Chat smileys approach... Possible?

Everything else that doesn't fall into one of the other PB categories.
Inf0Byt3
PureBasic Fanatic
PureBasic Fanatic
Posts: 2236
Joined: Fri Dec 09, 2005 12:15 pm
Location: Elbonia

Chat smileys approach... Possible?

Post by Inf0Byt3 »

The chat program we're making would definately look more cool if we could support smileys, but i don't have any idea of how to do this. Actually i've got 2 ideas, but none of them seems reliable enough... The first one would be to use a WebGadget, but we have a problem here... How can we add a new line to the contained page without having to refresh it each time an user sends a message? This would be the fastest way, and there is an alternative to this, using an EditorGadget, but I really can't figure out how to add the graphics to a specific location in the text (on the fly).

Is this possible in the first place? I would really appreciate any idea or code example. If it is too hard to make i'll quit trying to make this part.

Thanks in advance !
None are more hopelessly enslaved than those who falsely believe they are free. (Goethe)
White Eagle
Enthusiast
Enthusiast
Posts: 215
Joined: Sun Jan 04, 2004 3:38 am
Location: Maryland

Post by White Eagle »

How can we add a new line to the contained page without having to refresh it each time an user sends a message?
Wouldn't this work?
http://www.purebasic.fr/english/viewtopic.php?t=16837
Last edited by White Eagle on Thu Oct 05, 2006 11:30 am, edited 1 time in total.
Inf0Byt3
PureBasic Fanatic
PureBasic Fanatic
Posts: 2236
Joined: Fri Dec 09, 2005 12:15 pm
Location: Elbonia

Post by Inf0Byt3 »

I guess it would, but it would not be that 'professional' to refresh each time somebody sends a message... I need some ideas of how to do this...
None are more hopelessly enslaved than those who falsely believe they are free. (Goethe)
White Eagle
Enthusiast
Enthusiast
Posts: 215
Joined: Sun Jan 04, 2004 3:38 am
Location: Maryland

Post by White Eagle »

*scratches my head* I might be missing something, the code I linked to above doesn't require a refresh, does it? Or am I remembering wrong?

I have not used that code to try and insert graphics, but I have used it with text in a "chat type" environment, and not had any issues.
Inf0Byt3
PureBasic Fanatic
PureBasic Fanatic
Posts: 2236
Joined: Fri Dec 09, 2005 12:15 pm
Location: Elbonia

Post by Inf0Byt3 »

GOD!!! I really really must start wearing glasses... Or get to sleep earlier... I didn't even see the link :shock: :shock: :shock: . Thanks, i'll study it!
None are more hopelessly enslaved than those who falsely believe they are free. (Goethe)
White Eagle
Enthusiast
Enthusiast
Posts: 215
Joined: Sun Jan 04, 2004 3:38 am
Location: Maryland

Post by White Eagle »

Hehe, that happens to me all the time :lol:
Character
Enthusiast
Enthusiast
Posts: 337
Joined: Mon Aug 07, 2006 3:51 pm
Location: Netherlands

Post by Character »

I also didn't see it.
not possible on this forum to underline links by default instead of showing up after hoovering over it?
Cessante causa cessat effectus
White Eagle
Enthusiast
Enthusiast
Posts: 215
Joined: Sun Jan 04, 2004 3:38 am
Location: Maryland

Post by White Eagle »

I dunno, from now on I will just paste the link and not use the forums "url" commands, they never appear right for me on any browser.

Edited above post to clearly show the link.
rsts
Addict
Addict
Posts: 2736
Joined: Wed Aug 24, 2005 8:39 am
Location: Southwest OH - USA

Post by rsts »

They may display differently depending on which phpbb "style" is selected also.

cheers
User avatar
Joakim Christiansen
Addict
Addict
Posts: 2452
Joined: Wed Dec 22, 2004 4:12 pm
Location: Norway
Contact:

Post by Joakim Christiansen »

Why don't you just color your link?
I like logic, hence I dislike humans but love computers.
Character
Enthusiast
Enthusiast
Posts: 337
Joined: Mon Aug 07, 2006 3:51 pm
Location: Netherlands

Post by Character »

Why don't you just color your link
hé, you're a smart guy :wink:
Cessante causa cessat effectus
White Eagle
Enthusiast
Enthusiast
Posts: 215
Joined: Sun Jan 04, 2004 3:38 am
Location: Maryland

Post by White Eagle »

Joakim Christiansen wrote:Why don't you just color your link?
Or, I could underline it :lol:
Inf0Byt3
PureBasic Fanatic
PureBasic Fanatic
Posts: 2236
Joined: Fri Dec 09, 2005 12:15 pm
Location: Elbonia

Post by Inf0Byt3 »

This part is done now :). What about automatically scrolling the contents down with every line added? How can i do that?
None are more hopelessly enslaved than those who falsely believe they are free. (Goethe)
User avatar
Joakim Christiansen
Addict
Addict
Posts: 2452
Joined: Wed Dec 22, 2004 4:12 pm
Location: Norway
Contact:

Post by Joakim Christiansen »

You mean something like this?

Code: Select all

SendMessage_(GadgetID(#Main_Chat),#EM_SCROLL,#SB_BOTTOM,0)
Each time you add text to the editorgadget use that line.
I like logic, hence I dislike humans but love computers.
Inf0Byt3
PureBasic Fanatic
PureBasic Fanatic
Posts: 2236
Joined: Fri Dec 09, 2005 12:15 pm
Location: Elbonia

Post by Inf0Byt3 »

Thanks, but it doesn't seem to work :(. The scroll doesn't occur in the webgadget :(.

[Edit]
My bad... I didn't specify i needed this for the WebGadget... I'm sorry for that.
None are more hopelessly enslaved than those who falsely believe they are free. (Goethe)
Post Reply