Jump to content

"Who's Chatting" Sidebar Hook+Blocks


Nuclear General

Recommended Posts

%7Boption%7D



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


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



post-104108-0-85838300-1315929974_thumb.

And when I put the hook's code, I have this :



post-104108-0-61402800-1315930001_thumb.

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

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

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

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


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


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

  • 3 weeks later...

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


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

  • 2 weeks later...

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

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

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...