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)

grey_goose 06-09-2013 12:25 PM

I've added a new page, no problem. What do I need to do to be able to display custom profile fields on this new page?

Lynne 06-09-2013 06:47 PM

Quote:

Originally Posted by grey_goose (Post 2426842)
I've added a new page, no problem. What do I need to do to be able to display custom profile fields on this new page?

You probably need to run a query and then you need to assign variable names to the results, register them for use in the template, and then enter/format them into your template.

Digital Jedi 06-10-2013 10:41 PM

Quote:

Originally Posted by joeychgo (Post 2426587)
It took someone else 5 minutes to explain it to me. They took the time.

http://www.lincolnvscadillac.com/tech/test.php

I'm glad it worked out for you. But we took the time to give you an answer that would help you with more than just your one question. And, again, you weren't real clear the first time as to what you wanted. Which took more than five minutes to figure out ourselves. Since we didn't know what you didn't understand to start with. And we continued to help, even though it still had nothing to do with creating a custom page.

Spangle 06-24-2013 03:14 PM

I've got this as my HTML page :
Code:

{vb:stylevar htmldoctype}
<html xmlns="http://www.w3.org/1999/xhtml" dir="{vb:stylevar textdirection}" lang="{vb:stylevar languagecode}" id="vbulletin_html">
  <head>
    <title>{vb:raw vboptions.bbtitle} - {vb:raw pagetitle}</title>
    {vb:raw headinclude}
    {vb:raw headinclude_bottom}
  </head>
  <body>
   
    {vb:raw header}
   
    {vb:raw navbar}
   
    <div id="pagetitle">
      <h1>{vb:raw pagetitle}</h1>
    </div>
   
    <h2 class="blockhead">Page not found</h2>
    <div class="blockbody">
      <div class="blockrow">
        <h1> OOOPs </h1>
                <h2>  You've either made a typo, or tried to find a page that doesn't exist!
                </br>
                Now you have a choice, you can either look at this all day.
                Or click  <a href="http://www.primodoux.com/index.php"><span style =color:Red><h1>HERE</h1></span></a> to take you back to the index page. <br/>
               
                <br/>
      </div>
    </div>
   
    {vb:raw footer}
  </body>
</html>

and I have this as the php :

Code:

<?php

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

// #################### DEFINE IMPORTANT CONSTANTS #######################

define('THIS_SCRIPT', 'test');
define('CSRF_PROTECTION', true); 
// 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('notfound',
);

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

// ######################### REQUIRE BACK-END ############################
// if your page is outside of your normal vb forums directory, you should change directories by uncommenting the next line
// chdir ('/path/to/your/forums');
require_once('./global.php');

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

$navbits = construct_navbits(array('' => 'notfound'));
$navbar = render_navbar_template($navbits);

// ###### YOUR CUSTOM CODE GOES HERE #####
$pagetitle = 'Page not found';

// ###### NOW YOUR TEMPLATE IS BEING RENDERED ######

$templater = vB_Template::create('notfound');
$templater->register_page_templates();
$templater->register('navbar', $navbar);
$templater->register('pagetitle', $pagetitle);
print_output($templater->render());

?>

What I get from that is this :

{vb:stylevar htmldoctype} {vb:raw headinclude} {vb:raw headinclude_bottom} {vb:raw header} {vb:raw navbar}
{vb:raw pagetitle}
Page not found
OOOPs
You've either made a typo, or tried to find a page that doesn't exist!
Now you have a choice, you can either look at this all day. Or click
HERE
to take you back to the index page.

{vb:raw footer}


I think I need some help.

I'm using 4.2.1 if thats any help, and I'm trying to create a friendly 404 redirect page

TIA

Digital Jedi 06-24-2013 03:49 PM

At first glance, at least one instance of "test" was not changed to your template name in your PHP code.

Lynne 06-24-2013 04:01 PM

Is the page within the vbulletin directory?

Spangle 06-24-2013 05:03 PM

Quote:

Originally Posted by Digital Jedi (Post 2430201)
At first glance, at least one instance of "test" was not changed to your template name in your PHP code.

Thanks

Fixed that one but still not working

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

Quote:

Originally Posted by Lynne (Post 2430208)
Is the page within the vbulletin directory?


All the directories/files are uploaded to the root

ie :

public_html is my root directory

Lynne 06-25-2013 12:13 AM

Can we get a link to view the problem?

Spangle 06-25-2013 04:42 PM

Quote:

Originally Posted by Lynne (Post 2430280)
Can we get a link to view the problem?


Go to

www.primodoux.com/faeries

Lynne 06-26-2013 12:31 AM

You saved the template in the Style Manager, right? You didn't think we were talking about a Dreamweaver template hopefully.


All times are GMT. The time now is 07:51 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.04762 seconds
  • Memory Usage 1,751KB
  • 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
  • (2)bbcode_code_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (3)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