PHP Web Host - Quality Web Hosting For All PHP Applications Free RavenNuke(tm) Add Ons
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
Post new topic   Reply to topic
Author Message
NoFantasy
Worker
Worker


Joined: Apr 26, 2005
Posts: 114

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

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: 6044

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

You might look at some of the existing forums blocks to see how to see how they work.
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 Back to top

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
View user's profile Send private message Visit poster's website
NoFantasy
Worker
Worker


Joined: Apr 26, 2005
Posts: 114

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

...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.
View user's profile Send private message
Display posts from previous:       
Post new topic   Reply to topic

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
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2011 by Raven

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::
:: fisubice Theme Modified by the RavenNuke™ Team ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum