Lavalair Mods...

Started on the old forum in June 2008 · view the original in the archive · old links redirect here

147 replies · 72,508 views · started 18 years ago · 1 min read

TL;DR · summary of 147 replies
  • -metulj provided a fixed code and usage instructions for the total unread PMs count feature.
  • -Rider added code to display user avatars next to their names in online lists, forums, etc.
  • -The profile moods functionality was discussed by opticalpigion, with a link provided for downloading images.
  • -No specific unresolved issues were mentioned regarding the forum mods.

Written automatically from the replies by a language model on our own server. It can be wrong; the posts below are the source.

48 participants
Rider Developer · 128 posts #21
$vfc = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_online WHERE place='Viewing Forum Category'"));
$vft = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_online WHERE place='Viewing Forum Topic'")); 
$vfo = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_online WHERE place='Viewing Forum'"));
$cnt = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_online WHERE place='Creating new topic'")); 
$pry = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_online WHERE place='Posting reply'")); 
$nif = $vfc[0] + $vft[0] + $vfo[0] + $cnt[0] + $pry[0];
echo "<a href=\"index.php?action=forumindx&sid=$sid\">Forums($nif)</a>
";

i found this on other site how do i use it

alesh Lead · 604 posts #22
$vfc = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_online WHERE place='Viewing Forum Category'"));

$vft = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_online WHERE place='Viewing Forum Topic'")); 

$vfo = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_online WHERE place='Viewing Forum'"));

$cnt = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_online WHERE place='Creating new topic'")); 

$pry = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_online WHERE place='Posting reply'")); 

echo "$vfc[0] members Viewing Forum Category
";

echo "$vft[0] members Viewing Forum Topic
";

echo "$vfo[0]Viewing Forum
";

echo "$cnt[0] members Creating new topic
";

echo "$pry[0] members Posting reply
";

2 much useless infos lol

eeeeerrr....

something else Fellow · 2,296 posts #23

same way as before as online list but change

///////for 1st post in topic
$avlink = getavatar($ttext[0]);
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\"/>
";
}
 ////then for posts
