Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Blocks
Author Message
NoFantasy
Worker
Worker



Joined: Apr 26, 2005
Posts: 114

PostPosted: Sun Dec 10, 2006 9:19 am Reply with quote

Basically i'm looking for a way to reuse the assigned vars made in the forum in a right block. I don't want to make new SQL's or something like it, just grab the already made vars and put it into a block.

I could of course make me a template with some sort of right block, however this would require editing loads of template files.

I could look something like this
Code:
if ( !defined('BLOCK_FILE') ) {

    Header("Location: ../index.php");
    die();
}

define('IN_PHPBB', true);
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);

$content = "{TOTAL_POSTS}";

That doesnt work of course, just trying to show how i want it to be.

Anyone think this would be even possible?
 
View user's profile Send private message
kguske
Site Admin



Joined: Jun 04, 2004
Posts: 6433

PostPosted: Sun Dec 10, 2006 11:00 am Reply with quote

You might look at some of the existing forums blocks to see how to see how they work.

_________________
I search, therefore I exist...
nukeSEO - nukeFEED - nukePIE - nukeSPAM - nukeWYSIWYG
 
View user's profile Send private message
evaders99
Former Moderator in Good Standing



Joined: Apr 30, 2004
Posts: 3221

PostPosted: Sun Dec 10, 2006 9:59 pm Reply with quote

Unfortunately TOTAL_POSTS is one of those variables that are created in the specific Forums files.. modules/Forums/index.php

Assuming that file is run, your block could read from $total_posts - otherwise it is not assigned and you would need to do a query. I would just say do another query, it will not add that much overhead for just a COUNT

_________________
- Star Wars Rebellion Network -

Need help? Nuke Patched Core, Coding Services, Webmaster Services 
View user's profile Send private message Visit poster's website
NoFantasy







PostPosted: Tue Dec 12, 2006 10:24 am Reply with quote

...feels like i'm chewing a gum 10 times bigger than my mouth, lol

I probably have to choose between one of two methods first... Either a standard nuke block with additional queries or some sort of floating div injected into page_header, showing to the right of the forums module with the content.

Thanks for the feedback, i think i have to figure out how i actually want this stuff to work before i move on.
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Blocks

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©