Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 05-08-2009, 12:12 AM
Gamelobby's Avatar
Gamelobby Gamelobby is offline
 
Join Date: Jul 2007
Location: Long Beach, CA
Posts: 997
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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:


.
Reply With Quote
  #2  
Old 05-08-2009, 12:15 AM
notrious notrious is offline
 
Join Date: Mar 2007
Location: New York
Posts: 373
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Easy stuff try this ..


https://vborg.vbsupport.ru/showthread.php?t=62164
Reply With Quote
  #3  
Old 05-08-2009, 12:29 AM
RLShare RLShare is offline
 
Join Date: Jun 2008
Posts: 499
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #4  
Old 05-10-2009, 02:11 AM
Gamelobby's Avatar
Gamelobby Gamelobby is offline
 
Join Date: Jul 2007
Location: Long Beach, CA
Posts: 997
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by notrious View Post
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 View Post
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. )
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 12:27 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.03383 seconds
  • Memory Usage 2,206KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (4)post_thanks_box
  • (4)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (4)post_thanks_postbit_info
  • (4)postbit
  • (4)postbit_onlinestatus
  • (4)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete