Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 03-20-2005, 12:00 AM
BigIke's Avatar
BigIke BigIke is offline
 
Join Date: Aug 2004
Location: Norfolk, VA
Posts: 143
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default help w/ a template that calls most recent posts, title, etc.

I'm doing something similar with my site that www.nymfans.com did with theirs. I'm trying to add a module on top of my site (http://s116946478.onlinehome.us/vb/cmps_index.php) where the latest thread in a specific forum id is shown, and I need help with the template to do so. I know that I need to make a table, but I'm not sure where to put the variables. Can anyone help? Thanks in advance.

(I think i posted this in the wrong forum, I think it should be in modification discussion)

anyone?
Reply With Quote
  #2  
Old 03-21-2005, 01:38 AM
BigIke's Avatar
BigIke BigIke is offline
 
Join Date: Aug 2004
Location: Norfolk, VA
Posts: 143
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

does anyone know? ive posted at every possible vbulletin site but to no avail... i think this could be a quick answer if anyone would take the time to read it
Reply With Quote
  #3  
Old 03-21-2005, 02:43 AM
Jolten Jolten is offline
 
Join Date: Mar 2004
Posts: 749
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It's not a quick answer. It requires a php script or modification to one along with templates. Your best bet is to download a portal and look at the code used there.
Reply With Quote
  #4  
Old 03-21-2005, 03:22 AM
BigIke's Avatar
BigIke BigIke is offline
 
Join Date: Aug 2004
Location: Norfolk, VA
Posts: 143
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i have the actual php script already to do so, all i need help with is the actual template that utilizes the php script.. does that help? it also might be that i dont know what im talking about. but i have a php script that goes something like this:
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://nymfans.com/forums/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=22;

/* 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('TEMPLATE_NAME_HERE') . '";');

?>
I have vBAdvanced installed on my forums, I'm just not sure of what coding to put in the template on the top module.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 05:40 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.06147 seconds
  • Memory Usage 2,192KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (4)post_thanks_box
  • (4)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (4)post_thanks_postbit_info
  • (4)postbit
  • (4)postbit_onlinestatus
  • (4)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete