vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4 Articles (https://vborg.vbsupport.ru/forumdisplay.php?f=242)
-   -   [HOW TO - vB4] Create your own vBulletin page (https://vborg.vbsupport.ru/showthread.php?t=228112)

Lynne 05-15-2011 04:32 PM

There is no need to update it. It works perfectly fine in 4.1.2 an 4.1.3. The basic page structure hasn't changed at all in the 4.x series.

setjo1980ya 05-25-2011 01:59 PM

I have created custom page in vbulletin forum but don't know how to link it from navigation bar.
Please help

Lynne 05-25-2011 03:54 PM

Quote:

Originally Posted by setjo1980ya (Post 2199794)
I have created custom page in vbulletin forum but don't know how to link it from navigation bar.
Please help

There are several modifications to do this and a few articles if you try a search. [HOW TO - vB4] Create a New Tab in the navbar

setjo1980ya 06-02-2011 10:43 AM

I have created new page in vbulletin using the following code but is it blank

Please let me know the issue

First I prepared new custom page in named we-support.php

<?php
error_reporting(E_ALL & ~E_NOTICE);

define('NO_REGISTER_GLOBALS', 1);
define('THIS_SCRIPT', 'we-support');

$phrasegroups = array();

$specialtemplates = array();

$globaltemplates = array(
'test'
);

$actiontemplates = array();

require_once('./global.php');

if ($vbulletin->options['ctab_enable'])
{
$noaccessgids = explode(",", $vbulletin->options['limit_groups']);
if (is_member_of($vbulletin->userinfo, $noaccessgids))
{
print_no_permission();
}else{
$content = $vbulletin->options['content'];
}

$pagetitle = $vbulletin->options['custom_title'];

$navbits = array();
$navbits[$parent] = $vbphrase['custom_message_title'];
$navbits = construct_navbits($navbits);
$navbar = render_navbar_template($navbits);

$templater = vB_Template::create('test');
$templater->register_page_templates();
$templater->register('content', $content);
$templater->register('navbar', $navbar);
print_output($templater->render());
}
?>

============================
And Prepared new template named test

$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>

But When I opened it I found blank page
http://college-chat-rooms.gradchat.net/we-support.php

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

Issue solved
After deleting these lines the issue solved
if ($vbulletin->options['ctab_enable'])
{
$noaccessgids = explode(",", $vbulletin->options['limit_groups']);
if (is_member_of($vbulletin->userinfo, $noaccessgids))
{
print_no_permission();
}else{
$content = $vbulletin->options['content'];
}

Dave-ahfb 06-04-2011 01:29 PM

Is there any way to have each custom page have its own custom meta tags? I guess I could add about 100 if conditionals in the headinclude, but would this not bog things down?

Lynne 06-04-2011 03:21 PM

You may add your own meta tags into the pages. Just put it up where the headinclude template gets included.

Dave-ahfb 06-04-2011 10:33 PM

That is half the solution.

The problem then would be the second set of "default" meta tags also served up. To combat this I created a template which copies headinclude minus all the meta info, which is placed into the page templates.

This is the first time I have pulled out vb4 since the "not ready for prime time" release. Luckily after my 3rd attempt to locate my old test backups, I finally found them :).

Dave

temsamane 06-07-2011 08:57 AM

Quote:

Originally Posted by Lynne (Post 1915364)
This is an updated article on how to create your own vbulletin powered page. It's only for use with vB4.

This is NOT my work. I'm posting this from another thread where vB Style took the time to write this out. And his work is based on the article by Gary King here - How to create your own vBulletin-powered page! (uses vB templates)

Instructions to Create your Own Page:


1. Create the php page:
- 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)

2. Create the Template:
- If you are in debug mode, create the template in your MASTER STYLE so it shows up in all your styles, otherwise make sure you create the template in the style you are using.


i am a newby. I made step one and uploaded the file to forum root. but how can i create the template? can you tell me the steps i have to follow please?

Lynne 06-07-2011 04:47 PM

Quote:

Originally Posted by temsamane (Post 2204542)
i am a newby. I made step one and uploaded the file to forum root. but how can i create the template? can you tell me the steps i have to follow please?

Styles & Templates > Style Manager > find style > Add New Template

d19rnyxx 06-07-2011 11:36 PM

what condition can I use to only have a certain forum shown on a new .php page.


All times are GMT. The time now is 06:15 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.02249 seconds
  • Memory Usage 1,745KB
  • 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
  • (3)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