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
kafa Junior · 12 posts #121

Exclamation HELP To speedup this!

SOMEONE HELP to speed up "View category" func?it very slow to open this...this is code what I using now

Just exclude some stuff like i have done, and add in every mysql select at the end LIMIT 1 or LIMIT 0,1 except you have a while loop, then that would be a bad idea 🙂

if(canaccess(getuid_sid($sid), $forum[0]))
{
   $notp = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_topics WHERE fid='".$forum[0]."' LIMIT 0,1"));
// $nops = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_posts, ibwf_topics WHERE ibwf_posts.tid = ibwf_topics.id AND ibwf_topics.fid = '".$forum[0]."' LIMIT 0,1"));
// $nops = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_posts a INNER JOIN ibwf_topics b ON a.tid = b.id WHERE b.fid='".$forum[0]."'"));
$iml = "<img src=\"images/1.gif\" alt=\"*\"/>";
echo "<a href=\"index.php?action=viewfrm&sid=$sid&fid=$forum[0]\">$iml$forum[1] ($notp[0] topika)</a><br/>";
$lpt = mysql_fetch_array(mysql_query("SELECT id, name FROM ibwf_topics WHERE fid='".$forum[0]."' ORDER BY lastpost DESC LIMIT 0,1"));
      $nops = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_posts WHERE tid='".$lpt[0]."' LIMIT 1"));
      if($nops[0]==0)
      {
      $pinfo = mysql_fetch_array(mysql_query("SELECT authorid FROM ibwf_topics WHERE id='".$lpt[0]."' LIMIT 0,1"));
      $tluid = $pinfo[0];
      }else{
      $pinfo = mysql_fetch_array(mysql_query("SELECT uid FROM ibwf_posts WHERE tid='".$lpt[0]."' ORDER BY dtpost DESC LIMIT 0,1"));
      $tluid = $pinfo[0];
      }	  
      $tlnm = htmlspecialchars($lpt[1]);
      $tlnick = getnick_uid($tluid);
      $tpclnk = "<a href=\"index.php?action=viewtpc&sid=$sid&tid=$lpt[0]&go=last\">$tlnm</a>";
      $vulnk = "<a href=\"index.php?action=viewuser&sid=$sid&who=$tluid\">$tlnick</a>";
      echo "Zadnji post: $tpclnk, od: $vulnk<br/><br/>";
  }

http://merak.mobi - Love at first click

srecnica Developer · 174 posts #122

kafa wrote: Just exclude some stuff like i have done, and add in every mysql select at the end LIMIT 1 or LIMIT 0,1 except you have a while loop, then that would be a bad idea 🙂

if(canaccess(getuid_sid($sid), $forum[0]))
{
   $notp = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_topics WHERE fid='".$forum[0]."' LIMIT 0,1"));
// $nops = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_posts, ibwf_topics WHERE ibwf_posts.tid = ibwf_topics.id AND ibwf_topics.fid = '".$forum[0]."' LIMIT 0,1"));
// $nops = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_posts a INNER JOIN ibwf_topics b ON a.tid = b.id WHERE b.fid='".$forum[0]."'"));
$iml = "<img src=\"http://coding-talk.com/images/1.gif\" alt=\"*\"/>";
echo "<a href=\"index.php?action=viewfrm&sid=$sid&fid=$forum[0]\">$iml$forum[1] ($notp[0] topika)</a><br/>";
$lpt = mysql_fetch_array(mysql_query("SELECT id, name FROM ibwf_topics WHERE fid='".$forum[0]."' ORDER BY lastpost DESC LIMIT 0,1"));
      $nops = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_posts WHERE tid='".$lpt[0]."' LIMIT 1"));
      if($nops[0]==0)
      {
      $pinfo = mysql_fetch_array(mysql_query("SELECT authorid FROM ibwf_topics WHERE id='".$lpt[0]."' LIMIT 0,1"));
      $tluid = $pinfo[0];
      }else{
      $pinfo = mysql_fetch_array(mysql_query("SELECT uid FROM ibwf_posts WHERE tid='".$lpt[0]."' ORDER BY dtpost DESC LIMIT 0,1"));
      $tluid = $pinfo[0];
      }      
      $tlnm = htmlspecialchars($lpt[1]);
      $tlnick = getnick_uid($tluid);
      $tpclnk = "<a href=\"index.php?action=viewtpc&sid=$sid&tid=$lpt[0]&go=last\">$tlnm</a>";
      $vulnk = "<a href=\"index.php?action=viewuser&sid=$sid&who=$tluid\">$tlnick</a>";
      echo "Zadnji post: $tpclnk, od: $vulnk<br/><br/>";
  }

I have long time ago added everywhere LIMIT 0.1 , but all categories is very slow to open....