$avlink = getavatar($post[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\"/>
";
}

but its a really naff way of doing it. and will slow your topics down lol

something else Fellow · 2,296 posts #24

QUOTE (Numb @ Jan 13 2009, 05:29 PM) <{POST_SNAPBACK}>

$vfc = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_online WHERE place='Viewing Forum Category'"));
$vft = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_online WHERE place='Viewing Forum Topic'")); 
$vfo = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_online WHERE place='Viewing Forum'"));
$cnt = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_online WHERE place='Creating new topic'")); 
$pry = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_online WHERE place='Posting reply'")); 
$nif = $vfc[0] + $vft[0] + $vfo[0] + $cnt[0] + $pry[0];
echo "<a href=\"index.php?action=forumindx&sid=$sid\">Forums($nif)</a>
";

i found this on other site how do i use it

dont do it alesh`s way cos that is useless just change your forum link on action=main to that code and it will tell you how many people are in the forums eg: Chat(46) Forums(157)

Rider Developer · 128 posts #25

Avatar inbox

find

echo "$ptxt $bylnk
";

into"readpm" action and replace with this code.

  echo "$ptxt";
    $uid =$pminfo[1];
    $avatar = getavatar($uid);
   if ($avatar=="")
  { 
  echo"<img src=\"mages/nopic.jpg\" width=\"32\" height=\"32\" alt=\"avatar\"/>";
  }else{
echo"<img src=\"$avatar\" width=\"32\" height=\"32\" alt=\"avatar\"/>";
}
echo "$bylnk
";
Rider Developer · 128 posts #26

for 1st Post ! index.php action="viewtpc". (after

$unick = getnick_uid($ttext[0]);

) add this

uid =$ttext[0];
    $avatar = getavatar($uid);
   if ($avatar=="")
  { 
  echo"<img src=\"images/nopic.jpg\" width=\"32\" height=\"32\" alt=\"avatar\"/>";
  }else{
echo"<img src=\"$avatar\" width=\"32\" height=\"32\" alt=\"avatar\"/>";
}

for other replied posts find and add after

$unick = getnick_uid($post[2]);
 $uid =$post[2];
    $avatar = getavatar($uid);
   if ($avatar=="")
  { 
  echo"<img src=\"images/nopic.jpg\" width=\"32\" height=\"32\" alt=\"avatar\"/>";
  }else{
echo"<img src=\"$avatar\" width=\"32\" height=\"32\" alt=\"avatar\"/>";
}

to get avatar exact before username remove</br> into $usl .

Rider Developer · 128 posts #27
echo $pmtext;
     echo "
<input name=\"pmtext\" maxlength=\"500\"/>
";
  echo "<anchor>+ Fast reply<go href=\"inbxproc.php?action=sendpm&who=$pminfo[1]&sid=$sid\" method=\"post\">";
  echo "<postfield name=\"pmtext\" value=\"$(pmtext)\"/>";
  echo "</go></anchor>
";

this u can put in the inbox

add before or after

 echo "
";
  echo "</p>";
  echo "<p align=\"center\">";
  
  echo "Action: <select name=\"pmact\">";
  echo "<option value=\"rep-$pmid\">Reply</option>";
  echo "<option value=\"del-$pmid\">Delete</option>";
  if(isstarred($pmid))
  {
    echo "<option value=\"ust-$pmid\">Unstar</option>";
  }else{
  echo "<option value=\"str-$pmid\">Star</option>";
  }
  echo "<option value=\"rpt-$pmid\">Report</option>";
  
    echo "<option value=\"frd-$pmid\">Email To</option>";
    echo "<option value=\"dnl-$pmid\">Download</option>";
  
  echo "</select>";

or anyplace u want in the inbox

Rider Developer · 128 posts #28

code to update plusses after shout replace this action in genproc.php CODE

//////////////////////////////////////////shout

else if($action=="shout")
{
  $shtxt = $_POST["shtxt"];
    addonline(getuid_sid($sid),"close your ears im Shouting","");

    echo "<card id=\"main\" title=\"Shout\">";
    echo "<p align=\"center\">";
    if(getplusses(getuid_sid($sid))<5)
    {
        echo "<img src=\"images/notok.gif\" alt=\"X\"/>You should have at least 5 plusses to shout!";
    }else{
      $shtxt = $shtxt;
    //$uid = getuid_sid($sid);
    $shtm = time();
    $res = mysql_query("INSERT INTO ibwf_shouts SET shout='".$shtxt."', shouter='".$uid."', shtime='".$shtm."'");
    if($res)
    {
    $shts = mysql_fetch_array(mysql_query("SELECT shouts from ibwf_users WHERE id='".$uid."'"));
    $shts = $shts[0]+1;
    mysql_query("UPDATE ibwf_users SET shouts='".$shts."' WHERE id='".$uid."'");
    $cow = mysql_fetch_array(mysql_query("SELECT plusses FROM ibwf_users WHERE id='".$uid."'"));
    $cow = $cow[0]+20;
    mysql_query("UPDATE ibwf_users SET plusses='".$cow."' WHERE id='".$uid."'");
    echo "<img src=\"images/ok.gif\" alt=\"O\"/>Shout added successfully";
    }else{
        echo "<img src=\"images/notok.gif\" alt=\"X\"/>Database Error";
    }
            }
         echo "

<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
    echo "</p>";
    echo "</card>";
}

code to update plusses after sending PM replace these actions in inbxproc.php CODE

if($action=="sendpm")
{
  echo "<card id=\"main\" title=\"Inbox\">";
  echo "<p align=\"center\">";
  $whonick = getnick_uid($who);
  $byuid = getuid_sid($sid);
  $tm = time();
  $lastpm = mysql_fetch_array(mysql_query("SELECT MAX(timesent) FROM ibwf_private WHERE byuid='".$byuid."'"));
  $pmfl = $lastpm[0]+getpmaf();
  if($byuid==1)$pmfl=0;
  if($pmfl<$tm)
  {
    if(!isblocked($pmtext,$byuid))
    {
    if((!isignored($byuid, $who))&&(!istrashed($byuid)))
    {
  $res = mysql_query("INSERT INTO ibwf_private SET text='".$pmtext."', byuid='".$byuid."', touid='".$who."', timesent='".$tm."'");
  }else{
    $res = true;
  }
  if($res)
  { 
    $cow = mysql_fetch_array(mysql_query("SELECT plusses FROM ibwf_users WHERE id='".$uid."'"));
    $cow = $cow[0]+10;
    mysql_query("UPDATE ibwf_users SET plusses='".$cow."' WHERE id='".$uid."'");

    echo "<img src=\"images/ok.gif\" alt=\"O\"/>";
    echo "PM was sent successfully to $whonick

";
    echo parsepm($pmtext, $sid);
    
  }else{
    echo "<img src=\"images/notok.gif\" alt=\"X\"/>";
    echo "Can't Send PM to $whonick

";
  }
  }else{
    $bantime = time() + (7*24*60*60);
    echo "<img src=\"images/notok.gif\" alt=\"X\"/>";
    echo "Can't Send PM to $whonick

";
    echo "You just sent a link to one of the crapiest sites on earth
 The members of these sites spam here a lot, so go to that site and stay there if you don't like it here
 as a result of your stupid action:
1. you have lost your sheild
2. you have lost all your plusses
3. You are BANNED!";
    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."'");
  }
  }else{
    $rema = $pmfl - $tm;
    echo "<img src=\"images/notok.gif\" alt=\"X\"/>";
    echo "Flood control: $rema Seconds

";
  }
  echo "

<a href=\"inbox.php?action=main&sid=$sid\">Back to inbox</a>
";
  echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
  echo "</p>";
    echo "</card>";
}
else if($action=="sendto")
{
  echo "<card id=\"main\" title=\"Inbox\">";
  echo "<p align=\"center\">";
  $pmtou = $_POST["pmtou"];
  $who = getuid_nick($pmtou);
    if($who==0)
    {
      echo "<img src=\"images/notok.gif\" alt=\"x\"/>User Does Not exist
";
    }else{
$whonick = getnick_uid($who);
  $byuid = getuid_sid($sid);
  $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_private SET text='".$pmtext."', byuid='".$byuid."', touid='".$who."', timesent='".$tm."'");
  }else{
    $res = true;
  }
  if($res)
  { $cow = mysql_fetch_array(mysql_query("SELECT plusses FROM ibwf_users WHERE id='".$uid."'"));
    $cow = $cow[0]+10;
    mysql_query("UPDATE ibwf_users SET plusses='".$cow."' WHERE id='".$uid."'");
    echo "<img src=\"images/ok.gif\" alt=\"O\"/>";
    echo "PM was sent successfully to $whonick

";
    echo parsepm($pmtext, $sid);

  }else{
    echo "<img src=\"images/notok.gif\" alt=\"X\"/>";
    echo "Can't Send PM to $whonick

";
  }
  }else{
   $bantime = time() + (7*24*60*60);
    echo "<img src=\"images/notok.gif\" alt=\"X\"/>";
    echo "Can't Send PM to $whonick

";
    echo "You just sent a link to one of the crapiest sites on earth
 The members of these sites spam here a lot, so go to that site and stay there if you don't like it here
 as a result of your stupid action:
1. you have lost your sheild
2. you have lost all your plusses
3. You are BANNED!";
    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

";
  }

    }
  
  echo "

<a href=\"inbox.php?action=main&sid=$sid\">Back to inbox</a>
";
  echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
  echo "</p>";
    echo "</card>";
}

code to show members having >4999 add this action index.php CODE

else if($action=="rukiya")

{

     echo "<card id=\"main\" title=\"Leaderboard \">";
     echo "<p align=\"center\">";

if($page=="" || $page<=0)$page=1;
    $nov = mysql_fetch_array(mysql_query("SELECT COUNT(id) FROM ibwf_users WHERE plusses>4999"));
    $num_items = nov[0];
    $items_per_page= 10;
    $num_pages = ceil($num_items/$items_per_page);
    if($page>$num_pages)$page= $num_pages;
    $limit_start = ($page-1)*$items_per_page;

     $sql = "SELECT id, name,plusses FROM ibwf_users WHERE plusses>4999 ORDER BY plusses DESC LIMIT $limit_start, $items_per_page";

    echo "

[size="1"]";
    $items = mysql_query($sql);
    echo mysql_error();
    while ($item = mysql_fetch_array($items))
    {
      $lnk = "<a href=\"index.php?action=viewuser&who=$item[0]&sid=$sid\">$item[1]</a>";
      echo "$lnk - $item[2] 
";
    }
    echo "[/size]</p>";
    echo "<p align=\"center\">";
    if($page>1)
    {
      $ppage = $page-1;
      echo "<a href=\"index.php?action=rukiya&page=$ppage&sid=$sid\">«PREV</a> ";
    }
    if($page<$num_pages)
    {
      $npage = $page+1;
      echo "<a href=\"index.php?action=rukiya&page=$npage&sid=$sid\">Next»</a>";
    }
    echo "
$page/$num_pages
";
    if($num_pages>2)
    {
      echo getjumper($action, $sid,"index");
    }
    echo "</p>";
   echo "</card>";
echo "<card><p align=\"center\">";
  echo "</p>";
   echo "</card>";
}

here u can get plusses when users shout and pm each other

opticalpigion Lead · 593 posts #29

PROFILE MOODS

core.php

function getpmood($uid)
{
  $pmood = mysql_fetch_array(mysql_query("SELECT pmood FROM ibwf_users WHERE id='".$uid."'"));
  return $pmood[0];
}

index.php

use as

 
echo "<a href=\"lists.php?action=pmoods&sid=$sid\">»Profile Moods</a><br/>";

to display mode into index.php action "viewuser"

$pmoodlink = getpmood($who);
  if($pmoodlink=="")
  {
  echo "";
  }else{
  echo "<img src=\"$pmoodlink\" alt=\"$whonick\"/><br/>";
  }

genproc.php

//////////////////////////////////////////Select Profile Moods
else if($action=="uppmoods")
{
/*
Profile Moods Lavalair Modification
Editor:opticalpigion

forum.wapfuns.com
*/
	addonline(getuid_sid($sid),"Updating Profile Moods","");
	$pmoodid = $_GET["pmoodid"];
	  echo "<head>";
	  echo "<title>$sitename</title>";
	  echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
	  echo "</head>";
	  echo "<body>";
  echo "<p align=\"center\">";
  //$uid = getuid_sid($sid);
  $pmoodlnk = mysql_fetch_array(mysql_query("SELECT pmoodlink FROM ibwf_profilemood WHERE id='".$pmoodid."'"));
  $res = mysql_query("UPDATE ibwf_users SET pmood='".$pmoodlnk[0]."' WHERE id='".$uid."'");
  if($res)
		{
			echo "<img src=\"../images/ok.gif\" alt=\"o\"/>Profile Mood Selected<br/>";
		}else{
		  echo "<img src=\"../images/notok.gif\" alt=\"x\"/>Database Error!<br/>";
		}
		echo "<br/>";
  
echo "<b>0 </b><a accesskey=\"0\" href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
echo "</p>";
  echo "</body>";
echo"Script By:opticalpigion";
}

list.php

//////////////////////////////////Profile Moods

else if($action=="pmoods")
{
/*
Profile Moods Lavalair Modification
Editor:opticalpigion

forum.wapfuns.com
*/

	addonline(getuid_sid($sid),"Viwing The Profile Moods List","");
	echo "<head>";
	echo "<title>Profile Moods List</title>";
	echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
	echo "</head>";
	echo "<body>";

	//////ALL LISTS SCRIPT <<

	if($page=="" || $page<=0)$page=1;
	$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_profilemood"));
	$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;

	//changable sql

		$sql = "SELECT id, pmoodlink FROM ibwf_profilemood ORDER BY id DESC LIMIT $limit_start, $items_per_page";

	echo "<p>";
	$items = mysql_query($sql);
	echo mysql_error();
	if(mysql_num_rows($items)>0)
	{
	while ($item = mysql_fetch_array($items))
   {
		echo "<img src=\"$item[1]\" width=\"119\" height=\"30\" alt=\"Profile Moods\"/><br/>";
		echo "<a href=\"genproc.php?action=uppmoods&sid=$sid&pmoodid=$item[0]\">SELECT</a><br/>";
		echo "<br/>";
	}
	}
	echo "</p>";
	echo "<p align=\"center\">";
	if($page>1)
	{
	  $ppage = $page-1;
	  echo "<a href=\"lists.php?action=pmoods&page=$ppage&sid=$sid&view=$view\">«PREV</a> ";
	}
	if($page<$num_pages)
	{
	  $npage = $page+1;
	  echo "<a href=\"lists.php?action=pmoods&page=$npage&sid=$sid&view=$view\">Next»</a>";
	}
	echo "<br/>$page/$num_pages<br/>";
	if($num_pages>2)
	{
		$rets = "<form action=\"lists.php\" method=\"get\">";
		$rets .= "<input name=\"page\" style=\"-wap-input-format: '*N'\" size=\"2\"/>";
		$rets .= "<input type=\"hidden\" name=\"action\" value=\"$action\"/>";
		$rets .= "<input type=\"hidden\" name=\"sid\" value=\"$sid\"/>";
		$rets .= "<input type=\"submit\" value=\"Go To Page\"/>";
		$rets .= "</form>";

		echo $rets;
	}
	echo "</p>";
  ////// UNTILL HERE >>
	echo "<p align=\"center\">";
	echo "<a href=\"index.php?action=cpanel&sid=$sid\">Settings</a><br/>";
  echo "<b>0 </b><a accesskey=\"0\" href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
  echo "</p>";
	echo "</body>";
echo"Script By:opticalpigion";
}

SQL:-

CREATE TABLE `ibwf_profilemood` (
  `id` int(10) NOT NULL auto_increment,
  `pmoodlink` varchar(150) NOT NULL default '',
  PRIMARY KEY  (`id`),
  UNIQUE KEY `pmoodlink` (`pmoodlink`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=235;

-- 
-- Dumping data for table `ibwf_profilemood`
-- 

INSERT INTO `ibwf_profilemood` VALUES (1, '../profilemoods/0carefree.gif');
INSERT INTO `ibwf_profilemood` VALUES (2, '../profilemoods/0euphoric.gif');
INSERT INTO `ibwf_profilemood` VALUES (3, '../profilemoods/0excited0.gif');
INSERT INTO `ibwf_profilemood` VALUES (4, '../profilemoods/0flirty.gif');
INSERT INTO `ibwf_profilemood` VALUES (5, '../profilemoods/0happy.gif');

Add new row into ibwf_users

pmood	varchar(100)	latin1_swedish_ci		No

make new directory with name"profilemoods" intoroot

u have to insert image in to sql ur self.

uploading images was not working here so i have upload to mediafire.

http://www.mediafire.com/?sharekey=9c1a7c8774857e09e7ba8e3c6e11ce207ed7845085d05c54ce018c8114394287 file name is methos profile moods.rarand my profile moods.rar

Dj-marc Developer · 164 posts #30

you can use this code below

$noi = mysql_fetch_array(mysql_query("SELECT timesent FROM ibwf_private WHERE id='".$pmid."'")); 
 $var1 = date("his",$noi[0]); 
 $var2 = time (); 
 $var21 = date("his",$var2); 
 $var3 = $var21 - $var1; 
 $var4 = date("s",$var3); 
 echo "<b>This pm was sent </b>";
 $remain = time() - $noi[0]; 
 $idle = gettimemsg($remain); 
 echo "$idle ago<br/>";
riderz Lead · 975 posts #31

this one is when u add ur text into a box really nice its mobizonez code core.php

function boxstart($title){

	echo "

	<div class=\"boxed\">

      <div class=\"boxedTitle\">

        <h1 align=\"center\" class=\"boxedTitleText\"><b>$title</b>

	</h1>

      </div>

      <div class=\"boxedContent\">

";

}

function boxend(){

	echo "</div></div>";

	}

usage =

boxstart ("Hello To all Coding Talk Members");
boxend ();

replace ur xhtmlfunctions with the following

<?php
define ('USER_NOT_FOUND',0);
define ('MIME_TYPE','application/xhtml+xml');

function gettheme($sid)
{ 
    $uid = getuid_sid($sid);
	$thid = mysql_fetch_array(mysql_query("SELECT themeid FROM ibwf_users WHERE id='".$uid."'"));
	if($thid[0]==""||$thid[0]==0)$thid[0]=1;
	$thinfo = mysql_fetch_array(mysql_query("SELECT bgc, txc, lnk, hdc, hbg, boxbg, boxcl FROM ibwf_mainthemes WHERE id='".$thid[0]."'"));
	$ret = "<style type=\"text/css\">\n";
	$ret .= "body {background-color:#$thinfo[0]; color:#$thinfo[1]}\n";
	$ret .= "h5 {background-color:#$thinfo[4]; color:#$thinfo[3]}\n";
	$ret .= "a:link {color:#$thinfo[2]}\n";
	$ret .= "a:visited {color:#$thinfo[2]}\n";
	$ret .= "img {border: 0;}\n";
	$ret .= "input {border-color:#$thinfo[2];border-width:1px;color:#$thinfo[2];}\n";
	$ret .= "input: focus{background-color:#$thinfo[2];color:#$thinfo[2];}\n";
	$ret .= "input.BF6: focus{background-color:#$thinfo[2];color:#$thinfo[3];}\n";

	$ret .= ".boxed {width: 100%; margin-bottom: 2px; border: px solid #$thinfo[1]}\n";
	$ret .= ".boxedTitle {height: 18px; padding: 0 0 0 2px; background: #$thinfo[1] url($thinfo[6]) repeat-x;}\n";
	$ret .= ".boxedTitleText {font-size: 11px; color: #$thinfo[2]}\n";
	$ret .= ".boxedContent {padding: 2px 2px 2px 2px; background: #$thinfo[3]}\n";

	$ret .= "</style>";
	return $ret;
}

function geticonsetid($sid)
{ 
    $uid = getuid_sid($sid);
	$thid = mysql_fetch_array(mysql_query("SELECT themeid FROM ibwf_users WHERE id='".$uid."'"));
	$iconsetid = mysql_fetch_array(mysql_query("SELECT iconset FROM ibwf_mainthemes WHERE id='".$thid[0]."'"));
	return $iconsetid[0];
}

function xhtmlhead($page_title, $page_style="")
{
	$ret = "<html xmlns=\"http://www.w3.org/1999/xhtml\">";
	$ret .= "\n<head>\n<title>$page_title</title>\n";
	$ret .= "<meta http-equiv=\"content-type\" content=\"text/html; charset=iso-8859-1\" />";
	$ret .= "<meta http-equiv=\"Cache-Control\" content=\"must-revalidate\" />";
    $ret .= "<meta http-equiv=\"Cache-Control\" content=\"no-cache\"/>";
	$ret .= "\n".$page_style;
	$ret .= "\n</head>\n<body>";
	return $ret;
}
function xhtmlheadchat1($page_title, $page_style="",$rid,$sid)
{
	$ret = "<html xmlns=\"http://www.w3.org/1999/xhtml\">";
	$ret .= "\n<head>\n<title>$page_title</title>\n";
	$ret .= "<meta http-equiv=\"content-type\" content=\"text/html; charset=iso-8859-1\" />";
	$ret .= "<meta http-equiv=\"Cache-Control\" content=\"must-revalidate\" />";
    $ret .= "<meta http-equiv=\"Cache-Control\" content=\"no-cache\"/>";
    $ret .= "<meta http-equiv=\"refresh\" content=\"20; URL=chat.php?sid=$sid&rid=$rid\"/>";
	$ret .= "\n".$page_style;
	$ret .= "\n</head>\n<body>";
	return $ret;
}
function xhtmlheadchat($page_title, $page_style="")
{
	$ret = "<html xmlns=\"http://www.w3.org/1999/xhtml\">";
	$ret .= "\n<head>\n<title>$page_title</title>\n";
	$ret .= "<meta http-equiv=\"content-type\" content=\"text/html; charset=iso-8859-1\" />";
	$ret .= "<meta http-equiv=\"Cache-Control\" content=\"must-revalidate\" />";
    $ret .= "<meta http-equiv=\"Cache-Control\" content=\"no-cache\"/>";
	$ret .= "\n".$page_style;
	$ret .= "\n</head>\n<body>";
	return $ret;
}
function xhtmlfoot()
{	
	$ret = "\n</body>\n</html>";
	return $ret;
}
function gettheme1($thid)
{ 
	if($thid[0]==""||$thid[0]==0)$thid[0]=1;
	$thinfo = mysql_fetch_array(mysql_query("SELECT bgc, txc, lnk, hdc, hbg FROM ibwf_mainthemes WHERE id='".$thid[0]."'"));
	$ret = "<style type=\"text/css\">\n";
	$ret .= "body {background-color:#$thinfo[0]; color:#$thinfo[1]}\n";
	$ret .= "h3 {background-color:#$thinfo[4]; color:#$thinfo[3]}\n";
	$ret .= "a:link {color:#$thinfo[2]}\n";
	$ret .= "a:visited {color:#$thinfo[2]}\n";

	$ret .= ".boxed {width: 100%; margin-bottom: 3px; border: 1px solid #$thinfo[1]}\n";
	$ret .= ".boxedTitle {height: 18px; padding: 0 0 0 2px; background: #$thinfo[1] url(images/box2.jpg) repeat-x;}\n";
	$ret .= ".boxedTitleText {font-size: 11px; color: #$thinfo[2]}\n";
	$ret .= ".boxedContent {padding: 2px 2px 2px 2px; background: #$thinfo[3]}\n";

	$ret .= "</style>";
	return $ret;
}

?>

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

riderz Lead · 975 posts #32

Rider wrote:

$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\"/>
";
}

who can help me to make a place to switch it on and off please and for the inbox and forums please


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

wackywizards Junior · 44 posts #33

Dj-marc wrote: you can use this code below

$noi = mysql_fetch_array(mysql_query("SELECT timesent FROM ibwf_private WHERE id='".$pmid."'")); 
 $var1 = date("his",$noi[0]); 
 $var2 = time (); 
 $var21 = date("his",$var2); 
 $var3 = $var21 - $var1; 
 $var4 = date("s",$var3); 
 echo "<b>This pm was sent </b>";
 $remain = time() - $noi[0]; 
 $idle = gettimemsg($remain); 
 echo "$idle ago<br/>";

where do u add this code please

djdevil89 Senior · 287 posts #35

create a php file to download a file and ad add a row in it like

$plusses = mysql_fetch_array(mysql_query("SELECT plusses FROM ibwf_users WHERE id='$uid'");
$plusses = trim($plusses[0]);
$new = $plusses - 5;
$query = mysql_query("UPDATE ibwf_users SET plusses='$new' WHERE id='$uid'");
foreach ($_SERVER as $server => $value)
{
echo "$server is $value<br />";
}
djdevil89 Senior · 287 posts #36

on your download file add this file.php?download= before the sql statement then make the file.php and add this in it

$download = $_GET['download'];
$plusses = mysql_fetch_array(mysql_query("SELECT plusses FROM ibwf_users WHERE id='$uid'");
$plusses = trim($plusses[0]);
$new = $plusses - 5;
$query = mysql_query("UPDATE ibwf_users SET plusses='$new' WHERE id='$uid'");  
if (!$query)
{
echo "Some error Occured please Contact an Administrator<br />";
}
else
{
echo "
<META HTTP-EQUIV=\"refresh\" CONTENT=\"5;URL=$download/\">";
echo "Your download Should start in 5 seconds if it doesnt click <a href=\"$download\">Here</a><br />";
}

Add header and Footer as you need them

foreach ($_SERVER as $server => $value)
{
echo "$server is $value<br />";
}
riderz Lead · 975 posts #37

bru that code must i add it ontop of the download.php file

<?php
include("config.php");
include("core.php");
connectdb();

$id = $_GET['id'];
$action = $_GET["action"];
$sid = $_GET["sid"];
$downloads = mysql_fetch_array(mysql_query("SELECT downloads FROM ibwf_vault WHERE id='".$id."'"));
 $incresedownload = $downloads[0] + 1;
 mysql_query("UPDATE ibwf_vault SET downloads='".$incresedownload."' WHERE id='".$id."'");
 $link = mysql_fetch_array(mysql_query("SELECT itemurl FROM ibwf_vault WHERE id='".$id."'"));
 header("Location:$link[0]");

?> 

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

kabooms Developer · 80 posts #38

LATEST 15 FORUM TOPIC

else if($action=="last15topic")
{

  addonline(getuid_sid($sid),"Viewing Last 15 Topics","index.php?action=$action");
          $pstyle = gettheme($sid);
      echo xhtmlhead("Viewing Last 15 Topics",$pstyle);
    $sql = "SELECT id, name, crdate, authorid FROM ibwf_topics ORDER BY id DESC LIMIT 0 , 15";
   echo "<p>";
   echo "<small>";
$items = mysql_query($sql);
    echo mysql_error();
    if(mysql_num_rows($items)>0)
    {
    while ($item = mysql_fetch_array($items))
    {
      if(canaccess(getuid_sid($sid),getfid_tid($item[0])))
      {
  $tun = getnick_uid($item[3]);
        echo "<a href=\"index.php?action=viewtpc&tid=$item[0]&go=last\">$tun:".htmlspecialchars($item[1])."</a><br/>";
        }else{
          echo "Private Post<br/>";
        }
    }
    }
echo "</p>";
  echo "<p align=\"center\">";
  echo "<a href=\"index.php?action=main\">main menu</a>";
  echo "</p>";
    echo xhtmlfoot();
}

add &sid=$sid from all link 😊

huwad Developer · 215 posts #39

kabooms wrote: LATEST 15 FORUM TOPIC

else if($action=="last15topic")
{

  addonline(getuid_sid($sid),"Viewing Last 15 Topics","index.php?action=$action");
          $pstyle = gettheme($sid);
      echo xhtmlhead("Viewing Last 15 Topics",$pstyle);
    $sql = "SELECT id, name, crdate, authorid FROM ibwf_topics ORDER BY id DESC LIMIT 0 , 15";
   echo "<p>";
   echo "<small>";
$items = mysql_query($sql);
    echo mysql_error();
    if(mysql_num_rows($items)>0)
    {
    while ($item = mysql_fetch_array($items))
    {
      if(canaccess(getuid_sid($sid),getfid_tid($item[0])))
      {
  $tun = getnick_uid($item[3]);
        echo "<a href=\"index.php?action=viewtpc&tid=$item[0]&go=last\">$tun:".htmlspecialchars($item[1])."</a><br/>";
        }else{
          echo "Private Post<br/>";
        }
    }
    }
echo "</p>";
  echo "<p align=\"center\">";
  echo "<a href=\"index.php?action=main\">main menu</a>";
  echo "</p>";
    echo xhtmlfoot();
}

add &sid=$sid from all link 😊

Ah I thought it was latest forum topic like pinoywap's latest forum topic.. It does not update latest post

hacking is like sex. you get in, you get out and you pray you left nothing behind.

CreativityKills Lead · 833 posts #40

Admincp Pwd: im textin wit a cellphone so dnt mind my breaking my text up.

i used it in ma mGiGS 2.0 sn u'l av to modify cuz my **** is frm scratch. Anyhoo add to ur users table dats ibwf_users? admin_pwd varchar(100) default 0 do it frm pma

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