![]() |
It was your code that made me realize that $forumid was in fact working in that php file ;-)
--------------- Added [DATE]1235944263[/DATE] at [TIME]1235944263[/TIME] --------------- I've actually got another problem now. When i use the part of your code like if(forumid=5) then do this, it works fine. AFTER this part of the code, then i can get "echo $forumid" to display something. However, If i simply try to use "echo $forumdisplay" WITHOUT any other code (such as the if statement), it doesn't display anything or work. Any reason why this happens? It seems that if($forumid = 5) is assigning the value of 5 to $forumid, rather than giving me the actual forumid. Since if i view this on a page where forum id is actually 6, it still displays 5 because that is what $forumid was assigned. I guess i'm back to my starting problem of pulling the actual forum id. I was fooled earlier. |
I don't understand the full problem (probably partly because I am totally unfamiliar with vbadvanced), but you are using php and thus the condition should be if($forumid == '1') - a double equal, not a single one.
|
I'm just back at stage one it seems, i need to be able to recognize the current forum id with some sort of function. To keep it very simple, how would i output the current forum id with ECHO? In such a way that when i am at ForumA with the ID of 5, it will echo '5'. But when i go on over to forumB with ID of 6, it will echo '6'. This is what i'm really getting at.
|
Should be as simple as:
PHP Code:
|
Quote:
|
No, but then again I do not know where you are placing this at. What file are you editing? The global.php may need to be included.
|
Quote:
--------------- Added [DATE]1235946568[/DATE] at [TIME]1235946568[/TIME] --------------- Including global.php didn't work.. it must be that i have to include a file. I'll try to find the right one. --------------- Added [DATE]1235948936[/DATE] at [TIME]1235948936[/TIME] --------------- If i include global.php and then use "Echo $foruminfo", it echoes "array" and if i use "Echo $foruminfo[forumid]" nothing comes out. I think i'm on to something by getting "array" to display, is there a way i can go about analyzing the array and extracting the forum id from it? |
PHP Code:
|
The only two things i've managed to have output anything while having global.php included are "Echo $foruminfo" which outputs the word "Array" and what you just posted, print_r($foruminfo) which outputs "Array ( )" So apparently it knows that $foruminfo is an array... how do i go about grabbing the forumid part of that array? No form of "$foruminfo['forumid']" seems to work. In fact when i use that, it outputs nothing rather than even the word array.
Keep in mind this is a separate php file so i know there's got to be some trick to grabbing the forum id from the separate php file, but i just can't figure out how. Am i missing some include files that need to be included? |
Using the code I posted will allow you to see what is contained inside the array...
|
All times are GMT. The time now is 05:04 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|