Gossamer Forum
Quote Reply
Two Mods
Ok I'm wanting add two new mods to system and I basically don't know where to start but I need your help. I want to create a "report link" section, I want to also create a preview image that is 120 x 90 on my categories, new links, top links, cool links section. Suggestions on how to do this are appreciated.
Quote Reply
Re: [LordStryfe] Two Mods In reply to
wow no one knows?
Quote Reply
Re: [LordStryfe] Two Mods In reply to
The first mod you want can be done using the Report Deadlink file attached here: http://www.gossamer-threads.com/perl/gforum/gforum.cgi?post=231984#231984

Not sure what you're wanting the other one to do...? Explain.


Leonard
aka PerlFlunkie
Quote Reply
Re: [PerlFlunkie] Two Mods In reply to
Familiar with Alexa? Similar to their site preview that shows up beside their listing of a site.
Quote Reply
Re: [LordStryfe] Two Mods In reply to
Well, there is a mod available that puts an image next to a link listing, search for Priority Logo Mod. It would easy to do, just add a line to your links.def file with a path to the directory containing a "snapshot" of each site's index page; a Print Screen type of thing, so you're saving an image of the page, and not the whole file. There are programs available that take good Print Screen shots, like this one for $17: http://www.atlantsoft.com/utils/ssm.htm

The code for Alexa's images looks like so: <img hspace="8" border="0" align="left" width="112" height="82" src="http://thumbnails.alexa.com/...://www.nps.gov/grca/"> (Search term was "Grand Canyon".)


Leonard
aka PerlFlunkie
Quote Reply
Re: [PerlFlunkie] Two Mods In reply to
Ok I've uploaded and configured the deadlink mod and everything works but the report.cgi file. It basically comes up with a 500 error. Suggestions?
Quote Reply
Re: [LordStryfe] Two Mods In reply to
I'm guessing you mean that the Report Deadlink option shows up, but then does not work? Did you put the report.cgi in the same place as the add.cgi, etc? Is it set to 755? More info helps solve problems...


Leonard
aka PerlFlunkie
Quote Reply
Re: [PerlFlunkie] Two Mods In reply to
It is set to 755 and is in the same location as the add.cgi and I did update the top line of the file the way it suppose to be. Thoughts.
Quote Reply
Re: [LordStryfe] Two Mods In reply to
Did you set the referer in report.cgi?

@referers = ('www.yoururl.com/cgi-bin/report.cgi','yoururl.com/cgi-bin/report.cgi','http://www.yoururl.com/cgi-bin/report.cgi');
# SPECIFY ACCEPTED REFERERS ABOVE!!!!


If yes, and still not working, try commenting out this part:

# Check the referer.
if (@referers) {
$found = 0;
foreach (@referers) {
$ENV{'HTTP_REFERER'} =~ /$_/i and $found++ and last;
}
if (!$found) {
&site_html_report_failure_form ("Auto submission is not allowed in this directory. Please visit the site to report a link.");
return;
}
}


Leonard
aka PerlFlunkie
Quote Reply
Re: [PerlFlunkie] Two Mods In reply to
Yes I did have those fixed. I don't quite understand the latter half of the message on commenting.
Quote Reply
Re: [LordStryfe] Two Mods In reply to
Just in case the referrer is causing a problem, you can comment it out using hash signs, like so:

# This line will not be read by perl.
# Neither will this one.
This one could be (if it was perl).
# But not this one.

However, the refer is not likely to cause a 500 error.
Explain in more detail what you did and what happens. I have this mod on my site, so I know it works.


Leonard
aka PerlFlunkie
Quote Reply
Re: [PerlFlunkie] Two Mods In reply to
I uploaded it through my CPanel filemanager. changed the referrers, set permissions and was done with that one.
Quote Reply
Re: [LordStryfe] Two Mods In reply to
Quote:
I did update the top line of the file the way it suppose to be.


You mean the path to Perl? Is it the same as what you have in other working files (add, etc)?


Leonard
aka PerlFlunkie
Quote Reply
Re: [PerlFlunkie] Two Mods In reply to
yes
Quote Reply
Re: [LordStryfe] Two Mods In reply to
Does your host/server have error logs? These generally will tell you what is wrong and what line to look at.


Leonard
aka PerlFlunkie
Quote Reply
Re: [PerlFlunkie] Two Mods In reply to
[Wed Oct 12 13:11:56 2005] [error] [client 67.104.175.195] Premature end of script headers: /home/wstw/public_html/cgi-bin/report.cgi
Quote Reply
Re: [LordStryfe] Two Mods In reply to
I'm still working on this so I tried to re-install the mod and made sure it was uploaded in ASCII. All mods are done exactly has it is stated but when I try to go to www.wespreadtheword.net/cgi-bin/report.cgi I get a 500 error. Also how are people suppose to report broken links via this mod? I never saw anything it it modifying the detail template for the listings.
Quote Reply
Re: [LordStryfe] Two Mods In reply to
Well, you're not to supposed to run the script directly, it needs an argument to tell it what to do. Try putting something like this in your link.html or detailed.html:

<a href="<%db_cgi_url%>/report.cgi?ID=<%ID%>">Deadlink?</a>

I looked through the mod instructions and did not see that it says to do this, but it is required. Another way to do it would be to add this to either or both places:

<a href="<%deadlink_url%>">Deadlink?</a>

Then put this in sub site_html_link and/or sub site_html_detailed in site_html_templates.pl:

deadlink_url => "$db_cgi_url/report.cgi?ID=$rec{'ID'}",


Leonard
aka PerlFlunkie
Quote Reply
Re: [PerlFlunkie] Two Mods In reply to
Thanks got it working