![]() |
Can someone point me towards this mod?
I made a post on vbulletin.com, seen here: http://www.vbulletin.com/forum/showthread.php?t=279567, and was directed to here, but am unable to find the mod mentioned. Does anyone know where I can find this?
|
<a href="https://vborg.vbsupport.ru/showthread.php?p=1581370#post1581370" target="_blank">https://vborg.vbsupport.ru/showt...70#post1581370</a>
|
Am I able to use those custom pages OUTSIDE of the forum directory? Like instead of it being root/forums/blahblahblah, it can be root/folder/file.php?
|
Yes, you just need to chdir() into the forum directory before including global.php.
|
Can you explain that a little better? Sorry, I'm not too experienced with some of this :(
|
Before this line
PHP Code:
PHP Code:
|
Alright, I did that, but there's two things:
1) Some of the style doesn't seem to be transferring over. I have my banner, and the positioning all in place, but the table and category css, as well as some others, isn't showing up. 2) The content of the page is dependent on the content I have in place in the template. I need to make a lot of pages (thousands), and I need the content of them to be dependent on what I place in the php files on my server, because I don't want to have to shuffle through thousands of extra templates when I look through a style's template. |
You need to go to your style and replace all paths for images with absolute paths...
So instead of having something like images/yourimage.png You need to have http://yoursite.com/forumpath/images/yourimage.png edit; you lost me on question 2 |
I already have absolute paths for all my images in the style. The images are fine, but it's not pulling most of the CSS, like the background color for a table (which is defined by a solid color and not by an image).
For #2: On my custom page that I made, the contents of it (like the text saying "blah blah this is my page, blah blah") is controlled inside the actual template on the style. I want to know how to control the content of the page in a php file. Since I'm gonna have 100's of pages for my main site that I want to use the forums skin, I need them to go into different directories on my site, and not have them all listed in a row in the style's templates. |
Quote:
2. You can create php pages without creating custom templates to hold the content.. I started out doing it without templates before I learned how to do it with templates. quick example... PHP Code:
|
Except for the actual content, the only things I need to edit there would be lines 4-6, correct? I know how to do 5 and 6, but what do I put in place of:
define('THIS_SCRIPT', 'MAIN_INDEX'); |
You would replace 'main_index' with a unique name for your script... Usually it would be the same name as the php file itself.
|
|
1 Attachment(s)
I just tried it with an install of 3.7.2 as I haven't used that since 3.6 and it still works.
do you have the <?PHP at the very top of the page at line 0 with NO spaces before it? You cannot have any spaces or lines sent to the browser before you included global.php. edit: I attached the php I just tested with. change the forum path in the chdr call |
I tried again, and managed to get it to work, but it's still not using the css:
http://nintendohub.com/test2.php |
I looked at the source, its because you have VB storing the CSS in files and its giving you a relative path to the CSS file. So since the page is not in the forum directory the browser cannot locate the appropriate CSS file.
Someone else may be able to get this working with usiing external style sheets but I have never used that option. |
You need to put a base element at the TOP of your headinclude template (change URL to match your site). With this element, it also does not require images to have absolute paths.
HTML Code:
<base href="http://nintendohub.com/forum/" /> |
Great!
I finally stumbled on to this suggestion (after days or reading and playing) and it seems to work with my very limited skills:) I would like to have a condition of viewing the page, or at least some of the pages that I present with this. Neither of the statements below work for me, can you tell me what I am missing? <if condition="is_member_of($bbuserinfo,5,6,7,9,10,13) "> $vbphrase[not_yet_full_member] <else/> Welcome Back to the forums! </if> <?php if condition="is_member_of($bbuserinfo,5,6,7,9,10,13) " { ?> This is for a member<br> <?php } else { ?> This is for a guest<br> <?php } ?> Thanks:D |
Where are you putting that code? In a template or a plugin. (Also, please use the code/html/php tags.)
The first one won't work because it is <else />, not <else/>. The second one won't work in a template because you can't put php in a template. It also won't work in a plugin because your if statement is incorrect. |
All times are GMT. The time now is 07:55 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|