i made it for mobilezonez you can use this and make .... small chages and use for any edit of lava.....
again i have to say is
. 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_posts
`opostid` int(100) NOT NULL,
2..Open index.php and find ($action=="viewtpc") page and replace with this
3.add another action in index.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 ...
again i have to say is
. 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_posts
`opostid` int(100) NOT NULL,
2..Open index.php and find ($action=="viewtpc") page and replace with this
PHP Code:
else if($action=="viewtpc"){
gettimebar();
getnewmsg($sid);
getalert($sid);
$tid = $_GET["tid"];
$go = $_GET["go"];
$tfid = mysql_fetch_array(mysql_query("SELECT fid FROM ibwf_topics WHERE id='".$tid."'"));
$fname = getfname($tfid[0]);
if (isforumblocked($uid)){
boxstart("Error!");
echo "<img src=\"notok.gif\"/>";
echo "Your forum access has been blocked by a moderator!!!<br/><br/>";
echo "<a href=\"index.php?action=main&sid=$sid\">Main Menu</a>";
boxend();
echo "</font></body></html>";
exit();
}
if(!canaccess($uid, $tfid[0])){
boxstart("Error!");
echo "<img src=\"notok.gif\"/>";
echo "This post belongs to $fname forum which is not available to you presently. To read this post, join $fname club.<br/><br/>";
echo "<a href=\"index.php?action=main&sid=$sid\">Main Menu</a>";
echo "</font></body></html>";
exit();
}
if($go!="") {
$page=getpage_go($go,$tid,$sid);
}
$tinfo = mysql_fetch_array(mysql_query("SELECT name, text, authorid, crdate, views, fid, pollid from ibwf_topics WHERE id='".$tid."'"));
$tnm = htmlspecialchars($tinfo[0]);
$namewa = mysql_fetch_array(mysql_query("SELECT name FROM ibwf_forums WHERE id = $tinfo[5]"));
$namewa1 = htmlspecialchars($namewa[0]);
$indiatime = time() + (addhours());
addonline($uid,"Reading post <i>$tnm</i> in $fname forum","index.php?action=$action&tid=$tid");
boxstart("$tnm");
$vws = $tinfo[4]+1;
$num_pages = getnumpages($tid, $sid);
echo "Subject: $tnm<br/>Viewed: $vws times<br/>Topic # $tid<br/>Page # $page of $num_pages<br/>";
echo "Page:";
$pagewa = 1;
while ($pagewa<=$num_pages)
{
echo "[<a href=\"index.php?action=viewtpc&page=$pagewa&sid=$sid&tid=$tid\">$pagewa</a>]";
$pagewa = $pagewa+1;
};
if($page==""||$page<1) {
$page=1;
}
$posts_per_page = getppp($uid);
if($page>$num_pages) {
$page=$num_pages;
}
$limit_start = $posts_per_page *($page-1);
$rpls = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_posts WHERE tid='".$tid."'"));
///fm here
if($page==1){
mysql_query("UPDATE ibwf_topics SET views='".$vws."' WHERE id='".$tid."'");
$ttext = mysql_fetch_array(mysql_query("SELECT authorid, text, crdate, pollid FROM ibwf_topics WHERE id='".$tid."'"));
$unick = getnick_uid($ttext[0]);
if(isonline($ttext[0])){
$iml = "<img src=\"images/onl.gif\" alt=\"+\"/>";
}else{
$iml = "<img src=\"images/ofl.gif\" alt=\"-\"/>";
}
if(isadmin($ttext[0]))
{$usl = "$iml<a href=\"index.php?action=viewuser&sid=$sid&who=$ttext[0]\"><font color='green'>$unick</font></a>";}
else if(isheadadd($ttext[0]))
{$usl = "$iml<a href=\"index.php?action=viewuser&sid=$sid&who=$ttext[0]\"><font color='brown'>$unick</font></a>";}
else if(isowner($ttext[0]))
{$usl = "$iml<a href=\"index.php?action=viewuser&sid=$sid&who=$ttext[0]\"><font color='red'>$unick</font></a>";}
else if(isvip($ttext[0]))
{$usl = "$iml<a href=\"index.php?action=viewuser&sid=$sid&who=$ttext[0]\"><font color='lightgreen'>$unick</font></a>";}
else if(ismod($ttext[0]))
{$usl = "$iml<a href=\"index.php?action=viewuser&sid=$sid&who=$ttext[0]\"><font color='darkviolet'>$unick</font></a>";}
else if(isbanned($ttext[0]))
{$usl = "$iml<a href=\"index.php?action=viewuser&sid=$sid&who=$ttext[0]\"><strike>$unick</strike></a>";}
else
{$usl = "$iml<a href=\"index.php?action=viewuser&sid=$sid&who=$ttext[0]\">$unick</a>";}
$topt = "<a href=\"index.php?action=tpcopt&sid=$sid&tid=$tid\">[*]</a>";
$rep = "<a href=\"index.php?action=addrep&sid=$sid&tid=$tid\">[R]</a>";
$pst = parsemsg($ttext[1],$sid);
echo "<br/>Post from $usl: $topt $rep<br/>";
$indiatime = $ttext[2] + (addhours());
$dtot = date("d/m/Y h:i:s A",$indiatime);
echo $dtot."<br/>";
echo "<br/>$pst<br/><br/>";
if($ttext[3]>0){
echo "<a href=\"index.php?action=viewtpl&sid=$sid&who=$tid\">POLL</a><br/>";
}
}
if($page>1){
$limit_start--;
}
$sql = "SELECT id, text, uid, dtpost, opostid FROM ibwf_posts WHERE tid='".$tid."' ORDER BY dtpost LIMIT $limit_start, $posts_per_page";
$posts = mysql_query($sql);
while($post = mysql_fetch_array($posts)){
$unick = getnick_uid($post[2]);
if(isonline($post[2])){
$iml = "<img src=\"images/onl.gif\" alt=\"+\"/>";
}else{
$iml = "<img src=\"images/ofl.gif\" alt=\"-\"/>";
}
$nopl = mysql_fetch_array(mysql_query("SELECT id, text, uid, dtpost FROM ibwf_posts WHERE id = '".$post[4]."'"));
$shnickos = getnick_uid($nopl[2]);
$shdtos = date("d/m/Y h:i:s A", $nopl[3]+(addhours()));
if(isadmin($post[2]))
{$usl = "$iml<a href=\"index.php?action=viewuser&sid=$sid&who=$post[2]\"><font color='green'>$unick</font></a>";}
else if(isheadadd($post[2]))
{$usl = "$iml<a href=\"index.php?action=viewuser&sid=$sid&who=$post[2]\"><font color='brown'>$unick</font></a>";}
else if(isowner($post[2]))
{$usl = "$iml<a href=\"index.php?action=viewuser&sid=$sid&who=$post[2]\"><font color='red'>$unick</font></a>";}
else if(isvip($post[2]))
{$usl = "$iml<a href=\"index.php?action=viewuser&sid=$sid&who=$post[2]\"><font color='lightgreen'>$unick</font></a>";}
else if(ismod($post[2]))
{$usl = "$iml<a href=\"index.php?action=viewuser&sid=$sid&who=$post[2]\"><font color='darkviolet'>$unick</font></a>";}
else if(isbanned($post[2]))
{$usl = "$iml<a href=\"index.php?action=viewuser&sid=$sid&who=$post[2]\"><strike>$unick</strike></a>";}
else
{$usl = "$iml<a href=\"index.php?action=viewuser&sid=$sid&who=$post[2]\">$unick</a>";}
$pst = parsemsg($post[1], $sid);
$opst = parsemsg($nopl[1], $sid);
$topt = "<a href=\"index.php?action=pstopt&sid=$sid&pid=$post[0]&page=$page&fid=$tinfo[5]\">*</a>";
echo "<br/>Reply from $usl: $topt<br/>";
$indiantime = $post[3] + (addhours());
$dtot = date("d/m/Y h:i:s A",$indiantime);
echo $dtot."<br/>";
if ($post[4]=="0"){
echo "<br/>$pst<br/>";
}else{
echo "<i>Originally posted By $shnickos at $shdtos <br/> Orginal Post<b>:</b> $opst</i><br/>--------";
echo "<br/><b>$pst</b><br/>";
}
$osid = $post[0];
$whose = getnick_uid($post[2]);
$fpmtext = removebb($post[1], $sid);
echo "<form action=\"index.php?action=commentp&sid=$sid\" method=\"post\"><input type=\"hidden\" name=\"osid\" value=\"$osid\"/><input type=\"hidden\" name=\"tid\" value=\"$tid\"/><input type=\"hidden\" name=\"oshdt\" value=\"$dtot\"/><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/>";
}
boxend();
echo "<center>";
if($page<$num_pages){
$npage = $page+1;
echo "<a href=\"index.php?action=viewtpc&page=$npage&sid=$sid&tid=$tid\">Next»</a><br/>";
}
if($page>1){
$ppage = $page-1;
echo "<a href=\"index.php?action=viewtpc&page=$ppage&sid=$sid&tid=$tid\">«Previous</a>";
}
echo "<br/>Add reply:<br/><form action=\"genproc.php?action=post&sid=$sid\" method=\"post\"><textarea id=\"inputText\" name=\"reptxt\"></textarea><br/>";
echo "
<input type=\"hidden\" name=\"tid\" value=\"$tid\"/>
<input type=\"hidden\" name=\"qut\" value=\"\"/>
<input id=\"inputButton\" type=\"submit\" value=\"Send\"/>
</form></center>";
echo "<p align=\"center\">Page $page of $num_pages<br/>";
$fid = $tinfo[5];
$fname = getfname($fid);
echo "<a href=\"index.php?action=viewfrm&sid=$sid&fid=$fid\">Back To $fname Forum</a><br/><br/></p>";
getfooter($sid);
}
PHP Code:
////////////////////////////////////////////comment post
else if($action=="commentp"){
addonline(getuid_sid($sid),"Forwarding a text msg","");
$osid = $_POST["osid"];
$tid = $_POST["tid"];
$shoutm = $_POST["shoutm"];
$oshdt = $_POST["oshdt"];
$shouter = $_POST["shouter"];
boxstart("Comment on post");
echo "<p>";
$whonick = getnick_uid($who);
echo "This feature is currently in test phase, please report if you see errors.<br/>";
echo "Originally posted by:<b>$shouter </b>At<b> $oshdt</b><br/>";
echo "post <b>$shoutm</b><br/>";
echo "<br/> <form action=\"genproc.php?action=commentp&sid=$sid\" method=\"post\">";
echo "Comment:<br/> <textarea id=\"inputText\" name=\"pmtext\"></textarea><br/>";
echo "<input type=\"hidden\" name=\"tid\" value=\"$tid\"/>";
echo "<input type=\"hidden\" name=\"osid\" value=\"$osid\"/>";
echo "<input id=\"inputButton\" type=\"submit\" value=\"Add\"/>";
echo "</form></p>";
boxend();
getfooter($sid);
}
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
PHP Code:
///////////////////////comment on post
///////////////////////comment
else if($action=="commentp"){
echo "<p align=\"center\">";
$pmtou = $_POST["pmtou"];
$fmsg = $_POST["fmsg"];
$tid = $_POST["tid"];
$whose = $_POST["whose"];
$orgtime = $_POST["osid"];
addonline(getuid_sid($sid),"Adding Comment to Shout","");
$who = getuid_nick($pmtou);
if($tid ==0){
echo "<img src=\"images/notok.gif\" alt=\"x\"/>topic dont 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_posts SET text='".$pmtext."', tid='".$tid."', uid='".$byuid."', dtpost='".$tm."', opostid='".$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/><a href=\"index.php?action=viewtpc&sid=$sid&tid=$tid&go=last\">";
echo "Back To Topic</a><br/>";
echo "</p>";
}
Comment