Nuclear General Posted September 12, 2011 Share Posted September 12, 2011 File Name: "Who's Chatting" Sidebar Hook+Blocks File Submitter: Nuclear General File Submitted: 11 Sep 2011 File Category: User and Social Engagement This hook will Allow You to place a "Who's Chatting" Sidebar hook on the board index, with its own separate setting, and includes an IPContent block to return the same.... as Well as A separate Chat footer IPContent block that returns the IPS default Both regard all present settings, the blocks however can be used with the Show hooks Settings disabled. The code in use is based on the original "Who's Chatting?" Hook, By Invision Power Services here to download this file Link to comment Share on other sites More sharing options...
PersonalMode Posted September 13, 2011 Share Posted September 13, 2011 Thanks for this great hook But I have a problem When I put the {parse block="chatusers"} code in my template, my article's button disappear See the normal page And when I put the hook's code, I have this : I don't understand why Can you help me ? Thanks Link to comment Share on other sites More sharing options...
Marcher Technologies Posted September 13, 2011 Share Posted September 13, 2011 Thanks for this great hook But I have a problem When I put the {parse block="chatusers"} code in my template, my article's button disappear See the normal page And when I put the hook's code, I have this : I don't understand why Can you help me ? Thanks Yes... Download The File Again... just retested and patched this... it was getting confused as to what lang was loaded... i thought i had caught this and changed it already in initial, but somehow i missed it... $this->lang shouldve been $this->_lang... i could have sworn i had that, fixed now. http://www.marchertech.com/ the odd bit is... block scope seems to actually be faulty for once. Link to comment Share on other sites More sharing options...
PersonalMode Posted September 13, 2011 Share Posted September 13, 2011 Thanks, it works very well now Just another question I use this block too, from you : Active Users 3.2 block 1.0.1 And I modified it to be the same like the active user on the forum (class, id, etc...) See at the end of the page : http://www.depeche-mode.be/ But, how can I make this change too with "(MT32) "Who's Chatting" Sidebar Hook+Block" ? Link to comment Share on other sites More sharing options...
Marcher Technologies Posted September 13, 2011 Share Posted September 13, 2011 Its actually quite simple. Edit the block. Find near the end: $html = ''; if ( count( $member_ids ) ) { $html = $this->registry->getClass('output')->getTemplate('boards')->whoschatting_sideshow( intval(count($member_ids)), $member_ids ); } else { if ( ! $this->settings['ipschat_hide_chatting'] ) { $html = $this->registry->getClass('output')->getTemplate('boards')->whoschatting_sideempty(); } } return $html; Change this to: $html = ''; if ( count( $member_ids ) ) { $html = $this->registry->getClass('output')->getTemplate('boards')->whoschatting_show( intval(count($member_ids)), $member_ids ); } else { if ( ! $this->settings['ipschat_hide_chatting'] ) { $html = $this->registry->getClass('output')->getTemplate('boards')->whoschatting_empty(); } } return $html; Eg... simply return the IPS Default Template Instead :wink: Link to comment Share on other sites More sharing options...
PersonalMode Posted September 13, 2011 Share Posted September 13, 2011 This change have no effect :sweat: Link to comment Share on other sites More sharing options...
Marcher Technologies Posted September 13, 2011 Share Posted September 13, 2011 Recache the block? thats the ips default template they use in the footer. Link to comment Share on other sites More sharing options...
Marcher Technologies Posted September 13, 2011 Share Posted September 13, 2011 i literally just did what i outlined above... i gethttp://www.marchertech.com/ make sure to change BOTH template returns as above. Link to comment Share on other sites More sharing options...
PersonalMode Posted September 13, 2011 Share Posted September 13, 2011 Yes, I recache... Here is my template's code <div id="board_statistics" class="statistics clearfix"> {parse block="act32"} {parse block="chatusers"} </div> And when I check the source code of my page I find this <div class='ipsSideBlock'> <h3>Membre(s) actif(s) dans le live chat</h3> <p>Il n'y a aucun membre sur le live chat pour le moment</p> </div> I think this is a bad "div class" and "h3" Link to comment Share on other sites More sharing options...
Marcher Technologies Posted September 13, 2011 Share Posted September 13, 2011 what i saying is if you had switched to ips default template properly... THAT markup should not be present..... it should be returning the IPS default template that has NO such div.... should i add another block to return the ips hook template seperately? Link to comment Share on other sites More sharing options...
PersonalMode Posted September 13, 2011 Share Posted September 13, 2011 what i saying is if you had switched to ips default template properly... THAT markup should not be present..... it should be returning the IPS default template that has NO such div.... should i add another block to return the ips hook template seperately? You are right, and I don't understand why it doesn't work I try with the IPB Skin default, but same problem Last solution, delete div class in the HTML code of the skin.... I'm not sure that I understand what would you say about another block (sorry, I'm not english speaker) Link to comment Share on other sites More sharing options...
Marcher Technologies Posted September 13, 2011 Share Posted September 13, 2011 You are right, and I don't understand why it doesn't work I try with the IPB Skin default, but same problem Last solution, delete div class in the HTML code of the skin.... I'm not sure that I understand what would you say about another block (sorry, I'm not english speaker) i mean there is now an extra .block xml included with the download, eg to return it separately: {parse block="chatusers"} {parse block="chatfooter"} returns: http://www.marchertech.com/ (bottom) Link to comment Share on other sites More sharing options...
PersonalMode Posted September 14, 2011 Share Posted September 14, 2011 Really great Thank you very much MT ;) You make a really good job Link to comment Share on other sites More sharing options...
arikbo Posted October 1, 2011 Share Posted October 1, 2011 Thanks for the hook! I'm really loving it but I have a few questions. The block is way above my head with the php. Is there an area I could possibly make an edit to customize the title? I use a bigger font so "Member(s) active in live chat" wraps.. Also my main navigation tabs are taken so I don't have a chat tab. Could I add a link to the side bar block that says something like Join the conversation?..er.. how would one go about doing something like that? :rofl: Link to comment Share on other sites More sharing options...
Marcher Technologies Posted October 1, 2011 Share Posted October 1, 2011 Thanks for the hook! I'm really loving it but I have a few questions. The block is way above my head with the php. Is there an area I could possibly make an edit to customize the title? I use a bigger font so "Member(s) active in live chat" wraps.. Also my main navigation tabs are taken so I don't have a chat tab. Could I add a link to the side bar block that says something like Join the conversation?..er.. how would one go about doing something like that? :rofl: theres a reason the block seems mystic mojo :tongue: ACP->Look& Feel->skin->Board Index->whoschatting_sideempty and whoschatting_sideshow are the actual template bits for the sidebar block. EG, the block is a php processer same as the hook, and they both return same templates. <a href='{parse url="app=ipchat" base="public"}' target='_blank'> Join the Conversation </a> and just an example code to get started. Link to comment Share on other sites More sharing options...
Marcher Technologies Posted October 1, 2011 Share Posted October 1, 2011 oh, and that text is language strings: {$this->lang->words['whoschatting_total']} {$this->lang->words['whoschatting_loadchat']} Link to comment Share on other sites More sharing options...
arikbo Posted October 1, 2011 Share Posted October 1, 2011 Thank you so much!! Love it! thanks Link to comment Share on other sites More sharing options...
Cyrem Posted October 16, 2011 Share Posted October 16, 2011 Nice hook! Would it be possible for you to add permissions as to who can see this block, I'd like to disable it for guests. Or have it only show the block to those who can access the chatroom. Link to comment Share on other sites More sharing options...
Marcher Technologies Posted October 17, 2011 Share Posted October 17, 2011 Nice hook! Would it be possible for you to add permissions as to who can see this block, I'd like to disable it for guests. Or have it only show the block to those who can access the chatroom. the block? or the hook? both should be to a tee honoring the chat settings regarding this... why i saw no need to script additional options regarding it.... if this is not true i would say tis bug and ask for a closer look... but it should be honoring the chats settings.... its a port of ips code and all. Link to comment Share on other sites More sharing options...
arikbo Posted October 17, 2011 Share Posted October 17, 2011 As a guest I can see my chat sideblock on my forum while I don't have guests selected as a usergroup to use chat so if its a bug I really look forward to the fix. :) I was going to live with it but being viewable to the intended groups sounds even better. Link to comment Share on other sites More sharing options...
Marcher Technologies Posted October 17, 2011 Share Posted October 17, 2011 are either of you caching the block? Link to comment Share on other sites More sharing options...
arikbo Posted October 17, 2011 Share Posted October 17, 2011 No, no cache. Link to comment Share on other sites More sharing options...
Marcher Technologies Posted October 17, 2011 Share Posted October 17, 2011 sigh... itd have been nice if THEY(IPS) checked group access in their hook... Download the file fresh, added checks for group/secondary group access. Link to comment Share on other sites More sharing options...
arikbo Posted October 17, 2011 Share Posted October 17, 2011 You're awesome! Thank you so much, MT. Works like a charm. Link to comment Share on other sites More sharing options...
Cyrem Posted October 18, 2011 Share Posted October 18, 2011 Thanks mate! Works great now. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.