The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
chdir help
On my site, www.rustysoaptraders.com, we receive and review a lot of products...because of my lack of knowledge with vbulletin, I currently have all the .php files calling the review pages in the main 'rustysoaptraders.com/forums' directory. I would like to keepo these seperate via year...for example all reviews done in 2005 I would like to keep the .php files in 'rustysoaptraders.com/forums/reviews/2005' keeping the main forums directory uncluttered with 100's of .php files. I think this is a chdir command but not sure how or where this would go in the .php that calls that review page...also im not sure what exactly goes in the command.
Can I get some help? |
#2
|
|||
|
|||
anyone?
|
#3
|
|||
|
|||
The command looks like this:
PHP Code:
When you insert it, the code below will assume it is in that directory. So normally for an image located in your review directory you may currently use img src="../../images/file.jpg" After adding chdir('/home/www/public_html'); to the php file, you will only need "images/file.jpg" because the file assumes it's pulling links from /home/www/public_html I'm sure others could explain it better. |
#4
|
|||
|
|||
All im trying to do is get the .php files out of the main Forums directory - this way I can keep them organized.
What you are saying is I should put the .php file that calls up the template for the review in the directory reviews2005 (forums/reviews2005). Then all I would need to do is add chdir('www/forums/reviews2005') & when I link from the forums to that review i should link to Code:
www.rustysoaptraders.com/forums/reviews2005/filename.php And in the 'filename.php' is where I put the chdir command? and I put that file in the reviews2005 directory? Chris |
#5
|
|||
|
|||
anyone?
|
#6
|
||||
|
||||
Seems like I understand nothing
Can you attach one of those >100's of PHP files< you want to get organized? |
#7
|
|||
|
|||
This is one of them - currently this .php is in the main forums directory...I would like to be able to put this in a forums/reviews2005 directory.
Code:
<?php // ####################### SET PHP ENVIRONMENT ########################### error_reporting(E_ALL & ~E_NOTICE); // #################### DEFINE IMPORTANT CONSTANTS ####################### define('NO_REGISTER_GLOBALS', 1); define('THIS_SCRIPT', '04fleergotgcs'); // change this depending on your filename // ################### PRE-CACHE TEMPLATES AND DATA ###################### // get special phrase groups $phrasegroups = array( ); // get special data templates from the datastore $specialtemplates = array( ); // pre-cache templates used by all actions $globaltemplates = array( '04fleergotgcs', ); // pre-cache templates used by specific actions $actiontemplates = array( ); // ######################### REQUIRE BACK-END ############################ require_once('./global.php'); // ####################################################################### // ######################## START MAIN SCRIPT ############################ // ####################################################################### $navbits = array(); $navbits[$parent] = '2004 Fleer Greats of the Game Cut Signature Ed. Review'; $navbits = construct_navbits($navbits); eval('$navbar = "' . fetch_template('navbar') . '";'); eval('print_output("' . fetch_template('04fleergotgcs') . '");'); ?> |
#8
|
||||
|
||||
You've got a PHP file for every review?
I'd suggest to use an articles or CMS system for that, as your current solution seems to be way to complicated. If you want to keep it this way, place PHP Code:
PHP Code:
|
#9
|
|||
|
|||
thank you for the help - after reading your post I am going to look into an article hack...I do think that will be much easier - thank you!
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|