Page 1 of 1

Freetag and Hide from article overview / frontpage

Posted: Mon Feb 05, 2007 11:45 pm
by WebReiter
Hi,

I am using the freetag plugin. If i marked a article as "Hide from article overview / frontpage" it also will not listed in the article overview to a tag.

How can i modify this. Is there a trick?

Webreiter

Re: Freetag and Hide from article overview / frontpage

Posted: Tue Feb 06, 2007 10:39 am
by garvinhicking
Hi!

I'm afraid but those options don't play nicely together. It would require patching at code level of the freetag plugin and the entryproperties plugin to make them interact.

Best regards,
Garvin

Posted: Tue Feb 06, 2007 1:52 pm
by WebReiter
Hi Garvin,

i don't know/find how these two plugins interact together. Can you give me more help.

I believe this code should be modifed in entryproperties?:
if (!isset($serendipity['GET']['category']) && !isset($serendipity['GET']['adminModule']) && $event == 'frontend_fetchentries' && $addData['source'] != 'search') {
$conds[] = " (ep_no_frontpage.property IS NULL OR ep_no_frontpage.value != 'true') ";
$joins[] = " LEFT OUTER JOIN {$serendipity['dbPrefix']}entryproperties ep_no_frontpage
ON (e.id = ep_no_frontpage.entryid AND ep_no_frontpage.property = 'ep_no_frontpage')";
}
But no plan how to mod freetag plugin.

Regards
Webreiter

Posted: Tue Feb 06, 2007 2:30 pm
by garvinhicking
Hi!

I believe the freetag plugin sets $serendipity['GET']['tag'] when it is being used to display something. So modifying the entryproperties code to something like:

[quote]if (!isset($serendipity['GET']['tag'] && !isset($serendipity['GET']['category']) && !isset($serendipity['GET']['adminModule']) && $event == 'frontend_fetchentries' && $addData['source'] != 'search') {
$conds[] = " (ep_no_frontpage.property IS NULL OR ep_no_frontpage.value != 'true') ";
$joins[] = " LEFT OUTER JOIN {$serendipity['dbPrefix']}entryproperties ep_no_frontpage
ON (e.id = ep_no_frontpage.entryid AND ep_no_frontpage.property = 'ep_no_frontpage')";
}[/code]

Might do the trick?

Best regards,
Garvin

Posted: Tue Feb 06, 2007 7:01 pm
by WebReiter
Hi,
Might do the trick?
not really. The variable $serendipity['GET']['tag'] is empty.

Best Regards
Webreiter

Posted: Wed Feb 07, 2007 10:06 am
by garvinhicking
Hi!

Hm. Then I just updated the freetag plugin to version 2.77, which will now set a global $serendipity['plugin_vars']['tag'] and $serendipity['plugin_vars']['displayTag'] variables on which you should be able to check.

Best regards,
Garvin

Posted: Wed Feb 07, 2007 1:12 pm
by WebReiter
Hi,

i tried the latest updated version 2.77, but it doesn't run on my site. Following variables are empty in serendipity_event_entryproperties.php at
case 'frontend_fetchentries':
case 'frontend_fetchentry':
$serendipity['plugin_vars']['tag']
$serendipity['plugin_vars']['displayTag']
$serendipity['GET']['tag']
$showtag

I don't know how to fix.

Best Regards
Webreiter

Posted: Wed Feb 07, 2007 1:58 pm
by garvinhicking
Hi!

Hm, the variables should be set if the entryproperites plugin comes AFTER the freetag plugin in the list of event plugins?

Did you check if $serendipity is declared 'global $serendipity' in the plugin's event_hook method?

Best regards,
Garvin

Posted: Wed Feb 07, 2007 4:34 pm
by WebReiter
Hi,
Hm, the variables should be set if the entryproperites plugin comes AFTER the freetag plugin in the list of event plugins?
yes, it is.
Did you check if $serendipity is declared 'global $serendipity' in the plugin's event_hook method?
yes, it is.

And nothing. I hardcoded the variables in freetag plugin with a value, but in entryproperties the variables are nevertheless empty.

safe_mod = off
register_globals = on

Best Regards
Webreiter

Posted: Thu Feb 08, 2007 11:40 am
by garvinhicking
Hi!

Hm, works for me with the mentioned freetag plugin update and this simple patch to serendipity 1.2:

http://svn.berlios.de/viewcvs/serendipi ... erties.php

Regards,
Garvin

Posted: Thu Feb 08, 2007 2:27 pm
by WebReiter
Hi,

now I have updated serendipity 1.1 complete again on a existing website, with your patched entryproperties v 1.14 and the freetag v 2.77
But it doesn't run yet. :shock:

Then i checked it with a fresh installation of serendipity 1.1 on another server and it runs. :o

So i think that there is something wrong with the updated installation. Perhaps the MySQL Database or template.


Best Regards
WebReiter

Posted: Thu Feb 08, 2007 2:53 pm
by garvinhicking
Hi!

Hm, the database didn't need updating - the only thing required to get it to work were the updated versions of the freetag and entryproperties plugin. Did you absolutely make sure the two files are updated on your existing website page?

Maybe you are using a different version than the files you updated?

Regards,
Garvin

Posted: Wed Feb 14, 2007 10:03 am
by WebReiter
Hi,

the problem is solved. There was a problem between the event_freetag and plugin_freetag.
After deinstalling both and reinstall with the latest versions it runs now.

Thank you for your help.

Best Regards
WebReiter