vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Php Code Integration... (https://vborg.vbsupport.ru/showthread.php?t=159484)

Opserty 10-06-2007 05:53 PM

Put it under the bit which says:
PHP Code:

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

I would go and learn a little PHP at least, so that you know what is going on. Otherwise you run the risk of ruining your vB installation.

John3971 10-06-2007 06:10 PM

when i put it right under that the code will come above the header.

Leon44 10-06-2007 09:49 PM

yes i would like to do that samething on that portal hack with this code

PHP Code:

<tr>
                 <td height="44" valign="top" class="text-padding" 
align="center"><?php
$number 
"10";
include(
"/home/gamelair/public_html/cutenews/show_news.php");
?> 
</td>
                </tr>

but it shows nothing when i put it there.

John3971 10-08-2007 11:34 AM

Bump

Opserty 10-08-2007 02:54 PM

vB templates operates different, you save your code in a variable and then put it in a template. The final code is outputted when the script finishes executing, only then is the data displayed.

vB: Processing -> Output
Other small PHP files: Output (header) -> Processing -> Output (Dynamic content) -> (Processing e.t.c.)

If you don't want to do it that way then just use the HTML output from a vB and try and hack it up to fix your custom page.

John3971 10-08-2007 06:12 PM

can you give me an example because i don“t understand what you mean..

(im bad in english)

Dismounted 10-09-2007 08:18 AM

Can you post your whole custom page code that you have now?

John3971 10-09-2007 08:22 AM

i don?t have any other then this https://vborg.vbsupport.ru/showthread.php?t=62164 right now and i don?t now how i should do thats why im asking for an example..

Dismounted 10-09-2007 09:58 AM

Okay, in your file, find:
PHP Code:

require_once('./global.php'); 

Add below:
PHP Code:

if (!is_member_of($vbulletin->userinfoX))
{
    
print_no_permission();


Replace "X" with a comma-separated group of user ids allowed to view the page.

John3971 10-09-2007 10:04 AM

Quote:

Originally Posted by Dismounted (Post 1356148)
Okay, in your file, find:
PHP Code:

require_once('./global.php'); 

Add below:
PHP Code:

if (!is_member_of($vbulletin->userinfoX))
{
    
print_no_permission();


Replace "X" with a comma-separated group of user ids allowed to view the page.

and how do i fix the php codes in there?


All times are GMT. The time now is 04:44 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.01040 seconds
  • Memory Usage 1,740KB
  • 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
  • (6)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)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