[geeklog-devel] Bug 0000775 - proposed solution

Sean Clark sc1245 at messiah.edu
Mon Mar 23 22:33:07 EDT 2009


This may seem like an idiotic question, but what are the templates and their
connection to the calendar on Geeklog? 

>The idea with the test is a good one. However, assuming that really all
>the links in question are generated by COM_createLink, I would write a
>wrapper function in the Calendar that does the test and calls
>COM_createLink accordingly. Then change all the calls to COM_createLink
>in the Calendar to calls to that wrapper function.

Templates aside, I think I corrected the problem using the concept above as
far as all links on calendar/index.php go. It works fine on my computer,
adding rel="nofollow" into all links previous to the current date or over 12
months in the future (roughly 12 months, I used a static figure for months
in seconds), of course leaving the 12 easily accessible for change to the
desired value in the function. I'll wait to hear what these templates are
before getting too excited...

- Sean

>>> "Dirk Haun" <dirk at haun-online.de> 03/21/09 8:24 PM >>>
Sean Clark wrote:

>These links are all generated using COM_createlink.

Haven't checked myself, but there may be some more links lurking in the
templates.


>4) Insert an conditional statement COM_createfunction that will execute (3)
>if the $url contains /calendar/.

That sounds wrong. You're proposing to introduce code specific to one
plugin into a generic function.


>Using
>/calendar/ is the best way I can think of to ensure this is being applied
>only to calendar links, unless they universally have a $content that could
>be checked (I didn't see one). 

The idea with the test is a good one. However, assuming that really all
the links in question are generated by COM_createLink, I would write a
wrapper function in the Calendar that does the test and calls
COM_createLink accordingly. Then change all the calls to COM_createLink
in the Calendar to calls to that wrapper function.

Or, for a more generic approach, change COM_createLink so that it
accepts a callback function for the attributes (instead of passing them
as an array). Then implement that callback function in the Calendar and
again do the test there.


>If these sorts of things aren't discussed on this mailing list, my
apologies

No worries. This is our development list after all :-)

bye, Dirk




More information about the geeklog-devel mailing list