vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Can someone point me towards this mod? (https://vborg.vbsupport.ru/showthread.php?t=186100)

Chris11987 07-23-2008 05:59 AM

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?

RLShare 07-23-2008 06:00 AM

<a href="https://vborg.vbsupport.ru/showthread.php?p=1581370#post1581370" target="_blank">https://vborg.vbsupport.ru/showt...70#post1581370</a>

Chris11987 07-23-2008 06:13 AM

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?

Dismounted 07-23-2008 10:12 AM

Yes, you just need to chdir() into the forum directory before including global.php.

Chris11987 07-23-2008 08:06 PM

Can you explain that a little better? Sorry, I'm not too experienced with some of this :(

RLShare 07-23-2008 08:36 PM

Before this line
PHP Code:

require_once('./global.php'); 

add something like this

PHP Code:

chdir('PATHTOFORUM'); 

Where you change PATHTOFORUM to the path to your forum.

Chris11987 07-23-2008 09:54 PM

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.

RLShare 07-23-2008 09:56 PM

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

Chris11987 07-23-2008 10:02 PM

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.

RLShare 07-23-2008 10:08 PM

Quote:

Originally Posted by Chris11987 (Post 1582631)
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.

1. Are you sure your using the css classes that hold those style options when your creating the tables? (tborder, tcat, and etc) Because as long as your setting up the template with the headinclude variable all the css should be there.

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:

<?


define('THIS_SCRIPT', 'MAIN_INDEX');
chdir ('forum');
require_once('./global.php');


// Now set up the <head>

echo $stylevar[htmldoctype]."<html dir=\"".$stylevar[textdirection]."\" lang=\"".$stylevar[languagecode]."\">";
echo "<head>".$headinclude."</head>";

//now start with the body......
echo "<body>";
// and include the header and navbar.....
echo $header.$navbar;
?>



THIS IS WHERE YOU PUT YOUR CONTENT

<?
//now include footer template...
echo $footer;
?>
</body>
</html>


Chris11987 07-23-2008 10:36 PM

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');

RLShare 07-23-2008 10:38 PM

You would replace 'main_index' with a unique name for your script... Usually it would be the same name as the php file itself.

Chris11987 07-23-2008 10:54 PM

This is what I get from that:

http://nintendohub.com/forumpage.php

RLShare 07-23-2008 11:01 PM

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

Chris11987 07-23-2008 11:12 PM

I tried again, and managed to get it to work, but it's still not using the css:

http://nintendohub.com/test2.php

RLShare 07-23-2008 11:17 PM

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.

Dismounted 07-24-2008 10:18 AM

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/" />

rcull 11-13-2008 12:31 AM

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

Lynne 11-13-2008 02:41 AM

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
  • Page Generation 0.01263 seconds
  • Memory Usage 1,761KB
  • 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_html_printable
  • (3)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (19)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