How to add latest forum topics in a block on the Front Page ? To enable forums topics in a news block you need to configure the news block in cadmin => Other/Websites => NEWS BLOCKS (HEADER) or NEWS BLOCKS (FOOTER) Then select under "Block" the option "Forums (latest)". In case you are using a third party forum such as vBulletin, you need to select the option "bbwrapper" instead.
How to add latest forum topics in a block on the Front Page ? Thanx , Can i put this block on the left or right side ?
How to add latest forum topics in a block on the Front Page ? And allso i want ot know if its possible to make a block with a chart of the most read stories?
How to add latest forum topics in a block on the Front Page ? Open the template site_header in the template editor and add after: Code: global $insert; the following: Code: $forums_data = ""; dbconnect(); $result = DBQuery("SELECT * FROM esselbach_st_forumsthreads t, esselbach_st_forums f WHERE f.forum_status = '1' AND t.thread_forum = f.forum_id ORDER BY t.thread_endtime DESC LIMIT 10"); while ($data = mysql_fetch_array($result)) { $forums_data .= "<li><a href="thread.php?id=".$data['thread_id']."">".htmlentities($data['thread_topic'])."</a></li>"; } and add in the HTML part of the template after: Code: </font></td> </tr> </table> </td> </tr> </table> <br /> a new block: Code: <table cellspacing="0" cellpadding="0" width="160" bgcolor="#000000" border="0"> <tr> <td> <table cellspacing="1" cellpadding="3" width="100%" border="0"> <tr> <td bgcolor="#009966"> <font face="Verdana, Arial, sans-serif" color="#ffffff" size="2"><b>Latest Forum Topics</b></font></td> </tr> <tr> <td bgcolor="#ffffff"><font size="2"> $forums_data </font></td> </tr> </table> </td> </tr> </table> <br /> 1) Select News/Edit Fields in cadmin => Field 1 => "Enabled, text only" and add "Counter" as Field Text 2) Open story.php in an editor and find: Code: HeaderBlock(); Then add after this line the following: Code: dbconnect(); DBQuery("UPDATE esselbach_st_stories SET extra_field1=extra_field1+ 1 WHERE story_id = '$id'"); 3) Open site_header in the template editor and add after: Code: global $insert; the following: Code: $stories_data = ""; dbconnect(); $result = DBQuery("SELECT * FROM esselbach_st_stories WHERE story_hook = '0' ORDER BY story_extra1 DESC LIMIT 10"); while ($data = mysql_fetch_array($result)) { $stories_data .= "<li><a href="story.php?id=".$data['story_id']."">".htmlentities($data['story_title'])."</a> (".$data['story_extra1']." views)</li>"; } Then add a new block in the HTML part: Code: <table cellspacing="0" cellpadding="0" width="160" bgcolor="#000000" border="0"> <tr> <td> <table cellspacing="1" cellpadding="3" width="100%" border="0"> <tr> <td bgcolor="#009966"> <font face="Verdana, Arial, sans-serif" color="#ffffff" size="2"><b>Top 10 Stories</b></font></td> </tr> <tr> <td bgcolor="#ffffff"><font size="2"> $stories_data </font></td> </tr> </table> </td> </tr> </table> <br />
How to add latest forum topics in a block on the Front Page ? Ive got this err now Error: 1054 Unknown column 'extra_field2' in 'field list' when i try to open any story
How to add latest forum topics in a block on the Front Page ? Sorry, it should be: Code: DBQuery("UPDATE esselbach_st_stories SET story_field1=story_field1+1 WHERE story_id = '$id'"); or in your case story_field2
How to add latest forum topics in a block on the Front Page ? I managed to work , but it seems that doesnt count news posted this year ..only those from last year www.thehotfiles.com
How to add latest forum topics in a block on the Front Page ? It shouldn’t make any difference between news from this year and last year
How to add latest forum topics in a block on the Front Page ? It only counts until 9 . Any tips ? Thank You
How to add latest forum topics in a block on the Front Page ? It seems like a problem with the code in the site_header template. Can you post the entire PHP part from that template?
How to add latest forum topics in a block on the Front Page ? Strange . Try changing the query to: Code: $result = DBQuery("SELECT * FROM esselbach_st_stories ORDER BY story_extra1 DESC LIMIT 10");