Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 07 Apr 2008, 02:45
webmaster74 webmaster74 is offline
 
Join Date: Mar 2007
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?
__________________
the vbulletin script is way too expensive for the support you get.....
Reply With Quote
  #2  
Old 07 Apr 2008, 07:13
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Real name: Hanson
Access your file directly to see if it exists, can be read, and outputs something.
__________________
Former vBulletin.org Staff Member

View My Modifications
29 Releases and Counting... Latest Modification: dmActivityStream - vBookie Integration (4.x)

Please do not PM me to ask for support - please use the relevant thread or forum.
Reply With Quote
  #3  
Old 07 Apr 2008, 12:53
webmaster74 webmaster74 is offline
 
Join Date: Mar 2007
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
__________________
the vbulletin script is way too expensive for the support you get.....

Last edited by webmaster74; 07 Apr 2008 at 13:07.
Reply With Quote
  #4  
Old 08 Apr 2008, 20:08
webmaster74 webmaster74 is offline
 
Join Date: Mar 2007
F1 !!!!
__________________
the vbulletin script is way too expensive for the support you get.....
Reply With Quote
  #5  
Old 08 Apr 2008, 20:26
Opserty Opserty is offline
 
Join Date: Apr 2007
Try $GLOBALS[includedineverypost] in the template.
Reply With Quote
  #6  
Old 08 Apr 2008, 21:34
webmaster74 webmaster74 is offline
 
Join Date: Mar 2007
Originally Posted by Opserty View Post
Try $GLOBALS[includedineverypost] 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
__________________
the vbulletin script is way too expensive for the support you get.....
Reply With Quote
  #7  
Old 09 Apr 2008, 07:51
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Real name: Hanson
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.
__________________
Former vBulletin.org Staff Member

View My Modifications
29 Releases and Counting... Latest Modification: dmActivityStream - vBookie Integration (4.x)

Please do not PM me to ask for support - please use the relevant thread or forum.
Reply With Quote
  #8  
Old 09 Apr 2008, 14:30
webmaster74 webmaster74 is offline
 
Join Date: Mar 2007
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.
__________________
the vbulletin script is way too expensive for the support you get.....
Reply With Quote
  #9  
Old 16 Jun 2008, 02:46
webmaster74 webmaster74 is offline
 
Join Date: Mar 2007
thank you again Dismounted for this kind help
__________________
the vbulletin script is way too expensive for the support you get.....
Reply With Quote
  #10  
Old 15 Aug 2008, 21:31
gfxhelp.com gfxhelp.com is offline
 
Join Date: Aug 2008
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
  #11  
Old 15 Aug 2008, 21:58
SEOvB's Avatar
SEOvB SEOvB is offline
 
Join Date: May 2007
Real name: Jarvis
you need to create a plugin to include outside files. you can't post that directly into the templates.
__________________
vBulletin Services and vBulletin Hosting
Reply With Quote
  #12  
Old 15 Aug 2008, 22:41
Opserty Opserty is offline
 
Join Date: Apr 2007
Originally Posted by gfxhelp.com View Post
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
Including External Files
Reply With Quote
  #13  
Old 15 Aug 2008, 22:51
gfxhelp.com gfxhelp.com is offline
 
Join Date: Aug 2008
Thanks for the info.
Reply With Quote
  #14  
Old 22 Jul 2009, 16:22
bosal's Avatar
bosal bosal is offline
 
Join Date: Feb 2005
Real name: Kuba
How can I import, a php or HTML file form exteranal URL ?
__________________
To mówiłem ja bosal

http://tibia.pl/homepage/tab.gif
Reply With Quote
  #15  
Old 22 Jul 2009, 16:51
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Is that question related to the topic in this thread?
__________________
Marco van Herwaarden
Ex vBulletin.org Coordinator
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

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


New To Site? Need Help?

All times are GMT. The time now is 01:15.

Layout Options | Width: Wide Color: