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)

T_Richardson 07-11-2007 07:12 PM

Quote:

Originally Posted by blazingpc (Post 1287538)
I have made several pages but I was wondering if it would be possible to add some forum sections to 1 of these pages?

I'm also searching for some forum content to show in custom pages. I managed to include a shout box. I'm trying to get "who's online" showing and "latest posts/threads".

blazingpc 07-11-2007 11:43 PM

Quote:

Originally Posted by T_Richardson (Post 1288540)
I'm also searching for some forum content to show in custom pages. I managed to include a shout box. I'm trying to get "who's online" showing and "latest posts/threads".

I've basically put this idea on the back burner for the time being and have set up VB on my PC to play with it and see what I can do and learn.

ragtek 07-13-2007 05:20 AM

what you mean with forumsection?

threads?userpages?userdata?

DieselMinded 07-17-2007 06:37 PM

Quote:

Originally Posted by T_Richardson (Post 1286576)
are your files in the same folder as the the global.php? You might have to specify the location.

Yes and how do i do this

CarlitoBrigante 07-22-2007 06:32 PM

It's not difficult - store your script's working directory in a constant/variable, chdir to the vBulletin working directory, call global.php, and then chdir back to your script directory.

Basically, just do this:

Code:

// vBulletin path (edit the value)
define('VBULLETIN_CWD','/var/www/vhosts/yourwebsite.com/httpdocs/');
// Do not edit anything below
// Your script path
define('YOURSCRIPT_CWD', (($getcwd = getcwd()) ? $getcwd : '.'));
// Switch to vBulletin directory
chdir(VBULLETIN_CWD);
// Call backend
require_once('./global.php');
// Switch back to your script directory
chdir(YOURSCRIPT_CWD);


hiphopave 07-23-2007 09:34 PM

I have my script in another directory. Using the above advice, it now works, but the images and links are broken. Anyone know how to get around that?

CarlitoBrigante 07-25-2007 02:07 AM

This is an entirely different issue. This is a problem with the html of the website.

Keep in mind that most links to images, stylesheets, scripts used within vBulletin are relative to the forums path. So, if you want to output templates that link to images in your forums' directory using relative links, you can probably just add a base href tag. Of course, having a link to your forums/custom page would make finding the cause of this small issue very easy.

Hope this helps!

edgecutioner 07-28-2007 10:10 AM

works great thanks!

thompson 07-29-2007 04:42 PM

does it works in all versions (3.6.7 ?)

vuiveclub 07-30-2007 09:28 PM

Quote:

Originally Posted by thompson (Post 1304695)
does it works in all versions (3.6.7 ?)

Yes . :confused:,


I've a question,
I created a page:
PHP Code:

if ($_REQUEST['do'] == 'temp1'

    eval(
'print_output("' fetch_template('TEMPLATE_temp1') . '");'); 


But in the template temp1 I want to add another custom template something temp2
when I run this script it does not show the content of template temp2 ? :confused:
why?


All times are GMT. The time now is 12:25 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02409 seconds
  • Memory Usage 1,743KB
  • 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_code_printable
  • (1)bbcode_php_printable
  • (4)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