Page 1 of 1

freetag plugin patch

Posted: Wed Apr 19, 2006 7:56 am
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.

Re: freetag plugin patch

Posted: Wed Apr 19, 2006 11:32 am
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

great

Posted: Wed Apr 19, 2006 7:28 pm
by stain
tnx gavin.

i look forward to see your changes ;-)

bye, alberto.

Posted: Sat Apr 22, 2006 9:01 pm
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.

Posted: Sat Apr 22, 2006 9:07 pm
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

Posted: Sat Apr 22, 2006 9:36 pm
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

Posted: Sat Apr 22, 2006 9:59 pm
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

Posted: Sat Apr 22, 2006 10:10 pm
by robert
I will try it tomorrow afternoon.
Thank you
Robert

Posted: Sun Apr 23, 2006 4:54 pm
by robert
I´ve installed 2.45. Everything seems to be fine!

Thanks, Garvin!

Regards
Robert

Posted: Wed May 24, 2006 12:35 pm
by krist
I've updated the German language file to fit version 2.4.8, in case anyone is interested:

Get the ZIP here

Posted: Wed May 24, 2006 1:55 pm
by garvinhicking
Hi!

Thanks a lot, I committed your translation update!

Regards,
Garvin

Posted: Wed May 24, 2006 9:05 pm
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.

Posted: Fri May 26, 2006 1:53 pm
by garvinhicking
Thanks again! Just committed. :)

Regards,
Garvin