vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   How to include php files on vBulletin? (https://vborg.vbsupport.ru/showthread.php?t=139744)

kourou 02-18-2007 12:30 PM

How to include php files on vBulletin?
 
Hello there.

I recently installed vBulletin and i would like to integrate it with the rest of my site.
What I'd like to do is to include the header of my site to any page of vBulletin (showpowst, showthread, index, personal messages etc.). I guess I'm going to use the include() function of php. Could you please tell which file to edit and where to add the include() function?

Thank you.

So...

I'm trying to include a .php file (adding a new pluggin to global_start) but there are some issues with the relative paths. vBulletin is installed on public_html/modules/vbulletin/ and the file i want to include is on public_html/

If i try to include it using include("file.php") then it looks for it at public_html/modules/vbulletin/ (that's wrong). If I try to include it using include("../../file.php") it's get included some way but the links are not correct (for example instead for a link to point at index.php, it's pointing at public_html/modules/vbulletin/index.php).

Could you pleeeeease help me?

Thanks.

firstrebel 02-18-2007 03:48 PM

<a href="http://www.vbulletin.com/forum/showthread.php?p=1066718#post1066718" target="_blank">http://www.vbulletin.com/forum/showt...18#post1066718</a>

Bob

kourou 02-18-2007 03:53 PM

Yes i've already read that manual but i have problems with the relative paths.

vBulletin is installed on public_html/modules/vbulletin/ and the file i want to include is on public_html/

If i try to include it using include("file.php") then it looks for it at public_html/modules/vbulletin/ (that's wrong). If I try to include it using include("../../file.php") it's get included some way but the links are not correct (for example instead for a link to point at index.php, it's pointing at public_html/modules/vbulletin/index.php).

The problem is the paths of the files i want to include.

Could you please help me?

firstrebel 02-18-2007 07:58 PM

The path to file.php must be correct, otherwise it won't find it - /public_html/file.php.

Try it with and without the first /.

Also if you have hyperlinks in file.php make sure they are absolute not relative, eg http://domain.com/file.html not file.html.

Bob

kourou 02-19-2007 12:13 AM

The problem is that the file (file.php) i'd like to include to the vBulletin pages, also includes other files. So even if I try to include it with the absolute path (for example: include('http://www.domain.com/file.php') i get many errors for include() functions inside the file file.php (which are relative and not absolute - it's really hard to make all these paths absolute because there are so many files).

For any other page on my site the function include('file.php') includes the file file.php which is located on the home directory of my site. On vBulletin pages that doesn't work. Is there any way to solve it?

Thanks.

firstrebel 02-19-2007 12:42 PM

Are you saying you want to include a file that itself has includes?

Bob

kourou 02-19-2007 12:43 PM

Quote:

Originally Posted by firstrebel (Post 1185953)
Are you saying you want to include a file that itself has includes?

Bob

Yes, that's right.


All times are GMT. The time now is 10:03 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.01018 seconds
  • Memory Usage 1,725KB
  • 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
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete