The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
![]()
I am making a mod and my mod is loaded in iframes. The code for the frames is in a template and the template is called by my php file. I have everything working except rather then the No Permission page loading in the frames, I want the frames to just not load. I need the frames to not load when the mod is not activated or if the member is not in the right usergroup. All I need is the code or atleast a nudge in the right direction for the else statement.
As I said I have the code that will display the mod, now i just need the else code that will keep the frames template from loading so that not even the permissions page shows. If my code is needed to be seen then just say and I will post the part that is catching me. |
#2
|
||||
|
||||
![]()
Wrap it in a conditional. Something like:
$array = array(1,2,3,4,5,6); if(is_member_of($array)) { display_code_here(); } That way, if they do not succed in the conditional, the server will not run the display code. |
#3
|
||||
|
||||
![]()
Ok I am not sure how that would work. I have the code to check if the member is in the right group. I have it set up so that if the mod is active then it checks if the member is in the right group. now in the else is where I need to not display the frame.
|
#4
|
|||
|
|||
![]()
You don't need to write an else clause, if the conditional does not match then it simply won't execute the code between the braces.
PHP Code:
|
#5
|
||||
|
||||
![]()
This is the code I have.
PHP Code:
PHP Code:
|
#6
|
|||
|
|||
![]()
Make a new template? Like imagewtf_noframes and then check if they have frames or something?
I think you may be going about it the wrong way. Heres the way I would have done it. PHP Code:
Code:
We have our content here Code:
<html> <head.... ...body> We have our standard content here, which is displayed regardless of usergroup or if modification is active $innerhtml </body> </html> Also some general pointers.
|
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|