Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 04-07-2008, 12:45 AM
webmaster74 webmaster74 is offline
 
Join Date: Mar 2007
Posts: 193
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 2 almost identical plug-ins, one is working other is not.

I add an external php file to the common-template "header" of each style
$includedphpheader
and this works smoothly.

In the same way, I added $includedineverypost in the postbit template.
and a plug-in hooked to Product : vBulletin
plug-in title ineverypost
Hook global_start
Plugin PHP Code
ob_start();
include('/home/domain/public_html/php/includes/ineverypost.inc.php');
$includedineverypost = ob_get_contents();
ob_end_clean();
Plugin is Active YES
but $includedphpheader is not being parsed.
What am I missing?
Reply With Quote
  #2  
Old 04-07-2008, 05:13 AM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Access your file directly to see if it exists, can be read, and outputs something.
Reply With Quote
  #3  
Old 04-07-2008, 10:53 AM
webmaster74 webmaster74 is offline
 
Join Date: Mar 2007
Posts: 193
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Dismounted View Post
Access your file directly to see if it exists, can be read, and outputs something.
http://mydomain/php/includes/ineverypost.inc.php
it does output the expected html code.


I went further to chown me:me. ; chmod 775 -cvR . to all files in /php/includes/

still ineverypost.inc.php is not parsed in the posts
Reply With Quote
  #4  
Old 04-08-2008, 06:08 PM
webmaster74 webmaster74 is offline
 
Join Date: Mar 2007
Posts: 193
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

F1 !!!!
Reply With Quote
  #5  
Old 04-08-2008, 06:26 PM
Opserty Opserty is offline
 
Join Date: Apr 2007
Posts: 4,103
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Try [minicode]$GLOBALS[includedineverypost][/minicode] in the template.
Reply With Quote
  #6  
Old 04-08-2008, 07:34 PM
webmaster74 webmaster74 is offline
 
Join Date: Mar 2007
Posts: 193
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Opserty View Post
Try [minicode]$GLOBALS[includedineverypost][/minicode] in the template.

to my big furstration yes this works.

why does $includedineverypost not work when $GLOBALS[includedineverypost] does?

it does help me to know that what I did was correct, and per the manual I cared to read ....

note: I DID hook my plug-in to global start..... that did not help
Reply With Quote
  #7  
Old 04-09-2008, 05:51 AM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The postbit is parsed inside a function outside the scope of a variable set at global_start. If you placed your plugin at postbit_display_complete it would work, but would waste server resources by including that file on every post.
Reply With Quote
  #8  
Old 04-09-2008, 12:30 PM
webmaster74 webmaster74 is offline
 
Join Date: Mar 2007
Posts: 193
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Dismounted View Post
The postbit is parsed inside a function outside the scope of a variable set at global_start. If you placed your plugin at postbit_display_complete it would work, but would waste server resources by including that file on every post.

thank you very much

I appreciate your help

your answer tells me that my original complaint on vbulletin.com that the documentation is lacking, was in fact correct. The documentation is not clear enough on including external php files.
Reply With Quote
  #9  
Old 06-16-2008, 12:46 AM
webmaster74 webmaster74 is offline
 
Join Date: Mar 2007
Posts: 193
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thank you again Dismounted for this kind help
Reply With Quote
  #10  
Old 08-15-2008, 07:31 PM
gfxhelp.com gfxhelp.com is offline
 
Join Date: Aug 2008
Posts: 99
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm trying to call some code for an ad in the header of my forum.

I first tested it without an include and it works correctly. I then cut the code and put it in a new file and put
<include('/home/domain/public_html/ads/file.php');>
in it's place, but it isn't working. Is my format correct and do I need to do anything else to make my include work?

Thanks
Reply With Quote
Reply


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 10:40 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04394 seconds
  • Memory Usage 2,255KB
  • 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
  • (3)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
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)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