vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3 Articles (https://vborg.vbsupport.ru/forumdisplay.php?f=187)
-   -   How to create your own vBulletin-powered page! (uses vB templates) (https://vborg.vbsupport.ru/showthread.php?t=62164)

Adrian Schneider 08-10-2005 04:38 PM

Quote:

Originally Posted by cnczone
Has this been redone for VB 3.5?

Tis the exact same for both. :)

JohnBee 08-11-2005 06:10 PM

I would l like to use vB templates to design a dynamic page (with changing content)
specificaly the page is for news and would have a: Page 2 >> Page 3 >> type of arrangement. but I want to keep the vB header and footer active.

Normally this is not a problem on a regular .php page because I can use php includes but using vBulletins php include variable in the php_include_start template I am limited to one variable. The news page links are generated on the fly with there own unique ID's.

Is there any way to call php includes from an external file or something to get this working? can this addon do this?

Any help on this would be greatly appreciated

AndyA 08-15-2005 07:00 PM

Great I've got the page showing http://www.throttlejockey.co.uk/forum/info.php but am I right in thinking that any text is entered into the template and not the page itself ?

How do I get links or images to work on my new page ?

BigIke 08-15-2005 09:52 PM

Quote:

Originally Posted by AndyA
Great I've got the page showing http://www.throttlejockey.co.uk/forum/info.php but am I right in thinking that any text is entered into the template and not the page itself ?

How do I get links or images to work on my new page ?

Yes. What you want to put on the actual page goes into the template. However, whatever goes into the template must be html. So you can't put http://img.photobucket.com/albums/v1...4/P9060045.jpg that url and expect to have the image come up, you must use html like this:
HTML Code:

<img src="http://img.photobucket.com/albums/v185/andyaveyard/Tan%20Hill%20Meet%204-9-04/P9060045.jpg"></img>

keymistress 08-16-2005 03:56 AM

erm... for those who are using this mini mod for sub-domains, you have to add these two steps for it work:

find
PHP Code:

require_once('./global.php'); 

and add this before it
PHP Code:

define('CHDIR_PATH''/usr/local/psa/home/vhosts/yourdomain.com/subdomains/forums/httpdocs'); //just an example, please change to your own forum's full path
chdir(CHDIR_PATH); 

next you'll need to copy the login.php from your forums folder and paste it in your sub-domain directory. also find
PHP Code:

require_once('./global.php'); 

and add this before it
PHP Code:

define('CHDIR_PATH''/usr/local/psa/home/vhosts/yourdomain.com/subdomains/forums/httpdocs'); //just an example, please change to your own forum's full path
chdir(CHDIR_PATH); 

after that the mod will work for your sub-domain... just something i discovered while trying it for my own site... hope it helps!

eljeffe 08-21-2005 03:03 AM

I created a index.php file for our IRC chat client. I built a vbulletin header and footer wraper for it and it works like a champ. However, my chat client is outside the vB forum directory and the navbar links contain the wrong URL.

For the purposes of this example, my forums directory is in: http://www.mydomain.com/forums

My chat directory is in: http://www.mydomain.com/chat

I'll eventually have several other features that will be a subdirectory off of the http://www.mydomain.com/ website (i.e., chat, photos, files, journal, etc...)

Anyone have any ideas on what I can do to fix this. Here is the code in my index.php file:

PHP Code:

<?php 

        
// ####################### SET PHP ENVIRONMENT ########################### 
        
error_reporting(E_ALL & ~E_NOTICE); 

        
// #################### DEFINE IMPORTANT CONSTANTS ####################### 
        
define('NO_REGISTER_GLOBALS'1); 
        
define('THIS_SCRIPT''index'); // 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( 
                    
'java_irc_client'
                ); 

        
// pre-cache templates used by specific actions 
        
$actiontemplates = array( 

                ); 

        
// ######################### REQUIRE BACK-END ############################ 
        
chdir('/home/www/mydoman.com/forums');
        require_once(
'./global.php'); 

        
// ####################################################################### 
        // ######################## START MAIN SCRIPT ############################ 
        // ####################################################################### 

        
$navbits = array(); 
        
$navbits[$parent] = 'Chat Room'

        
$navbits construct_navbits($navbits); 
        eval(
'$navbar = "' fetch_template('navbar') . '";'); 
        eval(
'print_output("' fetch_template('java_irc_client') . '");'); 

?>

Any ideas are appreciated.

Thanks

MRGTB 08-21-2005 03:21 AM

Can you not move your IRC into your forums folder, things would be much easier for you then

eljeffe 08-21-2005 03:30 AM

Quote:

Originally Posted by Gary Bolton
Can you not move your IRC into your forums folder, things would be much easier for you then

I'm trying to keep my vb directory as clean as possible. I have to imagine there is some way to do this without throwing everything into the top directory of the forums.

Quote:

Originally Posted by Gary Bolton
Can you not move your IRC into your forums folder, things would be much easier for you then

Gary,

On second thought, I don't have a problem with keeping chat.php in my forum directory and accessing the chat system via http://www.mydomain.com/forum/chat

However, I would like to store the jar files, images, and support files outside of the forum directory. Even a subdirectory under forums (like chat) would work for me.

o0stephane0o 08-26-2005 12:44 PM

How would I create a page that only group ID 6, 8, 13 can see?
I tried with the information page 2 but it doesn´t work

Adrian Schneider 08-26-2005 03:09 PM

After calling global.php (and before the main output)
PHP Code:

if (!is_member_of($bbuserinfo6) AND !is_member_of($bbuserinfo8) AND !is_member_of($bbuserinfo13))
{
    
print_no_permission();


Replace "$bbuserinfo" with "$vbulletin->userinfo" if you are using 3.5


All times are GMT. The time now is 05:25 AM.

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.01641 seconds
  • Memory Usage 1,774KB
  • 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
  • (6)bbcode_php_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (4)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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