Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

[RELEASED] Bad Link Reporting Plug-in

Quote Reply
[RELEASED] Bad Link Reporting Plug-in
Ok,

I hacked this really quickly, and didn't check it really well. But, it's the script I had in the forum back about 6 months ago, and should work.

It installs as a plug-in, but uses no hooks. Creates a bad-link table, copies a file to the cgi-bin area, and a template to the templates directory. The only variable it outputs is < % status % > so you can use your existing error.html, rename it, and change < % errors % > to < % status % > to work.

No admin features, but with MySQLMan you can quickly see which links are not good.

I've been meaning to add in extra features, but this is a rough hack. Really.
Maybe using searchlogger.pm I can quickly add in some view/manage features. The principle should be exactly the same.

Let me know.


PUGDOGŪ Enterprises, Inc.
FAQ:http://LinkSQL.com/FAQ
Forum:http://LinkSQL.com/forum
Quote Reply
Re: [RELEASED] Bad Link Reporting Plug-in In reply to
hello
I've downloaded your bad_link plugin, and checked the upload & permissions.

when I call http://www.ridesworld.com/cgi-bin/meo/bad_link.cgi
it works fine, the standard error template will be loaded.
Now I do
http://www.ridesworld.com/cgi-bin/meo/bad_link.cgi?ID=1
I get an Internal server Error.
I checked the permission of the template bad_link.html
this was 777, but must be 666
although it gives the error.
the admin path in bad_link.cgi is correct.

I have no idea what's going wrong, check it yourself, I have 2 links in the database for test.



Quote Reply
Re: [RELEASED] Bad Link Reporting Plug-in In reply to
can you tell me what the server error logs say when that happens?



PUGDOGŪ Enterprises, Inc.
FAQ:http://LinkSQL.com/FAQ
Forum:http://LinkSQL.com/forum
Quote Reply
Re: [RELEASED] Bad Link Reporting Plug-in In reply to
Ok,

Put up a new version that fixes the problems, fixes some that were not so obvious, and also starts to give some "link reporting" functionality.

Let me know.

PUGDOGŪ Enterprises, Inc.
FAQ:http://LinkSQL.com/FAQ
Forum:http://LinkSQL.com/forum
Quote Reply
Re: [RELEASED] Bad Link Reporting Plug-in In reply to
Same problem here. (internal server error) with new release.

Regards
Abd

http://www.idleb.com
Quote Reply
Re: [RELEASED] Bad Link Reporting Plug-in In reply to
sorry, but an internal server error will stay with the newest release.
I checked & changed the permission of the template to 666 but it still happen again.

I think, that there is a bug in the module which load the bad_link template with the required link content from the database.

Quote Reply
Re: [RELEASED] Bad Link Reporting Plug-in In reply to
Can either of you tell me what the error logs say?

It's working fine on my site, really!!!

I fixed all the little bugs, it reports the bad link, it knows if a link has been reported, and it even lists the reported bad-links.

Really, this is working!!

PUGDOGŪ Enterprises, Inc.
FAQ:http://LinkSQL.com/FAQ
Forum:http://LinkSQL.com/forum
Quote Reply
Re: [RELEASED] Bad Link Reporting Plug-in In reply to
Hi,

Just a small comment about the plugin (looks good by the way!):

In your table you add, if you make LinkID a foreign key to Links.ID, then whenever a link is removed, all corresponding entries in the BadLinks table will be erased (keeping it clean). You can do this by saying:

$new_table->fk ( { Links => { LinkID => 'ID' } });

It's FOREIGN TABLE NAME => { YOURCOLUMN => FOREIGN TABLE COLUMN }.

Cheers,

Alex

--
Gossamer Threads Inc.
Quote Reply
Re: [RELEASED] Bad Link Reporting Plug-in In reply to
Ahah!

So that's how that works :)

Cool beans. It's in the next release :)

As for looking good, I assume you mean from a plug-in point of view :)
It's still an ugly hack, but at least it installs itself <G>


PUGDOGŪ Enterprises, Inc.
FAQ:http://LinkSQL.com/FAQ
Forum:http://LinkSQL.com/forum
Quote Reply
Re: [RELEASED] Bad Link Reporting Plug-in In reply to
here is what i have in my log:

