Ajax chat on all pages. [phpbb 3.2.x]

User avatar
Ax.
Registered User
Posts: 3
Joined: Tue Feb 02, 2016 11:58 am
Flag: Senegal

Ajax chat on all pages. [phpbb 3.2.x]

Post by Ax. »

Hey everyone,

I did little modification (most html and css) to have sidebar chat available for all pages inside board, but i was unable to make it work on some pages, including ucp, posting, search, etc.. Can someone help me, what part of code do i need to edit inside listener.php and core.php to make chat working on other pages.

I added chat to overall_header's EVENT, so it renders on all pages, but it's not working on some of them (index and viewforum is working).

Thanks for help!


User avatar
spaceace
Site Owner
Posts: 991
Joined: Wed Dec 16, 2009 8:30 pm
Location: Ontario, Canada
Flag: Canada

Re: Ajax chat on all pages. [phpbb 3.2.x]

Post by spaceace »

my chat extension uses core events within phpBB. some phpBB pages do not use those events. the events being used in the listener are the following
Code: Select all
	/**
	 * Decides what listener to use
	 *
	 * @return array
	 */
	static public function getSubscribedEvents()
	{
		return array(
			'core.viewonline_overwrite_location'		=> 'add_page_viewonline',
			'core.page_header'							=> 'page_header',
			'core.permissions'							=> 'add_permission',
			'core.index_modify_page_title'				=> 'index',
			'core.viewforum_get_topic_data'				=> 'index',
			'core.viewtopic_before_f_read_check'		=> 'index',
			'core.posting_modify_submit_post_after'		=> 'add_forum_id',
			'core.acp_users_prefs_modify_data'			=> 'acp_users_chat_settings_get', // For the ACP user setting
			'core.acp_users_prefs_modify_template_data'	=> 'acp_profile_ajax_chat_template', // For the ACP user setting
			'core.acp_users_prefs_modify_sql'			=> 'ucp_profile_ajax_chat_set', // For the ACP user setting
		);
	}
that said, right now, i do not remember where all those events are located in the core phpBB files. but it takes all 10 to make chat work properly.

it already has ACP options to use chat in the forum and topic view pages
Last edited by spaceace on Mon Oct 01, 2018 11:12 am, edited 1 time in total.
if you like my work and would like to contribute to my development of styles, please donate by using the donate button in the header.

Image

Need hosting? Click this text to check out ICDSOFT

User avatar
Ax.
Registered User
Posts: 3
Joined: Tue Feb 02, 2016 11:58 am
Flag: Senegal

Re: Ajax chat on all pages. [phpbb 3.2.x]

Post by Ax. »

Heyy spaceace,

Thanks for reply. Now you clarify things for me. Can you help me, or just guide how to add those events for Posting page and UCP pages?

User avatar
Ax.
Registered User
Posts: 3
Joined: Tue Feb 02, 2016 11:58 am
Flag: Senegal

Re: Ajax chat on all pages. [phpbb 3.2.x]

Post by Ax. »

Sorry for double post. I added those two, and they are working fine for me:
Code: Select all
'core.memberlist_view_profile'	=> 'index',
'core.posting_modify_post_data' => 'index',
I just could not figure it out for "UCP" pages. There are a lot hook events for ucp from list Event List

User avatar
spaceace
Site Owner
Posts: 991
Joined: Wed Dec 16, 2009 8:30 pm
Location: Ontario, Canada
Flag: Canada

Re: Ajax chat on all pages. [phpbb 3.2.x]

Post by spaceace »

Ax. wrote:
Tue Oct 02, 2018 4:48 pm
Sorry for double post. I added those two, and they are working fine for me:
Code: Select all
'core.memberlist_view_profile'	=> 'index',
'core.posting_modify_post_data' => 'index',
I just could not figure it out for "UCP" pages. There are a lot hook events for ucp from list Event List
sorry for such a late reply...

the UCP can be tricky but i will look into it when i get a chance ;)
if you like my work and would like to contribute to my development of styles, please donate by using the donate button in the header.

Image

Need hosting? Click this text to check out ICDSOFT