X7 Chat Support Board
Welcome, Guest. Please login or register.
July 31, 2010, 07:30:13 PM

Login with username, password and session length
Search:     Advanced search
X7 Chat Version 3.0.0 Alpha 2 is now available (http://x7chat.com/support_forum/index.php?topic=3198.msg11497#new).
13036 Posts in 3760 Topics by 66533 Members
Latest Member: hyunhperzah
* Home Help Search Login Register
+  X7 Chat Support Board
|-+  Version 1 Archive
| |-+  [Version 1] Feature Request
| | |-+  All smilies in a small box
« previous next »
Pages: [1] Print
Author Topic: All smilies in a small box  (Read 6917 times)
Vicks
Guest
« on: June 17, 2004, 09:28:55 AM »

Hello everybody!

I'm able to display all my smilies in a scrollable box by using DIV STYLE=overflow:auto

Here is the modified code in the frames/new.right.bottom.php

I removed the width and the height of img scr of each smiley because they are not always the same size.

Code:
<td width="196" height="79" bgcolor="<? echo $CS['2']; ?>" style="border: 1px solid <?=$CS[3]?>;">
<div style="height: 79px; width: 196px;overflow: auto;"><?
   $smstart = 0;
   $tsmilies = 0;
   $smilies = "";
   $q = DoQuery("SELECT * FROM $SERVER[TBL_PREFIX]filter WHERE type='1' LIMIT $smstart,52");
   while($row = Do_Fetch_Row($q)){
    $row[3] = eregi_replace("^../","./",$row[3]);
    $smilies .= "<img src=\"$row[3]\" onclick=\"javascript: smclick('$row[2]')\">";
    $tsmilies++;
   }
   print("<font color=\"$CS[FONTLT]\">$smilies");
  ?></div></td>

Can someone try that mod to see if it is working for other people? Do you see any coding error?
Here is a screenshot of the result:
Logged
E-Oreo
Administrator
Member
*****
Offline Offline

Posts: 3710


View Profile Email
« Reply #1 on: June 17, 2004, 04:31:48 PM »

Thank you Smiley

I am sure this will help many people.

Your code looks fine and you taught me something about <div> tags Smiley

The only thing you might want to change is:
Code:
  $q = DoQuery("SELECT * FROM $SERVER[TBL_PREFIX]filter WHERE type='1' LIMIT $smstart,52");
That limits it to 52, so what you can do is this:

Code:
  $q = DoQuery("SELECT * FROM $SERVER[TBL_PREFIX]filter WHERE type='1'");
And then it won't be limited at all!

Overall code w/o 52 smilie built in limit:
Code:
<td width="196" height="79" bgcolor="<? echo $CS['2']; ?>" style="border: 1px solid <?=$CS[3]?>;">
<div style="height: 79px; width: 196px;overflow: auto;"><?
  $smstart = 0;
  $tsmilies = 0;
  $smilies = "";
  $q = DoQuery("SELECT * FROM $SERVER[TBL_PREFIX]filter WHERE type='1'");
  while($row = Do_Fetch_Row($q)){
   $row[3] = eregi_replace("^../","./",$row[3]);
   $smilies .= "<img src=\"$row[3]\" onclick=\"javascript: smclick('$row[2]')\">";
   $tsmilies++;
  }
  print("<font color=\"$CS[FONTLT]\">$smilies");
 ?></div></td>

Proof that every day you learn everything new, I did not know that DIV could scroll like that.  I will test it on Opera and Mozilla web browsers for you.
« Last Edit: June 17, 2004, 04:32:06 PM by E-Oreo » Logged
Vicks
Guest
« Reply #2 on: June 17, 2004, 09:09:48 PM »

Yeah cool! My pleasure!

I found that DIV overflow thing last month when I was working like hell to put all my smilies in my InvisionBoard! It is working great in my board and all members loved this new feature!

 Cheesy  
Logged
DoctorJellybean
Member
*
Offline Offline

Posts: 5


View Profile
« Reply #3 on: July 03, 2008, 06:50:59 AM »

Exactly in which file, and where in the file, does this code go? This is something which I want to do for mine. I'm using v2.

Thanks.
Logged
Pages: [1] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.9 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 0.125 seconds with 15 queries.