Who enters in room? For lavalair/wapdesire

Started on the old forum in November 2009 · view the original in the archive · old links redirect here

12 replies · 1,253 views · started 17 years ago · 1 min read

TL;DR · summary of 12 replies
  • $ison = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_chonline WHERE uid='".$uid."' AND rid='".$rid."'));
  • Addtochat($uid, $rid);
  • Then empty the table ibwf_chonline.
  • For creating a new room message, add code like: [code]

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

7 participants
Mysterio Lead · 630 posts #1

To go to chat.php you need to go throught chatenter.php, because the chatenter.php will set some values into the database, and tell others who enters chat. But, this is kinda boring because that is going to happen everytime you change the room, or you go and come back.

Well, here is a simple code that is going to save you from that chatenter.php, just go to chat.php and enter it before addtochat($uid, $rid);


code:

$ison = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_chonline WHERE uid='".$uid."' AND rid='".$rid."' ")); if ($ison[0] == "0") { $name = getnick_sid($sid); mysql_query("INSERT INTO ibwf_chat SET chatter='1', who='0', timesent='".time()."', msgtext='".$name." entered chat!', rid='".$rid."', exposed='0' "); }


mysterio.al - programming is a functional art

kei_ki7 Senior · 431 posts #2

i cant make this work 🙁

Did I help you? You can help me too Your donations will help me finance my studies.

Mysterio Lead · 630 posts #3

kei_ki7 wrote: i cant make this work :(

  1. Are you sure you changed the fields names to match your own?
  2. Are you sure you have a member with ID = 1? Then it should work.

mysterio.al - programming is a functional art

kei_ki7 Senior · 431 posts #4

yup, and i change $session to $sid is that right?

Did I help you? You can help me too Your donations will help me finance my studies.

friend Developer · 112 posts #6

Not working.....

Mysterio Lead · 630 posts #7

friend wrote: Not working.....

Add the code again. After that, empty the table ibwf_chonline, and try again.

mysterio.al - programming is a functional art

Leviathan73 Senior · 260 posts #8

nice feature, works well for me:). But what is the code the message automatically when you open a new room? for example: open new room and check the automated message .. $ username has opened room name

Mysterio Lead · 630 posts #9

you mean when a user creates a room? And where to go that message?

mysterio.al - programming is a functional art

metulj Super moderator Principal · 1,726 posts #10

Leviathan73 wrote: nice feature, works well for me:). But what is the code the message automatically when you open a new room? for example: open new room and check the automated message .. $ username has opened room name

wouldnt that look like useless spam ? besides.. it'll just 'eat' kb's on mobile users...🤨

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

jefweewap Junior · 31 posts #11

i think ive seen the code here.. just do some search..

Leviathan73 Senior · 260 posts #12

Mysterio is correct, when a user creates room, and the subtitle goes on writing

addonline($uid,"Chat in $rname ($mmsg)","chat.php?rid=$rid&rpw=$rpw");
        //echo "<p>";
        echo popup($sid);
        echo "<b>1 </b><a name=\"top\" id=\"top\" accesskey=\"1\" href=\"chat.php?action=say&sid=$sid&rid=$rid&rpw=$rpw\">write</a><br/>";

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