PDA

View Full Version : Semi-automated link adding


Anonymous
06-21-2005, 08:51 PM
I have been searching for a link directory script for a long time, and this is the best one I have found yet. I love the link validation.

There is one feature that I have not been able to find anywhere. I would like to be able to add links by simply selecting a category and entering the url. A script would then take the site's title and description from the site's <title> and <meta description> tags. This doesn't need to be a complicated robot, and it would also make the link validation even more useful by updating any titles and descriptions that have changed.

Thank you for a wonderful script!

David
06-21-2005, 09:07 PM
Yes, I have seen this before on other scripts.
It could certainly be done, but it would involve reworking some things in the code. We have quite a workload right now, but if you end up sticking around, I promise we will get it done eventually. :)

Anonymous
06-23-2005, 12:41 AM
Awesome! Thanks.

Tobab
08-07-2005, 07:53 PM
It would be very great!

David
08-07-2005, 09:21 PM
Thanks for your interest. This one will have to wait until after the Final Release, unless we happen to get a nice sized donation to help with the costs.

oldford
06-30-2006, 06:26 AM
I know this is a really old thread, but the idea is great. Was there any more progress made on this?

oldford
06-30-2006, 06:37 AM
To add to this...Gossamer Links 2.0 has a mod that's similar to this. Basically it's just a bit of java script that you save as a bookmark. Then you browse to the site you want added, click the bookmark, and your admin "add a link" page comes up with most of the fields already filled in from the meta tags.

Here's what the script looks like. It's cgi based, but maybe something similar can be modified for phpLD?

javascript:Q='';if(top.frames.length==0)Q=document .selection.createRange().text;void(btw=window.open ('http://your-example-site.com/cgi-bin/admin/admin.cgi?db=links&add_form=1&URL='+escape(location.href)+'&Title='+document.title+'&Description='+escape(Q),'AddToLinks','menubar=1,lo cation=1,resizable=1,scrollbars=1,status=1,toolbar =1'));btw.focus();

Tim_Myth
06-30-2006, 04:32 PM
The downside to the original poster's request (if I understand it correctly) is the speed issue. If each title and discription is dynamically pulled from the target URL every time the page is loaded, that means your web server will be making an request for every link on the page. If you have your directory set to 10 links per page, that's 10 requests. Even if each request only takes 1 second to complete, you have just increased the load time of your page by 10 seconds. Further, what do you do if a site is down? Display nothing? Display a time out error? Display the old Title/Description? Plus, what about the increased bandwidth? On my main directory, I get 10000 pageviews to my rss.php file a month. This is due to the large number of sites that use my rss feeds from my directory. Would you want to list your site in a directory that consumes an extra 10-50 MB of your bandwidth just so it can display current Title or Descriptions?

As for the Gossamer Links thing, this would be a fairly simple app to program for Firefox thanks to XUL.

oldford
06-30-2006, 04:43 PM
Tim_Myth, I agree that doing it that way would be way too resource intensive.

Content visible to registered users only.

Maybe I misunderstood, but the way I read the original post was that the title and description information would be only pulled off when the link was first added by admin. It would basically populate the fields on the "add a link" page. The info would then be hard coded into the phpLD database. So you wouldn't be accessing that info every time a phpLD page was generated.

The original poster did also mention that it would be a way of keeping the title and description info fresh, but to me that meant when you ran the phpLD link validation it would go out and find any updated info.

Tim_Myth
07-05-2006, 05:11 PM
Now that does make sense. Adding it to the submit part shouldn't be too terribly tough. I've subscribed to this thread and try to look at this more in depth when I have time. Don't hold your breath though...I have two huge projects I'm working on.

jas
07-18-2006, 08:46 PM
Content visible to registered users only.

Have you had any progress on this mod yet. I am very interested in it as I am sure others would be too. If you could publish this mod on the forums, it would be a valuable and worthwhile contribution to phpLD and it's members.

Tim_Myth
07-18-2006, 10:54 PM
No. I haven't had time to look at it even. My off-the-top-of-my-head thought is that you can easily create an html request with php that will "scrape" content from another page, and that is essentially all this mod is. You are simply scraping the description meta tag, title, etc. from the target page. These are quite simple to find assuming you can parse the html DOM with PHP (which I'm sure you can, but I've never done it). For that matter, you could probably use Javascript to pull the title and description of the page during the link submit portion (but not the link validate portion). Maybe this thought will give someone with enough free time the direction they need to do this mod.