[01/Mar/2001:06:13:35 -0600] "GET /cgi-bin/links/bad_link.cgi?ID=15 HTTP/1.1" 500 539

Regards
Abd

http://www.idleb.com
Quote Reply
Re: [RELEASED] Bad Link Reporting Plug-in In reply to
A fatal error has occured:

Undefined subroutine &Links::Plugins::get_plugin_user_cfg called at Bad_Link.cgi line 56.

Please enable debugging in setup for more details.
i tried moving the line $BAD_LINK_CFG = Links::Plugins::get_plugin_user_cfg ('Bad_Link'); thinking that it would need that line sooner and it worked, but it didn't add it to the link to the table but it game me a confirmation screen.

Quote Reply
Re: [RELEASED] Bad Link Reporting Plug-in In reply to
Ok,

That helps. I'll bet the use statement is missing in the copy you have.

I'll update the site tonight, with another bug fix version.

Thanks....

BTW... this _really_ was/is working for me, and I post the copy I am using to the download site!

NOTE: I checked, and I'll bet it was what I thought. Another typo, but why it works for me, I don't know. Try it now.


PUGDOGŪ Enterprises, Inc.
FAQ:http://LinkSQL.com/FAQ
Forum:http://LinkSQL.com/forum
Quote Reply
Re: [RELEASED] Bad Link Reporting Plug-in In reply to
in responce : but why it works for me, I don't know. Try it now

I think you are just the lucky guy :).
ok here is a hint upon following up the install script is not creating the Bad_link colum in the link table at all and that is why the script runs when you call it as a stand alone and not with an ID... I guess

hope that helps

Regards
Abd

http://www.idleb.com
Quote Reply
Re: [RELEASED] Bad Link Reporting Plug-in In reply to
Geeezeeee......

I never even thought of that! All my databases already have that column in it, when I clone a database, that column is automatically cloned. Version 'c' will fix that. Coming right up!

See why I need people to try these things before "general" release!

Thanks!


Ok.... that wasn't it. I don't write to the link record, only the Bad_Link table. There is no bad_link column! The link is not altered in the Links database, only recorded in the Bad_Link table. Is that table being created?

The Recommend_It mod writes to a column in the Links table. That works, people have told me so.

I can prove that this mod works! I'll set it up to work on the FAQ, and see if people report errors in a live situtaion.


PUGDOGŪ Enterprises, Inc.
FAQ:http://LinkSQL.com/FAQ
Forum:http://LinkSQL.com/forum
Quote Reply
Re: [RELEASED] Bad Link Reporting Plug-in In reply to
I don't think I made any real changes, but "DROP" the Bad_Link table, and re-install.

Also, what might have tripped you up, is I got rid of the "s" on everything, to the script, tar, module, and table are all "Bad_Link" although the script is lower case, and everything else is mixed case.



PUGDOGŪ Enterprises, Inc.
FAQ:http://LinkSQL.com/FAQ
Forum:http://LinkSQL.com/forum
Quote Reply
Re: [RELEASED] Bad Link Reporting Plug-in In reply to
Hello Pugdog
I still have the error, and I have no Idea how to fix it
I have send you an email with access details to the server, and urls, so you can take a look there.


Quote Reply
Re: [RELEASED] Bad Link Reporting Plug-in In reply to
Same here

I will be upgrading to Links 2.0.3 so I will give up on this plug in for now.
will get back on it soon

Regards
Abd

http://www.idleb.com
Quote Reply
Re: [RELEASED] Bad Link Reporting Plug-in In reply to
Ok.

I figured it out.

I had the wrong module loading, but it worked for me because I installed it on the FAQ site, and that is running 'speedy' so the required module was already loaded (at least that is what I'm assuming happened, because nothing else makes sense!)

I fixed it, it's working on your system, and the FAQ version has been updated to release 'c' which fixes this problem once and for all!


It would have been so much easier with the error log, since the log would have shown the errent function as not existing.


PUGDOGŪ Enterprises, Inc.
FAQ:http://LinkSQL.com/FAQ
Forum:http://LinkSQL.com/forum
Quote Reply
Re: [RELEASED] Bad Link Reporting Plug-in In reply to
thank you pugdog.
Now I know that access to the error log is neccesary, so that's for me one of the reasons to get my own dedicated server within 2 weeks, where I can get all access I need.