is there a list of all variables used by phpbb...

This forum is now closed as part of retiring phpBB2.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

This forum is now closed due to phpBB2.0 being retired.
Post Reply
linuxoverwindows
Registered User
Posts: 82
Joined: Sun Feb 01, 2004 2:50 am
Location: Las Cruces, NM.
Contact:

is there a list of all variables used by phpbb...

Post by linuxoverwindows »

is there a list of all variables used by phpbb so i can make a page to see how theyre set when not logged in, logged in with each rank and admin so i know how i can use the variables within my websites? also, i noticed i used one variable so far that overlapped a variable within the phpbb environment.

thanks.
-rw-r--r-- 1 root root 69 Mar 12 00:00 core
http://www.yougetalife.com
mushroom mushroom

afterlife_69
I've Been Banned!
Posts: 630
Joined: Tue Nov 30, 2004 10:35 am

Post by afterlife_69 »

the only ones i know are: $template, $db, $userdata, $profiledata & $board_config

linuxoverwindows
Registered User
Posts: 82
Joined: Sun Feb 01, 2004 2:50 am
Location: Las Cruces, NM.
Contact:

variablist

Post by linuxoverwindows »

there was one $result since i had to change it in one of my own scripts...

i mean more like:
$userdata['session_logged_in']
$userdata['user_level'] (ADMIN or ANONYMOUS etc)

the arrays or whatever you call it... what im looking for is what variables get set and are dynamic according to login type and login status etc...

ive also noticed some $lang[] variables while digging through source.
i mean i can dig through all the code looing for all the variables, but i didnt know if for mod creators that there was some list of variables $userdata[*] $db[*] etc... so i know what i can call on.

if there isnt one, maybe i will compile one ;)
-rw-r--r-- 1 root root 69 Mar 12 00:00 core
http://www.yougetalife.com
mushroom mushroom

afterlife_69
I've Been Banned!
Posts: 630
Joined: Tue Nov 30, 2004 10:35 am

Post by afterlife_69 »

well, $sql, $result & $row is the simple way of doing all SQL querys so i cant see why $result would cause a problem in your code.

linuxoverwindows
Registered User
Posts: 82
Joined: Sun Feb 01, 2004 2:50 am
Location: Las Cruces, NM.
Contact:

yeah

Post by linuxoverwindows »

in my script www.yougetalife.com/antivirus.php
it calls the user agent and the os and displays a result based on the info recvd... the variables i used were $result and $result2 and when i put the session code into the pages, the first option ($result) it showed a status message or something. so i changed it to $result1 and it fixed it.

it was just an overlapping variable.

while im here, is there a quick snippet that displays the script Xecution time?

i had to remove my badger avatar cause it was animated :roll: :oops: :lol:
-rw-r--r-- 1 root root 69 Mar 12 00:00 core
http://www.yougetalife.com
mushroom mushroom

Graham
Former Team Member
Posts: 8462
Joined: Tue Mar 19, 2002 7:11 pm
Location: UK
Contact:

Post by Graham »

Most of the global variables are quite obvious what they contain

eg. $userdata contains the contents of the phpbb_users and phpbb_session tables for the current logged in user
$board_config contains the contents of the phpbb_config table
and so on
"So Long, and Thanks for All the Fish"

phpBB Useful Links: Knowledge Base | Userguide | Forum Search | MOD Database | Styles Database
My Links: Blog!

linuxoverwindows
Registered User
Posts: 82
Joined: Sun Feb 01, 2004 2:50 am
Location: Las Cruces, NM.
Contact:

tabledata

Post by linuxoverwindows »

ok, i didnt look into the db but what youre saying is that session_logged_in is a table so any table i can use by saying $userdata['some_table'] thanks, ill give it a try.
-rw-r--r-- 1 root root 69 Mar 12 00:00 core
http://www.yougetalife.com
mushroom mushroom

afterlife_69
I've Been Banned!
Posts: 630
Joined: Tue Nov 30, 2004 10:35 am

Post by afterlife_69 »

$userdata is the field, not the table.

ie $userdata['username'] returns the 'username' field from phpbb_users

linuxoverwindows
Registered User
Posts: 82
Joined: Sun Feb 01, 2004 2:50 am
Location: Las Cruces, NM.
Contact:

i think i get it

Post by linuxoverwindows »

ive been recently learning those types of vatiables. i use some similar to make a list ex:

Code: Select all

while ($count <= $variable) {
read list_item['$count'];
$count ++;
}
that sort of thing... so i guess i view it as $variable['$subvariable']

so in this case, the subvariable is the name of the field from the table. so if i have the list of tables, i have the list of subvariables. then to debug what goes on in the bg, i can, of course, make a script that displays said variables to understand what variables i can play with to tie the system into my site... i already have it set to restrict info based on login creds. i would like to take it farther.

if i seem like im rambling, im just thinking on my keyboard. :P

thanks for the info, i did find some of the code to list a lot of $lang['subvariables'].

anyway thanks for the point in the right direction.[/quote][/code]
-rw-r--r-- 1 root root 69 Mar 12 00:00 core
http://www.yougetalife.com
mushroom mushroom

Post Reply

Return to “[2.0.x] MOD Writers Discussion”