Autotitle

Creating and modifying plugins.
Post Reply
onli
Regular
Posts: 2829
Joined: Tue Sep 09, 2008 10:04 pm
Contact:

Autotitle

Post by onli »

Autotitle is a plugin that automatically insert the title of a linked site as title-tag into the link. This way, the user reading the blogentry normally sees a tooltip with a more clear description what the linked site is about when he hovers the link.

The plugin does this by fetching the first 4KB of the linked site and searching for the title-tag. Because this normally is located in the header (and in the first few bytes) it should be found every time it is present.
Because waiting for the other server's response may take a lot of time even if only fetching a small part it caches the title of the url, so the waiting time is only triggered once a week (the preview of a written post is enough for caching the entry, so a new post won't result in waiting-time for the first visitor).

Please give me a hint if something like this already exist.

This is version 0.1 which worked really well in my tests, but probably needs a lot more testing. I'll be glad about every feedback: Download.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Autotitle

Post by garvinhicking »

Hi!

This looks good. I don't really remember any plugin that specifically deals with this. The trackexits plugin does something similar in regards to <a> matching, but its functionality is quite different.

Would you like me to add your plugin to Spartacus?

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
onli
Regular
Posts: 2829
Joined: Tue Sep 09, 2008 10:04 pm
Contact:

Re: Autotitle

Post by onli »

Yes, that'd be great. Tested it today with my "productive"-blog and seemed to work well.
sincerely

PS. Ah, testing revealed there was a debug-line still present... better use the attached version. I also removed some requirements, I don't think smart is really required in a specific version (but maybe you can have a look on these?).
Attachments
serendipity_event_autotitle-0.1.tar.gz
(20 KiB) Downloaded 327 times
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Autotitle

Post by garvinhicking »

Hi!

Great! Committed! :-)

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
onli
Regular
Posts: 2829
Joined: Tue Sep 09, 2008 10:04 pm
Contact:

Re: Autotitle

Post by onli »

I just got a report about invalid HTML on my site and it turned out that the plugin placed a " too much into the link. 0.1.1 fixes only this issue.
Attachments
serendipity_event_autotitle-0.1.1.tar.gz
(2.63 KiB) Downloaded 324 times
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Autotitle

Post by garvinhicking »

Hi!

Thanks & Committed.

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
konus
Regular
Posts: 334
Joined: Mon Jun 16, 2008 1:57 pm
Location: Dresden, Germany
Contact:

Problems with Autotitle

Post by konus »

Hello,
today, I tried to change something in my template. Because I did not see the effect immediately I deleted the content of template_c completely. After I did this, my blog did not work correctly any more and showed severe load problems with errors 500 and 503. :-(

I think that serendipity_event_autotitle creates the load. I shouldn't deleted the cache, because now autotitle polls every web page again.

But wouldn't be the load problem be the same, if someone installs the plugin the first time? Other than deactivation the plugin, what are my options to ease the server load?

Could the plugin be modified to spread the load over a greater amount of time (i.e. only pulls up to 10 new links at a time)?
Post Reply