Go Back   vb.org Archive > vBulletin Article Depository > Read An Article > vBulletin 3 Articles
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
How to create your own vBulletin-powered page! (uses vB templates)
Gary King's Avatar
Gary King
Join Date: Jan 2002
Posts: 2,046

 

Show Printable Version Email this Page Subscription
Gary King Gary King is offline 03-03-2004, 10:00 PM

Want to create your very own vBulletin powered page which includes the header, footer, and the user permissions system as well?

Well now you can

Want to know how it will look? Take a look at the attached screenshot below!

Now includes the Who's Online modification!
Also, instructions included on how to create your own pages that are integrated with current vBulletin files!

I'm going to give you a generic page but you can easily modify the contents of the page by changing the template

So here we go

Instructions:

Create a new file, whatever you want to call it (let's say test.php).
Open up test.php and add the following (replace TEST with whatever template you want to show):
PHP Code:
<?php

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

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

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

);

// ######################### REQUIRE BACK-END ############################
require_once('./global.php');

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

$navbits = array();
$navbits[$parent] = 'Test Page';

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

?>
Be sure to change 'TEST' to the actual template name, and change 'test' to the filename. Also, change 'Test Page' to whatever you want to show in the navbar, such as 'Viewing Member Profile' (just an example).

Now create the template, called TEST with the following content:
HTML Code:
$stylevar[htmldoctype]
<html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
<head>
<title>$vboptions[bbtitle]</title>
$headinclude
</head>
<body>
$header

$navbar

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
    <td class="tcat">Title</td>
</tr>
<tr>
    <td class="alt1">Text</td>
</tr>
</table>

$footer
</body>
</html>
All done
Now check it out by going to test.php

Who's Online Modification

Now if you want to show who is browsing this new page of yours, just open up includes/functions_online.php and find:
PHP Code:
    case 'bugs.php':
        
$userinfo['activity'] = 'bugs';
        break; 
Below, add:
PHP Code:
    case 'test.php':
        
$userinfo['activity'] = 'test';
        break; 
(Be sure to change the values to your own!)

Then find:
PHP Code:
        case 'modcplogin':
            
$userinfo['action'] = $vbphrase['moderator_control_panel_login'];
            break; 
Below add:
PHP Code:
        case 'test':
            
$userinfo['action'] = 'Viewing Test Page';
            break; 
All done!

----------------------------------

Also if you want to create your own pages 'within' current vBulletin files, do the following:

Open the file you want, and then right before the final ?> in the source code, add the following:

