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

SMF WAP2 CUSTOMIZATION, ADD BOARD DETAILS (TOTAL POST/TOPICS AND DESCRIPTION)

Author Topic: SMF WAP2 CUSTOMIZATION, ADD BOARD DETAILS (TOTAL POST/TOPICS AND DESCRIPTION)  (Read 2814 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


Today am gonna show you guys
How to customize your smf wap2 by adding Board details like Total Post/Topics and Board descriptions


Difficulty: EASY

Just follow the steps Below
[/b][/u]
make sure you backup before proceeding
Login to your Control panel using Filezilla or Any Ftp program
Goto
public_html/Themes/default/wireless.template.php

Edit and Find

Code: [Select]
foreach ($category['boards'] as $board)
                {
                        $count++;
echo '
<div class="body">', $board['new'] ? '<span class="updated"><img border="0" src="' .$settings['default_images_url']. '/wap/new.png" width="18px" height="9px">&nbsp;' : '<img border="0" src="' .$settings['default_images_url']. '/wap/newg.png" width="9px" height="9px">', $board['children_new'] && !$board['new'] ? '<span class="updated">+&nbsp;&nbsp;' : '', $board['new'] || $board['children_new'] ? '</span>' : '&nbsp;&nbsp;', '<a href="', $scripturl, '?board=', $board['id'], '.0;wap2"', $count < 10 ? ' accesskey="' . $count . '"' : '', '>', $board['name'], '</a></div>';
                }

Then Replace with
Code: [Select]
foreach ($category['boards'] as $board)
                {
                        $count++;
echo '
<div class="body">', $board['new'] ? '<span class="updated"><img border="0" src="' .$settings['default_images_url']. '/wap/new.png" width="18px" height="9px">&nbsp;' : '<img border="0" src="' .$settings['default_images_url']. '/wap/newg.png" width="9px" height="9px">', $board['children_new'] && !$board['new'] ? '<span class="updated">+&nbsp;&nbsp;' : '', $board['new'] || $board['children_new'] ? '</span>' : '&nbsp;&nbsp;', '<a href="', $scripturl, '?board=', $board['id'], '.0;wap2"', $count < 10 ? ' accesskey="' . $count . '"' : '', '>', $board['name'], '</a></div>';

$boardname=$board['id'];
//connecting to db
$sq = mysql_query("select * from smf_boards where id_board='$boardname'");
if(!$sq)
{
die(mysql_error());
}
while($ow=mysql_fetch_array($sq))
{
$ntopic=$ow['num_topics'];
$npost=$ow['num_posts'];
$desc = $ow['description'];
if(!$desc)
{
$desc="No description";
}
echo'<div class="ss">'.$desc.'<br/>Topics: '.$ntopic.' Posts: '.$npost.'</div></div>';
}
                }

Or you can use the include function (Same we used in adding links to wap2)
Add the below code to a file and include it
Code: [Select]
$boardname=$board['id'];
//connecting to db
$sq = mysql_query("select * from smf_boards where id_board='$boardname'");
if(!$sq)
{
die(mysql_error());
}
while($ow=mysql_fetch_array($sq))
{
$ntopic=$ow['num_topics'];
$npost=$ow['num_posts'];
$desc = $ow['description'];
if(!$desc)
{
$desc="No description";
}
echo'<div class="ss">'.$desc.'<br/>Topics: '.$ntopic.' Posts: '.$npost.'</div></div>';
}

Simple! :)
Dont forget to Like / Tweet





 


Other Topics To Read

Powered by EzPortal