Forum Moderators: coopster

Message Too Old, No Replies

Registering a variable on forum list?

         

FreeStyleMan

7:24 am on Oct 29, 2010 (gmt 0)

10+ Year Member



Hey guys.

I'm trying to register a variable called '$channel' on /index.php (the forum list) so I can use it with a stats block. Would anyone have any idea how to do such a thing? (Only thing stopping me from finishing a product )

If anyone could help, that'd be great.

enigma1

8:20 am on Oct 29, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Assuming sessions are working (started) in your index.php you can do

if( !isset($_SESSION['channel']) {
$_SESSION['channel'] = 123;
}
Where 123 is the value you want to assign to the $channel var

Then you can use it

$channel++;

FreeStyleMan

8:28 am on Oct 29, 2010 (gmt 0)

10+ Year Member



Thanks for your response,

I also need to know how to use the PHP backend to add $channel to the forum list. Has nothing to do with templates. :/

enigma1

8:43 am on Oct 29, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You use a plain text editor to edit php files. But forum s/w is not a single script. You will need to find out which php script processes the forum list.