vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   Mini Mods - [Alexey] Create a new php file Easy and fast (https://vborg.vbsupport.ru/showthread.php?t=210565)

Alexey? 04-06-2009 10:00 PM

[Alexey] Create a new php file Easy and fast
 
Ok so here is what you have to do
open a new php file lets say
test.php
write into there this

Quote:

<?php
error_reporting(E_ALL & ~E_NOTICE);
define('NO_REGISTER_GLOBALS', 1);
define('GET_EDIT_TEMPLATES', true);
define('THIS_SCRIPT', 'newpage');
$phrasegroups = array();
$specialtemplates = array();
$globaltemplates = array();
$actiontemplates = array();
require_once('./global.php');
$navbits = array();
$navbits[''] = 'NAME IN NAVBAR';
$navbits = construct_navbits($navbits);
eval('$navbar = "' . fetch_template('navbar') . '";');
eval('print_output("' . fetch_template('Template NAME') . '");');
?>
And change the
"NAME IN NAVBAR" - this is will be displayed in the navbit
"Template NAME" - this must be the name of the Template you will create in your style.

And what ever you'r going to write in the Template that you will create wiil be shown there.


Any one who need help contact me in privet
Enjoy!

TalkVirginia 04-07-2009 07:49 PM

There's already an article on this.

https://vborg.vbsupport.ru/showthread.php?t=62164

Alexey? 04-08-2009 05:30 AM

Yea i saw that.
but this is a diffrent way to do it.

Rich 04-08-2009 10:11 AM

This is the same thing as the other minus the comments which explain everything to the user viewing it and the addition of "define('GET_EDIT_TEMPLATES', true);" which isn't needed.

I advise everyone to use the link posted by talkvirginia. If you need something like this to create a page, you are MUCH better off using the link and learning to do it right.

Princeton 04-08-2009 04:59 PM

moved to graveyard - not a modification
closer to being an article


All times are GMT. The time now is 11:15 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.00971 seconds
  • Memory Usage 1,717KB
  • 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
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete