Welcome to Geeklog, Anonymous Thursday, June 20 2024 @ 02:57 am EDT

Geeklog Forums

Display any content in right-hand blocks

Status: offline

James Fryer

Forum User
Registered: 08/06/02
Posts: 17
I needed to display a different set of blocks in the right-hand column of one page. To do this I hacked the function COM_siteFooter.

This takes a Boolean parameter $rightblock which indicates whether or not to display the blocks.

I changed this to also support a string, so you can call COM_siteFooter($block_data) and it will display $block_data in place of the usual right hand blocks.

Here's the changes to COM_siteFooter (for v1.3.9 but I doubt if later versions differ much). At about line 1131, change the code after 'if ($rightblock)' as follows:

Text Formatted Code

   if( $rightblock )
      if (is_string($rightblock))
        $rblocks = $rightblock;
        $rblocks = COM_showBlocks( 'right', $topic );
   if( $rightblock && !empty( $rblocks ))


Ideally the $rightblock string should be formatted into blocks, but if your theme allows it you can put any text in there.

One place I see this being useful is the 'related items' panels on story pages, which at the moment don't always behave themselves.

All times are EDT. The time is now 02:57 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content