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)

merk_aus 11-11-2008 06:09 AM

where do you create the template and where do you put the html code
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>

????

Digital Jedi 11-11-2008 06:22 AM

Quote:

Originally Posted by merk_aus (Post 1663367)
where do you create the template and where do you put the html code
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>

????

Templates are created in your Style Manager.

cindy helmond 11-20-2008 08:15 PM

nice but when i go back to forum or memberlist the pagina is going everytime to the added page ?
whats wrong?

all the links that i click are going to the new page but if a delete the link in the navbar and going to the url then the links are good !
thx

Lynne 11-20-2008 08:53 PM

Quote:

Originally Posted by cindy helmond (Post 1669579)
nice but when i go back to forum or memberlist the pagina is going everytime to the added page ?
whats wrong?

all the links that i click are going to the new page but if a delete the link in the navbar and going to the url then the links are good !
thx

I don't really understand what the problem is except it revolves around a link you added in the navbar? Perhaps you have it coded wrong. You might want to post what you did.

cindy helmond 11-20-2008 09:02 PM

Quote:

Originally Posted by Lynne (Post 1669598)
I don't really understand what the problem is except it revolves around a link you added in the navbar? Perhaps you have it coded wrong. You might want to post what you did.

Code:

<td class="vbmenu_control"><a href="http://www.xx.eu/forum/Chat.php/">Chat</a></td>
thats the link if i add that to the navbar the page are going to it but i cant back to another link in the forum he get the link with Chat for the link everytime

Lynne 11-20-2008 09:09 PM

Quote:

Originally Posted by cindy helmond (Post 1669606)
Code:

<td class="vbmenu_control"><a href="http://www.xx.eu/forum/Chat.php/">Chat</a></td>
thats the link if i add that to the navbar the page are going to it but i cant back to another link in the forum he get the link with Chat for the link everytime

I'm think your link is incorrect. Try this:
Code:

<td class="vbmenu_control"><a href="http://www.xx.eu/forum/Chat.php">Chat</a></td>

cindy helmond 11-20-2008 09:13 PM

Quote:

Originally Posted by Lynne (Post 1669611)
I'm think your link is incorrect. Try this:
Code:

<td class="vbmenu_control"><a href="http://www.xx.eu/forum/Chat.php">Chat</a></td>

THX WORKING !!

--------------- Added [DATE]1227225877[/DATE] at [TIME]1227225877[/TIME] ---------------

--------------- Added [DATE]1227225965[/DATE] at [TIME]1227225965[/TIME] ---------------

--------------- Added [DATE]1227244261[/DATE] at [TIME]1227244261[/TIME] ---------------

i have now an dating script but its not working to login (i know its not working with vbulletin username) if i open the script in a new window its working ! if i open it in vbforum cant login the script iframe not working cookies?
any idea?
thx

LaPiba 11-24-2008 11:02 PM

Hi,

I have a serious problem.

I made the following chat page; it is called parachat.php and this is the code:

Quote:

<?php

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

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

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

);

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

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

$nombre = $vbulletin->userinfo['username'];

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

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

?>
The "parachat" template has conditionals... it is something like this:

Quote:

$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="alt1">
<if condition="$bbuserinfo['usergroupid'] != 1 AND
$bbuserinfo['usergroupid'] != 2 AND
$bbuserinfo['usergroupid'] != 3 AND $bbuserinfo['usergroupid'] != 4 AND $bbuserinfo['usergroupid'] != 10 AND $bbuserinfo['usergroupid'] != 18 AND $bbuserinfo['usergroupid'] != 19 AND $bbuserinfo['usergroupid'] != 21">

Here it comes a chat applet.

<else />
Here it comes a message for non authorized usergroups.
<br /><br />
<if condition="$bbuserinfo['usergroupid'] == 2">
Here another message, specifically for usergroup 2 which is non-authorized for chat in my forum.
<br /><br />
</if>
</if>
</td>
</tr>
</table>
<br /><br />
$footer
</body>
</html>
However, one member managed to enter that page, although she is in a non-authorized usergroup (usergroup 21).

Is this a problem with the php page, or with the use of conditionals?

Could anybody help me? Thanky you in advance.

cindy helmond 11-24-2008 11:38 PM

Quote:

Originally Posted by LaPiba (Post 1672315)
Hi,

I have a serious problem.

I made the following chat page; it is called parachat.php and this is the code:



The "parachat" template has conditionals... it is something like this:



However, one member managed to enter that page, although she is in a non-authorized usergroup (usergroup 21).

Is this a problem with the php page, or with the use of conditionals?

Could anybody help me? Thanky you in advance.


its not working the php script in a vbulletin page , the users cant login i have the same problem with a dating inlog program

LaPiba 11-25-2008 01:37 AM

In my case, the page IS working for all users, with only one excepcion: there is ONE user that is entering the page, although she belongs to a usergroup which is not authorized to enter it.

That user is the only exception... the page is working fine for all other users.

Some days ago, this user belonged to another usergroup (a usergroup allowed to enter the page), and, after i moved her to usergroup #21, she continued entering the page.

Perhaps her browser is showing her a cached version?


All times are GMT. The time now is 12:29 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.03498 seconds
  • Memory Usage 1,764KB
  • 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
  • (6)bbcode_code_printable
  • (8)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