vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   Are there any mods to create custom pages? (https://vborg.vbsupport.ru/showthread.php?t=322147)

Innsomnimaniac 03-17-2016 03:43 PM

Are there any mods to create custom pages?
 
I'm looking to create pages an easy non complex way, is there any mod that will do this?

In Omnibus 03-17-2016 04:03 PM

Custom pages require custom coding. There might be a mod that utilizes a template but that won't necessarily meet your specific needs.

You might want to start here: https://vborg.vbsupport.ru/showthread.php?t=228112

MarkFL 03-17-2016 04:10 PM

Quote:

Originally Posted by ProSportsForums (Post 2567458)
Custom pages require custom coding. There might be a mod that utilizes a template but that won't necessarily meet your specific needs.

You might want to start here: https://vborg.vbsupport.ru/showthread.php?t=228112

Yes, that's an excellent tutorial and I used it to easily get going with creating custom pages. :up:

Innsomnimaniac 03-17-2016 05:50 PM

I tried it, but this is what I got following the directions precisely. http://urbanvapekartel.com/uvk/About.php Blank page. Nothing to see.

MarkFL 03-17-2016 06:27 PM

Quote:

Originally Posted by MaxwellMorphine (Post 2567473)
I tried it, but this is what I got following the directions precisely. http://urbanvapekartel.com/uvk/About.php Blank page. Nothing to see.

Please post the code in your PHP file, and maybe we can determine the issue. :)

Innsomnimaniac 03-17-2016 06:33 PM

Quote:

Originally Posted by MarkFL (Post 2567477)
Please post the code in your PHP file, and maybe we can determine the issue. :)

I was actually hoping for a little help figuring it out. This is what I got. I may have something wrong, but I think I did what the instructions said.


PHP Code:

<?php

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

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

define('THIS_SCRIPT''about');
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('about',
);

// 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('' => 'About Page'));
$navbar render_navbar_template($navbits);

// ###### YOUR CUSTOM CODE GOES HERE #####
$pagetitle 'About Max Evans';

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

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

?>


MarkFL 03-17-2016 06:40 PM

Try changing:

PHP Code:

// pre-cache templates used by all actions
$globaltemplates = array('about',
); 

to:

PHP Code:

// pre-cache templates used by all actions
$globaltemplates = array('about'); 


Innsomnimaniac 03-17-2016 07:06 PM

Now it says the page isn't working. http://urbanvapekartel.com/uvk/About.php

MarkFL 03-17-2016 07:10 PM

Quote:

Originally Posted by MaxwellMorphine (Post 2567486)
Now it says the page isn't working. http://urbanvapekartel.com/uvk/About.php

It looks like the requested file isn't where it's supposed to be...

ForceHSS 03-17-2016 07:12 PM

try putting the about.php into the uvk folder so the url will be http://urbanvapekartel.com/uvk/about.php


All times are GMT. The time now is 02:31 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.01081 seconds
  • Memory Usage 1,747KB
  • 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_php_printable
  • (4)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