Gossamer Forum
Quote Reply
detail_page.cgi updated
I've updated detail_page.cgi to version 2.1.1

It needs to run with version 2.1.1

I fixed a few things, and came up against a few bugs that needed to be addressed.

1) I noticed ClickTrack files were not updated/deleted unless you did a build. People running dynamic sites don't do that. Early versions of Links SQL had jump.cgi checking to see if the hit was old or not. The current version didn't. The ClickTrack file could grow out of control.

-- the fix was to add code to check the 'Hit' record, and a parameter 'delete_by' that you can set to determine how long a Click record should stay around.

2) I noticed also that the time format is stored as %yyyy%%mm%%dd%%hh%%mm%%ss%% which is *not* the Links default time format. build.cgi doesn't seem to acknowledge this, and uses 2-days as a format, which allows 24-hour slush. Anyway, the current detail_page.cgi converts the time format, so that the ClickTrack s are deleted/updated properly.

3) I added error reporting and checking, which is more consistent with Links, and it uses the standard error.html as output if an error occurs.

4) cleaned up some old version Links variables, and constructs.

I'm attaching the file here as a .tar, since it has a *lot* of changes, and want some people to check it out before I replace the download area version.

Actually, with minor modifications, you can use this to search on any field, and return/count results. These changes are the basis of the domain_display.cgi running on http://identitydots.com


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Quote Reply
Re: [pugdog] detail_page.cgi updated In reply to
Pugdog,

How do I install the files. Its been two years since I last worked with perl and linksql.

Thanks,

funodie Tongue
Quote Reply
Re: [funodie] detail_page.cgi updated In reply to
Go to your admin area

Click Plugins > Plugin Download



Hope that helps Smile
Quote Reply
Re: [funodie] detail_page.cgi updated In reply to
Hi,

To install this one, you'd download this file, to your pc, then in the plugins area of your admin, you'd browse to where you dowloaded this file, and have links upload it. Then go through the normal install procedure.

This is pretty much a full rewrite, all the important parts have changed, so I want to make it runs on other sites before I replace the download area copy.


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Quote Reply
Re: [pugdog] detail_page.cgi updated In reply to
Pugdog:

This updated version is working well on my site. It also installs a lot easier than previous versions (all paths are correctly identified and updated in the cgi). Previous versions required a manual update.

Well done ... and thanks,



Clint.
--------------------------
http://AffiliatesDirectory.com
The Affiliate Programs Directory
Quote Reply
Re: [Clint] detail_page.cgi updated In reply to
Hi,

Great plugin! I noticed a problem or a bug. Sites that are not validated shows up to with pointing to his/her ID#. How can I add the following:

If isValidated = 'No' then Error page?

Thanks.
Quote Reply
Re: [pugdog] detail_page.cgi updated In reply to
Figured it out:

if (! $link or ($link->{isValidated} eq 'No')) {
Quote Reply
Re: [mrcry11] detail_page.cgi updated In reply to
Hi,

Let me check this, and I'll probably change it. It's a hold-over from my original file-upload system, which allowed users to modify/change/view their own not-yet-validated files. I fixed that in the alpha_bar awhile back, but missed it again here.

Thanks,


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Quote Reply
Re: [pugdog] detail_page.cgi updated In reply to
Hi

Just downloaded the new version 2.1.1 and it seems to work well - however if you use Category Templates they are not included on the detailed pages - just seems to be using the default.

Any fix for this?

Klaus

http://www.ameinfo.com
Quote Reply
Re: [klauslovgreen] detail_page.cgi updated In reply to
Hi,

I've been off line for almost 3 weeks, my DSL line was cut due to a "software upgrade"by verizon, and it took 2.5+ weeks to get the new hardware and get me back into the system. <sigh> <grump>

I'll see about updating this. It shouldn't be more than a line or two of code.


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Quote Reply
Re: [pugdog] detail_page.cgi updated In reply to
Ok pugdog - sounds good :-)

Klaus

http://www.ameinfo.com
Quote Reply
Re: [klauslovgreen] detail_page.cgi updated In reply to
I'm also going to add the "purge" check for ClickTrack table.

