PDA

View Full Version : Report Broken Link


sdawkins
08-16-2006, 02:12 PM
How would I apply a mod for someone to report a broken link or a link
violating TOS?

Thanks :)

Vincent Wright
09-06-2006, 11:49 AM
This is trivial mod, but requires php knowledge. I will try to outline the most important steps.

1. You have to create a Report page itself where visitors can select/type the reason for reporting. This should be a dynamic page since you have to pass link information on to admin once the report is submitted.

In the page you have to implement functionality to email the report to admin (you).

2. You will probably have to create a Thank You page that the visitor is taken to once the report is submitted.

3. You have to tweak link-display.tpl a little to include "Report" url next to each link in the listings.

That's all I suppose.

P.S.

I would be glad to help but I feel overwhelmed since we are preparing the new version and there are lots of things to do yet. Sorry.

sdawkins
09-06-2006, 11:59 AM
Thanks Vincent, I am using Cougar's mod :)

Vincent Wright
09-06-2006, 01:10 PM
Is it working good for you?

sdawkins
09-06-2006, 01:23 PM
Is it working good for you?


Noone has reported anything :)

Vincent Wright
09-06-2006, 02:11 PM
Ok, we wait.... ;)

sdawkins
09-06-2006, 02:34 PM
Hey Vincent,

Only problem I have with this, is the Link ID number does not come through (tried it myself). How would I add that ?

Thanks.
Sharon

Vincent Wright
09-06-2006, 06:53 PM
Please post a URL of your directory where you applied this mod (I see several links in your signature and not sure which one to check). I will take a look and will able to advise then.

sdawkins
09-06-2006, 06:57 PM
It is applied on the www.momapproved.org directory :)

Thanks,
Sharon

Vincent Wright
09-06-2006, 07:26 PM
As I see the Report Link page has id in url. It means that it is available on that page.

What confuses me is why do I have to type in Site Name and Site URL if this information can be fetched from the database given the link id.

And... does your question mean you don't receive link id in the email?

sdawkins
09-06-2006, 07:33 PM
That is the problem, it does not fetch any of that information.

sdawkins
09-27-2006, 04:21 PM
Has anyone gotten this to work so it shows the link id? I want to implement it in my directory with 4500 links but people do not want to have to type the URL.

Thanks :)

Vincent Wright
09-27-2006, 06:10 PM
Ok,

basically it's not very difficult to implement.

1. You have to fetch this info from the database, which is easy since link ID is passed to the page and there is a db class method for this. Then you have to pass the info on to template file

2. In the template file you can display link title and url.

So, here we go ...

1. Fetch info and pass it to template file

Somewhere in your report-link.php you have to put this:


$broken_link =& $gDirDb->getLinkById((int)$_GET['id']);
$gDirSmarty->assign_by_ref('broken_link', $broken_link);


2. Use the info in the template

In the template file you can display link url and title like this:


Link title: {$broken_link.title}<br/>
Link URL: {$broken_link.url}


I think that's all.

Vincent Wright
09-27-2006, 06:11 PM
Though, I know for sure this feature will be in the new version.

sdawkins
09-27-2006, 06:57 PM
:)

Well, on the other sites I can can wait.....

Still can't get anything to show in the email. Will remove it for now.