kafa Junior · 12 posts #123

srecnica wrote: I have long time ago added everywhere LIMIT 0.1 , but all categories is very slow to open....

Go to phpmyadmin, select all tables and do "repair tables", this could do some speed-up 🙂 Also delete often all PM's cus inbox.php is a big CPU eater. Delete old topics and big topics with few thousand posts and open new ones. Also delete all unnecessary stuff from big tables like sellecting number of posts where"somestuff"="something" or number of PM's, cus every MYSQL SELECT uses CPU time and if you have 10 or 20 mysql requests on one page, then you have as result a very slow page. Do so much as possible to put all mysql reqs into one request.

I hope this could help you to do some speed-up 🙂

http://merak.mobi - Love at first click

srecnica Developer · 174 posts #124

kafa wrote: Go to phpmyadmin, select all tables and do "repair tables", this could do some speed-up 🙂 Also delete often all PM's cus inbox.php is a big CPU eater. Delete old topics and big topics with few thousand posts and open new ones. Also delete all unnecessary stuff from big tables like sellecting number of posts where"somestuff"="something" or number of PM's, cus every MYSQL SELECT uses CPU time and if you have 10 or 20 mysql requests on one page, then you have as result a very slow page. Do so much as possible to put all mysql reqs into one request.

I hope this could help you to do some speed-up :)

yes, thank you. Although often do everything that you said, clean the old threads, inbox ... but I think the problem with opening speed categories in fact the number of links in the category itself. I noticed when I cut down the number one category subforum it to be opened more quickly .. The problem is that our forums crowded subforum :)( mnogo podforuma u kategoriji.... previse linkova 😉 )

kafa Junior · 12 posts #125

srecnica wrote: yes, thank you. Although often do everything that you said, clean the old threads, inbox ... but I think the problem with opening speed categories in fact the number of links in the category itself. I noticed when I cut down the number one category subforum it to be opened more quickly .. The problem is that our forums crowded subforum :)( mnogo podforuma u kategoriji.... previse linkova 😉 )

so cut it off, delete some subcategories 🙂

for real speed just delete every mysql SELECT FROM ibwf_posts. You will have top speed, but you will not be able to see the last post.

View demo.

else if($action=="viewcat")
{
$cid = $_GET["cid"];
$cinfo = mysql_fetch_array(mysql_query("SELECT name from ibwf_fcats WHERE id='".$cid."' LIMIT 0,1"));
echo "<card id=\"main\" title=\"MERAK.mobi\">";
echo "<p align=\"center\"><b>$cinfo[0] forum</b><br/><br/>";
echo "</p><p>";
$forums = mysql_query("SELECT id, name FROM ibwf_forums WHERE cid='".$cid."' AND clubid='0' ORDER BY position, id, name");

  while($forum = mysql_fetch_array($forums))
  {
  if(canaccess(getuid_sid($sid), $forum[0]))
  {
  $notp = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_topics WHERE fid='".$forum[0]."'"));
  $iml = "<img src=\"images/1.gif\" alt=\"*\"/> ";
  echo "<a href=\"index.php?action=gviewfrm&sid=$sid&fid=$forum[0]\">$iml$forum[1] ($notp[0] topika)</a><br/>";
  }
  }
  echo "</p>";
  echo "<p align=\"center\">";
  echo "<a href=\"index.php?action=gforumindx&sid=$sid\">Forum</a><br/>";
  echo "<a href=\"index.php\"><img src=\"images/home.gif\" alt=\"\"/><br/>Home</a>";
  echo "</p>";
echo "</card>";
}

http://merak.mobi - Love at first click

srecnica Developer · 174 posts #126

kafa wrote: so cut it off, delete some subcategories 🙂

for real speed just delete every mysql SELECT FROM ibwf_posts. You will have top speed, but you will not be able to see the last post.

View demo.

else if($action=="viewcat")
{
$cid = $_GET["cid"];
$cinfo = mysql_fetch_array(mysql_query("SELECT name from ibwf_fcats WHERE id='".$cid."' LIMIT 0,1"));
echo "<card id=\"main\" title=\"MERAK.mobi\">";
echo "<p align=\"center\"><b>$cinfo[0] forum</b><br/><br/>";
echo "</p><p>";
$forums = mysql_query("SELECT id, name FROM ibwf_forums WHERE cid='".$cid."' AND clubid='0' ORDER BY position, id, name");

  while($forum = mysql_fetch_array($forums))
  {
  if(canaccess(getuid_sid($sid), $forum[0]))
  {
  $notp = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_topics WHERE fid='".$forum[0]."'"));
  $iml = "<img src=\"http://coding-talk.com/images/1.gif\" alt=\"*\"/> ";
  echo "<a href=\"index.php?action=gviewfrm&sid=$sid&fid=$forum[0]\">$iml$forum[1] ($notp[0] topika)</a><br/>";
  }
  }
  echo "</p>";
  echo "<p align=\"center\">";
  echo "<a href=\"index.php?action=gforumindx&sid=$sid\">Forum</a><br/>";
  echo "<a href=\"index.php\"><img src=\"http://coding-talk.com/images/home.gif\" alt=\"\"/><br/>Home</a>";
  echo "</p>";
echo "</card>";
}

