vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   How to make my own php script and access vbulletin database? (https://vborg.vbsupport.ru/showthread.php?t=207949)

geckoz 03-10-2009 09:26 PM

How to make my own php script and access vbulletin database?
 
Hi all,

currently I'm using this addon: http://www.vbulletin-germany.org/showthread.php?t=4869
With this addon I can set up custom pages and access them through my forum. I can use vbulletin variables in there but I can not have PHP code to work with these variables...

I want to be able to have a page using my forum layout and be able to put PHP code in there and make use of the vbulletin variable like userid etc. so that I can updated account information etc. with my PHP script.

Are there any tutorials on how to do that? What would you recommend me to do??

Thank you for your help! :)

Lynne 03-10-2009 09:34 PM

Take a look at this article for creating your own php page. You may put your queries in the code here - [How-To] vBulletin API Basics: Creating Custom Pages & Misc.

geckoz 03-11-2009 05:14 PM

Thanks for your help. But I don't understand how and where to place the PHP code. I can not place it in the template, or can I? Because in order to do a mysql query I need to know the corresponding userid of the user currently logged in. But any vbulletin variables can only be used in the template and not in the test.php

Lynne 03-11-2009 05:34 PM

You would place the php code in the php page - right under where it says Start Main Script (and above the $navbits stuff).

bamfonk 03-11-2009 05:46 PM

Quote:

Originally Posted by Lynne (Post 1765237)
Take a look at this article for creating your own php page. You may put your queries in the code here - [How-To] vBulletin API Basics: Creating Custom Pages & Misc.

interesting! :)


All times are GMT. The time now is 08:03 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.01053 seconds
  • Memory Usage 1,718KB
  • 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