vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   code in phpinclude.... (https://vborg.vbsupport.ru/showthread.php?t=86740)

drives fast 04-09-2003 03:43 PM

code in phpinclude....
 
I am trying to display the forum title, number of threads and forum discription of a specific forum (id=150) on a non vb page that I have integrated into vb and has isn't own template.

problem is...I don't know what to put in the phpinclude template to allow me to do this.

can anyone help me?

thank you

filburt1 04-09-2003 03:55 PM

If it's a non-vB page then there's nothing you can easily do because phpinclude is only executed on vB pages.

drives fast 04-09-2003 04:07 PM

it is integrated into vbulletin

here is the php for the page:
PHP Code:

<?php
error_reporting
(7);

$templatesused='classifieds';

require(
'./global.php');

if (
$bbuserinfo[userid]==0) {
    
show_nopermission();
}

$bbusername $bbuserinfo[username];

eval(
"dooutput(\"".gettemplate('classifieds')."\");");

?>

and it has its own template called "classifieds"

can there not be code written to the phpinclude template to draw the forumtitle,threadcount and forumdescription of forumid 150 and display that info in the classifieds template with a call like $forum150 ?

drives fast 04-09-2003 11:49 PM

anybody have any suggestions?

drives fast 04-10-2003 10:49 AM

was it something I said?

filburt1 04-10-2003 11:42 AM

Sorry but since it involves hacking you have to ask at https://vborg.vbsupport.ru/ .

drives fast 04-10-2003 03:01 PM

what hacking?

the php script I displayed above is already written and putting code in the phpinclude template is not hacking....it is a template modification....isn't it?

I have another page using the same script calling a different template and I was able to put code in the phpinclude to display the usernames that were on that page without hacking.....why is this different?

plus...I did ask this at vbulletin.org and I am getting the same cold shoulder

drives fast 04-17-2003 06:37 PM

I figured it out and since I received so much kindness and friendly help...I will return the favor and post the code...
PHP Code:

yea right 

I read the post in the tips and tricks area addressing using the phpinclude template instead of hacking scripts is the only reason I even tried this modification. To receive the cold shoulder as I did wasn't very nice. This mod required zero scripts to be hacked and only code put in the phpinclude template and the varyiables added to the template of the page I wanted them to appear on.

thanks


All times are GMT. The time now is 04:48 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.02568 seconds
  • Memory Usage 1,723KB
  • 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
  • (2)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)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