Announcement

GOOGLE CHROME IS A BOTNET? GOOGLE CHROME IS A BOTNET? GOOGLE CHROME IS A BOTNET? GOOGLE CHROME IS A BOTNET? GOOGLE CHROME IS A BOTNET? GOOGLE CHROME IS A BOTNET? GOOGLE CHROME IS A BOTNET? GOOGLE CHROME IS A BOTNET? WE LIVE INSIDE A DREAM. GOOGLE CHROME IS A BOTNET? GOOGLE CHROME IS A BOTNET? GOOGLE CHROME IS A BOTNET? GOOGLE CHROME IS A BOTNET? GOOGLE CHROME IS A BOTNET? GOOGLE CHROME IS A BOTNET? GOOGLE CHROME IS A BOTNET? NO MORE SPAM
FRIENDLY REMINDER THAT THE FORUMS ARE DEAD AND THAT THE LIFE OF THE PARTY CURRENTLY RESIDES IN #FAIL #EEFORUMSANARCHY #EEFORUMS #hi ON RIZON.

YO RIZON #HI
it's closing time you don't have to go home but you can't stay here

Advertisement

»  » 

#1 2012-04-07 08:05:33

Different55
The Beanmaker
Registered: 2011-05-18
Posts: 9,143
Fails: 0

Chatbox

I can has chatbox, too! big_smile
It was just sitting on one of my domains for a while until I saw scienceguyz's box and I remembered my sad little chatbox.
So.
To-do:
Write BBCode
Add register page.
Add password protection to login page.

Done:
It works.

Doing:
Converting from file-based log to MySQL-based log.
Writing BBCode Parser.


Jet fuel can't make dank memes.

Offline

#2 2012-04-07 09:31:46

furqi
Failure
Registered: 2011-11-24
Posts: 193
Fails: 97

Re: Chatbox

where is ure chatbox?


the nigerian donation fund
stopping cyber bullying,  poverty, war, and anything else you hate
learn more by emailing me ure bank info today smile

Offline

#3 2012-04-07 10:07:31

scienceguyz
VIF
Registered: 2012-03-04
Posts: 1,791
Fails: 114

Re: Chatbox

not done yet.


No longer part of Fail. Sorry.

Offline

#4 2012-04-07 15:28:49

Different55
The Beanmaker
Registered: 2011-05-18
Posts: 9,143
Fails: 0

Re: Chatbox

Not releasing it until it's working on with MySQL.

Update: BBCode parser finished.


Jet fuel can't make dank memes.

Offline

#5 2012-04-07 19:25:27

scienceguyz
VIF
Registered: 2012-03-04
Posts: 1,791
Fails: 114

Re: Chatbox

how? I want it!


No longer part of Fail. Sorry.

Offline

#6 2012-04-07 19:33:37

Bobithan
Actually Towwl
Registered: 2011-07-27
Posts: 2,215
Fails: 17

Re: Chatbox

Neato. Can you make username colors and pings like in CounterStrike? wink


secretsaget.gif

Towel on IRC

Offline

#7 2012-04-07 21:06:46

Different55
The Beanmaker
Registered: 2011-05-18
Posts: 9,143
Fails: 0

Re: Chatbox

When I made it I decided to name it FireStorm because the reason I wanted to make a chatbox was CS.

Colors were implemented when I added the LoadLog function. It grabs the last 30 messages, then grabs the username of the message and when I did that I also made it grab the user's color and it prints the color, the name, the time, the message, then moves on to the next line.


Jet fuel can't make dank memes.

Offline

#8 2012-04-07 21:38:20

scienceguyz
VIF
Registered: 2012-03-04
Posts: 1,791
Fails: 114

Re: Chatbox

Can I has BBcode codes?


No longer part of Fail. Sorry.

Offline

#9 2012-04-08 08:37:44

Different55
The Beanmaker
Registered: 2011-05-18
Posts: 9,143
Fails: 0

Re: Chatbox

yeah.

$pattern[] = "#\[b\](.*?)\[/b\]#";
$pattern[] = "#\[i\](.*?)\[/b\]#";

$replace[] = "<b>$1</b>";
$replace[] = "<i>$1</i>";

$msg = preg_replace($pattern, $replace, $msg);

Jet fuel can't make dank memes.

Offline

#10 2012-04-08 14:44:44

