Icy Phoenix

     
 


Post new topic  Reply to topic 
Page 1 of 1
 
 
Reply with quote Download Post 
Post To IP Developers - User Friendly Recent Forum Topics Block 
 
Hello,
In IP i add recent topics block for my IP index page.but thatone is not more user friendly.Can anyone please help me to develop a good & nice Recent topics block ? I saw in Php-nuke have their own nice looking forum information [recent forum topics] block .Can i customize it to IP?

Here is the Screenshot and the specific code for th php-nuke...Can anyone help me to develop this type of block to my IP..

forumscenterblock

Code: [Download] [Hide]
  1. <?php  
  2. if( eregi( "block-Forums_Center.php",$PHP_SELF ) )  
  3. {  
  4.    Header("Location: index.php");  
  5.    die();  
  6. }  
  7. global $user, $cookie, $sitename, $prefix, $user_prefix, $dbi, $sitename, $admin, $module_name, $bgcolor1, $bgcolor2;  
  8.  
  9. // When set to 1 then Forums permissions which View and/or Read are NOT set to 'ALL' will NOT be displayed in the center block  
  10. $HideViewReadOnly = 'ALL';  
  11. // Show only 5 last new topics  
  12. $Last_New_Topics  = 5;                              
  13. // Icon that is displayed in Center Block in front of Topic  
  14. $IconPath         = "images/msg.png";    
  15. //size of the outer border  
  16. $border = 1;  
  17. //cell spacing around the tables  
  18. $cellspacing = 0;  
  19.  
  20. /* Total Amount of Topics */  
  21. $result = sql_query( "SELECT * FROM ".$prefix."_bbtopics", $dbi );  
  22. $Amount_Of_Topics = sql_num_rows( $result );  
  23.  
  24. /* Total Amount of Posts */  
  25. $result = sql_query( "SELECT * FROM ".$prefix."_bbposts", $dbi );  
  26. $Amount_Of_Posts = sql_num_rows( $result );  
  27.  
  28. /* Total Amount of Topic Views */  
  29. $Amount_Of_Topic_Views = 0;  
  30. $result = sql_query( "SELECT topic_views FROM ".$prefix."_bbtopics", $dbi );  
  31. while( list( $topic_views ) = sql_fetch_row( $result, $dbi ) )  
  32. {  
  33.    $Amount_Of_Topic_Views = $Amount_Of_Topic_Views + $topic_views;  
  34. }  
  35.  
  36. /* Total Amount of Topic Replies */  
  37. $Amount_Of_Topic_Replies = 0;  
  38. $result = sql_query( "SELECT topic_replies FROM ".$prefix."_bbtopics", $dbi );  
  39. while( list( $topic_replies ) = sql_fetch_row( $result, $dbi ) )  
  40. {  
  41.    $Amount_Of_Topic_Replies = $Amount_Of_Topic_Replies + $topic_replies;  
  42. }  
  43.  
  44. /* Total Amount of Members */  
  45. $result = sql_query( "SELECT * FROM ".$prefix."_users", $dbi );  
  46. $Amount_Of_Members = sql_num_rows( $result );  
  47.  
  48. /* Last X New Topics */  
  49. $Count_Topics = 0;  
  50. $Topic_Buffer = "";  
  51. $result1 = sql_query( "SELECT topic_id, forum_id, topic_last_post_id, topic_title, topic_poster, topic_views, topic_replies, topic_moved_id FROM ".$prefix."_bbtopics ORDER BY topic_last_post_id DESC", $dbi );  
  52. while( list( $topic_id, $forum_id, $topic_last_post_id, $topic_title, $topic_poster, $topic_views, $topic_replies, $topic_moved_id ) = sql_fetch_row( $result1, $dbi ) )  
  53. {  
  54.    $skip_display = 0;  
  55.    if( $HideViewReadOnly == 1 )  
  56.    {  
  57.       $result5 = sql_query( "SELECT auth_view, auth_read FROM ".$prefix."_bbforums where forum_id = '$forum_id'", $dbi );  
  58.       list( $auth_view, $auth_read ) = sql_fetch_row( $result5, $dbi );  
  59.       if( ( $auth_view != 0 ) or ( $auth_read != 0 ) ) { $skip_display = 1; }  
  60.    }  
  61.     
  62.    if( $topic_moved_id != 0 )  
  63.    {  
  64.       // Shadow Topic !!  
  65.       $skip_display = 1;  
  66.    }  
  67.     
  68.    if( $skip_display == 0 )  
  69.    {  
  70.       $Count_Topics += 1;  
  71.       $result2 = sql_query( "SELECT topic_id, poster_id, FROM_UNIXTIME( post_time,'%b %d, %Y at %T') as post_time FROM ".$prefix."_bbposts where post_id = '$topic_last_post_id'", $dbi );  
  72.       list( $topic_id, $poster_id, $post_time ) = sql_fetch_row( $result2, $dbi );  
  73.  
  74.       $result3 = sql_query( "SELECT username, user_id FROM ".$prefix."_users where user_id='$poster_id'", $dbi );  
  75.       list( $username, $user_id ) = sql_fetch_row( $result3, $dbi );  
  76.       $LastPoster = "<a href=\"modules.php?name=Forums&file=profile&mode=viewprofile&u=$user_id\">$username</a>";  
  77.         
  78.       $result4 = sql_query( "SELECT username, user_id FROM ".$prefix."_users where user_id='$topic_poster'", $dbi );  
  79.       list( $username, $user_id ) = sql_fetch_row( $result4, $dbi );  
  80.       $OrigPoster = "<A HREF=\"modules.php?name=Forums&file=profile&mode=viewprofile&u=$user_id\"STYLE=\"text-decoration: none\"> $username </a>";  
  81.     
  82.       $TopicImage = "&nbsp;<img src=\"$IconPath\" border=\"0\" alt=\"\">";  
  83.       $TopicTitleShow = "<a href=\"modules.php?name=Forums&amp;file=viewtopic&amp;p=$topic_last_post_id#$topic_last_post_id\"STYLE=\"text-decoration: none\">$topic_title</a>";  
  84.     
  85.       $Topic_Buffer .= "<tr><td>$TopicImage&nbsp;&nbsp;$TopicTitleShow</td><td><div align=\"center\">$OrigPoster</div></td><td><div align=\"center\"><b>$topic_views</b></div></td><td><div align=\"center\"><b>$topic_replies</b></div></td><td align=\"center\">$LastPoster&nbsp;<a href=\"modules.php?name=Forums&file=viewtopic&p=$topic_last_post_id#$topic_last_post_id\"><img src=\"images/icon_latest_reply.gif\" border=\"0\"></a><br><font size=\"-2\"><i>$post_time</i></font></td></tr>";  
  86.    }  
  87.     
  88.    if( $Last_New_Topics == $Count_Topics ) { break 1; }  
  89.     
  90. }  
  91.  
  92. $cat = sql_query("SELECT * FROM ".$prefix."_bbcategories", $dbi);  
  93. $content = "";  
  94.  
  95.  
  96. /* Write Table to Screen */  
  97. $content  = "<center><table width=\"100%\" border=\"$border\"  cellspacing=\"$cellspacing\" bordercolor=\"#292929\">";  
  98. $content .= "<td width=\"100%\" height=\"21\" colspan=\"6\" align=\"center\"><STRONG>Last 5 Forum Posts</STRONG></td></tr>";  
  99. $content .= "<td rowspan=\"0\" >";  
  100. $content .= "<table width=\"100%\" cellpadding=\"$cellspacing\" bordercolor=\"$bgcolor1\" cellspacing=\"1\" border=\"$border\" vAlign=\"top\">";  
  101.  
  102.         $forum_id = $forum_row[0];  
  103.         $forum_title = $forum_row[5];  
  104.         $for_count ++;  
  105.       
  106.       
  107.  
  108. $content .= "</table>";  
  109. $content .= "<tr><td align=\"center\" >"._BBFORUM_TOTTHREAD."</td><td align=\"center\">"._BBFORUM_POSTER."</td><td align=\"center\">"._BBFORUM_VIEWS."</td><td align=\"center\">"._BBFORUM_REPLIES."</td><td align=\"center\">"._BBFORUM_LASTPOSTER."</td></tr>";  
  110. $content .= "$Topic_Buffer";  
  111. $content .= "<tr><td align=\"center\" colspan=\"6\">"._BBFORUM_TOTTOPICS."<b>$Amount_Of_Topics</b>&nbsp;<b>|</b>&nbsp;"._BBFORUM_TOTPOSTS."<b>$Amount_Of_Posts</b>&nbsp;<b>|</b>&nbsp;"._BBFORUM_TOTVIEWS."<b>$Amount_Of_Topic_Views</b>&nbsp;<b>|</b>&nbsp;"._BBFORUM_TOTREPLIES."<b>$Amount_Of_Topic_Replies</b>&nbsp;<b>|</b>&nbsp;<a href=\"modules.php?name=Members_List\">"._BBFORUM_TOTMEMBERS."</a>&nbsp;<b>$Amount_Of_Members</b></center></td></tr>";  
  112. $content .= "<tr><td colspan=\"6\">";  
  113. $content .= "<table width=\"100%\" cellpadding=\"0\" bordercolor=\"$bgcolor1\" cellspacing=\"$cellspacing\" border=\"0\" vAlign=\"top\" height=\"32\">";  
  114. $content .= "<tr>";  
  115. $a = 1;  
  116.     global $user, $cookie, $sitename, $prefix, $user_prefix, $dbi, $admin, $module_name;  
  117.     $result=sql_query("SELECT user_id, username, user_posts, user_avatar FROM ".$user_prefix."_users ORDER BY user_posts DESC LIMIT 0,5", $dbi);  
  118.     while(list($user_id, $username, $user_posts, $user_avatar) = sql_fetch_row($result, $dbi)) {  
  119.  
  120. $content .= "<td width=\"32\" vAlign=\"middle\">";  
  121. if (eregi("http://", $user_avatar)) {  
  122. $content .= "&nbsp;&nbsp;<a href=\"modules.php?name=Forums&amp;file=profile&amp;mode=viewprofile&amp;u=$user_id\"><img alt src=\"$user_avatar\" border =\"0\" width=\"32\" height=\"32\"></a></td>";  
  123. }  
  124. else  
  125. $content .= "&nbsp;&nbsp;<a href=\"modules.php?name=Forums&amp;file=profile&amp;mode=viewprofile&amp;u=$user_id\"><img alt src=\"modules/Forums/images/avatars/$user_avatar\" border =\"0\" width=\"32\" height=\"32\"></a></td>";  
  126. $content .= "<td vAlign=\"middle\">&nbsp;<a href=\"modules.php?name=Forums&amp;file=profile&amp;mode=viewprofile&amp;u=$user_id\"><b>$username</b></a>&nbsp;<br>&nbsp;<a href=\"modules.php?name=Forums&amp;file=search&amp;search_author=$username\">Posts:</a>&nbsp; ";  
  127. $content .= "&nbsp;<a href=\"modules.php?name=Forums&amp;file=search&amp;search_author=$username\">$user_posts</a>&nbsp;</td>";  
  128. }  
  129. $content .= "</tr></table>";  
  130. $content .= "</td><tr>";  
  131. $content .= "</table>";  
  132. //Please leave the following link in place so other people can also share this block !!  
  133. $content .=  "<p align=right><a href= http://udesign.me.uk>©</a></p>";  
  134. ?>  
  135.  

 



 
