vBulletin Modifications

Templates/styles in subdirectories [3.5rc1]

Welcome to vBHackers.com! - vBHackers Updates:

Go Back   vBulletin Modifications > General vBulletin Section > General vBulletin Support

Reply
 
LinkBack Thread Tools
Old 08-04-2005, 02:03 AM   #1
vB Newbie
Join Date: Nov 2004
Real Name: Dave
Location: Utah
EasyTarget is on a distinguished road

Default Templates/styles in subdirectories [3.5rc1]

I origintally posted this at vb.org but it just gets overlooked.
_______________________
I'm trying to use the forum template on a non forum page and used these instructions:
You must first be a registered member to view any code.
and this worked fine if I had the files inside of the forums folder. however I've moved the page one folder away and the style no longer appears.

ex.
works >http://www.troc.us/forum/testpage.php
doesn't work >http://www.troc.us/forum/subdirectory/testpage.php

note we've tried to apply this fix:
Quote:
Originally Posted by Jolten
yes.. add

chdir('/server/path/to/forum/directory');

after

define('THIS_SCRIPT', 'yourscript');


in the php file.
but it did not affect the template/styles.

I'd really appreciate it if anyone could give me some guidance on this, thanks.




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
Old 08-04-2005, 02:47 AM   #2
vBulletin Guru
Ken Iovino's Avatar
Join Date: Mar 2004
Real Name: Ken Iovino
Location: Miami, Florida
Ken Iovino is on a distinguished road

Default

Jolten was correct.
Above:
You must first be a registered member to view any code.
You should add
You must first be a registered member to view any code.
For example: On this site I use this code for the portal page.
You must first be a registered member to view any code.
Since that page isn't in the forum dir. You can find your path name by creating a file with this code in the file.

You must first be a registered member to view any code.
Point your browser to that file and look for "DOCUMENT_ROOT". Next to that it will have the name and dirctory to your root directory. Mine is:

You must first be a registered member to view any code.
So that means my forums are
You must first be a registered member to view any code.
Hope this helps




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-04-2005, 05:03 AM   #3
vB Newbie
Join Date: Nov 2004
Real Name: Dave
Location: Utah
EasyTarget is on a distinguished road

Default

we applied that and in my case its
You must first be a registered member to view any code.
but it did not work.

it seems that the problem lies in this bit of code which I spotted when I chose to view the source:
You must first be a registered member to view any code.
I looked in the headinclude template where I think it pulls that from and it says this:
You must first be a registered member to view any code.
so I'm guessing that the $style[css] is what directs it to the file, but I don't know how to change that at all.

Also looking inside the vbadvanced portal page(since it uses the styles outside of the forum folder as well) they have this:
You must first be a registered member to view any code.
but I wasn't able to find from it where they applied the change at.




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-04-2005, 05:11 AM   #4
vBulletin Guru
Ken Iovino's Avatar
Join Date: Mar 2004
Real Name: Ken Iovino
Location: Miami, Florida
Ken Iovino is on a distinguished road

Default

You chdir() should be:

You must first be a registered member to view any code.
If of course your running on a linux box. Then your template should contain the following. Template name for example: "test_template"

You must first be a registered member to view any code.
Your PHP code should look like this:

You must first be a registered member to view any code.




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-04-2005, 05:37 AM   #5
vB Newbie
Join Date: Nov 2004
Real Name: Dave
Location: Utah
EasyTarget is on a distinguished road

Default

thanks for the quick reply, time and simple instructions.
I tried the public_html thing like you said but my host really has it like
You must first be a registered member to view any code.
Following the steps you laid out and putting in the code as you say works fine if I keep the file in the same folder as my forums, however when I move the file to a subdirectory it doesn't work.

ex. in forum folder
http://www.troc.us/forum/test1.php <- using public_html
http://www.troc.us/forum/test2.php <- using troc.us

ex in subdirectory
http://www.troc.us/forum/subdirectory/test1.php <- using public_html
http://www.troc.us/forum/subdirectory/test2.php <- using troc.us




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-04-2005, 05:40 AM   #6
vB Newbie
Join Date: Nov 2004
Real Name: Dave
Location: Utah
EasyTarget is on a distinguished road

Default

I just tried this because I saw that vbadvanced could use their cmps index file outside of the forums page and it used the sytles just fine. I looked at their source for that page and it had
You must first be a registered member to view any code.
but I couldn't find where they edited the path for the style sheet, so I went in the headinclude template and changed the $style[css] to
You must first be a registered member to view any code.
and it seemed to work. Will doing this cause problems elsewhere in the forum or styles? Is there some way to access $style[css] and make the change from there instead of taking it out completely?




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-04-2005, 06:56 AM   #7
vBulletin Guru
Ken Iovino's Avatar
Join Date: Mar 2004
Real Name: Ken Iovino
Location: Miami, Florida
Ken Iovino is on a distinguished road

Default

The only thing that will do is grab the style css infomation. To make it look like your style of your forums. But you won't be able to grab infomation from the database with just having that.




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-04-2005, 01:32 PM   #8
vB Newbie
Join Date: Nov 2004
Real Name: Dave
Location: Utah
EasyTarget is on a distinguished road

Default

Is there some simple code I can try to see if we're tied into the database? The problem we were trying to fix first was the styles, but eventually we'd need to use the database too I think.

but as far as replacing the $style[css] bit in the headinclude with the direct information to the css file, that is ok to do?

btw, thanks for your replies, I've posted this stuff on several sites (vb.com and org)and you're the only person to reply.




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-04-2005, 03:00 PM   #9
vBulletin Guru
Ken Iovino's Avatar
Join Date: Mar 2004
Real Name: Ken Iovino
Location: Miami, Florida
Ken Iovino is on a distinguished road

Default

If you want PM me FTP access and I'll see why you can't seem to use the code I posted.




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-04-2005, 07:22 PM   #10
vB Newbie
Join Date: Nov 2004
Real Name: Dave
Location: Utah
EasyTarget is on a distinguished road

Default

thanks for being so accomodating.

The problem was bugging me so much (even though I found a work around) that I kept looking around the files and settings to see what was going on.

Apparently if you set your board to store the css stylesheets as files then the $style[css] call no longer can load it properly and you have to edit the headinclude to point directly to the stylesheet file that you'd like to use. (even if you only have 1 default style)

I changed my setting to not store the styles as files and replaced the direct call to the stylesheet file with $style[css] and everything worked as it should.

admin cp > vb options > style and language settings > store css stylesheets as files

Last edited by EasyTarget; 08-04-2005 at 07:33 PM.




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
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
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT -3. The time now is 05:04 AM.


SEO by vBSEO 3.2.0 ©2008, Crawlability, Inc. (Patent Pending)