I realized (startlingly) that table is only purged when a site is "built" staticly or the tables are repaired. This can lead to accounting problems....


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Quote Reply
Re: [pugdog] detail_page.cgi updated In reply to
I'm still trying to get all these updated, but here is a minor fix for something I overlooked before. The User information was not being passed to the detailed template. You need to modify the following line:


print Links::SiteHTML::display ('detailed', {%$link,%$IN,%$USER});

I have to think about passing %$IN, but for now it makes sure all the data is passed. This little script is under going a major rewrite, as above.


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Quote Reply
Re: [pugdog] detail_page.cgi updated In reply to
You are passing in %$IN which is the entire CGI object, you'd be better using:

%{$IN->get_hash}
Quote Reply
Re: [Paul] detail_page.cgi updated In reply to
Probably, but I'd do it as:

my $in = $IN->get_hash;

and then pass %$in as there tends to be some random issues with passing complex data structure strings. These big long complex statements look cool, but there is often less trouble with a few shorter ones.


Actually, as I said, %$IN isn't really needed, it was an afterthought. There *are* problems with passing $IN in any form -- ie: only data that has been somehow "approved" should be passed on.

That's probably why I didn't do it before... but I wasn't having users login either. $USER is needed to pass the login information on through. That was the main idea here.

With the power of the template parser, your programs that call it should really know what is being passed in to them, and what is being sent out. If you need to accept arbitrary variables, prefix them prefix_ and pick them out, and check them out before sending them on. It's easy to get lazy, and to get caught up in the power of passing hashes, but good protection never goes out of style :)

All these plugins are undergoing rework, and updating to a more "modern" logic for Links 2.1.2 and above.

Once Community is released, my progamming will probably be limited to scripts that work under that, as all my site networks will be sharing different community "shell" log ons. We have 3 main projects going on, so it looks like 3 "communities" will be enabled.

I'm just really out of *time* to do anything. I'm working on a stress-related, sleep-deprived heart attack as it is.


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Quote Reply
Re: [pugdog] detail_page.cgi updated In reply to
Quote:
Probably, but I'd do it as:

my $in = $IN->get_hash;

and then pass %$in as there tends to be some random issues with passing complex data structure strings.

It has worked everytime for me without fail. Maybe it was the surrounding code causing inconsistencies.

What "random issues" did you experience?

Quote:
These big long complex statements look cool, .

Haha, I wouldn't label it as big and complex.

Quote:
but there is often less trouble with a few shorter ones

Sure, if you feel more comfortable with a step by step layout then its a personal decision I guess.

Last edited by:

Paul: Jan 10, 2003, 2:58 AM
Quote Reply
Re: [Paul] detail_page.cgi updated In reply to
I just do most of my programming at night, and I have had problems with -> symbols in passed complex data structures. Sometimes, the perl parser seems to get confused. I can't put it any other way. After a few times of trying to deal with it, simplifying the process and passing simple variables in has worked repeatedly.

So, I assign all these structures to simple variables, and pass those.

Yes, it is preference, but it does avoid a lot of hair pulling at late hours, and I'm running short of hair.


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Quote Reply
Re: [pugdog] detail_page.cgi updated In reply to
I've never known perl to get confused, more often than not it is the person writing the code :)

I have pulled my hair out in the past when perl has refused to do what I want and in 100% of the cases perl turned out to be the winner and it was human error causing any issues Blush

Quote:
with -> symbols

It is a dereference operator.

Last edited by:

Paul: Jan 10, 2003, 9:49 AM
Quote Reply
Re: [Paul] detail_page.cgi updated In reply to
Actually, for the purposes of simplifying life, it doesn't matter who is right, human or computer, or what the "correct" syntax is. The end result is the same. Perl has subtleties that at 4am are not really something you want to find you've spent the last 3 hours dealing with.

So, I always simplify my statements, and keep what little hair I have left.

"performance" isn't an issue, as so many other things factor in, that the extra confusion doesn't ever pay off.

It's whatever makes you comfortable, and in Pittsburgh, they say "It's right over there, but you can't get there from here." With perl, "It's right over there, and you can get there any way you want."


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.