vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3 Articles (https://vborg.vbsupport.ru/forumdisplay.php?f=187)
-   -   Create Custom Pages (https://vborg.vbsupport.ru/showthread.php?t=108586)

Princeton 02-21-2006 10:00 PM

Create Custom Pages
 
GO-TOTAL LLC had everyone in mind when GTCustom Pages was created.
Custom pages can now be created with little or no coding knowledge.

If you know how to create a phrase within ADMINCP / LANGUAGES then you can create custom pages with ease.

First Download and install product and...

Let's Create A Custom "About Us" Page:
  1. In your favorite editor, create the contents of the page. HTML is allowed.
  2. When you finish with the contents of the page, create 2 phrases (an optional subtitle is available).
    • "gtcustom_about_header" - title of custom page
    • "gtcustom_about" - contents of custom page
    • "gtcustom_about_subtitle" -optional subtitle for custom page; the subtitle (table cell) will only display if it's created
  3. That's it! Now, go visit the page via URL: $vboptions[bburl]/goto.php?section=about
NOTE:
- Replace bold text with your choice of name. Follow naming convention as described above or the pages will not display.
- All 'xxx_header' phrases should be added to GLOBAL phrase group. (Needs to be global to display in navbar, etc.)
- All other phrases are required to be in GTCustom Pages phrase group. (If it's not here, cutom page will not work.)
Tips:
  • URL looks good with mod-rewrite enabled.
    For example, $vboptions[bburl]/goto/section/about, $vboptions[bburl]/goto_section_about.html
  • Use short names to prevent mod-rewrite (SEO links) problems. (It really depends on your setup. For example, some SEO scripts will convert every '_' into '/'. Which will prevent custom page from being displayed.)
    • Examples:
      • about - (GOOD)
      • terms - (GOOD)
      • privacy - (GOOD)
      • about_us - (BAD)
      • terms_of_service - (BAD)
      • privacy_policy - (BAD)

Examples Included With Product:
  • About Us Custom Page - phrases: gtcustom_about_header, gtcustom_about
    URL: $vboptions[bburl]/goto.php?section=about
  • Terms Of Service Custom Page - phrases: gtcustom_terms_header, gtcustom_terms
    URL: $vboptions[bburl]/goto.php?section=terms
    Additional options available in Admincp/ vBulletin Options/ Site Name / URL / Contact Details to create Terms of Service
  • Privacy Policy Custom Page- phrases: gtcustom_privacy_header, gtcustom_privacy
    URL: $vboptions[bburl]/goto.php?section=privacy
Now Let's Create Who's Online Location For All Custom Pages:
  • Oops, this feature is only available to those who donate.
  • What do you get? A new Custom Pages Plugin. All you have to do is overwrite the original.

Connector 04-25-2006 01:38 AM

Very nice .. if i need to show a messge for each usergroup when they visit the about page .. is there any way to do this ?

Thanks :)

Princeton 04-25-2006 11:25 AM

edit the goto.php and create a new template with conditionals

FIND:
HTML Code:

switch($_REQUEST['section'])
{

REPLACE:
HTML Code:

switch($_REQUEST['section'])
{
        case 'about';
                $globaltemplates[] = 'gtcustom_about';
                break;


FIND:
HTML Code:

        switch ($section)
        {

REPLACE WITH:
HTML Code:

        switch ($section)
        {
                case 'about';
                        eval('$HTML = "' . fetch_template('gtcustom_about') . '";');
                        break;


Create new template as you see fit (use conditionals, use phrases, it's up to you):
name it "gtcustom_about"

that's it

Connector 04-25-2006 04:15 PM

Thankyou very much .. It's work fine. . i'm not sure if there is way where i can add UserPost Count ..

Example

Welcome Username You have Made XX Post ..

Welcome username i find how to do this but Their postcount i dont no :)

Thanks :)

almukmin 05-04-2006 11:13 AM

What if I need the page to do some PHP commands?

How do I just add a header and a footer to that PHP file?

aceofspades 05-04-2006 05:23 PM

Im sorry, but im new to this and i dont have a clue what you are talking about in your instructions.

In the admin CP im going to phrase manager, then what, you havent said?!

Phrase type = ?
Product type = ?
Var name = gtcustom_about_header (for first one)
Text = ?

Thank you

Princeton 05-04-2006 10:07 PM

Quote:

Originally Posted by aceofspades
Im sorry, but im new to this and i dont have a clue what you are talking about in your instructions.

In the admin CP im going to phrase manager, then what, you havent said?!

Phrase type = ?
Product type = ?
Var name = gtcustom_about_header (for first one)
Text = ?

Thank you

- Replace bold text with your choice of name. Follow naming convention as described above or the pages will not display.
- All 'xxx_header' phrases should be added to GLOBAL phrase group. (Needs to be global to display in navbar, etc.)
- All other phrases are required to be in GTCustom Pages phrase group. (If it's not here, cutom page will not work.)

aceofspades 05-12-2006 06:32 PM

Here is my page:

http://www.hiven.net/forum/goto.php?section=rules

Can you tell me how i get rid of the box's on the left please, i just want the text no search / advert / stuff box. Thank you

James

Princeton 05-12-2006 06:43 PM

edit the CUSTOM_SHELL template

Snake 05-14-2006 11:09 AM

Thanks for the tutorial. Very useful! :)


All times are GMT. The time now is 01:01 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.01733 seconds
  • Memory Usage 1,739KB
  • 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
  • (4)bbcode_html_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (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