how i allow smileys in it.

Started on the old forum in December 2009 · view the original in the archive · old links redirect here

4 replies · 328 views · started 16 years ago · 1 min read

3 participants
icedroplet1987 Senior · 258 posts #1

friends, what to add where to allow smileys n bbcodes on this page..

//////////////////////////////////shouts

else if($action=="shouts")
{
    addonline(getuid_sid($sid),"Roar","");
    $pstyle = gettheme($sid);
	 echo "<div class=\"HTAB\" style=\"background:#F1FFFE\">";
	echo "<div>";
	
      echo xhtmlhead("Roar",$pstyle);
    $who = $_GET["who"];
    //////ALL LISTS SCRIPT <<

    if($page=="" || $page<=0)$page=1;
    if($who=="")
    {
    $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM hfjgn_shouts"));
    }else{
    $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM hfjgn_shouts WHERE shouter='".$who."'"));
    }
    $num_items = $noi[0]; //changable
    $items_per_page= 10;
    $num_pages = ceil($num_items/$items_per_page);
    if(($page>$num_pages)&&$page!=1)$page= $num_pages;
    $limit_start = ($page-1)*$items_per_page;

    //changable sql
    if($who =="")
    {
        $sql = "SELECT id, shout, shouter, shtime  FROM hfjgn_shouts ORDER BY shtime DESC LIMIT $limit_start, $items_per_page";
}else{
    $sql = "SELECT id, shout, shouter, shtime  FROM hfjgn_shouts  WHERE shouter='".$who."'ORDER BY shtime DESC LIMIT $limit_start, $items_per_page";
}

    echo "<p><small>";
    $items = mysql_query($sql);
    echo mysql_error();
    if(mysql_num_rows($items)>0)
    {
    while ($item = mysql_fetch_array($items))
    {
        $shnick = getnick_uid($item[2]);
        $sht = htmlspecialchars($item[1]);
       // $shdt = date("d m y-H:i", $item[3]);
      $lnk = "<a href=\"index.php?action=viewuser&who=$item[2]&sid=$sid\">$shnick</a>: $sht<br/>";
      if(ismod(getuid_sid($sid)))
      {
      $dlsh = "<a href=\"121mprocpl121.php?action=delsh&sid=$sid&shid=$item[0]\">[x]</a>";
      }else{
        $dlsh = "";
      }
      echo "$lnk $dlsh<br/>";
    }
    }
    echo "</small></p>";
    echo "<p align=\"center\">";
	echo "<form method=\"post\" action=\"121genproc121.php?action=shout&sid=$sid\">";
  echo "Text:<input name=\"shtxt\" maxlength=\"100\"/><br/>";
  echo "<input type=\"submit\" name=\"Submit\" value=\"Roar\"/><br/>";
  echo "</form>";
    if($page>1)
    {
      $ppage = $page-1;
      echo "<a href=\"121lists121.php?action=shouts&page=$ppage&sid=$sid&who=$who\">«Prev</a> ";
    }
    if($page<$num_pages)
    {
      $npage = $page+1;
      echo "<a href=\"121lists121.php?action=shouts&page=$npage&sid=$sid&who=$who\">Next»</a>";
    }
    echo "<br/>$page/$num_pages<br/>";
    if($num_pages>2)
    {
  $rets = "<form action=\"121lists121.php\" method=\"get\">";
      $rets .= "Jump to page<input name=\"page\" format=\"*N\" size=\"3\"/><br/>";
        $rets .= "<input type=\"submit\" value=\"GO\"/>";
         $rets .= "<input type=\"hidden\" name=\"action\" value=\"$action\"/>";
         $rets .= "<input type=\"hidden\" name=\"who\" value=\"$who\"/>";
         $rets .= "<input type=\"hidden\" name=\"sid\" value=\"$sid\"/>";
         $rets .= "</form>";

        echo $rets;
    }
    echo "</p>";
  ////// UNTILL HERE >>
    echo "<p align=\"center\">";
    $thid = mysql_fetch_array(mysql_query("SELECT themeid FROM hfjgn_users WHERE id='".$uid."'"));
    $themeimageset = mysql_fetch_array(mysql_query("SELECT themedir FROM hfjgn_iconset WHERE id='".$thid[0]."'"));
    echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/themes/$themeimageset[0]/home.gif\" alt=\"*\"/>";
echo "Home</a>";
  echo "</p>";
    echo xhtmlfoot();
}
subzero Super moderator Fellow · 3,954 posts #2

$sht = htmlspecialchars($item[1]); it has it !

what you mean ?

Visit: Chat4u.mobi - The New Lay Of being a site of your dreams! Visit: WapMasterz Coming Back Soon!


SCRIPTS FOR SALE BY SUBZERO Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders. FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others... _______…

icedroplet1987 Senior · 258 posts #3

it has it then why no smileys or bbcode working in this page.. it shows source code of smileys n bbcode.

riderz Lead · 975 posts #4

try $sht = htmlspecialchars($item[1]); $sht = parsepm($item[1]); dnt know if it will work then

or $sht = htmlspecialchars2($item[1]);


Jacques jacques@gw-designs.co.za http://coding.biz.tm Come join and lets make it a place to learn all the noobies how to code


NEVER FORGET TO CLICK THE TANX BUTTON IF U LIKE WHAT IM SHARING OR HELPING WITH

Write your reply now; next you create a free account (or sign in) and it is posted right away. Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close