Topics

User Functions

Events

There are no upcoming events

What's New

Stories

No new stories

Comments last 2 weeks


Trackbacks last 2 weeks

No new trackback comments

Links last 2 weeks

No recent new links

NEW FILES last 14 days

No new files

Welcome to Geeklog Tuesday, June 18 2013 @ 11:27 PM EDT


 Forum Index > Support > General Geeklog Support New Topic Post Reply
 Static Page vs Forum Centerblock Order
   
kilerb
 08/10/09 08:13PM (Read 707 times)  
++++-
Regular Poster

Status: offline


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!

 
Profile Email
 Quote
suprsidr
 08/10/09 09:23PM  
+++++
Full Member

Status: offline


Registered: 12/29/04
Posts: 553
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?

PHP 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
 
Profile Email Website
 Quote
Dirk
 08/11/09 09:42AM  
AAAAA
Admin

Status: offline


Registered: 01/12/02
Posts: 13035
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

 
Profile Email Website
 Quote
suprsidr
 08/11/09 07:58PM  
+++++
Full Member

Status: offline


Registered: 12/29/04
Posts: 553
@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
 
Profile Email Website
 Quote
Dirk
 08/12/09 04:12AM  
AAAAA
Admin

Status: offline


Registered: 01/12/02
Posts: 13035
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

 
Profile Email Website
 Quote
Content generated in: 1.65 seconds
New Topic Post Reply

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