Welcome to Geeklog, Anonymous Sunday, May 19 2024 @ 10:11 am EDT

Geeklog Forums

Static Page vs Forum Centerblock Order


Status: offline

kilerb

Forum User
Regular Poster
Registered: 03/19/08
Posts: 119
Hi, on my site I have the Centerblock forum posts enabled, so you can see the last 6 posts... I have 3 things on my main page. 1 story, featured... The centerblock recent forum posts... I also have a static php page for a chatterbox centerblock. No matter what I do to the settings on the forum settings or the static pages settings, the forum board is always above the chatterbox. I'd like the forum at the top. When I set them both at "show at top of page" the chatterbox always wins and the forum is 2nd. I want the forum centerblock first. I've gone into the admin/configuration.php and adjusted the order to "order by name" and "order by block number" etc etc... but it still always puts the forum board below the chatterbox. How can I get the forum board posts at the very top?

Thanks!
 Quote

Status: offline

suprsidr

Forum User
Full Member
Registered: 12/29/04
Posts: 555
Location:Champaign, Illinois
I ended up creating a php_centerblock_staticpage for each and managing them that way.
But I'm wondering why my chatterblock centerblock function does not work?

Text Formatted Code

function plugin_centerblock_chatterblock ($where = 1, $page = 1, $topic = '')
{
    global $_CONF, $_USER, $cb_siteconfig;
    if (!$cb_siteconfig['public_access'] && $_USER['uid'] < 2) {
        return;
    }
    $block = new Template( $_CONF['path'] . 'plugins/chatterblock/templates/' );
    $block->set_file (array ('block'=>'centerblock.thtml'));
    $block->set_var ('content', COM_startBlock ('Leave a message...').phpblock_chatterblock().COM_endBlock());
    return $block->finish($block->parse('output', 'block'));
}
 


When enabled the whole page gets replaced instead of simply adding the centerblock why would that be?
Do certain plugins have centerblock privileges?

-s
FlashYourWeb and Your Gallery with the E2 XML Media Player for Gallery2 - http://www.flashyourweb.com
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Quote by: kilerb

No matter what I do to the settings on the forum settings or the static pages settings, the forum board is always above the chatterbox. I'd like the forum at the top. When I set them both at "show at top of page" the chatterbox always wins and the forum is 2nd.


That order actually depends on the order of the plugins in the database. There's no way to control this from within Geeklog, I'm afraid. You could try changing the order of the entries in the gl_plugins table in the database.

bye, Dirk
 Quote

Status: offline

suprsidr

Forum User
Full Member
Registered: 12/29/04
Posts: 555
Location:Champaign, Illinois
@Dirk

When enabled the whole page gets replaced instead of simply adding the centerblock why would that be?
Do certain plugins have centerblock privileges?


-s
FlashYourWeb and Your Gallery with the E2 XML Media Player for Gallery2 - http://www.flashyourweb.com
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
You don't seem to be checking the $where parameter. The centerblock function is called more than once, with different values for $where.

All centerblocks are equal - it only depends on the plugin order in the database (see above). But there can, of course, be only one centerblock to take over the entire page.

bye, Dirk
 Quote

All times are EDT. The time is now 10:11 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