• Page 1 of 3
  • 1
  • 2
  • 3
  • »
uCause Community » uCoz Modules » Guestbook » Chat from the guestbook
Chat from the guestbook
CheburatorDate: Thursday, 2011-06-30, 9:53 PM | Message # 1
Member
Group: Senior Members
Messages: 43
Awards: 2
Reputation: 3
Status: :-(


Description:
A very nice chat which is build on the guestbook.
This script has the following functions:
-> Auto refresh (all 10 seconds, customizable)
-> Color of the message, which are addressed to the user.
-> Smileys
-> BB-Codes functions like Code, Quote, Spoiler etc.
-> Send the messages with the keyboard shortcut ctrl + Enter
-> and much more.

Live Demo: DEMO

Installation:
The installation should be easy, but it will be difficult for beginners.
Ok then let us begin to install this Script wink

1. Login in the CP and activate the guestbook module (if isn't activated).
2. In the CP go to User -> User groups ->Set permissions for all groups and set it like on the Screenshot:

3. Now go in the CP to Customize design -> Guestbook -> Appearance of entries and replace all the Code with the following code:
Code
<div class="blockGbChat $CLASS$">
       <div style="float: left">
           <span onclick="toUmane('<?if $USERNAME$?>$USERNAME$<?else?>Guest<?endif?>');" class="gbchatnick"> <?if $USERNAME$?>$USERNAME$<?else?>Guest<?endif?></span>
       </div>
       <div style="text-align: right">
           <span title="$DATE$" class="gbct-nav" style="color: grey; font-size: 9px;">$TIME$</span>
           <?if $MODER_PANEL$?><span title="Delete" class="gbct-nav" onclick="delchatmsg('<?substr($MODER_PANEL$,strrpos($MODER_PANEL$,'del_item(')+9,strpos(substr($MODER_PANEL$,strrpos($MODER_PANEL$,'del_item   (')+9),')'))?>',$(this).parents('.blockGbChat'));"><img src="http://uscripts.de/images/chat/icons/error.png" align="absmiddle" border="0"></span><?endif?>
           <span title="$USERNAME$" class="gbct-nav" onclick="<?if substr($PROFILE_URL$, strpos($PROFILE_URL$,"/index/8-")+9,strpos(substr($PROFILE_URL$,strpos($PROFILE_URL$,'/index/8-')+9),"'")) != $CUR_USER_ID$?>userChatNav({num: '$NUMBER$'},this);<?else?>_uWnd.alert('You have wrote this message.', 'Captain obvious', {w: 200, h: 70, tm: 5000});<?endif?>"><img src="http://uscripts.de/images/chat/icons/user_gray.png" align="absmiddle" border="0"></span>
       </div>
           <div class="hrchat"></div>
           <span class="messageChatMess">$MESSAGE$</span>
           <?if substr($PROFILE_URL$, strpos($PROFILE_URL$,"/index/8-")+9, strpos(substr($PROFILE_URL$,strpos($PROFILE_URL$,'/index/8-')+9),"'")) != $CUR_USER_ID$?><div id="chb$NUMBER$" class="chat-block-div" onmouseover="menuJJ(this, 1);" onmouseout="menuJJ(this, 0);"><div class="cbgbH"><div style="text-align: center; margin-bottom: 10px;"><?if $USER_AVATAR_URL$?><img src="$USER_AVATAR_URL$" onerror="this.src='/images/noavatar.png'" style="border: 0px; max-height: 150px; max-width: 150px;"><?else?><img src="http://uscripts.de/images/noavatar.png" style="border: 0px; max-height: 150px; max-width: 150px;"><?endif?></div> <div class="menu-chat-link prfl-mcg" onmouseover="$(this).toggleClass('gvr-chgbl');" onmouseout="$(this).toggleClass('gvr-chgbl');" onclick="menuNavChat('<?substr($PROFILE_URL$, strpos($PROFILE_URL$,"/index/8-")+9,strpos(substr($PROFILE_URL$,strpos($PROFILE_URL$,'/index/8-')+9),"'"))?>', 0);">Profile</div><?if $USER_LOGGED_IN$?><div class="menu-chat-link prfl-pm" onmouseover="$(this).toggleClass('gvr-chgbl');" onmouseout="$(this).toggleClass('gvr-chgbl');" onclick="menuNavChat('<?substr($PROFILE_URL$, strpos($PROFILE_URL$,"/index/8-")+9, strpos(substr($PROFILE_URL$, strpos($PROFILE_URL$,'/index/8-')+9),"'"))?>', 1);">Send PM</div><?endif?> </div></div><?endif?>
       </div>

4. Now go in the Customize design to Global blocks -> Left or Right container and add the following code there where the Chat should be:
Code
<link type="text/css" rel="StyleSheet" href="http://uscripts.de/css/chat-styles.css" />    
    <div id="gbchat"><div id="gbcb1"><div style="text-align: center; padding-top: 50px">Loading…</div> </div><div style="padding: 3px;" id="bbcodesInChat"> <img class="bbcodeImgChat" align="absmiddle" src="http://uscripts.de/images/chat/bbcodes/format-text-bold.png" onclick="bbcodeChat('b');" alt="" title="Bold"> <img class="bbcodeImgChat" align="absmiddle" src="http://uscripts.de/images/chat/bbcodes/format-text-italic.png" onclick="bbcodeChat('i');" alt="" title="Italic"> <img class="bbcodeImgChat" align="absmiddle" src="http://uscripts.de/images/chat/bbcodes/format-text-underline.png" onclick="bbcodeChat('u');" alt="" title="Underline"> <img class="bbcodeImgChat" align="absmiddle" src="http://uscripts.de/images/chat/bbcodes/script_code.png" onclick="bbcodeChat('code');" alt="" title="Add code"> <img class="bbcodeImgChat" align="absmiddle" src="http://uscripts.de/images/chat/bbcodes/miscellaneous2.png" onclick="bbcodeChat('spoiler');" alt="" title="Spoiler"> <img class="bbcodeImgChat" align="absmiddle" src="http://uscripts.de/images/chat/bbcodes/user_comment.png" onclick="bbcodeChat('quote');" alt="" title="Add quote"></div><textarea id="txtchatGB" onfocus="ifchatautosmiles();" onkeypress="ctrlpost(event, gbch.post);"></textarea> <div class="postbuttons-chat"><div class="pstt-chat"><img src="http://uscripts.de/images/chat/icons/load.gif" style="border: 0;padding:3px 0px 0px 2px; display: none" alt="" align="absmiddle" id="statimg-chat"></div><input type="button" value="Senden" onclick="gbch.post();" title="Ctrl + Enter" class="ch-b-send"><input type="button" title="Smileys" onclick="smilesToggleChat();" value=":)" class="ch-b-sml"><input type="button" value="~" title="Options" onclick="optionschat();" class="ch-b-opt"><input type="button" value="R" title="Refresh" onclick="myreloadchat();" id="reloadchatbutton" class="ch-b-opt"><span style="color: green; font-size: 10px; padding-left: 10px; display: none;" id="reNewPostsChat">Refreshed</span></div></div>    
    <script type="text/javascript">    
    var ucodes = {ru:{logged: "$USER_LOGGED_IN$", login: "$USERNAME$"}};    
    includeJSfile("http://en.uscripts.de/js/chat.js", "uchat");    
    </script>

You mussn't add the Code in the Left or Right container, you can add the code where you want that chat.
5. Now the Installation is complete. If you have questions or problems feel freee to ask here in the forum wink

tags-zB11Chat,from,the,guestbook,
Attachments: 3500993.png(137.9 Kb) · 2808321.png(48.3 Kb)
 
0 Thanked you For This Useful Post:
BlazerDate: Thursday, 2011-06-30, 9:56 PM | Message # 2
Member
Group: Senior Members
Messages: 471
Awards: 2
Reputation: 4
Status: :-(
Nice
 
0 Thanked you For This Useful Post:
Maczo12310Date: Thursday, 2011-06-30, 10:14 PM | Message # 3
Member
Group: Senior Members
Messages: 987
Awards: 12
Reputation: 11
Status: :-(
Very nice script. I like it, I will try it out later.


Visit my Graphic forum board on uCause !!!
 
0 Thanked you For This Useful Post:
AnimorphDate: Friday, 2011-07-01, 0:49 AM | Message # 4
uCause forum Admin
Group: Developer
Messages: 2835
Awards: 73
Status: :-(
Cheburator, Thankyou for releasing this in uCause
 
0 Thanked you For This Useful Post:
CheburatorDate: Friday, 2011-07-01, 0:52 AM | Message # 5
Member
Group: Senior Members
Messages: 43
Awards: 2
Reputation: 3
Status: :-(
Animorph, no problem smile Hope you like this script guys biggrin
 
0 Thanked you For This Useful Post:
HermesDate: Friday, 2011-07-01, 0:56 AM | Message # 6
Member
Group: Senior Members
Messages: 455
Awards: 7
Reputation: 8
Status: :-(
Cheburator, Good job smile
 
0 Thanked you For This Useful Post:
AnimorphDate: Friday, 2011-07-01, 3:12 AM | Message # 7
uCause forum Admin
Group: Developer
Messages: 2835
Awards: 73
Status: :-(
Should i add this in uCause ?
 
0 Thanked you For This Useful Post:
SirDarknight(Tonmoy)Date: Friday, 2011-07-01, 6:16 AM | Message # 8
Member
Group: Senior Members
Messages: 894
Awards: 10
Reputation: 15
Status: :-(
I agree

Please Give Me A Award or + Rep If My Post Helps You

Please Give Me A Award or + Rep If You Like my Scripts
 
0 Thanked you For This Useful Post:
CheburatorDate: Friday, 2011-07-01, 8:15 AM | Message # 9
Member
Group: Senior Members
Messages: 43
Awards: 2
Reputation: 3
Status: :-(
Animorph, yes why not wink ?
 
0 Thanked you For This Useful Post:
SirDarknight(Tonmoy)Date: Friday, 2011-07-01, 9:52 AM | Message # 10
Member
Group: Senior Members
Messages: 894
Awards: 10
Reputation: 15
Status: :-(
i'll like it

Please Give Me A Award or + Rep If My Post Helps You

Please Give Me A Award or + Rep If You Like my Scripts
 
0 Thanked you For This Useful Post:
BlazerDate: Sunday, 2011-07-03, 4:52 AM | Message # 11
Member
Group: Senior Members
Messages: 471
Awards: 2
Reputation: 4
Status: :-(
Cheburator, why guests can see the remove message button ? and why when i write a message and log out and i press on the little head icon ( user profile ) it says i wrote this message in a little ajax window ?

Added (2011-07-03, 4:50 Am)
---------------------------------------------
1 more question, why are the buttons in german ?

Added (2011-07-03, 4:52 Am)
---------------------------------------------
and when i remove message it comes back ???? dry

 
0 Thanked you For This Useful Post:
CheburatorDate: Sunday, 2011-07-03, 11:51 AM | Message # 12
Member
Group: Senior Members
Messages: 43
Awards: 2
Reputation: 3
Status: :-(
Blazer, thanks i will check it out later... then say you what is wrong...
And does someone other has the same problem?

Added (2011-07-03, 11:51 Am)
---------------------------------------------
Ok got the fix... The problem was the Code for the Appearance... here is the new Code for the Appearance:
Code
<div class="blockGbChat $CLASS$">
      <div style="float: left">
          <span onclick="toUmane('<?if $USERNAME$?>$USERNAME$<?else?>Guest<?endif?>');" class="gbchatnick"> <?if $USERNAME$?>$USERNAME$<?else?>Guest<?endif?></span>
      </div>
      <div style="text-align: right">
          <span title="$DATE$" class="gbct-nav" style="color: grey; font-size: 9px;">$TIME$</span>
          <?if $MODER_PANEL$?><span title="Delete" class="gbct-nav" onclick="delchatmsg('<?substr($MODER_PANEL$,strrpos($MODER_PANEL$,'del_item(')+9,strpos(substr($MODER_PANEL$,strrpos($MODER_PANEL$,'del_item  (')+9),')'))?>',$(this).parents('.blockGbChat'));"><img src="http://uscripts.de/images/chat/icons/error.png" align="absmiddle" border="0"></span><?endif?>
          <span title="$USERNAME$" class="gbct-nav" onclick="<?if substr($PROFILE_URL$, strpos($PROFILE_URL$,"/index/8-")+9,strpos(substr($PROFILE_URL$,strpos($PROFILE_URL$,'/index/8-')+9),"'")) != $CUR_USER_ID$?>userChatNav({num: '$NUMBER$'},this);<?else?>_uWnd.alert('You have wrote this message.', 'Captain obvious', {w: 200, h: 70, tm: 5000});<?endif?>"><img src="http://uscripts.de/images/chat/icons/user_gray.png" align="absmiddle" border="0"></span>
      </div>
          <div class="hrchat"></div>
          <span class="messageChatMess">$MESSAGE$</span>
          <?if substr($PROFILE_URL$, strpos($PROFILE_URL$,"/index/8-")+9, strpos(substr($PROFILE_URL$,strpos($PROFILE_URL$,'/index/8-')+9),"'")) != $CUR_USER_ID$?><div id="chb$NUMBER$" class="chat-block-div" onmouseover="menuJJ(this, 1);" onmouseout="menuJJ(this, 0);"><div class="cbgbH"><div style="text-align: center; margin-bottom: 10px;"><?if $USER_AVATAR_URL$?><img src="$USER_AVATAR_URL$" onerror="this.src='/images/noavatar.png'" style="border: 0px; max-height: 150px; max-width: 150px;"><?else?><img src="http://uscripts.de/images/noavatar.png" style="border: 0px; max-height: 150px; max-width: 150px;"><?endif?></div> <div class="menu-chat-link prfl-mcg" onmouseover="$(this).toggleClass('gvr-chgbl');" onmouseout="$(this).toggleClass('gvr-chgbl');" onclick="menuNavChat('<?substr($PROFILE_URL$, strpos($PROFILE_URL$,"/index/8-")+9,strpos(substr($PROFILE_URL$,strpos($PROFILE_URL$,'/index/8-')+9),"'"))?>', 0);">Profile</div><?if $USER_LOGGED_IN$?><div class="menu-chat-link prfl-pm" onmouseover="$(this).toggleClass('gvr-chgbl');" onmouseout="$(this).toggleClass('gvr-chgbl');" onclick="menuNavChat('<?substr($PROFILE_URL$, strpos($PROFILE_URL$,"/index/8-")+9, strpos(substr($PROFILE_URL$, strpos($PROFILE_URL$,'/index/8-')+9),"'"))?>', 1);">Send PM</div><?endif?> </div></div><?endif?>
      </div>


Message edited by Cheburator - Sunday, 2011-07-03, 7:16 PM
 
0 Thanked you For This Useful Post:
BlazerDate: Sunday, 2011-07-03, 5:46 PM | Message # 13
Member
Group: Senior Members
Messages: 471
Awards: 2
Reputation: 4
Status: :-(
Cheburator, can you check this code again ? because when i put it in the appearance of entries the code becomes red, that means that there is something wrong in the code. wink
 
0 Thanked you For This Useful Post:
CheburatorDate: Sunday, 2011-07-03, 7:14 PM | Message # 14
Member
Group: Senior Members
Messages: 43
Awards: 2
Reputation: 3
Status: :-(
Blazer, there is allright the Code musst be red at the end the last 3 / 4 Lines at the end... I have this too, so dont worry... and this is because of some uCoz Codes smile

Message edited by Cheburator - Sunday, 2011-07-03, 7:14 PM
 
0 Thanked you For This Useful Post:
AnimorphDate: Sunday, 2011-07-03, 8:09 PM | Message # 15
uCause forum Admin
Group: Developer
Messages: 2835
Awards: 73
Status: :-(
Cheburator, Do i need to edit the top thread ?
 
0 Thanked you For This Useful Post:
uCause Community » uCoz Modules » Guestbook » Chat from the guestbook
  • Page 1 of 3
  • 1
  • 2
  • 3
  • »
Search:


"Making uCoz web designs simple and easy to use"
- uCause Developers