Thank you so much:)) where I wiped the last message was written much faster and really works! 🙂) Thanks 🙂))

brand Senior · 391 posts #128

nclemale36 wrote: i made this years ago. aint seen it anywere else so thought id share .

dont forget the thankyou button this is kool and got it on v2 script

HELP THEM WHO HELPS YOU

External image (may be gone)

i only work on wapdesire v_2 coding only

Sreekanth P R Newbie · 2 posts #129

WhiteWarrior wrote: Post Your Custom Made Mods Here For The Lavalair Script.


Topic Made And Pinned As Requested By Members

Thanks for all the mods posted. very useful thread

metulj Super moderator Principal · 1,726 posts #131

chathumax wrote: need more scipts...

... and ... ? make them and stop moaning...🔪👎

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ノ刀ノイリ!

nimeshka Developer · 180 posts #132

Still this is pinned? I came here after around 2 yrs...so don't blame me because i posted in this topic, I did because this one is pinned 🙂

External image (may be gone)

I'm Proud to be a Sri Lankan!

stefan998 Junior · 25 posts #135

asadkhan wrote: need ibwf_users table plz

CREATE TABLE IF NOT EXISTS iwbf_users ( id int(100) NOT NULL AUTO_INCREMENT, name varchar(30) NOT NULL DEFAULT '', pass varchar(60) NOT NULL DEFAULT '', birthday varchar(50) NOT NULL DEFAULT '', sex char(1) NOT NULL DEFAULT '', location varchar(100) NOT NULL DEFAULT '', perm char(1) NOT NULL DEFAULT '0', posts int(100) NOT NULL DEFAULT '0', plusses int(100) NOT NULL DEFAULT '0', signature varchar(100) NOT NULL DEFAULT '', avatar varchar(100) NOT NULL DEFAULT '', email varchar(50) NOT NULL DEFAULT '', site varchar(50) NOT NULL DEFAULT '', browserm varchar(100) NOT NULL DEFAULT '', ipadd varchar(30) NOT NULL DEFAULT '', lastact int(100) NOT NULL DEFAULT '0', regdate int(100) NOT NULL DEFAULT '0', chmsgs int(100) NOT NULL DEFAULT '0', chmood int(100) NOT NULL DEFAULT '0', shield char(1) NOT NULL DEFAULT '0', gplus int(100) NOT NULL DEFAULT '0', budmsg varchar(100) NOT NULL DEFAULT '', lastpnreas varchar(100) NOT NULL DEFAULT '', lastplreas varchar(100) NOT NULL DEFAULT '', shouts int(100) NOT NULL DEFAULT '0', pollid int(100) NOT NULL DEFAULT '0', rbcid varchar(255) NOT NULL DEFAULT '', hvia char(1) NOT NULL DEFAULT '1', lastvst int(100) NOT NULL, battlep int(100) NOT NULL DEFAULT '0', PRIMARY KEY (id), UNIQUE KEY name (name) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ;

stefan998 Junior · 25 posts #136

Does someone knows why i cant load bg image i put background-image: url("bg.jpg"); background-repeat: repeat; width: 10px; height: 10px; but it dosent load on my site

something else Fellow · 2,296 posts #137

Is bg.jpg in the same directory as your css ? Try adding it as the full path to see if it works.

thunderwap Developer · 169 posts #138

stefan998 wrote: Does someone knows why i cant load bg image i put background-image: url("bg.jpg"); background-repeat: repeat; width: 10px; height: 10px; but it dosent load on my site

body {

    background-image: url(bg.jpg);
    background-repeat:repeat;
    width: 10px; 
    height: 10px;
}

can u put css code here of ur site to check

WANT GOOD CHEAP HOSTING WITH 99% UPTIME? THEN PM ME FOR DETAILS!!

stefan998 Junior · 25 posts #139

It worked. Now when i try to register I click register button and I get nothing and in database also nothing it wont register me at all

something else Fellow · 2,296 posts #140

stefan998 wrote: It worked. Now when i try to register I click register button and I get nothing and in database also nothing it wont register me at all

Normally its because of missing $_POST's on the registration page, but without seeing the registration page you are using then this might not be the case.

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