vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3 Articles (https://vborg.vbsupport.ru/forumdisplay.php?f=187)
-   -   How to create your own vBulletin-powered page! (uses vB templates) (https://vborg.vbsupport.ru/showthread.php?t=62164)

amcd 11-26-2007 11:13 AM

global.php has been designed to be included from scripts in the same directory. You can change the directory to forum root, require global.php, and then change back to /directory/page and continue processing but I would not recommend it.

SBlueman 12-01-2007 11:48 PM

Would this be able to work at all on a Wordpress blog?

l3it3r 12-03-2007 12:03 AM

Quote:

Originally Posted by Nullifi3d (Post 774645)
IMO, an array would be better.

vB 3.0.x:
PHP Code:

if (!in_array($bbuserinfo['usergroupid'], array(6,8,13))) print_no_permission(); 

vB 3.5.x:
PHP Code:

if (!in_array($vbulletin->userinfo['usergroupid'], array(6,8,13))) print_no_permission(); 


This works better IMO..

THANKS!!

Opserty 12-03-2007 03:52 PM

Quote:

Originally Posted by l3it3r (Post 1393791)
This works better IMO..

You should use the is_member_of() function to do this properly.

PHP Code:

if(!is_member_of($vbulletin->userinfo12459))
{
    
//print_no...



Razasharp 12-05-2007 09:05 PM

Does anyone know if the output of a page created in this way could be cached? And the cached version displayed to the end user?

Perhaps with the cached page being updated via a cron job every ten minutes? That would be SO cool!

tunistunis 12-12-2007 12:19 PM

est ce que sa marche avec 3.8

apn3a 12-14-2007 04:15 PM

i have a php script that i am having trouble with. it is not written for vbulletin, but i would like to include it in my vb's template. this script has about 3-4 php files. i create a php file from which i run my script. i only include once the index.php of my script, which runs other php files from inside of it.

my problem is the following: when i run the script, everything is fine, the template is there etc. when i enter the details the script asks for, and i hit submit, the new window that opens does not have the vb template. i've tried everything, no luck. the window that opens when i hit submit has no action (etc. xxx.php?=something.) its just xxx.php. the funny thing is that if i have an error in my form, the template stays as it is even though a new window opens. the problem only occurs when i hit submit. please help

that's the action code from the script:

<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">

cfitzarl 12-14-2007 11:01 PM

Very nice tutorial :)

Jase2 12-24-2007 04:58 PM

Hi,

Where do i put the HTML one?

Opserty 12-26-2007 08:22 AM

Quote:

Originally Posted by Jase2 (Post 1408481)
Hi,

Where do i put the HTML one?

In a new Template in your AdminCP ( -> Styles & Templates -> Style Manager -> Edit Templates)


All times are GMT. The time now is 10:18 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.01860 seconds
  • Memory Usage 1,742KB
  • 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
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (4)pagenav_pagelinkrel
  • (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