vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Custom Pages Running from subfolder? (https://vborg.vbsupport.ru/showthread.php?t=178233)

John3971 05-12-2008 07:28 PM

im not good in this but is it possible to add a field in the product settings were i put the path so i don´t have to edit the php file if i changes host or have it on other host?

Dismounted 05-13-2008 07:15 AM

Please read my post again.

John3971 05-13-2008 06:09 PM

if i understand you right i must changes the path "chdir('/home/yoursite/public_html/forums');" in the php file but i want it to be ansetting were i can changes the path in the acp. and also the style doesn´t work like it should when i go to the file in the subfolder.

Lynne 05-13-2008 06:19 PM

Quote:

Originally Posted by John3971 (Post 1518551)
if i understand you right i must changes the path "chdir('/home/yoursite/public_html/forums');" in the php file but i want it to be ansetting were i can changes the path in the acp. and also the style doesn?t work like it should when i go to the file in the subfolder.

And you can't have it as a setting because in order to use settings, you must include the global.php file. And, in order to include the global.php file, you need to have the path correct. And if the path is set in a setting, which needs global.php to be called in order to use it.... round and round and round you go.

John3971 05-13-2008 08:25 PM

ok but how do i get the style to show correct? and the images?

Dismounted 05-14-2008 07:01 AM

Add <base href="http://yourdomain.com/" /> to the top of your headinclude template.

John3971 05-14-2008 11:02 AM

that worked. thanks. but why does it have to be in the top? i tested at the bottom and that didn´t work.

EDIT:

is it possible to have a plugin that automatic edit the template and add this in the top of header include? if so how?

Dismounted 05-14-2008 11:43 AM

[QUOTE=John3971;1519238]that worked. thanks. but why does it have to be in the top? i tested at the bottom and that didn´t work.
Because code is executed (not really "executed" in the programming sense, though) in the order it appears. You will find that there are Javascript links in the template.


All times are GMT. The time now is 02:07 PM.

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.01051 seconds
  • Memory Usage 1,728KB
  • 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)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)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