The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
![]()
I need to add something to my three templates navbar where I can change the text in a file that will instantly change on the forum page. I have a fuzzy idea how to do this but I would like to get some feedback from someone who knows exactly what it takes.
For example, phrase ="$vbphrase[text_name]" goes in the navbar page what file do I add the text into? I would be glad to stipend anyone who can simply describe what I need to do. thx |
#2
|
|||
|
|||
![]()
You could try creating a plugin using the global_start hook with this code:
Code:
$mytext = file_get_contents("/usr/public_html/forum/info.txt"); Of course you will change "$mytext" and "/usr/public_html/forum/info.txt" to whatever you want to use. |
#3
|
||||
|
||||
![]()
Thanks for the reply, kh.
I added Code:
$mytext = file_get_contents("/usr/public_html/forum/info.txt"); Code:
= file_get_contents("/usr/public_html/forum/info.txt"); "/public_html/forum/info.txt" and also tried "/forum/info.txt" but the webpage just displays the bit after $mytext Any suggestions? Update: ah, I see, you mentioned a plug in. I have not used them much, is there a basic guide you know of I can read?? . |
#4
|
|||
|
|||
![]()
The manual is here: http://www.vbulletin.com/docs/html/ (remember to choose your version from the drop-down because it defaults to the latest version 4 if you don't). There's a section in the manual called "Plugin System".
However, it's pretty simple. From the admin control panel "Plugins & Products" section choose "Add New Plugin". Choose the hook location (global_start) and give it a name that makes sense to you. Then just enter the code in the box. Don't worry about the other fields. If you want to read the manual and get more fancy you can create a product, add the plugin to your product, then you can export and import it as you like (for instance, export it so that in case you ever need to do a clean install you can just import it again). As far as the code, the path name needs to be the actual path on your server. If you're uploading your text file to where everything else is, then you could probably use this: $mytext = file_get_contents(CWD . "/info.txt"); (ETA: I added a '/' to the above - kh) Of course you can choose any variable name or file name you want instead of "$mytext" or "info.txt". |
#5
|
||||
|
||||
![]() Quote:
|
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|