freetag plugin patch

Creating and modifying plugins.
Post Reply
stain
Regular
Posts: 10
Joined: Tue Jun 07, 2005 7:11 pm
Contact:

freetag plugin patch

Post by stain »

hi all

already posted on the ML, but no reply, so I post it here.

I modified freetag plugin, in order to let him display related posts based on tags, when viewing a post. related posts are listed below the post footer. I also added few configs and did translate freetag in italian.

one major change on freetag behaviour is that tags are no longer displayed after footer (using "add_footer" field) but are enclosed at the end of the entry body or extended body. this is better for usability and design, imho.

I just have some problem when dealing with preview in the administration interface: for entries without extended body it seems not able to get related posts, due to an inconsistent tags array. see line 690 on serendipity_event_freetag.php file.

here you can see it in action on the front side:

http://www.mucignat.com/blog/archives/3 ... itory.html

and here you can download modified files:

http://www.mucignat.com/download/serend ... reetag.zip

I just modified these files:

serendipity_event_freetag/lang_en.inc.php
serendipity_event_freetag/lang_it.inc.php (new)
serendipity_event_freetag/serendipity_event_freetag.php

hope you can merge it in the next release and fix somehow where needed. this is the first time I modified a plugin, so I'm not sure 100% of my work.

:-)

bye, Alberto.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: freetag plugin patch

Post by garvinhicking »

Hi!

Thanks a lot for your help! I'll reply here, since you crossposted to the ML. Please be patient about response times below 12 hours :-D

I've changed your patch a bit on a few issues, and needed to integrate the latest changes in the freetag plugin into your patch. Then I also made a config switch if the tags are put in footer or entry body. I personally dislike the tags being put in the footer/entry body,

I also fixed the preview problem.

The fixed files are committed to CVS, you should be able to get the ZIP file with updated files soon via Spartacus on netmirror.org. SF.Net anonymous CVS is still not being synchronized. :-(

Best 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/
stain
Regular
Posts: 10
Joined: Tue Jun 07, 2005 7:11 pm
Contact:

great

Post by stain »

tnx gavin.

i look forward to see your changes ;-)

bye, alberto.
robert
Regular
Posts: 1063
Joined: Mon May 09, 2005 9:17 pm
Location: Vienna, Austria
Contact:

Post by robert »

I´ve installed Freetag 2.44.

When I open an entry (which no tag) I see in the footer
Warning: implode(): Bad arguments. in ..../blog/plugins/serendipity_event_freetag/serendipity_event_freetag.php on line 296
When I open an entry with tag, there is only the problem, that I don´t see the tags related to the entry.
Von 2005 bis 2020 nutzte ich Serendipity/S9y. Auch nach meinem Umstieg bin ich S9y weiterhin in Gedanken verbunden. Ein Dank ergeht an alle Forumsteilnehmer:innen, die mir hier weitergeholfen haben.

Nur ein Blog
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

Thanks for reporting that error! Fixed in 2.45.

Did you enable the option to show related tags in the freetag config? And it only shows related entries if you have any other entries with the same tags...at least in my test it worked?!

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/
robert
Regular
Posts: 1063
Joined: Mon May 09, 2005 9:17 pm
Location: Vienna, Austria
Contact:

Post by robert »

Hello Garvin,
all items are enabled.

The Tags are not shown only in the normal entry list (startpage). You can see it at my site http://www.robertlender.info/blog/archives/2005/09.html - the first two entrys have a tag "Serendipity" but it is not shown.

Before the Update to 2.44 it worked.

Regards
Robert
Von 2005 bis 2020 nutzte ich Serendipity/S9y. Auch nach meinem Umstieg bin ich S9y weiterhin in Gedanken verbunden. Ein Dank ergeht an alle Forumsteilnehmer:innen, die mir hier weitergeholfen haben.

Nur ein Blog
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi Robert!

You're right, they way of writing something into the add_footer of an entry might cause problems. I just committed a change to this also to version 2.45 of the plugin, maybe you can try it tomorrow?

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/
robert
Regular
Posts: 1063
Joined: Mon May 09, 2005 9:17 pm
Location: Vienna, Austria
Contact:

Post by robert »

I will try it tomorrow afternoon.
Thank you
Robert
Von 2005 bis 2020 nutzte ich Serendipity/S9y. Auch nach meinem Umstieg bin ich S9y weiterhin in Gedanken verbunden. Ein Dank ergeht an alle Forumsteilnehmer:innen, die mir hier weitergeholfen haben.

Nur ein Blog
robert
Regular
Posts: 1063
Joined: Mon May 09, 2005 9:17 pm
Location: Vienna, Austria
Contact:

Post by robert »

I´ve installed 2.45. Everything seems to be fine!

Thanks, Garvin!

Regards
Robert
Von 2005 bis 2020 nutzte ich Serendipity/S9y. Auch nach meinem Umstieg bin ich S9y weiterhin in Gedanken verbunden. Ein Dank ergeht an alle Forumsteilnehmer:innen, die mir hier weitergeholfen haben.

Nur ein Blog
krist
Regular
Posts: 17
Joined: Sun Apr 09, 2006 7:54 pm

Post by krist »

I've updated the German language file to fit version 2.4.8, in case anyone is interested:

Get the ZIP here
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

Thanks a lot, I committed your translation update!

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/
krist
Regular
Posts: 17
Joined: Sun Apr 09, 2006 7:54 pm

Post by krist »

You're welcome! I just noticed there were some typos in it, you'll find a corrected version at the above location now.
Last edited by krist on Fri May 26, 2006 2:31 pm, edited 1 time in total.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Thanks again! Just 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/
Post Reply