systemSend private message  
Back to topPage bottom
Icy Phoenix is an open source project, you can show your appreciation and support future development by donating to the project.

Support us
 
Reply with quote Download Post 
Post Re: To IP Developers - User Friendly Recent Forum Topics Block 
 
you can edit the block to add the extra information you need...

list what you want to show.. and I will have a look..

   
 




____________
Mods and themes for Icy Phoenix 1.3

IcyPhoenix UK is off-line permanently due to lack of time to update mods.
if anyone is interested in my templates I will upgrade them to Icy 2.0.
 
DWhoSend private messageVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post Re: To IP Developers - User Friendly Recent Forum Topics Block 
 
I need,
Post Title  |  Rating  | Last Post  | Replies | Views  | Forum

Can you please develop this? I'll PM you some example sites.thanks.

System.
 



 
systemSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: To IP Developers - User Friendly Recent Forum Topics Block 
 
Block released here

http://www.icyphoenix.com/viewtopic.php?f=2&p=37429#p37429

   
 




____________
Mods and themes for Icy Phoenix 1.3

IcyPhoenix UK is off-line permanently due to lack of time to update mods.
if anyone is interested in my templates I will upgrade them to Icy 2.0.
 
DWhoSend private messageVisit poster's website  
Back to topPage bottom
Post new topic  Reply to topic  Page 1 of 1
 


Display posts from previous:    

HideWas this topic useful?

Link this topic
URL
BBCode
HTML




 
Permissions List
You cannot post new topics
You cannot reply to topics
You cannot edit your posts
You cannot delete your posts
You cannot vote in polls
You cannot attach files
You can download files
You cannot post calendar events


  

 

  cron