[geeklog-devel] Geeklog Topics - This is how they will work

Tom websitemaster at cogeco.net
Fri Sep 30 14:03:22 EDT 2011

Okay so I have started to think more about multiple topics  and child
topics. I am writing this to organize my thoughts and to make sure we are
all on the same page and agree with the direction I am taking (I am trying
to make things as flexible as possible while still using the current
framework).  This will affect Topics (duh!), Blocks, Articles and
Staticpages. For these changes Geeklog will have to keep track better what
topic the user is in or was just in. Currently we have a global variable
$topic that gets set in COM_siteHeader. It is set by seeing if there is a
topic variable in the url or if a story id is in the url. Since stories will
be able to have multiple topics and plugins (that support this) will have
the option to be assigned to one or more topics this will not work. Adding
the topic variable to the url string every time is not the answer either. I
am not really familiar with how Geeklog sessions work . could we add a topic
column to the session table (or somehow create a session variable) that we
can grab and set instead?


I will be adding fields (see below) to the topic edit form. At some point
this form should be redesigned and visibly show the topic structure (jQuery
Tree control maybe) but this is not something I am planning to tackle at the


Geeklog currently has 3 views: All Topics, Home Page and Topic. This will
not change. This means we are still only passing around one topic id in the
code though required functions will still have to gather all the child topic
ids if needed. When a topic is viewed, it can inherit items from child
topics. One of these inherited items are blocks.  Let's say this is our
topic tree:


A             -> B        -> E

-> C        -> F

                -> G

-> D        -> H


If we are viewing Topic A then all the blocks assigned to All Topics as well
as any of the child topics (B - H) will be displayed just as long as the
blocks are marked as inherited and the child topics are marked as inherited.
If the block is marked as not inherited then it is only viewed from within
that topic. If a topic is marked as not inherited then it  cannot be
inherited by a parent topic but it still can inherit from its own child
topics. If duplicate blocks are inherited (i.e. Block 12 is assigned to both
Topic C and E) then only one will be displayed.


When viewing topics, stories being displayed will follow the same logic as
blocks. The only exception is that a story will also have a default topic.
This will be used when viewing a story directly, and only if the last topic
viewed by the user is not known. 


For plugins, previously their only real option when it came to what blocks
are displayed was the All Topic option. For the Staticpages plugin I plan to
add the ability to specify if the page belongs to one or more topics. This
way when viewed directly a staticpage will show only the blocks of that
topic. Like stories though a staticpage will also require a default topic.
The other thing topics can affect in the plugin is search and the menu. I
would modify plugin_getmenuitems_staticpages to return only pages in the
menu that relate to the topic and child topics. Likewise when using the
advance search, the topic dropdown will be used if specified.


The only other change at the moment I will make is to update the Topics
block. The block will have to take into account hidden topics as well as
distinguish child topics by indenting them.


This is what I have come up with so far. Hopefully I have thought of most
things but please feel free to comment!


Here are the table changes:


New Topic Fields


Parent Id

-          Blank id = root



-          True/False = Inherit information from child topics (if topics and
topic assignments are set to inherit)



-          Topic is not viewable but it can be inherited. Inherit must be
true if Hidden is True

-          Not valid for root topics 


Featured Article

-          Used by articles



New Topic Assignments Fields



-          True/False = Allow individual objects to be inherited or not



-          True/False = If a story or plugin item is viewed and  has
multiple topics then this will be considered the default




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist8.pair.net/pipermail/geeklog-devel/attachments/20110930/fe70aa10/attachment.html>

More information about the geeklog-devel mailing list