Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Blocks
Author Message
izone
Involved
Involved


Joined: Sep 07, 2004
Posts: 354
Location: Sweden

PostPosted: Mon Aug 29, 2005 10:19 am Reply with quote

I have a Forum center block on frontpage of site, showing the last topics. it works fine but the only thing I want to change is when U click on a topic link it take u to the last post and LAST PAGE of that topic.

What it does now is if the topic has only one page it take u to the last post on it. But if the topic has 2 or more pages it take u to page one.

What can I do to change this to go to last page and last post on that topic?

Here is the code for showing topics. It is Advanced Center Forum Block v.3.0


Code:


     // Shadow Topic !!
      $skip_display = 1;
   }
   
   if( $skip_display == 0 )
   
   {
     $Count_Topics += 1;

$result2 = $db->sql_query("SELECT username, user_id FROM ".$prefix."_users where user_id='$topic_poster'");
list($username, $user_id)=$db->sql_fetchrow($result2);
$avtor=$username;
$sifra=$user_id;

$result3 = $db->sql_query("SELECT poster_id, FROM_UNIXTIME(post_time,'%b %d, %Y at %T') as post_time FROM ".$prefix."_bbposts where post_id='$topic_last_post_id'");
list($poster_id, $post_time)=$db->sql_fetchrow($result3);

$result4 = $db->sql_query("SELECT username, user_id FROM ".$prefix."_users where user_id='$poster_id'");
list($username, $user_id)=$db->sql_fetchrow($result4);

$viewlastdetail .="
   <tr><td height=\"34\" nowrap bgcolor=\"$bgcolor1\" class=\"row1\"><img src=\"".$folder_path."images/folder_new_hot.gif\"  border=\"0\" /></td><td width=\"100%\" bgcolor=\"$bgcolor1\" class=\"row1\">&nbsp;<a href=\"forums.html?file=viewtopic&t=$topic_id#$topic_last_post_id\">$topic_title</a></td>
   <td align=\"center\" bgcolor=\"$bgcolor1\" class=\"row2\"><b>$topic_replies</b></td>
   <td align=\"center\" bgcolor=\"$bgcolor1\" class=\"row3\"><a href=\"profile-.html$sifra\">$avtor</a></td>
   <td align=\"center\" bgcolor=\"$bgcolor1\" class=\"row2\"><b>$topic_views</b></td>
   <td align=\"center\" nowrap bgcolor=\"$bgcolor1\" class=\"row3\">
   <a href=\"profile-.html$user_id\">$username</a>&nbsp;<a href=\"forums.html?file=viewtopic&p=$topic_last_post_id#$topic_last_post_id\"><img src=\"".$folder_path."images/icon_minipost_new.gif\" border=\"0\" alt=\" $post_time\"></a></td></tr>";
}
   
   if( $Last_New_Topics == $Count_Topics ) { break 1; }
   
}

    $head = "
   <table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"2\"><tr><td bgcolor=\"$bgcolor1\"><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"1\" bgcolor=\"$bgcolor1\"><tr><td><table width=\"100%\" border=\"0\" cellpadding=\"2\" cellspacing=\"1\"><tr><td height=\"28\" colspan=\"6\" align=\"center\" class=\"row3\"><b>"._Advancedcenterforumakharinersialirantrainingooakharinersalha."</b></td></tr>
   ";
   
   

 $viewcatend = "</td></tr><tr><td><br></td></tr>";
 
 $content = "$head";
 $content .= "$viewcattop";
 $content .= "$viewcat";
 $content .= "$viewcatend";
 $content .= "$viewlasttop";
 $content .= "$viewlastdetail";
 $content .= "$show";


Best regards!

----------------------------
Sorry for my bad english. I change the subject and hope it is ok now.


Last edited by izone on Wed Aug 31, 2005 4:54 am; edited 2 times in total 
View user's profile Send private message
izone
PostPosted: Wed Aug 31, 2005 4:47 am Reply with quote

Please let me know if you need all codes for this block.

I have downloaded this from thainuke.net (I guess) and made some changes for the language file.
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Blocks

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©