The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
![]()
This code grabs the most recent post, author blah blah... I keep getting an error message that states:
Quote:
Code:
<?php /* Needed for use without vBA require_once('./global.php'); */ /* ###### VARIOUS SETTINGS ###### */ $box_max_title_length=30; $box_max_post_length=80; $box_do_parse=0; /* Set to 1 to parse BBCODE */ $box_attachment_file="http://s116946478.onlinehome.us/vb/attachment.php?"; /* ###### GRABBING DATA ###### */ /* Only needed if you're going to be using bbcode */ if($box_do_parse==1){require_once('./includes/functions_bbcodeparse.php');} /* Forum to Grab thread/post from */ $box_forumid_1=2; /* Grabbing the thread */ $box_forumid_1thread = $DB_site->query_first("SELECT * FROM ".TABLE_PREFIX."thread WHERE forumid = '$box_forumid_1' ORDER BY thread.dateline DESC "); /* Grabbing the first post */ $box_forumid_1_first_post=$DB_site->query_first("SELECT * FROM ".TABLE_PREFIX."post WHERE threadid = '$box_forumid_1thread[threadid]' ORDER BY dateline ASC"); /* Grabbing the first attachment */ $box_forumid_1_image=$DB_site->query_first("SELECT * FROM ".TABLE_PREFIX."attachment WHERE postid = '$box_forumid_1_first_post[postid]' ORDER BY dateline DESC"); $image1=$box_forumid_1_image['attachmentid']; /* ###### FORMATING DATA ###### */ /* Max title length */ if(strlen($box_forumid_1thread[title])>$box_max_title_length){ $box_forumid_1thread[title]=substr($box_forumid_1thread[title], 0, $box_max_title_length); } /* Max post length */ if($box_forumid_1_first_post[pagetext]>$box_max_post_length){ $box_forumid_1_first_post[pagetext]=substr($box_forumid_1_first_post[pagetext], 0, $box_max_post_length); } /* Parse BBCODE if desired */ if($box_do_parse==1){ $box_forumid_1_first_post[pagetext]=parse_bbcode($box_forumid_1_first_post[pagetext]); } /* IMAGE CREATION */ $box_1_image="<img src='".$box_attachment_file."attachmentid=$img_m&stc=1' width='100' height='100' border='0'/>"; /* Template to use for data */ eval('$home[$mods[\'modid\']][\'content\'] = "' . fetch_template('adv_portal_features') . '";'); ?> |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|