PHP Code:
if ($_REQUEST['do'] == 'xxx')
{
    eval(
'print_output("' fetch_template('TEMPLATE_XXX') . '");');

Replace 'xxx' with whatever you want ?do= in the query string to be (for example, replace 'xxx' with 'showprofile' so then someone would type in example.php?do=showprofile to view this template.) Then of course, change TEMPLATE_XXX to your template name, it's that simple!


edit by Lynne: If running 3.8.4 or above, see this post to take care of the PHP 5.3.0-related problems - https://vborg.vbsupport.ru/showpost....postcount=1171
Attached Images
File Type: jpg template_test.jpg (62.5 KB, 0 views)
Reply With Quote
  #322  
Old 07-23-2005, 04:56 PM
Adrian Schneider's Avatar
Adrian Schneider Adrian Schneider is offline
 
Join Date: Jul 2004
Posts: 2,528
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

global.php
Find
PHP Code:
define('STYLEID'$style['styleid']); 
Above it, add
PHP Code:
if (THIS_SCRIPT == 'yourscriptname')
{
    
$styleid X

Make sure you have yourscriptname defined in your custom page.
Reply With Quote
  #323  
Old 07-24-2005, 12:47 AM
derekivey derekivey is offline
 
Join Date: Apr 2005
Location: Pennsylvania, USA
Posts: 1,186
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks

Didn't work
Reply With Quote
  #324  
Old 07-26-2005, 04:11 PM
MRGTB MRGTB is offline
 
Join Date: Dec 2004
Posts: 548
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have a question, how can you create the template so it uses it own custom folder to store the template in, so the option is there to restore the template to original state.

Just like all the other vb templates use there own folders. Like FORUMHOME stores all the forumhome templates for example, if you understand what I mean to tidy things up much better in the admin template section.
Reply With Quote
  #325  
Old 08-02-2005, 02:12 PM
MRGTB MRGTB is offline
 
Join Date: Dec 2004
Posts: 548
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I hate to reply to myself - but anybody got an answer to the above question? :surprised:
Reply With Quote
  #326  
Old 08-02-2005, 04:17 PM
attroll's Avatar
attroll attroll is offline
 
Join Date: Jan 2003
Location: Litchfield, Me
Posts: 664
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Gary Bolton
I have a question, how can you create the template so it uses it own custom folder to store the template in, so the option is there to restore the template to original state.

Just like all the other vb templates use there own folders. Like FORUMHOME stores all the forumhome templates for example, if you understand what I mean to tidy things up much better in the admin template section.
I know you can create a folder so that it is stored in its own folder but I don't know any way to have the template have a default code.
Reply With Quote
  #327  
Old 08-02-2005, 04:24 PM
Adrian Schneider's Avatar
Adrian Schneider Adrian Schneider is offline
 
Join Date: Jul 2004
Posts: 2,528
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

To create the categories to store them in edit adminfunctions_template.php, at the very end add to the array.
PHP Code:
'prefix' => 'Text'
remember that for it to work, the template name must be "prefix" or contain "prefix_", and the text "Templates" is automatically added.

To be able to revert it, you must add it into the MASTER STYLE {requires being in debug mode}.
Reply With Quote
  #328  
Old 08-02-2005, 06:30 PM
m0nde's Avatar
m0nde m0nde is offline
 
Join Date: Mar 2005
Location: Toronto, ON Canada
Posts: 204
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by SVTBlackLight01
OK. To answer my own question, on line 32, I replaced

Code:
require_once('./global.php');
with this

Code:
chdir('/home/site/public_html/testvb/');
require('./global.php');
How can that work? Wouldn't you have to put the whole path to global.php once you change the directory?

- Sid
Reply With Quote
  #329  
Old 08-02-2005, 07:05 PM
MRGTB MRGTB is offline
 
Join Date: Dec 2004
Posts: 548
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by TheSpecialist
To create the categories to store them in edit adminfunctions_template.php, at the very end add to the array.
PHP Code:
'prefix' => 'Text'
remember that for it to work, the template name must be "prefix" or contain "prefix_", and the text "Templates" is automatically added.

To be able to revert it, you must add it into the MASTER STYLE {requires being in debug mode}.
Can you please be a little more clear in laymans terms. I really don't understand what your saying for me to do :disappointed:
Reply With Quote
  #330  
Old 08-02-2005, 07:12 PM
Adrian Schneider's Avatar
Adrian Schneider Adrian Schneider is offline
 
Join Date: Jul 2004
Posts: 2,528
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Okay, in /includes/adminfunctions_template.php there is an array at the very end of the file:
PHP Code:
// template groups
$only = array
(
    
// phrased groups
    
'buddylist' => $vbphrase['group_buddy_list'],
    
'calendar' => $vbphrase['group_calendar'],
    
'faq' => $vbphrase['group_faq'],
 ... 
Each of these creates a 'folder' into the template manager to oraganize your templates. You can add your own in using the above format (left part is the prefix, right part is the 'folder' Name (which automatically adds Templates to the end).

Example:
PHP Code:
    'attachmentlist' => $vbphrase['group_attachment_list'],
    
'subscription' => $vbphrase['group_paid_subscriptions'],
        
'league' => 'League'// I added this one 
    
'aaa' => 'AAA Old Backup' 
Reply With Quote
  #331  
Old 08-02-2005, 11:41 PM
MRGTB MRGTB is offline
 
Join Date: Dec 2004
Posts: 548
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by TheSpecialist
Okay, in /includes/adminfunctions_template.php there is an array at the very end of the file:
PHP Code:
// template groups
$only = array
(
    
// phrased groups
    
'buddylist' => $vbphrase['group_buddy_list'],
    
'calendar' => $vbphrase['group_calendar'],
    
'faq' => $vbphrase['group_faq'],
 ... 
Each of these creates a 'folder' into the template manager to oraganize your templates. You can add your own in using the above format (left part is the prefix, right part is the 'folder' Name (which automatically adds Templates to the end).

Example:
PHP Code:
    'attachmentlist' => $vbphrase['group_attachment_list'],
    
'subscription' => $vbphrase['group_paid_subscriptions'],
        
'league' => 'League'// I added this one 
    
'aaa' => 'AAA Old Backup' 
Your a star, that works great and I created a new line called:
'vbindex' => 'vBindex',

And it moved all my loose vbindex templates into the folder so everything is nice and neat now. I have one other question though that I also hope you can help me with the finish it off.

By default when you go into a templates folder and view a template there, there is an option to view the default template code in-case you mess up. So you can copy and paste that code back intoi the box and save.

I noticed even though I now have all my vbindex templates in there own folder under default template, the option to view default template just shows me a blank white box with no code in it. Is it possible to make that show the default code for all my vbindex templates when clicked for each one?
Reply With Quote
  #332  
Old 08-03-2005, 04:34 AM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That is because they are custom templates. If you want to show them also as default, you will have to set them manually in the database to belong to styleid -1.

This can however mean that they get removed on a vB upgrade.

/me didn't have his coffee yet, so use the above only on a testboard.
Reply With Quote
  #333  
Old 08-03-2005, 12:44 PM
MRGTB MRGTB is offline
 
Join Date: Dec 2004
Posts: 548
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Does that also mean then if you make some manual edits to some of the default templates, like when you add a new mod that requires some edits in FORUMHOME templates, the chances are an update to an higher version can mess things up becuase they were default templates edited,

Out of interest how would you go about making them changes in your database. Would you go into the template section and edit each template and change the ID.
Reply With Quote
  #334  
Old 08-03-2005, 11:53 PM
JMH11788 JMH11788 is offline
 
Join Date: Jan 2005
Location: Ohio
Posts: 83
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have this hack working perfect for my forum rules, but I tried making another page today using a template called ARTICLES and a .php file called articles.php. I modifed the template and .php file correctly, but when I go to http://forums.theoverclocked.com/articles.php, I get that error. Can anyone help?

EDIT: Nvm...appears to be working now....wierd
Reply With Quote
  #335  
Old 08-04-2005, 12:57 AM
Selene Selene is offline
 
Join Date: Feb 2005
Posts: 166
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanx
Reply With Quote
  #336  
Old 08-04-2005, 01:18 AM
derekivey derekivey is offline
 
Join Date: Apr 2005
Location: Pennsylvania, USA
Posts: 1,186
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I still can't get it to show the page in a certain style, it always shows it in the style the user is using. Any ideas?
Reply With Quote
  #337  
Old 08-04-2005, 03:14 PM
MRGTB MRGTB is offline
 
Join Date: Dec 2004
Posts: 548
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sorry can't help you there, I only use the default style here, so I don't have that problem.

But I also would still like to know how you edit your database so the new template displays a default template for in the edit template page.
Reply With Quote
  #338  
Old 08-04-2005, 08:27 PM
James Grant James Grant is offline
 
Join Date: Jul 2005
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is a really useful bit of code, but i want to change the style to something different too :ermm:
Reply With Quote
  #339  
Old 08-06-2005, 04:47 PM
TylerL TylerL is offline
 
Join Date: Sep 2004
Posts: 5
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Am I the ONLY one with this error?

Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/myovercl/public_html/sudburyskate/skatespots/index.php on line 43

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(
    
'skatespots',
);

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

);

// ######################### REQUIRE BACK-END ############################
chdir('$vboptions[homeurl]/');
require(
'./global.php');

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

$navbits = array();
$navbits[$parent] = 'Sudbury Skate Spots'';

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

?>
Created a template called 'skatespots'. The file is located at:

http://www.sudburyskate.com/skatespots/index.php
Reply With Quote
  #340  
Old 08-06-2005, 05:13 PM
Adrian Schneider's Avatar
Adrian Schneider Adrian Schneider is offline
 
Join Date: Jul 2004
Posts: 2,528
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

PHP Code:
$navbits[$parent] = 'Sudbury Skate Spots''; 
should be
PHP Code:
$navbits[$parent] = 'Sudbury Skate Spots'
(it had an extra quote)

Also,
PHP Code:
chdir('$vboptions[homeurl]/'); 
won't work, as $vboptions is set after global.php is ran, and of course even if it was set, you can't use variables inside single quotes.

Quote:
Originally Posted by James Grant
This is a really useful bit of code, but i want to change the style to something different too :ermm:
Assuming you are on 3.0.x: (mine is 3.0.7, may be a little dif)

global.php - find:
PHP Code:
$styleid intval($styleid); 
Above it, add:
PHP Code:
if (THIS_SCRIPT == 'yourscriptname')
{
    
$styleid X;

(where yourscriptname is what you have defined at the top of your page)
Reply With Quote
  #341  
Old 08-10-2005, 04:37 PM
cnczone cnczone is offline
 
Join Date: Mar 2003
Posts: 128
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Has this been redone for VB 3.5?
Reply With Quote
  #342  
Old 08-10-2005, 04:38 PM
Adrian Schneider's Avatar
Adrian Schneider Adrian Schneider is offline
 
Join Date: Jul 2004
Posts: 2,528
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by cnczone
Has this been redone for VB 3.5?
Tis the exact same for both.
Reply With Quote
  #343  
Old 08-11-2005, 06:10 PM
JohnBee JohnBee is offline
 
Join Date: Oct 2004
Posts: 544
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #344  
Old 08-15-2005, 07:00 PM
AndyA AndyA is offline
 
Join Date: Apr 2005
Posts: 188
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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 ?
Reply With Quote
  #345  
Old 08-15-2005, 09:52 PM
BigIke's Avatar
BigIke BigIke is offline
 
Join Date: Aug 2004
Location: Norfolk, VA
Posts: 143
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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>
Reply With Quote
  #346  
Old 08-16-2005, 03:56 AM
keymistress keymistress is offline
 
Join Date: Jan 2005
Posts: 29
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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!
Reply With Quote
  #347  
Old 08-21-2005, 03:03 AM
eljeffe eljeffe is offline
 
Join Date: Aug 2005
Posts: 48
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #348  
Old 08-21-2005, 03:21 AM
MRGTB MRGTB is offline
 
Join Date: Dec 2004
Posts: 548
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Can you not move your IRC into your forums folder, things would be much easier for you then
Reply With Quote
  #349  
Old 08-21-2005, 03:30 AM
eljeffe eljeffe is offline
 
Join Date: Aug 2005
Posts: 48
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #350  
Old 08-26-2005, 12:44 PM
o0stephane0o's Avatar
o0stephane0o o0stephane0o is offline
 
Join Date: Feb 2002
Posts: 48
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #351  
Old 08-26-2005, 03:09 PM
Adrian Schneider's Avatar
Adrian Schneider Adrian Schneider is offline
 
Join Date: Jul 2004
Posts: 2,528
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #352  
Old 08-27-2005, 11:32 AM
---MAD--- ---MAD--- is offline
 
Join Date: Jun 2005
Location: Earth
Posts: 191
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

the online thing doesnt work :S
Reply With Quote
  #353  
Old 08-27-2005, 06:19 PM
Adrian Schneider's Avatar
Adrian Schneider Adrian Schneider is offline
 
Join Date: Jul 2004
Posts: 2,528
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by MAD_PLayEr1
the online thing doesnt work :S
Yes it does.

What version of vBulletin are you using? Post the edits you made.
Reply With Quote
  #354  
Old 08-30-2005, 05:15 AM
geoff4787 geoff4787 is offline
 
Join Date: Apr 2005
Posts: 28
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks, great tutorial!
Reply With Quote
  #355  
Old 08-30-2005, 07:27 AM
o0stephane0o's Avatar
o0stephane0o o0stephane0o is offline
 
Join Date: Feb 2002
Posts: 48
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

SirAdrian it works like a charm, thanks a lot
Reply With Quote
  #356  
Old 08-31-2005, 12:43 PM
digidivakathy digidivakathy is offline
 
Join Date: Jul 2005
Posts: 17
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

PLEASE could someone help me with this?

I have made a vBulletin powered page with bio information about my team members and have managed to get everything perfect in FF, but I have one little problem in IE and don't know how to fix it. The time stat is over to the far right instead of at the bottom above the nav bar. I'm sure it's something very tiny, but I just don't know what it is...can anyone help me?

http://www.digiscrapdivas.com/forums/AAM_suzy.php

That's the page. If you have any other suggestions on how to make it look better, feel free to let me know, but I'm happy with it other than the little problem I described.

I'm sorry if this isn't the right place to ask this, but there are so many help forums out there that I didn't know where to start.

Thanks so much!!
Reply With Quote
  #357  
Old 08-31-2005, 08:46 PM
Huijting Huijting is offline
 
Join Date: Jul 2005
Posts: 26
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by SirAdrian
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

Thank U for this one , i have seen all the pages :squareeyed: and found it here

Rob
Reply With Quote
  #358  
Old 08-31-2005, 09:01 PM
Adrian Schneider's Avatar
Adrian Schneider Adrian Schneider is offline
 
Join Date: Jul 2004
Posts: 2,528
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by digidivakathy
I have made a vBulletin powered page with bio information about my team members and have managed to get everything perfect in FF, but I have one little problem in IE and don't know how to fix it. The time stat is over to the far right instead of at the bottom above the nav bar. I'm sure it's something very tiny, but I just don't know what it is...can anyone help me?
Try cleaning up your HTML a bit in your template, just as an example I noticed you opened a new <tr> without closing the last one, things like that will break the page, just keep in mind that IE and FFX render things differently, so it may appear fine on one and not the other...

Also, best place for that kind of thing would be the PHP / MySQL / JS / (X)HTML forum.
Reply With Quote
  #359  
Old 08-31-2005, 11:56 PM
MRGTB MRGTB is offline
 
Join Date: Dec 2004
Posts: 548
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Then find:
PHP Code:
        case 'modcplogin':
            
$userinfo['action'] = $vbphrase['moderator_control_panel_login'];
            break; 
Below add:
PHP Code:
        case 'test':
            
$userinfo['action'] = 'Viewing Test Page';
            break; 
Just to slightly improve on this for people who want to also add a link on there "Who's Online" page that links to the test page when clicked. You can also use this as a replacment for the above bottom code.

PHP Code:
case 'test'
            
$userinfo['action'] = 'Viewing Test Page';
            
$userinfo['where'] = "<a href=\"test.php\">Test</a>";
            break; 
Reply With Quote
  #360  
Old 09-11-2005, 12:17 AM
BlueBulletRL BlueBulletRL is offline
 
Join Date: Apr 2005
Posts: 91
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I am currently trying to integrate a paypal store that I had purchased into my website. I used the template in the thread and couldn't get it to work the store actually uses a few files that it calls and uses. I tried adding the main page which calls all the files to the template file and use the ob_start(); thing such as you pointed out but still am unable to get it to bring up my page. Any insight and help and kicks in the right direction would be greatly appreciated. Oh and also my paypal store uses a mysql backend. Thanks

ok sweet looks like I got it to work........somewhat I get the page to display like my store front however when I click on one of my products instead of reloading the page like it should with just the product and all the details it just reloads my whole front page again. This is driving me nuts I'm gonna keep trying but if anyone has any ideas please let me know. Oh and it uses this at the end of the page do=buy&pid=6 within the actual file it does a post within its self thanks guys I NEED HELP!
Reply With Quote
  #361  
Old 09-16-2005, 06:41 PM
Nullifi3d Nullifi3d is offline
 
Join Date: Apr 2004
Location: FL, USA
Posts: 215
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by SirAdrian
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
IMO, an array would be better.

vB 3.0.x:
PHP Code:
if (!in_array($bbuserinfo['usergroupid'], array(6,8,13))) print_no_permission(); 
vB 3.5.x:
PHP Code:
if (!in_array($vbulletin->userinfo['usergroupid'], array(6,8,13))) print_no_permission(); 
Reply With Quote
Reply


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

Forum Jump


All times are GMT. The time now is 03:55 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.09756 seconds
  • Memory Usage 2,762KB
  • Queries Executed 56 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_code
  • (2)bbcode_html
  • (33)bbcode_php
  • (14)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_article
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (41)post_thanks_box
  • (5)post_thanks_box_bit
  • (41)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (41)post_thanks_postbit_info
  • (40)postbit
  • (1)postbit_attachment
  • (41)postbit_onlinestatus
  • (41)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete