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)

ckandes1 06-24-2006 04:50 AM

nice writeup

heyitsjeremy 07-07-2006 03:15 AM

is there another copy of this that would work on 3.5.4 ?

vBSkins 07-09-2006 05:33 AM

This works fine with vBulletin 3.5.4 I used it on my site at vBSkins.com to create a couple of pages.

Gryphon 07-10-2006 08:48 PM

Works fine with 3.6.0 as well.

vBSkins 07-10-2006 10:01 PM

It should work with all future versions of vBulletin, all it does is creates a template and you upload one simple .php file, its a great release :)

dodjer42 07-16-2006 10:42 PM

I had a problem with the test page coming up blank. Turns out I created the test template as 'Test' rather than 'TEST'. Although my test server is Windows, it appears its still case sensitive. So once that was changed, it all worked perfectly.

Great hack :)

rootnik 07-21-2006 07:46 PM

Can somebody please look over this and tell me why it doesn't work?

edit: Nevermind, It turned out to be a problem with the template, not the php code.

Ipuck 08-08-2006 01:04 AM

It works great thanks!!!:D

I created another template(templeate2) with some information in html. Can insert that new template in the template a created first(template1).

template2 in template1.

I have tried but it doesn't work. Nothing is showing up.

Thanks

AzzidReign 08-11-2006 06:08 PM

If im making an affilaite system, would I use:

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

$affiliates $vbulletin->db->query_read_slave("
        SELECT *
        FROM " 
TABLE_PREFIX "affiiates 
        ORDER BY order ASC
    "
);


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

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

while (
$affiliates $vbulletin->db->fetch_array($affiliates))
{


eval(
'print_output("' fetch_template('affiliates') . '");');

}

?>


gonecountry 08-16-2006 04:34 PM

Ok please forgive me for the ??? I didn't have coffe today.

If I understand this correctly, for every page you want to create whether its 1 or 20 you make a new php file and an new template????

TIA

JompaMP 08-21-2006 10:23 AM

i have problem when i go to this page its just a white page look http://forum.drazonia.com/premium.php

i got it to work

Renmiri 08-23-2006 02:46 AM

You are an angel, thanks for this!

:)

aycan555 09-10-2006 06:09 AM

Hi i have insatlled this hack, and it works perfectly,

But the problem is only registered users can view this page, i want to show all visitors, how can i do this?

SaN-DeeP 09-13-2006 01:15 AM

works perfect in Vb 3.6 but need some modifications to whos online code..
can someone direct to right modifications for whos online for custom pages in 3.6 ?

ZacUSNYR 09-20-2006 01:13 PM

Quote:

Originally Posted by SaN-DeeP
works perfect in Vb 3.6 but need some modifications to whos online code..
can someone direct to right modifications for whos online for custom pages in 3.6 ?

Who's on-line has changed in the newer versions - just use plugins.

https://vborg.vbsupport.ru/showthread.php?t=82882

Simple and works great :)

Cebby 10-01-2006 03:27 PM

Quote:

Originally Posted by ang2el
I tried Iframe code in the template but it didn't display the website that I wanted to display in the costume page created.


Can anyone help me how to display through template


or


how to create a page with just header navbar and footer or say no need to fetch template


thanks

I have a need for this also. I just get a blank page. Any way to make this work? I've stripped out as much off the stuff out of the src file for the iframe as possible...

