The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#11
|
||||
|
||||
Place $variable (or however you called it) in Template footer (or header if you want it there) where you want to have the output from your include script displayed and you're done.
|
#12
|
||||
|
||||
Thank you so much both of you. It works.
|
#13
|
|||
|
|||
OK I can get a file included this way, thank you....
Now I have another question, as it seems it will not allow me to include a file that has a script in it, . . . thinking about it though I probably just need to add the script to the code in the created plugin and then call it. Hopefully I just answered my question. :ermm: EDIT: nope :speechless: Is there a detailed walkthrough on adding a plugin manually, I am trying to add some code, which is basically a php file that calls information from several other files, hoping to be able to use a $variable to include it. As I said above, I can get it to work if it's just a normal php file with no calls to other files, just can't seem to get anything to show up if it's a more complex file. Thanks. |
#14
|
||||
|
||||
Well, I'm not sure if this is going to help... but I'll show you exactly what I did.
******************************* STEP ONE: The first thing I did was create the plug-in. The settings of the plug-in are below. Name: Whatever Hook Location: global_start Plug-in PHP Code: ob_start(); include('http://site.com/file.php'); $main_xb_nav = ob_get_contents(); ob_end_clean(); Active: Yes ******************************* STEP TWO: After that, you'll need to create the php file. Inside the file, you can basically have whatever you want. In my case, it's just html. However, I have a simple script that calls for the date. IE: <?php echo date ('l, F dS Y'); ?> ******************************* STEP THREE: After that, you'll need to call for the plug-in somewhere in the forums. All you need to input is the bolded part below. In my case, I used it in my header. Below is how I have it setup. <!-- logo --> <a name="top"></a> <table border="0" width="$stylevar[outertablewidth]" cellpadding="0" cellspacing="0" align="center"> <tr> <td align="center"><a href="$vboptions[forumhome].php$session[sessionurl_q]"><img src="images/logo.jpg" border="0" alt="$vboptions[bbtitle]" /></a></td> </tr> </table> <table class="navbarwrap" border="0" width="$stylevar[outertablewidth]" cellpadding="0" cellspacing="0" align="center"> <tr> <td> $main_xb_nav </td> </tr> <tr> <td bgcolor="#666666" height="1"></td> </tr> <tr> <td bgcolor="#868686" height="5"></td> </tr> </table> <!-- /logo --> ******************************* CONC: All I did was add that little bolded part, as well as define an area for it with the row and column commands. Otherwise, that's all I needed to do. Like I said, I'm not sure if that's what you need, but that's what I did. If I'm on the right track, but you have a few questions, feel free to AIM me: xinnyburt. It works for me just fine. The PHP is working as well. |
#15
|
||||
|
||||
If you were only going to insert the date you didn't need to create a seperate file. Could have just done something like:
PHP Code:
|
#16
|
|||
|
|||
SirAdrian he was inserting a customized navbar for his site in addition to the time, in fact the time might have just been to see if script would work...
xYarub, I have done everything you listed, the only problem is, if there is a <php include in the file I am calling from the plugin, it basically ignores the entire plugin. I can get it to work with just html, I think the problem getting the file I want to work is that it calls for some server settings as well as another file on the server. Basically, the php file I am including gather information from the server and another file, so maybe that is why it comes up blank. I just don't know. :ermm: |
#17
|
||||
|
||||
I am actually unsure of how to help you. It sounds like you're doing it all right. Sorry. =\
|
#18
|
|||
|
|||
Quote:
|
#19
|
|||
|
|||
xYarub,
Thanks a ton!! That works awesome |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|