Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions

Reply
 
Thread Tools Display Modes
  #11  
Old 09-25-2005, 09:20 PM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #12  
Old 09-25-2005, 09:24 PM
evenmonkeys's Avatar
evenmonkeys evenmonkeys is offline
 
Join Date: Aug 2004
Location: Iowa
Posts: 896
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you so much both of you. It works.
Reply With Quote
  #13  
Old 09-25-2005, 10:29 PM
jribz jribz is offline
 
Join Date: Oct 2003
Posts: 66
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #14  
Old 09-26-2005, 01:46 AM
evenmonkeys's Avatar
evenmonkeys evenmonkeys is offline
 
Join Date: Aug 2004
Location: Iowa
Posts: 896
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #15  
Old 09-26-2005, 01:59 AM
Adrian Schneider's Avatar
Adrian Schneider Adrian Schneider is offline
 
Join Date: Jul 2004
Posts: 2,528
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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:
$main_xb_nav date("l, F dS Y'); 
Reply With Quote
  #16  
Old 09-26-2005, 04:27 AM
jribz jribz is offline
 
Join Date: Oct 2003
Posts: 66
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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:
Reply With Quote
  #17  
Old 09-27-2005, 08:53 PM
evenmonkeys's Avatar
evenmonkeys evenmonkeys is offline
 
Join Date: Aug 2004
Location: Iowa
Posts: 896
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I am actually unsure of how to help you. It sounds like you're doing it all right. Sorry. =\
Reply With Quote
  #18  
Old 09-27-2005, 08:58 PM
jribz jribz is offline
 
Join Date: Oct 2003
Posts: 66
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by xYarub
I am actually unsure of how to help you. It sounds like you're doing it all right. Sorry. =\
Thanks anyhow, still looking for a solution though, so if any coders out there read this let me know if you have any ideas. :ermm:
Reply With Quote
  #19  
Old 10-22-2005, 01:32 PM
Peace_Hope Peace_Hope is offline
 
Join Date: Jul 2005
Location: MN, USA
Posts: 44
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

xYarub,

Thanks a ton!! That works awesome
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:12 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04229 seconds
  • Memory Usage 2,243KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (9)postbit
  • (9)postbit_onlinestatus
  • (9)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete