The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Getting the sub forum name from url
If my url looks like this http://www.clubmonza.com/forums/foru...p?2-Main-Forum
How can i get the forum name from the url (Main-Forum) |
#2
|
||||
|
||||
Are you talking about getting it in a plugin or in a template? Can you be more specific about what you want. Or do you literally want to take "2-Main-Forum" and turn it into "Main-Forum"? If so, look at this PHP page on string functions - http://www.php.net/manual/en/ref.strings.php
|
#3
|
|||
|
|||
I just want to pull the current sub forum name the the url so i can use it in my external
so $_get["?????"]; will show my the sub forum |
#4
|
|||
|
|||
Where is the url coming from? I'm wondering if there could be any other parameters on the url. Also you're saying this is not a vb script, right?
|
#5
|
|||
|
|||
the url is coming from vbulletin. All i really need to do is if a user is in a sub forum i want to know who to find the sub form name using hard code.
|
#6
|
|||
|
|||
$foruminfo['title'] contains the title of the forum a user is in. You'll need to use it in a hook, most likely forumdisplay_start.
There's no reason to try and grab it from the URL, that's just over-complicating it. |
#7
|
|||
|
|||
What do you mean by a hook??
My code looks like this PHP Code:
|
#8
|
|||
|
|||
I mean. You're going about this all wrong...
Go to products and plugins -> create new plugin -> hook location: forumdisplay_start |
#9
|
|||
|
|||
in my adds i use this to get the add
<center><iframe width="800" frameborder="0" height="110" src="http://www.clubmonza.com/forums/theadds.php"></iframe></center> now i have made the plugin how to i call it within the Ad HTML section in advertising banners |
#10
|
|||
|
|||
You could try this: create a new plugin using hook location parse_templates and this code:
Code:
global $foruminfo; vB_Template::preRegister('ad_global_above_footer', array('foruminfo' => $foruminfo)); Then in your ad html, put {vb:raw foruminfo.title} where you want to use it. ETA:...you also need to change the template name (in red) to the template for the ad location you're using - ad_global_above_footer was just an example. |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|