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

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 05-22-2009, 05:59 PM
enteha enteha is offline
 
Join Date: Dec 2008
Posts: 20
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default prefix_rich in front of threads

Hi, I am trying to modify a php file that is about latest thread and post scrolling. This file as ready to use but I want to add an ability to show prefix name at the start os thread.I don`t know what variable control prefix rich.can anybody help me? the php file I said is here:

PHP Code:
<?php
/
// ######################### REQUIRE BACK-END ############################
require_once('./includes/config.php');
// #######################################################################
// ######################## START MAIN SCRIPT ############################
// #######################################################################
echo"<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">";

$forum_path "."// Change this to reflect to your forum's Path.
$specific_forum_id ""// If you wish to display the posts from a specific forum, enter the forum id here. Otherwise, leave it blank.
$ignore_forum_id_a ""// If you dont wish to display the posts from a specific forum, enter the forum id here. Otherwise, leave it blank.
$ignore_forum_id_b "";
$ignore_forum_id_c "";
$ignore_forum_id_d "";
$ignore_forum_id_e "";
$ignore_forum_id_f "";
$ignore_forum_id_g "";
$ignore_forum_id_h "";
$lastpost_limit "20"// Number of posts displayed.
$title_color "#006600"// This is the color of the title.
$text_color "#CC3300"// This is the color of the bottom text.
$title_limit "100"// This is the character limit.
echo"<marquee onmouseover=this.stop() onmouseout=this.start() dir=\"rtl\" direction=\"up\" scrollAmount=\"2\" scrolldelay=\"50\">";
echo 
"<table dir=\"rtl\" border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"2\">";
$sforumid '';
$iforumida '';
$iforumidb '';
$iforumidc '';
$iforumidd '';
$iforumide '';
$iforumidf '';
$iforumidg '';
$iforumidh '';
if (
$specific_forum_id) {
    
$sforumid "AND forumid = $specific_forum_id";
}
if (
$ignore_forum_id_a) {
    
$iforumida "AND forumid != $ignore_forum_id_a";
}
if (
$ignore_forum_id_b) {
    
$iforumidb "AND forumid != $ignore_forum_id_b";
}
if (
$ignore_forum_id_c) {
    
$iforumidc "AND forumid != $ignore_forum_id_c";
}
if (
$ignore_forum_id_d) {
    
$iforumidd "AND forumid != $ignore_forum_id_d";
}
if (
$ignore_forum_id_e) {
    
$iforumide "AND forumid != $ignore_forum_id_e";
}
if (
$ignore_forum_id_f) {
    
$iforumidf "AND forumid != $ignore_forum_id_f";
}
if (
$ignore_forum_id_g) {
    
$iforumidg "AND forumid != $ignore_forum_id_g";
}
if (
$ignore_forum_id_h) {
    
$iforumidh "AND forumid != $ignore_forum_id_h";
}
if (
$lastpost_limit) {
    
$lastpost_limited "LIMIT $lastpost_limit";
}
        
//dtabase connection
$server $config['MasterServer']['servername'];
$databaseuser $config['MasterServer']['username'];
$databasepass $config['MasterServer']['password'];
$databasename $config['Database']['dbname'];
$table_prefix $config['Database']['tableprefix'];
$conn mysql_connect("$server""$databaseuser""$databasepass") or die ('database error');
mysql_select_db("$databasename"$conn) or die ('database error');
        
//thread table sql query
$thread_sql_query mysql_query("SELECT threadid,title,lastpost,lastposter,forumid,postusername,lastpostid FROM " $table_prefix "thread WHERE visible=1 AND open=1 $sforumid $iforumida $iforumidb $iforumidc $iforumidd $iforumide $iforumidf $iforumidg $iforumidh ORDER BY lastpost DESC $lastpost_limited");
while(
$thread_get_info mysql_fetch_array($thread_sql_query))
{
    
$lastpost $thread_get_info['lastpost'];
    
$lastposter $thread_get_info['lastposter'];
    
$threadid $thread_get_info['threadid'];
    
$forumid $thread_get_info['forumid'];
    
$postusername $thread_get_info['postusername'];
    
$lastpostid $thread_get_info['lastpostid'];
    
$date date ("m/d/y h:i A" ,$lastpost);
    
$threadtitle $thread_get_info['title'];
    
$threadtitle substr($threadtitle,0,$title_limit);
    
        
//forum table sql query
    
$forum_sql mysql_query("SELECT title FROM " $table_prefix "forum WHERE forumid=$forumid");
    
$forum_get mysql_fetch_array($forum_sql);
    
$forumtitle $forum_get['title'];
    
        
//post table sql query
    
$post_sql mysql_query("SELECT title,postid FROM " $table_prefix "post WHERE postid=$lastpostid");
    
$post_get mysql_fetch_array($post_sql);
    
$lastposterid $post_get['postid'];
    
$lastposttitle $post_get['title'];
    if (empty(
$lastposttitle)) {
        
$lastposttitle = ("response: $threadtitle");    
    }
    
$lastposttitle substr($lastposttitle,0,$title_limit);
    echo 
"<tr dir=\"rtl\"><td dir=\"rtl\"><font size=\"2\" face=\"utf-8\"><a target=_blank href=\"$forum_path/showthread.php?p=$lastposterid#post$lastposterid\"><FONT SIZE=\"4\" COLOR=\"$title_color\" face=\"tahoma\">$threadtitle</FONT></a></font><br> <font color=\"$text_color\" face=\"tahoma\" size='2'>Starter : $postusername |forum :  $forumtitle | last post :  $lastposter </FONT></td></tr>";
}
echo 
"</table>";
echo
"</marquee>";
/*======================================================================*\
|| ##################################################################### ||
|| ############################ END SCRIPT ############################# ||
|| ##################################################################### ||
\*======================================================================*/

I knew that I should write a line such:

$threadtitle = $thread_get_info['title'];

but I don`t know how?
Reply With Quote
 


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 07:49 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.05998 seconds
  • Memory Usage 2,773KB
  • Queries Executed 12 (?)
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
  • (3)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (11)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)showthread_list
  • (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_threadedmode.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_threaded
  • showthread_threaded_construct_link
  • 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