vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   2 almost identical plug-ins, one is working other is not. (https://vborg.vbsupport.ru/showthread.php?t=175375)

webmaster74 04-07-2008 12:45 AM

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? :confused::confused:

Dismounted 04-07-2008 05:13 AM

Access your file directly to see if it exists, can be read, and outputs something.

webmaster74 04-07-2008 10:53 AM

Quote:

Originally Posted by Dismounted (Post 1484984)
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

webmaster74 04-08-2008 06:08 PM

F1 !!!!

Opserty 04-08-2008 06:26 PM

Try [minicode]$GLOBALS[includedineverypost][/minicode] in the template.

webmaster74 04-08-2008 07:34 PM

Quote:

Originally Posted by Opserty (Post 1486142)
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

Dismounted 04-09-2008 05:51 AM

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.

webmaster74 04-09-2008 12:30 PM

Quote:

Originally Posted by Dismounted (Post 1486488)
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.

webmaster74 06-16-2008 12:46 AM

thank you again Dismounted for this kind help

gfxhelp.com 08-15-2008 07:31 PM

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


All times are GMT. The time now is 11:36 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.01001 seconds
  • Memory Usage 1,737KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete