i made it for mobilezonez wich im using .... you can make smal chages and use it according to your need ....
and one think ... since im not a good coder i cant make thiks small and perfecrt ...
....
plzzz experiance ppl show me mistake i made and help me out ....
the think in genpro should b made lil more exact ... its working ... but there is too much uselss thinks in it plzz remove it ... and share
1.Go to phpmyadmin and add these one row under ibwf_shouts
`osid` int(100) NOT NULL,
2..Open lists.php and find ($action=="shouts") page and replace with this
3. then add another action in list.php
4. then in genproc.php add the action ...... there is bit useless thinks ... plzz any one knows how to make it perfect help me and outhrs to remove the junk also
its 100% working if you want you can chek it in my site ...
there was a small error now its correct the error was in list php ....
and one think ... since im not a good coder i cant make thiks small and perfecrt ...
....
plzzz experiance ppl show me mistake i made and help me out ....
the think in genpro should b made lil more exact ... its working ... but there is too much uselss thinks in it plzz remove it ... and share
1.Go to phpmyadmin and add these one row under ibwf_shouts
`osid` int(100) NOT NULL,
2..Open lists.php and find ($action=="shouts") page and replace with this
PHP Code:
else if($action=="shouts")
{
addonline(getuid_sid($sid),"Shouts","lists.php?action=$action");
boxstart("Shouts");
echo "Add shout(255 chars max):<br/><form action=\"genproc.php?action=shout&sid=$sid\" method=\"post\"><textarea id=\"inputText\" name=\"shtxt\"></textarea><br/>";
echo "<input id=\"inputButton\" type=\"submit\" value=\"Send\"/></form><br/>";
echo "<a href=\"lists.php?action=shout&sid=$sid\">»<b>post shout With Photo</b></a><br/><br/>";
$who = $_GET["who"];
if($page=="" || $page<=0)$page=1;
if($who=="")
{
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_shouts"));
}else{
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_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, image, osid FROM ibwf_shouts ORDER BY shtime DESC LIMIT $limit_start, $items_per_page";
}else{
$sql = "SELECT id, shout, shouter, shtime, image, osid FROM ibwf_shouts WHERE shouter='".$who."'ORDER BY shtime DESC LIMIT $limit_start, $items_per_page";
}
$items = mysql_query($sql);
echo mysql_error();
if(mysql_num_rows($items)>0)
{
while ($item = mysql_fetch_array($items))
{
$shnick = getnick_uid($item[2]);
if(isonline($item[2])){
$iml = "<img src=\"images/onl.gif\" alt=\"+\"/>";
}else{
$iml = "<img src=\"images/ofl.gif\" alt=\"-\"/>";
}
$nopl = mysql_fetch_array(mysql_query("SELECT id, shout, shouter, shtime, image FROM ibwf_shouts WHERE id = '".$item[5]."'"));
$fshout = htmlspecialchars($item[1]);
$fshoutos = htmlspecialchars($nopl[1]);
$fshout = getsmilies($fshout);
$fshoutos = getsmilies($fshoutos);
$fshout = getbbcode($fshout, $sid);
$fshoutos = getbbcode($fshoutos, $sid);
$shbox .= $fshout;
$image = ($item[4]);
$imageos = ($nopl[4]);
$shnickos = getnick_uid($nopl[2]);
$shdt = date("d/m/Y h:i:s A", $item[3]+(addhours()));
$shdtos = date("d/m/Y h:i:s A", $nopl[3]+(addhours()));
//<img src=\"$nopl[4]\" width=\"40\" height=\"40\"/>
if(isowner($item[2]))
{
if($image==""){
if ($item[5]=="0"){
$lnk = "$iml <a href=\"index.php?action=viewuser&who=$item[2]&sid=$sid\"><font color='red'>$shnick</font></a>: $shdt<br/><br/>".getbbcode(getsmilies($fshout));
}else{ $lnk = "$iml <a href=\"index.php?action=viewuser&who=$item[2]&sid=$sid\"><font color='red'>$shnick</font></a>: $shdt<br/><i>Originally Shouted By $shnickos at $shdtos <br/> ".getbbcode(getsmilies($fshoutos))."</i><img src=\"$nopl[4]\" width=\"40\" height=\"40\"/> <br/>--------<br/>".getbbcode(getsmilies($fshout));
}
}else{
$lnk = "$iml <a href=\"index.php?action=viewuser&who=$item[2]&sid=$sid\"><font color='red'>$shnick</font></a>: $shdt<br/><br/> <img src=\"$item[4]\" width=\"40\" height=\"40\"/>".getbbcode(getsmilies($fshout));
}
}
else if(isadmin($item[2]))
{
if($image==""){
if ($item[5]=="0"){
$lnk = "$iml <a href=\"index.php?action=viewuser&who=$item[2]&sid=$sid\"><font color='green'>$shnick</font></a>: $shdt<br/><br/>".getbbcode(getsmilies($fshout));
}else{ $lnk = "$iml <a href=\"index.php?action=viewuser&who=$item[2]&sid=$sid\"><font color='green'>$shnick</font></a>: $shdt<br/><i>Originally Shouted By $shnickos at $shdtos <br/> ".getbbcode(getsmilies($fshoutos))."</i><img src=\"$nopl[4]\" width=\"40\" height=\"40\"/> <br/>--------<br/>".getbbcode(getsmilies($fshout));
}
}else{
$lnk = "$iml <a href=\"index.php?action=viewuser&who=$item[2]&sid=$sid\"><font color='green'>$shnick</font></a>: $shdt<br/><br/> <img src=\"$item[4]\" width=\"40\" height=\"40\"/>".getbbcode(getsmilies($fshout));
}
}
else if(isvip($shots[1]))
{
if($image==""){
if ($item[5]=="0"){
$lnk = "$iml <a href=\"index.php?action=viewuser&who=$item[2]&sid=$sid\"><font color='lightgreen'>$shnick</font></a>: $shdt<br/><br/>".getbbcode(getsmilies($fshout));
}else{ $lnk = "$iml <a href=\"index.php?action=viewuser&who=$item[2]&sid=$sid\"><font color='lightgreen'>$shnick</font></a>: $shdt<br/><i>Originally Shouted By $shnickos at $shdtos <br/> ".getbbcode(getsmilies($fshoutos))."</i><img src=\"$nopl[4]\" width=\"40\" height=\"40\"/> <br/>--------<br/>".getbbcode(getsmilies($fshout));
}
}else{
$lnk = "$iml <a href=\"index.php?action=viewuser&who=$item[2]&sid=$sid\"><font color='lightgreen'>$shnick</font></a>: $shdt<br/><br/> <img src=\"$item[4]\" width=\"40\" height=\"40\"/>".getbbcode(getsmilies($fshout));
}
}
else if(ismod($item[2]))
{
if($image==""){
if ($item[5]=="0"){
$lnk = "$iml <a href=\"index.php?action=viewuser&who=$item[2]&sid=$sid\"><font color='darkviolet'>$shnick</font></a>: $shdt<br/><br/>".getbbcode(getsmilies($fshout));
}else{ $lnk = "$iml <a href=\"index.php?action=viewuser&who=$item[2]&sid=$sid\"><font color='darkviolet'>$shnick</font></a>: $shdt<br/><i>Originally Shouted By $shnickos at $shdtos <br/> ".getbbcode(getsmilies($fshoutos))."</i><img src=\"$nopl[4]\" width=\"40\" height=\"40\"/> <br/>--------<br/>".getbbcode(getsmilies($fshout));
}
}else{
$lnk = "$iml <a href=\"index.php?action=viewuser&who=$item[2]&sid=$sid\"><font color='darkviolet'>$shnick</font></a>: $shdt<br/><br/> <img src=\"$item[4]\" width=\"40\" height=\"40\"/>".getbbcode(getsmilies($fshout));
}
}
else if(isheadadd($item[2]))
{
if($image==""){
if ($item[5]=="0"){
$lnk = "$iml <a href=\"index.php?action=viewuser&who=$item[2]&sid=$sid\"><font color='brown'>$shnick</font></a>: $shdt<br/><br/>".getbbcode(getsmilies($fshout));
}else{ $lnk = "$iml <a href=\"index.php?action=viewuser&who=$item[2]&sid=$sid\"><font color='brown'>$shnick</font></a>: $shdt<br/><i>Originally Shouted By $shnickos at $shdtos <br/> ".getbbcode(getsmilies($fshoutos))."</i><img src=\"$nopl[4]\" width=\"40\" height=\"40\"/> <br/>--------<br/>".getbbcode(getsmilies($fshout));
}
}else{
$lnk = "$iml <a href=\"index.php?action=viewuser&who=$item[2]&sid=$sid\"><font color='brown'>$shnick</font></a>: $shdt<br/><br/> <img src=\"$item[4]\" width=\"40\" height=\"40\"/>".getbbcode(getsmilies($fshout));
}
}
else
{
if($image==""){
if ($item[5]=="0"){
$lnk = "$iml <a href=\"index.php?action=viewuser&who=$item[2]&sid=$sid\">$shnick</a>: $shdt<br/><br/>".getbbcode(getsmilies($fshout));
}else{ $lnk = "$iml <a href=\"index.php?action=viewuser&who=$item[2]&sid=$sid\">$shnick</a>: $shdt<br/><i>Originally Shouted By $shnickos at $shdtos <br/> ".getbbcode(getsmilies($fshoutos))."</i><img src=\"$nopl[4]\" width=\"40\" height=\"40\"/> <br/>--------<br/>".getbbcode(getsmilies($fshout));
}
}else{
$lnk = "$iml <a href=\"index.php?action=viewuser&who=$item[2]&sid=$sid\">$shnick</a>: $shdt<br/><br/> <img src=\"$item[4]\" width=\"40\" height=\"40\"/>".getbbcode(getsmilies($fshout));
}
}
if(ismod(getuid_sid($sid)))
{
$dlsh = "[<a href=\"lists.php?action=chiledit&sid=$sid&shid=$item[0]\">E</a>]|[<a href=\"adctrlpr.php?action=chilmit&sid=$sid&shid=$item[0]\">D</a>]";
}else{
$dlsh = "";
}
echo "$lnk $dlsh";
$osid = $item[0];
$shouttext = getbbcode(getsmilies($fshout));
$whose = getnick_uid($item[2]);
$fpmtext = removebb($shouttext, $sid);
echo "<form action=\"lists.php?action=comment&sid=$sid\" method=\"post\"><input type=\"hidden\" name=\"osid\" value=\"$osid\"/><input type=\"hidden\" name=\"oshdt\" value=\"$shdt\"/><input type=\"hidden\" name=\"shoutm\" value=\"$fpmtext\"/><input type=\"hidden\" name=\"shouter\" value=\"$whose\"/><input id=\"inputButton\" type=\"submit\" value=\"Comment\"/></form>";
echo "<br/><br/>";
}
}
echo "<p align=\"center\">";
if($page>1)
{
$ppage = $page-1;
echo "<a href=\"lists.php?action=shouts&page=$ppage&sid=$sid&who=$who\">«PREV</a> ";
}
if($page<$num_pages)
{
$npage = $page+1;
echo "<a href=\"lists.php?action=shouts&page=$npage&sid=$sid&who=$who\">Next»</a>";
}
echo "<br/>Page $page of $num_pages<br/>";
if($num_pages>2)
{
$rets = "<center>Jump to page<form action=\"lists.php\" method=\"get\"><input id=\"inputText\" name=\"page\" format=\"*N\" size=\"3\"/>";
$rets .= "<input type=\"hidden\" name=\"action\" value=\"$action\"/>";
$rets .= "<input type=\"hidden\" name=\"sid\" value=\"$sid\"/>";
$rets .= "<input type=\"hidden\" name=\"who\" value=\"$who\"/>";
$rets .= "<input id=\"inputButton\" type=\"submit\" value=\"Go\"/></form></center>";
echo $rets;
}
////// UNTILL HERE >>
echo "</p>";
}
PHP Code:
else if($action=="comment"){
addonline(getuid_sid($sid),"Forwarding a text msg","");
$osid = $_POST["osid"];
$shoutm = $_POST["shoutm"];
$oshdt = $_POST["oshdt"];
$shouter = $_POST["shouter"];
boxstart("Comment on Shout");
echo "<p>";
$whonick = getnick_uid($who);
echo "This feature is currently in test phase, please report if you see errors.<br/>";
echo "Originally Shouted by:<b>$shouter </b>At<b> $oshdt</b><br/>";
echo "Shout: <b>$shoutm</b><br/>";
echo "<br/> <form action=\"genproc.php?action=comments&sid=$sid\" method=\"post\">";
echo "Comment:<br/> <textarea id=\"inputText\" name=\"pmtext\"></textarea><br/>";
echo "<input type=\"hidden\" name=\"osid\" value=\"$osid\"/>";
echo "<input id=\"inputButton\" type=\"submit\" value=\"Add\"/>";
echo "</form></p>";
boxend();
}
PHP Code:
///////////////////////comment
else if($action=="comments"){
echo "<p align=\"center\">";
$pmtou = $_POST["pmtou"];
$fmsg = $_POST["fmsg"];
$whose = $_POST["whose"];
$orgtime = $_POST["osid"];
addonline(getuid_sid($sid),"Adding Comment to Shout","");
$who = getuid_nick($pmtou);
if($orgtime ==0){
echo "<img src=\"images/notok.gif\" alt=\"x\"/>User Does Not exist<br/>";
}else{
$whonick = getnick_uid($who);
$byuid = getuid_sid($sid);
$pmtext = removebb($pmtext);
$tm = time();
$lastpm = mysql_fetch_array(mysql_query("SELECT MAX(timesent) FROM ibwf_private WHERE byuid='".$byuid."'"));
$pmfl = $lastpm[0]+getpmaf();
if($pmfl<$tm){
if(!isblocked($pmtext,$byuid)){
if((!isignored($byuid, $who))&&(!istrashed($byuid))){
$res = mysql_query("INSERT INTO ibwf_shouts SET shout='".$pmtext."', shouter='".$byuid."', shtime='".$tm."', osid='".$orgtime."'");
}else{
$res = false;
}
if($res){
echo "<img src=\"images/ok.gif\" alt=\"O\"/>";
echo "Message from $whose was forwarded successfully to $whonick<br/><br/>";
echo parsepm($pmtext, $sid);
}else{
echo "<img src=\"images/notok.gif\" alt=\"X\"/>";
echo "Your message wasn't sent because either $whonick has put you in his/her ignore list or your outgoing messaging has been barred by an admin!<br/><br/>";
}
}else{
$bantime = time() + (7*24*60*60);
echo "<img src=\"images/notok.gif\" alt=\"X\"/>";
echo "Can't Send PM to $whonick<br/><br/>";
echo "You just sent a link to one of the crappiest sites on earth<br/> The members of these sites spam here a lot, so go to that site and stay there if you don't like it here<br/> as a result of your stupid action:<br/>1. you have lost your sheild<br/>2. you have lost all your plusses<br/>3. You are BANNED for 7 days!";
mysql_query("INSERT INTO ibwf_penalties SET uid='".$byuid."', penalty='1', exid='1', timeto='".$bantime."', pnreas='Banned: Automatic Ban for spamming for a crap site'");
mysql_query("UPDATE ibwf_users SET plusses='0', shield='0' WHERE id='".$byuid."'");
mysql_query("INSERT INTO ibwf_private SET text='".$pmtext."', byuid='".$byuid."', touid='2', timesent='".$tm."', reported='1'");
}
}else{
$rema = $pmfl - $tm;
echo "<img src=\"images/notok.gif\" alt=\"X\"/>";
echo "Flood control: $rema Seconds<br/><br/>";
}
}
echo "<br/><br/><a href=\"lists.php?action=shouts&sid=$sid\">Back to Shouts</a><br/>";
echo "</p>";
}
its 100% working if you want you can chek it in my site ...
there was a small error now its correct the error was in list php ....