Or is there another way? (the reason for this is the person generating the content that I want to display in the iframe won't try to manually code it into the template directly) Any workarounds?

Dumi 10-14-2006 04:41 AM

I get this when i try and access the test page? Any ideas?

http://www.prisonbreakscene.com/test.php

Adrian Schneider 10-14-2006 04:53 AM

Add "<?php" to the very beginning of the file.

Dumi 10-14-2006 03:18 PM

Quote:

Originally Posted by SirAdrian
Add "<?php" to the very beginning of the file.

I'm such an idiot cant even copy and past! :confused:

Samouel 10-21-2006 01:41 PM

For vbulletin 3.6.2 you could use :

You have to create a 'TEST' template :
Quote:

$stylevar[htmldoctype]
<html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
<head>
<!-- no cache headers -->
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="-1" />
<meta http-equiv="Cache-Control" content="no-cache" />
<!-- end no cache headers -->
$headinclude
<title><phrase 1="$vboptions[bbtitle]">$vbphrase[x_powered_by_vbulletin]</phrase></title>
</head>
<body>
$header
$navbar

<br />

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" style="border-bottom: 0" width="100%" align="center">
<tr>
<td class="cat-top">TEST</td>
</tr>
</table>
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tbody>
<tr>
<td colspan="2">TEST</td>
</tr>
</tbody>
</table>
<br />

$footer
</body>
</html>
and a test.php file :

Quote:

<?php

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

// #################### DEFINE IMPORTANT CONSTANTS #######################
define('THIS_SCRIPT', 'index');

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

eval('$navbar = "' . fetch_template('navbar') . '";');
eval('print_output("' . fetch_template('TEST') . '");');
?>
I think it will work :up:

:bunny: :bunny:

************

Hum... I have a question :)

In my database, I have 5 records (5 names of country) and I would like to list them in the 'test.php' page.

My test.php file :
Code:

$name = $db->query_read_slave("SELECT name FROM country");

        while ($country = $db->fetch_array($name))
        {
                $vbphrase[name] =  $country['name'];
        }

In the template, I indicate :

Code:

$vbphrase[name]
But I have just one name of country which is listed !
What I have to do to list all names of country ?

Thanks :rambo:

HPIA 10-24-2006 11:14 AM

So to make one for 3.6.2, I would just need to do the one above this post in compliance to the other one on the first post?

Animesprings 10-24-2006 07:53 PM

1 Attachment(s)
Sweet tutorial, lol I made a forum guidelines page (which I copied from another site...but I modified them a bit) with it on v3.6.2!
http://www.animesprings.com/forums/rules.php

Edit: Also if you want the default guest message to show up on your page (screenshot posted below) then find :
Code:

$navbar
Then Paste Below:
Code:


<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">

<if condition="$show['guest']">

        <!-- guest welcome message -->
        <tr>
                <td class="tcat"><phrase 1="$vboptions[bbtitle]">$vbphrase[welcome_to_the_x]</phrase></td>
        </tr>
        <tr>
                <td class="alt1">
                        <phrase 1="faq.php$session[sessionurl_q]" 2="register.php$session[sessionurl_q]">$vbphrase[first_visit_message]</phrase>
                </td>
        </tr>
        <!-- / guest welcome message -->
        </if>
</table>
<br />


Sergio68 10-25-2006 11:09 PM

I have 2 custom pages :

a) http://www.vbulletin.it/forums/prova.php

b) http://www.vbulletin.it/prova.php

In a) page vBMenu is working but not in the b) page.

Anyone can help me please ?

Sergio68 10-27-2006 02:14 AM

Ok, solved.

Now I have a problem with PHP include, I can show the variables but I can't show the echo from the php file, what can I do ?

http://www.bodyweb.it/prodotti.php








__________________________________________________ ________________________
What a mess, automerged :D
__________________________________________________ ________________________






Quote:

Originally Posted by Samouel
Hum... I have a question :)

In my database, I have 5 records (5 names of country) and I would like to list them in the 'test.php' page.

My test.php file :
Code:

$name = $db->query_read_slave("SELECT name FROM country");

        while ($country = $db->fetch_array($name))
        {
                $vbphrase[name] =  $country['name'];
        }

In the template, I indicate :

Code:

$vbphrase[name]
But I have just one name of country which is listed !
What I have to do to list all names of country ?

Thanks :rambo:

Code:

$name = $db->query_read_slave("SELECT name FROM country");
    $i=0;
        while ($country = $db->fetch_array($name))
        {
                $vbphrase[$i] =  $country['name'];
$i++;
        }

Code:

$vbphrase[1]
$vbphrase[2]
$vbphrase[3]
$vbphrase[4]
$vbphrase[5]

