Post Your Custom Made Mods Here For The Lavalair Script.
Topic Made And Pinned As Requested By Members
Started on the old forum in June 2008 · view the original in the archive · old links redirect here
Written automatically from the replies by a language model on our own server. It can be wrong; the posts below are the source.
Post Your Custom Made Mods Here For The Lavalair Script.
Topic Made And Pinned As Requested By Members
Random Picture From The ibwf_gallery Table
$pic = mysql_fetch_array(mysql_query("SELECT uid, url FROM ibwf_gallery ORDER BY RAND() LIMIT 1"));
$user = getnick_uid($pic[0]);
echo "<a href=\"index.php?action=viewuser&sid=$sid&who=$pic[0]\"/><img src=\"$pic[1]\" width=\"120\" height=\"120\"/></a>";
Note: This Will Only Work If You Have The Gallery That Uses The Database
Visit Counter For Each MemberAdd New Table In ibwf_users
`visit` varchar(255) NOT NULL default '0'
Add To Login.php
$uid = getuid_sid($sid);
$addv = mysql_fetch_array(mysql_query("SELECT visit FROM ibwf_users WHERE id='".$uid."'"));
$addv = $addhitv[0] + 1;
$addvisit = mysql_query("UPDATE ibwf_users SET visit='".$addv."' WHERE id='".$uid."'");
Add To Index.php?action=main
$nick = getnick_sid($sid);
$uid = getuid_sid($sid);
$showv = mysql_fetch_array(mysql_query("SELECT visit FROM ibwf_users WHERE id='".$uid."'"));
echo "Hello $nick,
This Is Your $showv[0]. Visit!";
User RatingAdd To Core.php
function rating($uid)
{
$info=mysql_fetch_array(mysql_query("SELECT * FROM ibwf_users WHERE id='".$uid."'"));
$posts = $info["posts"];
$plusses = $info["plusses"];
$gplus = $gplus["gplus"];
$shouts = $shouts["shouts"];
$tot = $posts+$plusses+$gplus+$shouts;
if($tot<100){return "<img src=\"http://coding-talk.com/images/half-star.gif\" alt=\"\"/>";}
if($tot<250){return "<img src=\"http://coding-talk.com/images/1-star.gif\" alt=\"\"/>";}
if($tot<500){return "<img src=\"http://coding-talk.com/images/1half-star.gif\" alt=\"\"/>";}
if($tot<750){return "<img src=\"http://coding-talk.com/images/2-star.gif\" alt=\"\"/>";}
if($tot<2500){return "<img src=\"http://coding-talk.com/images/2half-star.gif\" alt=\"\"/>";}
if($tot<50000){return "<img src=\"http://coding-talk.com/images/3-star.gif\" alt=\"\"/>";}
if($tot<75000){return "<img src=\"http://coding-talk.com/images/3half-star.gif\" alt=\"\"/>";}
if($tot<100000){return "<img src=\"http://coding-talk.com/images/4-star.gif\" alt=\"\"/>";}
if($tot<150000){return "<img src=\"http://coding-talk.com/images/4half-star.gif\" alt=\"\"/>";}
if($tot>=150000){return "<img src=\"http://coding-talk.com/images/5-star.gif\" alt=\"\"/>";}
}
Add To Index.php?action=viewuser
$whonick = getnick_log($who);
echo "
";
echo rating($whonick);
echo "
";
I'll Add The Stars Later Or You Can Add Your Own.
Total Unread PMs count Add To Index.php?action=viewuser
echo "[b]Total Unread PMs:[/b] ".getunreadpm($who)."
";
Unread PMs count from you add this function in core.php
/////////////////////Get unread number of pms form you
function getunreadpm($uid,$you)
{
$nopm = mysql_fetch_array(mysql_query("SELECT COUNT(id) FROM ibwf_private WHERE touid='".$uid."' AND byuid='".$you."'AND unread='1'"));
return $nopm[0];
}
Add To Index.php?action=viewuser
echo "[b]Unread PMs From You:[/b] ".getunreadpm($who,$uid)."
";
looks nice whitwarrior and Romi External image (may be gone)
Last Profile Viewer & Last 10 Profile Viewers I coded this using a different pattern sql table and different sql tackties to keep the last 10 records for each user field only and dont erase the copyright line if you are not stupid Add To Index.php?action=viewuser after the $whonick variable has been declared
$sql = mysql_fetch_array(mysql_query("SELECT COUNT(id) FROM lastview WHERE whonick='".$whonick."'"));
if ($sql[0]>10)
{
$sql = mysql_fetch_array(mysql_query("SELECT MAX(id) FROM lastview WHERE whonick='".$whonick."'"));
$sql = $sql[0]-9;
mysql_query("DELETE FROM lastview WHERE whonick='".$whonick."' AND id <'".$sql."'");
}
$lv=getnick_sid($sid);
$a = getuid_nick($whonick);
if($a!=$uid)
{
mysql_query("INSERT INTO lastview SET lastview='".$lv."', whonick='".$whonick."', ltime='".time()."'");
}
$sql= mysql_fetch_array(mysql_query("SELECT lastview,ltime FROM lastview WHERE whonick='".$whonick."'ORDER BY ltime DESC LIMIT 1"));
$a = getuid_nick($sql[0]);
$link = "<a href=\"index.php?action=viewuser&sid=$sid&who=$a\">$sql[0]</a>";
echo "last viewed by $link -";
$newtime =$sql[1]+(0 *60 *60);
echo date("D d M y - h:i:s a",$newtime);
echo "<a href=\"index.php?action=10pv&who=$who&sid=$sid\">+</a>
";
in index.php
/////////////////////////////////////// 10 viewers
else if($action=="10pv")
{
addonline(getuid_sid($sid),"Viewing Last 10 profileviewers","");
if($who==""||$who==0)
{
$mnick = $_POST["mnick"];
$who = getuid_nick($mnick);
}
$whonick = getnick_uid($who);
echo "<card id=\"main\" title=\"Viewing Last 10 profileviewers\">";
echo "<p align=\"center\">";
$sql= mysql_query("SELECT lastview,ltime FROM lastview WHERE whonick='".$whonick."'ORDER BY ltime DESC LIMIT 10");
while($row = mysql_fetch_array($sql))
{
$a = getuid_nick($row[0]);
echo "<a href=\"index.php?action=viewuser&sid=$sid&who=$a\">$row[0]</a>";
$newtime =$row[1]+(0 *60 *60);
echo " [b]".date("D d M y - h:i:s a",$newtime)."[/b]
";
echo "------------
";
}
$a = getuid_nick($whonick);
echo "back to <a href=\"index.php?action=viewuser&sid=$sid&who=$a\">$whonick</a>'s profile
";
echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"http://coding-talk.com/images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "© coded by Rukiya";
echo "</p>";
echo "</card>";
}
SQL
Learner add this code 2 profile
echo "Rating:";
$whonick = getuid_nick($whonick);
echo rating($whonick);
echo "
"
///////////////////////////////// ratings
function rating($uid)
{
$info=mysql_fetch_array(mysql_query("SELECT * FROM ibwf_users WHERE id='".$uid."'"));
$posts = $info["posts"];
$plusses = $info["plusses"];
$gplus = $gplus["gplus"];
$shouts = $shouts["shouts"];
$tot = $posts+$plusses+$gplus+$shouts;
if($tot<100){return "<img src=\"images/half-star.gif\" alt=\"*\"/>";}
if($tot<250){return "<img src=\"images/1-star.gif\" alt=\"**\"/>";}
if($tot<500){return "<img src=\"images/1half-star.gif\" alt=\"***\"/>";}
if($tot<750){return "<img src=\"images/2-star.gif\" alt=\"****\"/>";}
if($tot<2500){return "<img src=\"images/2half-star.gif\" alt=\"*****\"/>";}
if($tot<50000){return "<img src=\"images/3-star.gif\" alt=\"******\"/>";}
if($tot<75000){return "<img src=\"images/3half-star.gif\" alt=\"*******\"/>";}
if($tot<100000){return "<img src=\"images/4-star.gif\" alt=\"********\"/>";}
if($tot<150000){return "<img src=\"images/4half-star.gif\" alt=\"********\"/>";}
if($tot>=150000){return "<img src=\"images/5-star.gif\" alt=\"*********\"/>";}
}
i have coded Comment Box for Blogs and its working fine for me
demo- Click Here username & password = test
sql
--
-- Table structure for table `ibwf_blogcomment`
--
CREATE TABLE `ibwf_blogcomment` (
`id` int(100) NOT NULL auto_increment,
`blogowner` int(100) NOT NULL default '0',
`blogsigner` int(100) NOT NULL default '0',
`blogmsg` blob NOT NULL,
`dtime` int(100) NOT NULL default '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=9;
--
-- Dumping data for table `ibwf_blogcomment`
--
core.php
//////////////////////////can sign blog comment?
function cansignblogcomment($uid, $who)
{
if(arebuds($bid, $who))
{
return true;
}
if($bid==$who)
{
return false; //imagine if someone signed his own gbook o.O
}
if(getplusses($uid)>=50)
{
return true;
}
return false;
}
////////////////////////////////////////////is del blog comment
function candelblogcomment($bid,$mid)
{
$minfo = mysql_fetch_array(mysql_query("SELECT blogowner, blogsigner FROM ibwf_blogcomment WHERE id='".$mid."'"));
if($minfo[0]==$bid)
{
return true;
}
if($minfo[1]==$bid)
{
return true;
}
return false;
}
genproc.php
else if($action=="signblogcomment")
{
$who = $_POST["who"];
if(!cansignblogcomment(getuid_sid($sid), $who))
{
echo "<card id=\"main\" title=\"$sitename\">";
echo "<p align=\"center\">";
echo "You cant Sign this user Blog
";
echo "<a href=\"index.php?action=main&sid=$sid\">Home</a>";
echo "© coded by Vishal";
echo "</p>";
echo "</card>";
echo "</wml>";
exit();
}
$msgtxt = $_POST["msgtxt"];
//$qut = $_POST["qut"];
addonline(getuid_sid($sid),"Signing a User's Blog","");
echo "<card id=\"main\" title=\"$sitename\">";
echo "<p align=\"center\">";
$crdate = time();
//$uid = getbid_sid($sid);
$res = false;
if(trim($msgtxt)!="")
{
$res = mysql_query("INSERT INTO ibwf_blogcomment SET blogowner='".$who."', blogsigner='".$uid."', dtime='".$crdate."', blogmsg='".$msgtxt."'");
}
if($res)
{
echo "<img src=\"../images/ok.gif\" alt=\"O\"/>Comment Posted Successfully";
}else{
echo "<img src=\"../images/notok.gif\" alt=\"X\"/>Error Posting Comment";
}
echo "
";
echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "© coded by Vishal";
echo "</p>";
echo "</card>";
}
else if($action=="delblogcomment")
{
$mid = $_GET["mid"];
addonline(getuid_sid($sid),"Deleting Blog's Comment","");
echo "<card id=\"main\" title=\"$sitename\">";
echo "<p align=\"center\">";
if(candelblogcomment(getuid_sid($sid), $mid))
{
$res = mysql_query("DELETE FROM ibwf_blogcomment WHERE id='".$mid."'");
if($res)
{
echo "<img src=\"../images/ok.gif\" alt=\"o\"/>Comment Deleted From Blog
";
}else{
echo "<img src=\"../images/notok.gif\" alt=\"x\"/>Database Error!
";
}
}else{
echo "<img src=\"../images/notok.gif\" alt=\"X\"/>You can't delete this Comment";
}
echo "
";
echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "© coded by Vishal";
echo "</p></card>";
}
lists.php
///////////////////////////////////Blogs Comment
else if($action=="blogscomment")
{
$who = $_GET["who"];
addonline(getuid_sid($sid),"Sending Comment On Blog","");
echo "<card id=\"main\" title=\"Blogs Comment\">";
$uid = getuid_sid($sid);
//////ALL LISTS SCRIPT <<
if($page=="" || $page<=0)$page=1;
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_blogcomment WHERE blogowner='".$who."'"));
$num_items = $noi[0]; //changable
$items_per_page= 5;
$num_pages = ceil($num_items/$items_per_page);
if(($page>$num_pages)&&$page!=1)$page= $num_pages;
$limit_start = ($page-1)*$items_per_page;
$sql = "SELECT blogowner, blogsigner, blogmsg, dtime, id FROM ibwf_blogcomment WHERE blogowner='".$who."' ORDER BY dtime DESC LIMIT $limit_start, $items_per_page";
echo "
";
$items = mysql_query($sql);
echo mysql_error();
if(mysql_num_rows($items)>0)
{
while ($item = mysql_fetch_array($items))
{
if(isonline($item[1]))
{
$iml = "<img src=\"../images/onl.gif\" alt=\"+\"/>";
}else{
$iml = "<img src=\"../images/ofl.gif\" alt=\"-\"/>";
}
$snick = getnick_uid($item[1]);
$lnk = "<a href=\"index.php?action=viewuser&who=$item[1]&sid=$sid\">$iml$snick</a>";
$bs = date("d m y-H:i:s",$item[3]);
echo "$lnk
[size="1"]";
if(candelblogcomment($uid, $item[4]))
{
$delnk = "<a href=\"genproc.php?action=delblogcomment&sid=$sid&mid=$item[4]\">[x]</a>";
}else{
$delnk = "";
}
$text = parsepm($item[2], $sid);
echo "$text
$bs $delnk
";
echo "[/size]";
}
}
echo "</p>";
echo "<p align=\"center\">";
if($page>1)
{
$ppage = $page-1;
echo "<a href=\"lists.php?action=$action&page=$ppage&sid=$sid&who=$who\">«PREV</a> ";
}
if($page<$num_pages)
{
$npage = $page+1;
echo "<a href=\"lists.php?action=$action&page=$npage&sid=$sid&who=$who\">Next»</a>";
}
echo "
$page/$num_pages
";
if($num_pages>2)
{
$rets = "Jump to page<input name=\"pg\" format=\"*N\" size=\"3\"/>";
$rets .= "<anchor>[GO]";
$rets .= "<go href=\"lists.php\" method=\"get\">";
$rets .= "<postfield name=\"action\" value=\"$action\"/>";
$rets .= "<postfield name=\"who\" value=\"$who\"/>";
$rets .= "<postfield name=\"sid\" value=\"$sid\"/>";
$rets .= "<postfield name=\"page\" value=\"$(pg)\"/>";
$rets .= "</go></anchor>";
echo $rets;
}
echo "</p>";
////// UNTILL HERE >>
{
echo "<a href=\"index.php?action=signblogcomment&sid=$sid&who=$who\">";
echo "Add Your Message</a>
";
}
echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "© coded by Vishal";
echo "</card>";
}
index.php
///////////////////////////////////////////Blog Comment
else if($action=="signblogcomment")
{
$who=$_GET["who"];
addonline(getuid_sid($sid),"Signing Users guestbook","");
if(!cansignblogcomment(getuid_sid($sid), $who))
{
echo "<card id=\"main\" title=\"$sitename\">";
echo "<p align=\"center\">";
echo "You cant Sign this user Blog
";
echo "<a href=\"index.php?action=main&sid=$sid\">Home</a>";
echo "© coded by Vishal";
echo "</p>";
echo "</card>";
echo "</wml>";
exit();
}
echo "<card id=\"main\" title=\"Sign blog\">";
echo "<onevent type=\"onenterforward\">";
echo "<refresh>
<setvar name=\"msgtxt\" value=\"\"/>
";
echo "</refresh></onevent>";
echo "<p align=\"center\">";
echo "Text:<input name=\"msgtxt\" maxlength=\"500\"/>
";
echo "<anchor>Add";
echo "
<go href=\"genproc.php?action=signblogcomment&sid=$sid\" method=\"post\">
<postfield name=\"msgtxt\" value=\"$(msgtxt)\"/>
<postfield name=\"who\" value=\"$who\"/>
</go>
";
echo "</anchor>";
echo "
<a href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "© coded by Vishal";
echo "</p>";
echo "</card>";
}
in index.php find else if($action=="viewblog")
and add
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_blogcomment WHERE blogowner='".$bid."'"));
echo "<a href=\"lists.php?action=blogscomment&sid=$sid&who=$bid\">»Blogs Comment($noi[0])</a>
";
add in genproc.php for back to blog list
in else if($action=="signblogcomment") and else if($action=="delblogcomment")
echo "<a href=\"lists.php?action=allbl&sid=$sid\">Back to Blogs</a>
";
<div class='codemain' style='height:200px;white-space:pre;overflow:auto'>////////////////////////////////////////APPLY MAIN////////////////////////////
if($action=="main")
{
addvisitor();
addonline(getuid_sid($sid),"Applying To Be Staff","");
echo "<head>";
echo "<title>Apply To Be Staff</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
echo "$sitename Staff";
echo "<p align=\"center\">";
echo "Here You Can Apply For Admin An Inbox Will Be Sent To The Owners
";
echo "And Owners Will Come Ask You A Few Questions";
echo "</p>";
echo "<p align=\"center\">";
echo "What Possion Are You Going To Apply For:</p>";
echo "<p align=\"center\">";
echo "----------
";
echo "<a accesskey=\"2\" href=\"staffaply.php?action=hadmin&sid=$sid\">Apply To Be HeadAdmin</a>
";
echo "<a accesskey=\"2\" href=\"staffaply.php?action=admin&sid=$sid\">Apply To Be Admin</a>
";
echo "<a accesskey=\"2\" href=\"staffaply.php?action=mod&sid=$sid\">Apply To Be Mod</a>
";
echo "----------
";
echo "<p align=\"center\">";
$chs = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_chonline"));
echo "<a accesskey=\"1\" href=\"inbox.php?action=main&sid=$sid\">Inbox</a>
";
echo "<a accesskey=\"9\" href=\"forums.php?action=forumindx&sid=$sid\">Forums</a>
";
echo "<a accesskey=\"2\" href=\"main.php?action=online&sid=$sid\">Online list(".getnumonline().")</a>
";
echo "<a accesskey=\"6\" href=\"chat1.php?action=chat&sid=$sid\">ChatRooms($chs[0])</a>
";
echo "<a accesskey=\"0\" href=\"main.php?action=main&sid=$sid\"><img src=\"../phpThumb/phpThumb.php?src=../images/home.gif\" alt=\"\"/>Main Menu</a>";
echo "</p>";
echo "</body>";
}
/////////////////////////HEADADMIN////////////AUTO INBOS 4 APPLY//////////////
else if($action=="hadmin")
{
addonline(getuid_sid($sid),"Applying For HeadAdmin","");
echo "<head>";
echo "<title>HeadAdmin</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
echo "<p align=\"center\">";
echo "<img src=\"../phpThumb/phpThumb.php?src=../image/hadmin.gif\" alt=\"HeadAdmin\"/>
";
$ownid[0]=1;
$who=$_GET["whoid"];
$whoid=$_GET["who"];
$whonick = getnick_uid($uid);
$message = "".$whonick." Would Like To Be HeadAdmin Please Reply To Him Asap.[br/][small]p.s: this is an automated pm[/small]";
autopm($message, $ownid[0]);
echo "<img src=\"../phpThumb/phpThumb.php?src=../images/ok.gif\" alt=\"\"/>Thank You For Applying To Be HeadAdmin.
Your Request Has Been Sent To The Staff For Processing.
";
echo "Owners Will Contact You Shortly!!.";
echo "<p align=\"center\">";
$chs = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_chonline"));
echo "<a accesskey=\"1\" href=\"inbox.php?action=main&sid=$sid\">Inbox</a>
";
echo "<a accesskey=\"9\" href=\"forums.php?action=forumindx&sid=$sid\">Forums</a>
";
echo "<a accesskey=\"2\" href=\"main.php?action=online&sid=$sid\">Online list(".getnumonline().")</a>
";
echo "<a accesskey=\"6\" href=\"chat1.php?action=chat&sid=$sid\">ChatRooms($chs[0])</a>
";
echo "<a accesskey=\"0\" href=\"main.php?action=main&sid=$sid\"><img src=\"../phpThumb/phpThumb.php?src=../images/home.gif\" alt=\"\"/>Main Menu</a>";
echo "</p>";
echo "</body>";
}
/////////////////////////////////////ADMIN/////////////////////////////////////
else if($action=="admin")
{
addonline(getuid_sid($sid),"Applying For Admin","");
echo "<head>";
echo "<title>Admin</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
echo "<p align=\"center\">";
echo "<img src=\"../phpThumb/phpThumb.php?src=../image/admin.gif\" alt=\"Admin\"/>
";
$ownid[0]=1;
$who=$_GET["whoid"];
$whoid=$_GET["who"];
$whonick = getnick_uid($uid);
$message = "".$whonick." Would Like To Be Admin Please Reply To Him Asap.[br/][small]p.s: this is an automated pm[/small]";
autopm($message, $ownid[0]);
echo "<img src=\"../phpThumb/phpThumb.php?src=../images/ok.gif\" alt=\"\"/>Thank You For Applying To Be Admin.
Your Request Has Been Sent To The Staff For Processing.
";
echo "Owners Will Contact You Shortly!!.";
echo "<p align=\"center\">";
$chs = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_chonline"));
echo "<a accesskey=\"1\" href=\"inbox.php?action=main&sid=$sid\">Inbox</a>
";
echo "<a accesskey=\"9\" href=\"forums.php?action=forumindx&sid=$sid\">Forums</a>
";
echo "<a accesskey=\"2\" href=\"main.php?action=online&sid=$sid\">Online list(".getnumonline().")</a>
";
echo "<a accesskey=\"6\" href=\"chat1.php?action=chat&sid=$sid\">ChatRooms($chs[0])</a>
";
echo "<a accesskey=\"0\" href=\"main.php?action=main&sid=$sid\"><img src=\"../phpThumb/phpThumb.php?src=../images/home.gif\" alt=\"\"/>Main Menu</a>";
echo "</p>";
echo "</body>";
}
//////////////////////////////////MOD/////////////////////////////////////////
else if($action=="mod")
{
addonline(getuid_sid($sid),"Applying For Mod","");
echo "<head>";
echo "<title>Mod</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
echo "<p align=\"center\">";
echo "<img src=\"../phpThumb/phpThumb.php?src=../image/mod.gif\" alt=\"Mod\"/>
";
$ownid[0]=1;
$who=$_GET["whoid"];
$whoid=$_GET["who"];
$whonick = getnick_uid($uid);
$message = "".$whonick." Would Like To Be Mod Please Reply To Him Asap.[br/][small]p.s: this is an automated pm[/small]";
autopm($message, $ownid[0]);
echo "<img src=\"../phpThumb/phpThumb.php?src=../images/ok.gif\" alt=\"\"/>Thank You For Applying To Be Mod.
Your Request Has Been Sent To The Staff For Processing.
";
echo "Owners Will Contact You Shortly!!.";
echo "<p align=\"center\">";
$chs = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_chonline"));
echo "<a accesskey=\"1\" href=\"inbox.php?action=main&sid=$sid\">Inbox</a>
";
echo "<a accesskey=\"9\" href=\"forums.php?action=forumindx&sid=$sid\">Forums</a>
";
echo "<a accesskey=\"2\" href=\"main.php?action=online&sid=$sid\">Online list(".getnumonline().")</a>
";
echo "<a accesskey=\"6\" href=\"chat1.php?action=chat&sid=$sid\">ChatRooms($chs[0])</a>
";
echo "<a accesskey=\"0\" href=\"main.php?action=main&sid=$sid\"><img src=\"../phpThumb/phpThumb.php?src=../images/home.gif\" alt=\"\"/>Main Menu</a>";
echo "</p>";
echo "</body>";
}
?>
</html></div>
Its OK 😉
--
-- Table structure for table `ibwf_blogcomment`
--
CREATE TABLE `ibwf_blogcomment` (
`id` int(100) NOT NULL auto_increment,
`blogowner` int(100) NOT NULL default '0',
`blogsigner` int(100) NOT NULL default '0',
`blogmsg` blob NOT NULL,
`dtime` int(100) NOT NULL default '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=9;
--
-- Dumping data for table `ibwf_blogcomment`
--
core.php
//////////////////////////can sign blog comment?
function cansignblogcomment($uid, $who)
{
if(arebuds($bid, $who))
{
return true;
}
if($bid==$who)
{
return false; //imagine if someone signed his own gbook o.O
}
if(getplusses($uid)>=50)
{
return true;
}
return false;
}
////////////////////////////////////////////is del blog comment
function candelblogcomment($bid,$mid)
{
$minfo = mysql_fetch_array(mysql_query("SELECT blogowner, blogsigner FROM ibwf_blogcomment WHERE id='".$mid."'"));
if($minfo[0]==$bid)
{
return true;
}
if($minfo[1]==$bid)
{
return true;
}
return false;
}
genproc.php
else if($action=="signblogcomment")
{
$who = $_POST["who"];
if(!cansignblogcomment(getuid_sid($sid), $who))
{
echo "<card id=\"main\" title=\"$sitename\">";
echo "<p align=\"center\">";
echo "You cant Sign this user Blog
";
echo "<a href=\"index.php?action=main[b]&[/b]sid=$sid\">Home</a>";
echo "© coded by Vishal";
echo "</p>";
echo "</card>";
echo "</wml>";
exit();
}
$msgtxt = $_POST["msgtxt"];
//$qut = $_POST["qut"];
addonline(getuid_sid($sid),"Signing a User's Blog","");
echo "<card id=\"main\" title=\"$sitename\">";
echo "<p align=\"center\">";
$crdate = time();
//$uid = getbid_sid($sid);
$res = false;
if(trim($msgtxt)!="")
{
$res = mysql_query("INSERT INTO ibwf_blogcomment SET blogowner='".$who."', blogsigner='".$uid."', dtime='".$crdate."', blogmsg='".$msgtxt."'");
}
if($res)
{
echo "<img src=\"../images/ok.gif\" alt=\"O\"/>Comment Posted Successfully";
}else{
echo "<img src=\"../images/notok.gif\" alt=\"X\"/>Error Posting Comment";
}
echo "
";
echo "<a href=\"index.php?action=main[b]&[/b]sid=$sid\"><img src=\"../images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "© coded by Vishal";
echo "</p>";
echo "</card>";
}
else if($action=="delblogcomment")
{
$mid = $_GET["mid"];
addonline(getuid_sid($sid),"Deleting Blog's Comment","");
echo "<card id=\"main\" title=\"$sitename\">";
echo "<p align=\"center\">";
if(candelblogcomment(getuid_sid($sid), $mid))
{
$res = mysql_query("DELETE FROM ibwf_blogcomment WHERE id='".$mid."'");
if($res)
{
echo "<img src=\"../images/ok.gif\" alt=\"o\"/>Comment Deleted From Blog
";
}else{
echo "<img src=\"../images/notok.gif\" alt=\"x\"/>Database Error!
";
}
}else{
echo "<img src=\"../images/notok.gif\" alt=\"X\"/>You can't delete this Comment";
}
echo "
";
echo "<a href=\"index.php?action=main[b]&[/b]sid=$sid\"><img src=\"../images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "© coded by Vishal";
echo "</p></card>";
}
[b]lists.php[/b]
///////////////////////////////////Blogs Comment
else if($action=="blogscomment")
{
$who = $_GET["who"];
addonline(getuid_sid($sid),"Sending Comment On Blog","");
echo "<card id=\"main\" title=\"Blogs Comment\">";
$uid = getuid_sid($sid);
//////ALL LISTS SCRIPT <<
if($page=="" || $page<=0)$page=1;
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_blogcomment WHERE blogowner='".$who."'"));
$num_items = $noi[0]; //changable
$items_per_page= 5;
$num_pages = ceil($num_items/$items_per_page);
if(($page>$num_pages)&&$page!=1)$page= $num_pages;
$limit_start = ($page-1)*$items_per_page;
$sql = "SELECT blogowner, blogsigner, blogmsg, dtime, id FROM ibwf_blogcomment WHERE blogowner='".$who."' ORDER BY dtime DESC LIMIT $limit_start, $items_per_page";
echo "
";
$items = mysql_query($sql);
echo mysql_error();
if(mysql_num_rows($items)>0)
{
while ($item = mysql_fetch_array($items))
{
if(isonline($item[1]))
{
$iml = "<img src=\"../images/onl.gif\" alt=\"+\"/>";
}else{
$iml = "<img src=\"../images/ofl.gif\" alt=\"-\"/>";
}
$snick = getnick_uid($item[1]);
$lnk = "<a href=\"index.php?action=viewuser[b]&[/b]who=$item[1]&sid=$sid\">$iml$snick</a>";
$bs = date("d m y-H:i:s",$item[3]);
echo "$lnk
[size="1"]";
if(candelblogcomment($uid, $item[4]))
{
$delnk = "<a href=\"genproc.php?action=delblogcomment[b]&[/b]sid=$sid&mid=$item[4]\">[x]</a>";
}else{
$delnk = "";
}
$text = parsepm($item[2], $sid);
echo "$text
$bs $delnk
";
echo "[/size]";
}
}
echo "</p>";
echo "<p align=\"center\">";
if($page>1)
{
$ppage = $page-1;
echo "<a href=\"lists.php?action=$action[b]&[/b]page=$ppage[b]&[/b]sid=$sid&who=$who\">«PREV</a> ";
}
if($page<$num_pages)
{
$npage = $page+1;
echo "<a href=\"lists.php?action=$action[b]&[/b]page=$npage[b]&[/b]sid=$sid[b]&[/b]who=$who\">Next»</a>";
}
echo "
$page/$num_pages
";
if($num_pages>2)
{
$rets = "Jump to page<input name=\"pg\" format=\"*N\" size=\"3\"/>";
$rets .= "<anchor>[GO]";
$rets .= "<go href=\"lists.php\" method=\"get\">";
$rets .= "<postfield name=\"action\" value=\"$action\"/>";
$rets .= "<postfield name=\"who\" value=\"$who\"/>";
$rets .= "<postfield name=\"sid\" value=\"$sid\"/>";
$rets .= "<postfield name=\"page\" value=\"$(pg)\"/>";
$rets .= "</go></anchor>";
echo $rets;
}
echo "</p>";
////// UNTILL HERE >>
{
echo "<a href=\"index.php?action=signblogcomment[b]&[/b]sid=$sid[b]&[/b]who=$who\">";
echo "Add Your Message</a>
";
}
echo "<a href=\"index.php?action=main[b]&[/b]sid=$sid\"><img src=\"../images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "© coded by Vishal";
echo "</card>";
}
[b]index.php[/b]
///////////////////////////////////////////Blog Comment
else if($action=="signblogcomment")
{
$who=$_GET["who"];
addonline(getuid_sid($sid),"Signing Users guestbook","");
if(!cansignblogcomment(getuid_sid($sid), $who))
{
echo "<card id=\"main\" title=\"$sitename\">";
echo "<p align=\"center\">";
echo "You cant Sign this user Blog
";
echo "<a href=\"index.php?action=main[b]&[/b]sid=$sid\">Home</a>";
echo "© coded by Vishal";
echo "</p>";
echo "</card>";
echo "</wml>";
exit();
}
echo "<card id=\"main\" title=\"Sign blog\">";
echo "<onevent type=\"onenterforward\">";
echo "<refresh>
<setvar name=\"msgtxt\" value=\"\"/>
";
echo "</refresh></onevent>";
echo "<p align=\"center\">";
echo "Text:<input name=\"msgtxt\" maxlength=\"500\"/>
";
echo "<anchor>Add";
echo "
<go href=\"genproc.php?action=signblogcomment[b]&[/b]sid=$sid\" method=\"post\">
<postfield name=\"msgtxt\" value=\"$(msgtxt)\"/>
<postfield name=\"who\" value=\"$who\"/>
</go>
";
echo "</anchor>";
echo "
<a href=\"index.php?action=main[b]&[/b]sid=$sid\"><img src=\"../images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "© coded by Vishal";
echo "</p>";
echo "</card>";
}
[b]in index.php find else if($action=="viewblog")[/b]
[b]and add[/b]
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_blogcomment WHERE blogowner='".$bid."'"));
echo "<a href=\"lists.php?action=blogscomment&[b]&[/b]id=$sid[b]&[/b]who=$bid\">»Blogs Comment($noi[0])</a>
";
please use BB code. thank you
the rating not working it shows only half star all the time this is fixed code and works 100%
////// RATING ///////
function rating($uid)
{
$info = mysql_fetch_array(mysql_query("SELECT plusses, gplus, shouts, chmsgs FROM ibwf_users WHERE id='".$uid."'"));
$pl = $info[0];
$gp = $info[1];
$sh = $info[2];
$ch = $info[3];
$infototal = ($pl + $gp + $sh + $ch);
if($infototal<10)
{
return "<img src=\"images/empty.gif\" alt=\"\"/>";
}
else if($infototal<350)
{
return "<img src=\"images/half.gif\" alt=\"\"/>";
}
else if($infototal<1000)
{
return "<img src=\"images/one.gif\" alt=\"\"/>";
}
else if($infototal<2500)
{
return "<img src=\"images/onehalf.gif\" alt=\"\"/>";
}
else if($infototal<6500)
{
return "<img src=\"images/two.gif\" alt=\"\"/>";
}
else if($infototal<15000)
{
return "<img src=\"images/twohalf.gif\" alt=\"\"/>";
}
else if($infototal<37000)
{
return "<img src=\"images/three.gif\" alt=\"\"/>";
}
else if($infototal<85000)
{
return "<img src=\"images/threehalf.gif\" alt=\"\"/>";
}
else if($infototal<190000)
{
return "<img src=\"images/four.gif\" alt=\"\"/>";
}
else if($infototal<420000)
{
return "<img src=\"images/fourhalf.gif\" alt=\"\"/>";
}
else if($infototal<900000)
{
return "<img src=\"images/five.gif\" alt=\"\"/>";
}
else if($infototal<1700000)
{
return "<img src=\"images/fivehalf.gif\" alt=\"\"/>";
}
else if($infototal<3300000)
{
return "<img src=\"images/six.gif\" alt=\"\"/>";
}
else if($infototal<7000000)
{
return "<img src=\"images/sixhalf.gif\" alt=\"\"/>";
}
else
{
return "<img src=\"images/seven.gif\" alt=\"\"/>";
}
}
and usage
echo "Rating: ";
echo rating($who);
i've exluded posts from count.. cos plusses>=posts 😉
It's better to keep your mouth shut and give the impression that you're stupid, than to open it and remove all doubt. ⓣⓗⓔ ⓠⓤⓘⓔⓣⓔⓡ ⓨⓞⓤ ⓑⓔ©ⓞⓜⓔ, ⓣⓗⓔ ⓜⓞⓡⓔ ⓨⓞⓤ ⓐⓡⓔ ⓐⓑⓛⓔ ⓣⓞ ⓗⓔⓐⓡ ! ιη тнєσяу, тнє ρяα¢тι¢є ιѕ α яєѕυℓт σƒ тнє тнєσяу, вυт ιη ρяα¢тι¢є ιѕ тнє σρρσѕιтє.
キノgんイノ刀g 4 ア乇ムc乇 ノ丂 レノズ乇 キucズノ刀g 4 √ノ尺gノ刀ノイリ!
and i've made images also
rainbow version
External image (may be gone) External image (may be gone) External image (may be gone) External image (may be gone) External image (may be gone) External image (may be gone) External image (may be gone)
It's better to keep your mouth shut and give the impression that you're stupid, than to open it and remove all doubt. ⓣⓗⓔ ⓠⓤⓘⓔⓣⓔⓡ ⓨⓞⓤ ⓑⓔ©ⓞⓜⓔ, ⓣⓗⓔ ⓜⓞⓡⓔ ⓨⓞⓤ ⓐⓡⓔ ⓐⓑⓛⓔ ⓣⓞ ⓗⓔⓐⓡ ! ιη тнєσяу, тнє ρяα¢тι¢є ιѕ α яєѕυℓт σƒ тнє тнєσяу, вυт ιη ρяα¢тι¢є ιѕ тнє σρρσѕιтє.
キノgんイノ刀g 4 ア乇ムc乇 ノ丂 レノズ乇 キucズノ刀g 4 √ノ尺gノ刀ノイリ!
External image (may be gone) External image (may be gone) External image (may be gone) External image (may be gone) External image (may be gone) External image (may be gone) External image (may be gone) External image (may be gone)
It's better to keep your mouth shut and give the impression that you're stupid, than to open it and remove all doubt. ⓣⓗⓔ ⓠⓤⓘⓔⓣⓔⓡ ⓨⓞⓤ ⓑⓔ©ⓞⓜⓔ, ⓣⓗⓔ ⓜⓞⓡⓔ ⓨⓞⓤ ⓐⓡⓔ ⓐⓑⓛⓔ ⓣⓞ ⓗⓔⓐⓡ ! ιη тнєσяу, тнє ρяα¢тι¢є ιѕ α яєѕυℓт σƒ тнє тнєσяу, вυт ιη ρяα¢тι¢є ιѕ тнє σρρσѕιтє.
キノgんイノ刀g 4 ア乇ムc乇 ノ丂 レノズ乇 キucズノ刀g 4 √ノ尺gノ刀ノイリ!
bronze~silver~gold version
External image (may be gone) External image (may be gone) External image (may be gone) External image (may be gone) External image (may be gone) External image (may be gone) External image (may be gone)
It's better to keep your mouth shut and give the impression that you're stupid, than to open it and remove all doubt. ⓣⓗⓔ ⓠⓤⓘⓔⓣⓔⓡ ⓨⓞⓤ ⓑⓔ©ⓞⓜⓔ, ⓣⓗⓔ ⓜⓞⓡⓔ ⓨⓞⓤ ⓐⓡⓔ ⓐⓑⓛⓔ ⓣⓞ ⓗⓔⓐⓡ ! ιη тнєσяу, тнє ρяα¢тι¢є ιѕ α яєѕυℓт σƒ тнє тнєσяу, вυт ιη ρяα¢тι¢є ιѕ тнє σρρσѕιтє.
キノgんイノ刀g 4 ア乇ムc乇 ノ丂 レノズ乇 キucズノ刀g 4 √ノ尺gノ刀ノイリ!
External image (may be gone) External image (may be gone) External image (may be gone) External image (may be gone) External image (may be gone) External image (may be gone) External image (may be gone) External image (may be gone)
if you dont like images.. make your own 😛
It's better to keep your mouth shut and give the impression that you're stupid, than to open it and remove all doubt. ⓣⓗⓔ ⓠⓤⓘⓔⓣⓔⓡ ⓨⓞⓤ ⓑⓔ©ⓞⓜⓔ, ⓣⓗⓔ ⓜⓞⓡⓔ ⓨⓞⓤ ⓐⓡⓔ ⓐⓑⓛⓔ ⓣⓞ ⓗⓔⓐⓡ ! ιη тнєσяу, тнє ρяα¢тι¢є ιѕ α яєѕυℓт σƒ тнє тнєσяу, вυт ιη ρяα¢тι¢є ιѕ тнє σρρσѕιтє.
キノgんイノ刀g 4 ア乇ムc乇 ノ丂 レノズ乇 キucズノ刀g 4 √ノ尺gノ刀ノイリ!
this might help for blog comments aswell 🙂
in genproc.php action=delbl 🙂
$res = mysql_query("DELETE FROM ibwf_blogcomment WHERE blogowner='".$bid."'");
$avlink = getavatar($item[2]);
if ($avlink!=""){
echo "<img src=\"$avlink\" height=\"25\" width=\"25\" alt=\"avatar\"/>
";
}else{
echo "<img src=\"images/nopic.jpg\" height=\"25\" width=\"25\" alt=\"avatar\"/>
";
}
here sumthing some ppl mabe looking for well i did and ppl here helped me to complete it use this code to see user avatar next to their names in online list forums etc