Looking for Something? Search Afriwap now!!!
Add to Flipboard Magazine. | |

HOW TO ADD RECENT UPDATES TO SMF WAP2 MOD

Author Topic: HOW TO ADD RECENT UPDATES TO SMF WAP2 MOD  (Read 1608 times)

0 Members and 1 Guest are viewing this topic.

Offline Timi Dapsin

  • Administrator
  • Hero Member
  • *****
  • Posts: 2,504
  • Today is that tomorrow you worried about yesterday
    • View Profile
HOW TO ADD RECENT UPDATES TO SMF WAP2 MOD
« on: January 14, 2014, 12:08:36 PM »


This is quite easy if you follow the steps below
DIFFICULTY : EASY


Just copy the code below and save with .php then include it anywhere in your Wireless.template.php  as done when adding links, change $show_limit and $table_prefix to your desired

Code: [Select]
<?php
$show_limit 
5;//Number of topics to show
$table_prefix 'smf_';//Your SMF table prefix, if you don't know this, leave it as it is

$mysql_query mysql_query("select * from $table_prefix"."messages order by id_msg desc limit $show_limit")or die(mysql_error());
while(
$db_row mysql_fetch_array($mysql_query))
{
$id_topic $db_row['id_topic'];
$subject_topic $db_row['subject'];
?>
<a href="?topic=<?=$id_topic?>;wap2"><?=$subject_topic?></a><br/><?php
}
?>

Or you can download the php code below and include it...
But make sure you change your table prefix if its not smf.
Ask your questions below







 


Other Topics To Read

Powered by EzPortal