Posted on: 01/05/06 01:48am
By: inquest750
I need help in making certain blocks appear within about 5+ different sets of topics. Is there a way I can enter code in the actual article.php file so that with certain topics it ALWAYS pulls up certain blocks? Basically I want to be able to tell geeklog that is any of these articles are called, please always display these "blocks", if these articles are displayed , please display these blocks instead. I know that you can adjust this functionality within the admin but I need something where I can set these permissions for at least 4 articles per set. This would really help me accomplish a huge task with great ease. I am even willing to pay an amount for a hack like this.
Blocks Under Multiple Topics
Posted on: 01/06/06 04:37pm
By: inquest750
Dirk, any suggestions other than creating a WHOLE LOT of blocks for each topic?
Blocks Under Multiple Topics
Posted on: 01/06/06 04:43pm
By: Dirk
Nope.
Geeklog does not support multiple topics, sorry.
bye, Dirk
Blocks Under Multiple Topics
Posted on: 01/07/06 02:27pm
By: inquest750
[QUOTE BY= Dirk] Nope.
Geeklog does not support multiple topics, sorry.
bye, Dirk[/QUOTE]
ok, so I have a question then. When you create a block and specify the "Topic" in which for it to display. Where is that code written? What file specifically?
Ricardo
Blocks Under Multiple Topics
Posted on: 01/07/06 05:16pm
By: LWC
public_html/lib-common.php
Mostly function COM_showBlocks
If I were you, I'd use PHPMyAdmin to manually change your chosen block's tid to something like "all, topicX, topicY, etc." - that is, a comma separated list (with spaces so it's more comfortable) of topics' names instead of just one,
that starts with "all"' (e.g. "all, news, general").
Then, change this part in the aforementioned function
if( !empty( $topic ))
{
$sql .= " AND (tid = '$topic' OR (tid = 'all' AND type <> 'layout'))";
}
to
if( !empty( $topic ))
{
$sql .= " AND (tid LIKE ', $topic' OR (tid = 'all' AND type <> 'layout'))";
}
I've simply changed
"tid = '$topic'" to
"LIKE ', $topic'".
But you'd have to re-prepare that list in MyPHPAdmin each time after you edit your block in Geeklog (assuming you can even edit it in Geeklog without changing it back to using only one topic first).