View Single Post
  #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
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01349 seconds
  • Memory Usage 1,859KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_php
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.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
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • 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
  • showpost_complete