Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
Enkidu Posted December 4, 2009 Posted December 4, 2009 aha ! OK start by: 1. Look & Feel > 2. Manage Skin Sets & Templates > 3. Manage Skin Sets & Templates then click on IP.board, expand the skin_chat, and click on chatRoom template bit, copy and paste everything in it to a backup text file (you know just in case). then replace it with this code: save, and test :)<script type='text/javascript'> // Basic variables var roomId = {$options['roomId']}; var userId = {$options['userId']}; var userName = '{$this->memberData['members_display_name']}'; var accessKey = '{$options['accessKey']}'; var serverHost = '{$options['serverHost']}'; var serverPath = '{$options['serverPath']}'; var ourUrl = '{$options['ourUrl']}'; USE_RTE = 0; // Chat settings ipb.chat.condenseTime = parseInt({$this->settings['ipchat_limit_time']}); ipb.chat.maxMessages = parseInt({$this->settings['ipchat_max_messages']}); ipb.chat.moderator = parseInt({$options['moderator']}); // Set up templates ipb.chat.templates['msg-1'] = new Template( "<li class='post chat-message #{ownclass}'><label>#{username}</label> <div>#{message}</div></li>" ); ipb.chat.templates['msg-2'] = new Template( "<li class='post chat-notice'><label>#{username}</label> <div>#{action}</div></li>" ); ipb.chat.templates['msg-3'] = new Template( "<li class='post chat-me'><label>#{username}</label> <div>**#{message}**</div></li>" ); ipb.chat.templates['msg-4'] = new Template( "<li class='post chat-system'>{$this->lang->words['sys_message_pre']} #{message}</li>" ); ipb.chat.templates['msg-5'] = new Template( "<li class='post chat-moderator'><label>#{username}</label> <div>{$this->lang->words['_kicked']} #{extra}</div></li>" ); ipb.chat.templates['msg-K'] = new Template( "<li class='post chat-moderator'><div>{$this->lang->words['youve_been_kicked']}</div></li>" ); // Set some language vars ipb.lang['time_am'] = "{$this->lang->words['time_am']}"; ipb.lang['time_pm'] = "{$this->lang->words['time_pm']}"; ipb.lang['entered_room'] = "{$this->lang->words['entered_room']}"; ipb.lang['left_room'] = "{$this->lang->words['left_room']}"; ipb.lang['chat_kick_user'] = "{$this->lang->words['chat_kick_user']}"; ipb.lang['chat_ban_user'] = "{$this->lang->words['chat_ban_user']}"; ipb.lang['cant_kick_self'] = "{$this->lang->words['cant_kick_self']}"; ipb.lang['youve_been_kicked'] = "{$this->lang->words['youve_been_kicked']}"; // Emoticons ipb.chat.emoticons = \$H({ {IPSLib::fetchEmoticonsAsJson( $this->registry->output->skin['set_emo_dir'], true )} }); ipb.vars['emoticon_url'] = "{$this->settings['emoticons_url']}"; ipb.vars['img_url'] = '{$this->settings['img_url']}'; // Sound ipb.chat.soundEnabled = <if test="cookiesound:|:IPSCookie::get('chat_sounds') == 'off'">0<else />1</if>; ipb.chat.soundOnImg = "{$this->settings['img_url']}/bell.png"; ipb.chat.soundOffImg = "{$this->settings['img_url']}/bell_off.png"; // Chatters name formatting <foreach loop="formatname:$chatters as $data"> ipb.chat.nameFormatting.set( {$data['user_id']}, [ "{$data['member']['prefix']}", "{$data['member']['suffix']}" ] ); </foreach> </script> <script type='text/javascript' src='{$this->settings['public_dir']}js/ips.editor.js'></script> <h2 class='maintitle'>{$this->lang->words['chat_page_title']}</h2> <div class='generic_bar'></div> <div id='ipschat'> <div id='chat-container'> <div id='scrollbar_container'> <div id='messages-display'><span id='initial_message'>{$this->lang->words['please_wait_chats']}</span></div> </div> <form id='chat-form' action='#' method='post'> <input type='hidden' name='1_wysiwyg_used' id='1_wysiwyg_used' value='0' /> <input type='hidden' name='editor_ids[]' value='1' /> <div class='ips_editor' id='editor_message'> <div id='message_controls' class='controls'> <ul id='message_toolbar_2' class='toolbar' style='display: none'> <li> <span id='message_cmd_bold' class='rte_control rte_button' title='{$this->lang->words['js_tt_bold']}'><img src='{$this->settings['img_url']}/rte_icons/bold.png' alt='{$this->lang->words['js_tt_bold']}' /></span> </li> <li> <span id='message_cmd_italic' class='rte_control rte_button' title='{$this->lang->words['js_tt_italic']}'><img src='{$this->settings['img_url']}/rte_icons/italic.png' alt='{$this->lang->words['js_tt_italic']}' /></span> </li> <li> <span id='message_cmd_underline' class='rte_control rte_button' title='{$this->lang->words['js_tt_underline']}'><img src='{$this->settings['img_url']}/rte_icons/underline.png' alt='{$this->lang->words['js_tt_underline']}' /></span> </li> <li> <span id='emoticons_custom_menu' class='ipbmenu rte_control rte_button' title='{$this->lang->words['js_tt_emoticons']}'><img src='{$this->settings['img_url']}/rte_icons/emoticons.png' alt='{$this->lang->words['js_tt_emoticons']}' /></span> </li> <li> <span id='message_cmd_link' class='rte_control rte_palette' title='{$this->lang->words['js_tt_link']}'><img src='{$this->settings['img_url']}/rte_icons/link.png' alt='{$this->lang->words['js_tt_link']}' /></span> </li> </ul> </div> <div id='message_wrap' class='editor'> <textarea name="message" class="input_rte" id="message_textarea" rows="3" cols="50" tabindex="0"></textarea> </div> </div> <input type='submit' id='chat-submit' class='input_submit' value='{$this->lang->words['chat_post_button']}' /> </form> </div> <div id='chat-online' class='general_box alt'> <h3><span id='online-chat-count'><if test="$_count = count($chatters)">{$_count}<else />0</if></span> {$this->lang->words['whos_chatting_ttl']}</h3> <div id='chatters-online-wrap'> <ul id='chatters-online'> <foreach loop="$chatters as $data"> <li id='user_{$data['user_id']}'> <div class='chat-photo'><a target='_blank' href="{parse url="showuser={$data['member']['member_id']}" seotitle="{$data['member']['members_seo_name']}" template="showuser" base="public"}" title='{$this->lang->words['view_profile']}'><img src='{$data['member']['pp_mini_photo']}' alt="{$data['member']['members_display_name']}{$this->lang->words['users_photo']}" width='{$data['member']['pp_mini_width']}' height='{$data['member']['pp_mini_height']}' class='photo' /></a></div> <span class='names'><if test="modlink:|:$options['moderator']"><a href='#' id='mod_link_{$data['user_id']}' class='ipbmenu'></if><if test="hasname:|:$data['member']['members_display_name']"><span title='{$data['member']['members_display_name']}'>{IPSLib::makeNameFormatted( IPSText::truncate( $data['member']['members_display_name'], 16 ), $data['member']['member_group_id'] )}</span><else />{$data['user_name']}</if><if test="modendlink:|:$options['moderator']"></a></if> {parse template="user_popup" group="global" params="$data['member']['pp_member_id'], $data['member']['members_seo_name']"}</span> </li> </foreach> </ul> </div> <ul class='post_controls' id='chat-controls'> <li><a href='{parse url="module=ipschat&section=chat&do=leave&room={$options['roomId']}&user={$options['userId']}&access_key={$options['accessKey']}" base="publicWithApp"}' title='{$this->lang->words['leave_room']}'><img src='{$this->settings['img_url']}/cross.png' alt='{$this->lang->words['leave_room']}' /> {$this->lang->words['leave_room']}</a></li> <li><a href='#' title='{$this->lang->words['toggle_sound']}' id='sound_toggle'><img id='sound_toggle_img' src='{$this->settings['img_url']}/<if test="soundon:|:IPSCookie::get('chat_sounds') == 'off'">bell_off.png<else />bell.png</if>' alt='{$this->lang->words['toggle_sound']}' /></a></li> </ul> </div> </div> <if test="modmenus:|:$options['moderator']"> <div id='mod-menu-container'> <foreach loop="$chatters as $data"> <ul id='mod_link_{$data['user_id']}_menucontent' class='kickmenu'> <if test="nokickself:|:$data['user_id'] == $options['userId']"> <li><em>{$this->lang->words['cant_kick_self']}</em></li> <else /> <li><a href='#' title='{$this->lang->words['chat_kick_user']}' class='kick_user' id='kick_user_{$data['user_id']}'><img src='{$this->settings['img_url']}/user_delete.png' alt='{$this->lang->words['icon']}' /> {$this->lang->words['chat_kick_user']}</a></li> <li><a href='#' title='{$this->lang->words['chat_ban_user']}' class='ban_user' id='ban_user_{$data['user_id']}_{$data['member']['member_id']}'><img src='{$this->settings['img_url']}/user_delete.png' alt='{$this->lang->words['icon']}' /> {$this->lang->words['chat_ban_user']}</a></li> </if> </ul> </foreach> </div> </if> <div id='emoticons_custom_menu_menucontent'> {$emoticons} </div> <script type='text/javascript'> if( $( 'message_toolbar_2' ) ){ $( 'message_toolbar_2' ).show(); } ipb.editor_values.get('templates')['link'] = new Template("<label for='#{id}_url'>{$this->lang->words['js_template_url']}</label><input type='text' class='input_text' id='#{id}_url' value='http://' tabindex='10' /><label for='#{id}_urltext'>{$this->lang->words['js_template_link']}</label><input type='text' class='input_text _select' id='#{id}_urltext' value='{$this->lang->words['js_template_default']}' tabindex='11' /><input type='submit' class='input_submit' value='{$this->lang->words['js_template_insert_link']}' tabindex='12' />"); ipb.editor_values.get('templates')['emoticons_showall'] = new Template("<input class='input_submit emoticons' type='button' id='#{id}_all_emoticons' value='{$this->lang->words['show_all_emoticons']}' />"); ipb.editor_values.get('templates')['emoticon_wrapper'] = new Template("<h4><span>{$this->lang->words['emoticons_template_title']}</span></h4><div id='#{id}_emoticon_holder' class='emoticon_holder'></div>"); ipb.editor_values.set( 'show_emoticon_link', false ); ipb.editor_values.set( 'emoticons', ipb.chat.emoticons ); ipb.editor_values.set( 'bbcodes', \$H({IPSLib::fetchBbcodeAsJson()}) ); ipb.vars['emoticon_url'] = "{$this->settings['emoticons_url']}"; ipb.editors[ 'message' ] = new ipb.editor( 'message', 0 ); </script> <!--Iframes used for cross-domain "AJAX"--> <div id='iframeContainer' style="display:none"> </div>
Rheddy Posted December 4, 2009 Posted December 4, 2009 Ah! Thanks. While it still looks the same, it does work. I really need to learn code ... :P ... I'm a real caveman ... :hairy:
Enkidu Posted December 4, 2009 Posted December 4, 2009 [quote name='Colonel Wolfie' date='04 December 2009 - 08:21 PM' timestamp='1259958060' post='1884993'] Ah! Thanks. While it still looks the same, it does work. I really need to learn code ... :P ... I'm a real caveman ... :hairy: oh that's great...the thing is: your IP>Chat didn't install properly, you have a broken template bits all over. I think now is the time to update your CSS bit, so click on the CSS tab and click ipchat.css, replace the content with this:#ipschat { overflow: hidden; position: relative; padding: 10px; background: #f9f9f9; border: 1px solid #9f9f9f; } #chat-container { margin-right: 200px; } #chat-controls { /*position: absolute;*/ height: 32px; bottom: 0; left: 0; right: 0; padding: 6px 10px; } #scrollbar_container { position: relative; /*width: 960px;*/ } #messages-display { overflow: auto; /*width: 945px;*/ margin-left: 0px; height: 350px; border: 1px solid #dcdcdc; margin-bottom: 4px; background: #fff; } #messages-list label { width: 100px; display: block; min-width: 100px; float: left; font-weight: bold; margin-right: 5px; text-align: right; } #messages-list li { /*border-top: 1px solid #D3D3D3;*/ border-bottom: 1px solid #e3e3e3; padding: 4px; font-size: 12px; overflow: auto; } #messages-list div { padding-left: 5px; margin-left: 103px; border-left: 1px solid #D3D3D3; } /*#chat-container, #chat-online { float: left; }*/ #chat-submit { vertical-align: top; position: absolute; right: 15px; top: 20px; } #chat-form { border: 1px solid #d5dde5; border-bottom-width: 4px; padding: 4px; background: #eef3f8; position: relative; } #ipboard_body #editor_message { margin: 0px; margin-right: 150px; border: 0; } #ipboard_body #editor_message textarea { height: 40px; width: 99.7%; resize: none; /* disables the grip on safari */ outline: 0; /* disables the 'halo' */ } #ipboard_body #editor_message .toolbar { padding: 0; } #chat-submit { height: 45px; padding: 0 15px; float: right; } .chat-me { font-style: italic; background-color: #e2f3e2; } #messages-list li.chat-time { font-size: 11px; font-weight: bold; color: #4f4f4f; } #messages-list li.chat-system { font-weight: bold; color: #fff; background: #913535; padding: 6px 20px; } .chat-message { } .chat-myown { background-color: #F0FFFF; } .chat-notice { background-color: #FAFAD2; } .chat-moderator { background-color: #f2e4e7; } ul.kickmenu { background: #d5dde5; border: 1px solid #1d3652; margin-top: 0px; width: 170px; float: right; z-index: 10000; } ul.kickmenu li { padding: 1px; float: none; } ul.kickmenu a { color: #1d3652; text-decoration: none; padding: 4px 4px 4px 4px; display: block; font-size: 11px; } ul.kickmenu a:hover { background: #528f6c; color: #fff; } #chatters-online-wrap { overflow: auto; height: 370px; min-height: 370px; bottom: 30px; } #chatters-online { list-style: none; padding: 5px; } #chatters-online li { padding-bottom: 3px; padding-top: 3px; border-bottom: 1px solid #f6f6f6; height: 30px; overflow: hidden; } /* #chatters-online .photo { float: left; } #chatters-online .names { margin-left: 34px; }*/ #chat-online { position: absolute; top: 10px; right: 10px; width: 185px; background: #fff; } #chat-online h3 { margin: 0; } #initial_message { display: block; padding: 15px; color: #5e5e5e; font-style: italic; } /* Kill the loading bar at the top */ #ipboard_body #ajax_loading { display: none; } #emoticons_custom_menu_menucontent { border: 1px solid #1d3652; height: 400px; width: 200px; overflow: auto; } .chat-photo { width: 30px; max-width: 30px; min-width: 30px; height: 30px; min-height: 30px; max-height: 30px; display: inline-block; text-align: center; } #iframeContainer { left: 5000px; display: none; }
Rheddy Posted December 4, 2009 Posted December 4, 2009 That could be a problem since ipchat.css wasn't created with the installation. Ended up having to create the template bit. It's better. Still a formatting problem with the name display in the main post area but otherwise, okay. Thanks, Enkidu. :thumbsup: It just parses a username if it happens to a long username with more than 12 characters.
AtariAge Posted December 4, 2009 Posted December 4, 2009 There is definitely something funky going on--I just went to make sure I had "ipchat.css" in my "AtariAge" skin, and when I click on the template bit I get an "ACP Session Has Expired" message. Clicking OK just dismisses the dialog box and nothing happens. If I click on the template bit again I get the same error. Something definitely got screwed up during the upgrade. I wish Invision wouldn't be so quick to assume their users aren't properly following directions. ..Al
Rheddy Posted December 4, 2009 Posted December 4, 2009 I don't know if I would be so quick to point out mistakes. I'd rather point out suggestions on how to correct it or just be patient. More flies with honey than with sugar. :whistle:
Enkidu Posted December 4, 2009 Posted December 4, 2009 [quote name='AtariAge' date='04 December 2009 - 09:30 PM' timestamp='1259962238' post='1885009'] There is definitely something funky going on--I just went to make sure I had "ipchat.css" in my "AtariAge" skin, and when I click on the template bit I get an "ACP Session Has Expired" message. Clicking OK just dismisses the dialog box and nothing happens. If I click on the template bit again I get the same error. Something definitely got screwed up during the upgrade. I wish Invision wouldn't be so quick to assume their users aren't properly following directions. ..Al clear your browser's cache :)
AtariAge Posted December 4, 2009 Posted December 4, 2009 [quote name='Colonel Wolfie' date='04 December 2009 - 03:38 PM' timestamp='1259962692' post='1885014'] I don't know if I would be so quick to point out mistakes. I'd rather point out suggestions on how to correct it or just be patient. More flies with honey than with sugar. :whistle: Coming from you this is pretty damn hilarious! ..Al
Rheddy Posted December 4, 2009 Posted December 4, 2009 Let's just say that I'm learned the better part of valor here. I don't have an ego to bruise and I've learned when and where to pick my fights. This is definitely not one of them. Besides, it's never a good idea to pick with those who run things. :lol:
bfarber Posted December 5, 2009 Posted December 5, 2009 [quote name='AtariAge' date='04 December 2009 - 04:30 PM' timestamp='1259962238' post='1885009'] Something definitely got screwed up during the upgrade. I wish Invision wouldn't be so quick to assume their users aren't properly following directions. ..Al I have attempted to duplicate every bug reported to the tracker, and every bug I can duplicate I mark as such and fix. Bugs I can't duplicate I have STILL been working on and fixing (such as the online list issue I couldn't reproduce, but confirmed and managed to fix, and the CJOIN-0 error I've been working with customers on). I think it's kind of harsh to say we're "quick to assume" something when that's not the case. We start at the simplest explanation for a problem (such as chat not being installed properly) and work out from there to the more obscure possibilities. I think that's quite a reasonable process, as the simplest explanation is more often than not the correct one. The chat CSS file is nothing special. It's the same CSS file any application would add. There's no special code related to the chat CSS, and nothing in chat itself that would be able to cause alerts/issues like you are describing (that couldn't happen for any other application). @Colonel Wolfie- pretty sure I suggested earlier that it sounds like your skin templates and CSS weren't properly updated. You can rebuild them under the template tools section of the look and feel tab (click css and html under the third tool, click ip.chat, and run the tool, then use the first tool to rebuild all your skin caches). It's possible your CSS folder(s) aren't writable, and that might be why you don't have the CSS file.
Rheddy Posted December 5, 2009 Posted December 5, 2009 I did. Also conducted the changes that Enkidu suggested. While the chat does work, I still get the #CJOIN-0 error. :blush:
bfarber Posted December 5, 2009 Posted December 5, 2009 http://community.invisionpower.com/topic/299823-cjoin-0-error-please-read/page__view__getlastpost
Enkidu Posted December 5, 2009 Posted December 5, 2009 I found this code in the chatroom template bit: I couldn't find here in this board, not sure if it's there for monitoring or something else :unsure:<!--Iframes used for cross-domain "AJAX"--> <div id='iframeContainer'> </div>
bfarber Posted December 5, 2009 Posted December 5, 2009 That's right, and would be here on this board too. In beta 2 the iframes were coded into the template, but in beta 3 javascript adds the iframes to that div when the page is drawn (depending on the type of communication the browser will make use of).
Enkidu Posted December 5, 2009 Posted December 5, 2009 wouldn't iframe present a security threat? :unsure:
bfarber Posted December 5, 2009 Posted December 5, 2009 No, iframes are not inherently dangerous. They're only dangerous if not used properly. 1) Requires a dangerous site to be embedded via iframe, which wouldn't happen (we don't put any arbitrary site into the iframe) 2) Hacker puts an iframe to a third part site on THEIR site - has nothing to do with our usage of iframes 3) We don't use any such CSS ;) 4) We don't use any such javascript ;) 5) We don't use any such css 6) We don't use any such redirection In all of those examples, they show how iframes can be misused. That doesn't mean they're bad to use, it simply means a hacker can use iframes for nefarious purposes. They can do the same with javascript, which we use extensively throughout IPB.
AtariAge Posted December 5, 2009 Posted December 5, 2009 [quote name='bfarber' date='04 December 2009 - 06:55 PM' timestamp='1259974520' post='1885056'] I think it's kind of harsh to say we're "quick to assume" something when that's not the case. We start at the simplest explanation for a problem (such as chat not being installed properly) and work out from there to the more obscure possibilities. I think that's quite a reasonable process, as the simplest explanation is more often than not the correct one. You're right and I apologize. I was just aggravated at the time and shouldn't have said that. I believe what was causing my particular problem was XCache. When I was knee deep in skinning work for IP.Board 3.0, I had to disable XCache as changes I was making to the skin would not be reflected immediately. And there doesn't seem to be any way to disable XCache on a per-directory basis or even on a domain basis (it's affects all the domains you have on a server). Since I haven't done any skinning work in a while, I forgot about this issue. I know you and everyone at Invision are working quite hard and I very much appreciate it. I'm looking forward to watching IP.Chat stabilize and evolve over time. ..Al
Ambar Posted December 5, 2009 Posted December 5, 2009 Tried to get into the ip.chat here and get same problem as my board :) at least im not alone, well I am never alone, Voices ya know... [#CJOIN-0] There was an error connecting with the chat room. Please notify an administrator.
Rheddy Posted December 5, 2009 Posted December 5, 2009 Apparently, after you apply the patch and clear your browser cache, you have to exit your browser and open your browser again. This was unknown to me as the patch seems to be working fine with no errors.
bfarber Posted December 7, 2009 Posted December 7, 2009 I have more to the patch that I'm testing on a site that was having issues. So far, so good. Apparently hasn't had any further problems all weekend. I hope to release an update later today. @AA - thanks. :)
bfarber Posted December 7, 2009 Posted December 7, 2009 http://community.invisionpower.com/topic/299823-cjoin-0-error-please-read/page__st__20__gopid__1885891&#entry1885891
NVGAonline Posted December 11, 2009 Posted December 11, 2009 Hello, for some reason our chat is not coming up on our site. It was working before but I don't what is going on http://www.nvgaonline.com The invision admins installed the chat!!
Mat Barrie Posted December 13, 2009 Posted December 13, 2009 [quote name='Chingachgook_merged' date='12 December 2009 - 10:08 AM' timestamp='1260569308' post='1887546'] Hello, for some reason our chat is not coming up on our site. It was working before but I don't what is going on http://www.nvgaonline.com The invision admins installed the chat!! You appear to have been upgraded to 3.0.5. I can virtually guarantee that if IPS upgraded you, they overwrote the chat files with the out of the box ones that support only ParaChat and AddonChat. Reinstall it.
Rhandi Posted December 20, 2009 Posted December 20, 2009 I'm going to post this here, with hopes that I can get some help. Let me start with: I HAVE NEVER SUCCESSFULLY INSTALLED AN APPLICATION on my board in the 4 months I've had it. So, I have figured out FTP and how to transfer and such. But I'm not sure where I'm supposed to transfer the chat to (I put it in uploads), nor do I know what I'm supposed to put where when I push "Add New Application" in the Manage Applications & Modules. I don't know what to do after that either. So basically, I just know that I'm supposed to transfer the upload file of the chat I downloaded from the Client Area, but that's all I know? When I thought I got it, It had "Third Party Add Ons" with the chat listed in there but it said there was nothing in there and there was no "install" button. I'm so confused. Is there a specific folder I should transfer it to? Once I do that what should happen? I have followed the instructions, but those aren't good for someone who has never had any success at uploading applications and such because they don't know what directory is what and such, KWIM? I'm trying really hard to learn and I've looked everywhere for more help, but I can't find anything. Can anyone help? I'm desperate! I think this would be a great help for my site and I know my girls & guys would LOVE it!
Recommended Posts
Archived
This topic is now archived and is closed to further replies.