vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Question about - [How-To] vBulletin API Basics: Creating Custom Pages & Misc. (https://vborg.vbsupport.ru/showthread.php?t=213131)

Gamelobby 05-08-2009 12:12 AM

Question about - [How-To] vBulletin API Basics: Creating Custom Pages & Misc.
 
From - https://vborg.vbsupport.ru/showthread.php?t=98009

PHP Code:

<?php 

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

// ##################### DEFINE IMPORTANT CONSTANTS ####################### 
// change the line below to the actual filename without ".php" extention. 
// the reason for using actual filename without extention as a value of this constant is to ensure uniqueness of the value throughout every PHP file of any given vBulletin installation. 

define('THIS_SCRIPT''test');  

// #################### 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( 
        
// change the lines below to the list of actual templates used in the script 
        
'test_mytesttemplate1'
        
'test_mytesttemplate22'
); 

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

// ########################## REQUIRE BACK-END ############################ 
require_once('./global.php'); 

// #################### HARD CODE JAVASCRIPT PATHS ######################## 
$headinclude str_replace('clientscript'$vbulletin->options['bburl'] . '/clientscript'$headinclude); 

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

$navbits = array();  
// change the line below to contain whatever you want to show in the navbar (title of your custom page) 
$navbits[$parent] = 'Test Page'

$navbits construct_navbits($navbits); 
eval(
'$navbar = "' fetch_template('navbar') . '";'); 

// change the line below to contain the name of the actual main output template used in your script 
eval('print_output("' fetch_template('test_mytesttemplate1') . '");'); 

?>

Why do these things have to be so confusing..!!??

The first thing it says to do is: Read through the code above and change what's commented with "// change this...".

So look at the very first one..
Now this is THE FIRST thing it tells you to do.. // change the line below to the actual filename without ".php" extention.
So where is the "something.php" that they want you to change that is in the line below..??



Maybe im missing something here, but IF NOT why bother with any of these "helpful threads" if you need a coder to do it for you anyway..!!?? :erm: :mad:


.

notrious 05-08-2009 12:15 AM

Easy stuff try this ..


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

RLShare 05-08-2009 12:29 AM

You see all that code you just pasted up? That is called PHP code, you are supposed to save it in a text file with whatever name you want but with a .php extension.. .So "somefile.php" would be an example of the name you COULD give the file YOU are creating with THAT CODE. So you would replace the 'test' part in that line with 'somefile' if the name of the file YOU created is 'somefile.php'.

And there is no need to be obnoxious in your post.

Gamelobby 05-10-2009 02:11 AM

Quote:

Originally Posted by notrious (Post 1806679)

Thats exactly what im talking about & the exact same thread i linked to about this....?
But i guess thanks for trying. (without reading my post)



Quote:

Originally Posted by RLShare (Post 1806687)
You see all that code you just pasted up? That is called PHP code, you are supposed to save it in a text file with whatever name you want but with a .php extension.. .So "somefile.php" would be an example of the name you COULD give the file YOU are creating with THAT CODE. So you would replace the 'test' part in that line with 'somefile' if the name of the file YOU created is 'somefile.php'.

And there is no need to be obnoxious in your post.

Yea i know, i have made a few other .php pages, but the VERY first thing this asks is what was confusing. im actually not going to retype my first post, but if you read what i wrote you'll see the confusion in it.

Honestly i appreciate the attempt to help, but i was very irritated when i first posted this, i still stand behind what i worte.. it is confusing. but i was being obnoxious becasue it is written in a confusing way. and when you are new to this it just makes things worse.

My whole reason for posting is not because im confused about how to make that code work. (i have used it before) I am trying to figure out how to make it work for something different. Which i have posted already elsewhere.

Thanks (you can close this, im not mad anymore. :D)


All times are GMT. The time now is 12:38 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.00956 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
  • (1)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)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