scienceguyz
VIF
Registered: 2012-03-04
Posts: 1,791
Fails: 114

Re: Chatbox

where does I put that? Index? Log? Post? gonna try post.


No longer part of Fail. Sorry.

Offline

#11 2012-04-08 15:35:40

Different55
The Beanmaker
Registered: 2011-05-18
Posts: 9,143
Fails: 0

Re: Chatbox

It's not gonna work right off if you stuff it somewhere. You has to plug it into ur codes. post.php if u aren't usin a functions.php


Jet fuel can't make dank memes.

Offline

#12 2012-04-08 16:59:12

scienceguyz
VIF
Registered: 2012-03-04
Posts: 1,791
Fails: 114

Re: Chatbox

do I use another <? ?> or do i just add it?


No longer part of Fail. Sorry.

Offline

#13 2012-04-08 19:28:10

Different55
The Beanmaker
Registered: 2011-05-18
Posts: 9,143
Fails: 0

Re: Chatbox

let's say the variable that gets written to log.html is $msg.

This takes $msg and parses it into BBCode. $msg in your case is probably $_POST['msg'] or something similar. Add $msg = $_POST['whatever']; before it gets written to the log then replace all istances of $_POST['thatthing'] with $msg and insert that parsin' business before it gets written to the log but after $msg is declared.


Jet fuel can't make dank memes.

Offline

#14 2012-04-08 20:00:21

Ratburntro44
Member
Registered: 2011-10-28
Posts: 3,370
Fails: 100,959

Re: Chatbox

scienceguyz wrote:

do I use another <? ?> or do i just add it?

Use <?php ?>. Even though <? ?> will work on most places, you should use the long form just for interoperability.


31
SEfX29x.png

Offline

#15 2012-04-08 20:15:40

Different55
The Beanmaker
Registered: 2011-05-18
Posts: 9,143
Fails: 0

Re: Chatbox

Don't use <? ?> when they've already been used. <?php somecode <?php somecode ?> ?> won't work.


Jet fuel can't make dank memes.

Offline

#16 2012-04-08 21:07:18

Ratburntro44
Member
Registered: 2011-10-28
Posts: 3,370
Fails: 100,959

Re: Chatbox

It will if your goal is to generate an error.


31
SEfX29x.png

Offline

#17 2012-04-09 10:14:47

scienceguyz
VIF
Registered: 2012-03-04
Posts: 1,791
Fails: 114

Re: Chatbox

but will
<?php some code?>
<?php some more code?>
work?
And 000webhost should get ASP so I can go <% somecode %>


No longer part of Fail. Sorry.

Offline

#18 2012-04-09 15:14:17

Different55
The Beanmaker
Registered: 2011-05-18
Posts: 9,143
Fails: 0

Re: Chatbox

Yes,  but it's pointless and won't work in this situation. Forget about <?php ?> and put it in the already existing ones.


Jet fuel can't make dank memes.

Offline

#19 2012-04-09 17:16:24

scienceguyz
VIF
Registered: 2012-03-04
Posts: 1,791
Fails: 114

Re: Chatbox

I'm confused. Can I have the Full code for whatever I need to put the BBcode in, but make sure it works with my php fwrite and not your MySQL.
*works on passcode*


No longer part of Fail. Sorry.

Offline

#20 2012-04-09 20:53:40

Muffin
rrrrrr
From: Mulberry Lane
Registered: 2011-05-18
Posts: 1,318
Fails: 567
Website

Re: Chatbox

Sometimes I wonder if I'm the only one that doesn't know how to code on this forum...


rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr

Offline

#21 2012-05-30 12:35:35

N1KF
REBORN CORPSE
Registered: 2012-05-16
Posts: 6,923
Fails: 100,956

Re: Chatbox

Muffin wrote:

Sometimes I wonder if I'm the only one that doesn't know how to code on this forum...

Nope. You're not the only one.

Offline

#22 2017-02-05 23:16:35

N1KF
REBORN CORPSE
Registered: 2012-05-16
Posts: 6,923
Fails: 100,956

Re: Chatbox

fail chat is dead

Offline

Board footer

Jump to

We use Fail. Fail uses FluxBB

[ Generated in 0.020 seconds, 57 queries executed - Memory usage: 615.2 KiB (Peak: 638.86 KiB) ]