May be ?

renalpha 10-27-2006 11:37 AM

how do i do this?
i have a already installed skin,i want ot use that skin
i need to add a code or skin :S
How?
Please a stepby step tutorial would be nice,

Like when im in admin cp -> style manager _>

help would be nice
ty in future

CSS59 10-27-2006 11:39 PM

How Can I make these pages searchable?

Adrian Schneider 10-27-2006 11:41 PM

There's no easy way yet... vBulletin's search capabilities weren't created with flexibility in mind.

CSS59 10-27-2006 11:46 PM

Quote:

Originally Posted by SirAdrian
There's no easy way yet... vBulletin's search capabilities weren't created with flexibility in mind.


any way of doing it by duplicating the FAQ, then creating custom pages based on that? The FAQ has a search function

vern17 10-30-2006 03:58 AM

I am trying to add a google map using this method. I have done everything I am supposed to, but for some reason when I get done it doesn't show up in IE. It works fine in Opera. What can I do to fix this? Thanks for your help guys.

jimbocook 11-01-2006 10:50 PM

Quote:

Originally Posted by Mr. HillBilly
Here guys, try this.

Edit the lines at the top of the file so they look like this, be sure to include your own changes if you had made any.

etc. etc.

this was trying to get the who's online etc. information to work with this hack. sross said he got it to work by moving the eval statements. If you're still around, can you tell me where you moved them?

Or can anyone else help?

GriZzm0 11-16-2006 04:54 PM

Anyone know how to make it parse links and smileys?

Bacteria 11-21-2006 08:04 PM

Grr I did exactly as it said but when I go to test.php it is a blank page. Is this right?

Captain Kirk76 11-23-2006 06:04 PM

I can't get it working, it just gives me a blank page :(

Derekclarke 11-24-2006 07:00 PM

Hi, using the codes from the first page with Vb 3.6.4 i have got the pages working, but cannot see how to restrict them to specific user groups?

Can anyone advise.

Thanks
Derek

shete 11-26-2006 08:08 AM

Love this thank you so so much ! makes my site urls look much more professional and easier to remember

Quote:

Originally Posted by Captain Kirk76 (Post 1123814)
I can't get it working, it just gives me a blank page :(


it did that to me too ... but i bet your template is LOWERCASE huh ???

change it to CAPITALIZED LETTERS and it should work !

Quote:

Originally Posted by Bacteria (Post 1122459)
Grr I did exactly as it said but when I go to test.php it is a blank page. Is this right?


the template name needs to be capitalized !!

JimmyJames 11-29-2006 03:21 PM

Ok, so I created a page and dropped the template in and everything works fine except for one thing. I need this page to be viewable by guests, so I tried wrapping a conditional around my template, but this did not work. Every time a guest tries to access my customized page, they get the generic vbulletin "you don't have permission to access this page" message. Any suggestions???

btw, i used this conditional around my template:

<if condition="$show['guest']"></if>

Gastongr 12-03-2006 04:36 AM

Nice article.
I'm using this on a different directory, for those with path problems for images and links, adding the base url element with your forum path will solve it.

dakar 12-16-2006 07:40 PM

Okay saw this a few pages back but it went unanswered;

Created new .php file and template.. works great... now the problem is the page I created takes user input and POSTS the values to another php script which does some math and echos the results. When the calculation page is called all the php echo and stuff is hosed.... The script works properly outside of vB. Am I missing something to perform standard php functions within a vB page?

wIrEs 01-02-2007 10:11 AM

Does this work with 3.6.4?

i want to create a page with only the vbulletin copyrights at the bottom, making the page as my main index page, sort of like a mini-cms page with recent post, recent pictures etc...

Eagle Creek 01-02-2007 04:05 PM

I have it working with 3.6.4.


All times are GMT. The time now is 09:23 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.02213 seconds
  • Memory Usage 1,850KB
  • 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
  • (8)bbcode_code_printable
  • (1)bbcode_php_printable
  • (10)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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