[BETA] Active Notifications

A place for Extension Authors to post and receive feedback on Extensions still in development. No Extensions within this forum should be used within a live environment!
Get Involved
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: Extensions Development rules

IMPORTANT FOR NEEDED EVENTS!!!
If you need an event for your extension please read this for the steps to follow to request the event(s)
User avatar
DesignerMix
Registered User
Posts: 40
Joined: Thu Jul 17, 2014 11:03 am
Location: Russia, Belgorod
Contact:

Re: [BETA] Active Notifications

Post by DesignerMix » Tue Dec 15, 2015 11:29 am

Satanasov wrote:...
The line you need is 92 in controller/main_controller.php
...
i edit 78, 82 and 92 line from controller/main_controller.php, now it seems to be working. Thanks for yor work and advice. If found any another problem i tell about them (if it needed).
Satanasov wrote: I have this problem with routes ... this is why this extension is hardly worked on.
...
There the url is generated. It's as hackish as it can be and it is made to work in few cases ... problem is I'm not sure how to make it work in general case.
I try to help with this problem. If found any solution i let you know.

jotix
Registered User
Posts: 3
Joined: Thu Jan 28, 2016 3:07 am

Re: [BETA] Active Notifications

Post by jotix » Wed Feb 03, 2016 11:21 am

Hi!

Great app

But, You can adapt the extension to the template of my forum?
http://ricodinheiro.com

Good job ;p

User avatar
Siava
Registered User
Posts: 135
Joined: Wed Jan 26, 2005 10:07 am
Contact:

Re: [BETA] Active Notifications

Post by Siava » Wed Feb 03, 2016 12:42 pm

Satanasov wrote:Active Notifications
Nice ext!
I found that script_path is missing.

ext/anavaro/activenotifications/controller/main_controller.php

Code: Select all

$tmp['U_MARK_READ'] = $this->config['server_protocol'] . $this->config['server_name'] . '/index.php?' . $mark[1];
replace with

Code: Select all

$tmp['U_MARK_READ'] = $this->config['server_protocol'] . $this->config['server_name'] . $this->config['script_path'] . '/index.php?' . $mark[1];

Code: Select all

$tmp['URL'] = $this->config['server_protocol'] . $this->config['server_name'] . '/' . implode('/', $url);
replace with

Code: Select all

$tmp['URL'] = $this->config['server_protocol'] . $this->config['server_name'] . $this->config['script_path'] . '/' . implode('/', $url);

Satanasov
Registered User
Posts: 1180
Joined: Sun Jul 29, 2012 5:48 am
Name: Stanislav Atanasov
Contact:

Re: [BETA] Active Notifications

Post by Satanasov » Wed Feb 03, 2016 1:50 pm

Siava wrote:
Satanasov wrote:Active Notifications
Nice ext!
I found that script_path is missing.

ext/anavaro/activenotifications/controller/main_controller.php

Code: Select all

$tmp['U_MARK_READ'] = $this->config['server_protocol'] . $this->config['server_name'] . '/index.php?' . $mark[1];
replace with

Code: Select all

$tmp['U_MARK_READ'] = $this->config['server_protocol'] . $this->config['server_name'] . $this->config['script_path'] . '/index.php?' . $mark[1];

Code: Select all

$tmp['URL'] = $this->config['server_protocol'] . $this->config['server_name'] . '/' . implode('/', $url);
replace with

Code: Select all

$tmp['URL'] = $this->config['server_protocol'] . $this->config['server_name'] . $this->config['script_path'] . '/' . implode('/', $url);
I will take a look in few days - I'm working on new upload method in the gallery (want to add some beautiful upload options) ... once done I will move to fix this.
For list of all my extensions go to https://github.com/satanasov
If you want custom functions in some of my products - PM me and we will discuss it.

User avatar
asouza
Registered User
Posts: 6
Joined: Tue Jan 19, 2016 3:28 pm

Re: [BETA] Active Notifications

Post by asouza » Tue May 24, 2016 10:44 pm

I would like use with the bootlike theme, is possible?

Satanasov
Registered User
Posts: 1180
Joined: Sun Jul 29, 2012 5:48 am
Name: Stanislav Atanasov
Contact:

Re: [BETA] Active Notifications

Post by Satanasov » Wed May 25, 2016 4:35 am

asouza wrote:I would like use with the bootlike theme, is possible?
Probably, but you will have to do some manual changes.
For list of all my extensions go to https://github.com/satanasov
If you want custom functions in some of my products - PM me and we will discuss it.

User avatar
SalazarAG
Registered User
Posts: 665
Joined: Mon Mar 30, 2015 10:48 am

Re: [BETA] Active Notifications

Post by SalazarAG » Fri May 27, 2016 12:55 am

The avatar does not appear when the page does not update
Could support the canvas style?
I'm sorry for my English. Google Translator does a bad job. :D

Satanasov
Registered User
Posts: 1180
Joined: Sun Jul 29, 2012 5:48 am
Name: Stanislav Atanasov
Contact:

Re: [BETA] Active Notifications

Post by Satanasov » Sun May 29, 2016 2:58 am

SalazarAG wrote:The avatar does not appear when the page does not update
Could support the canvas style?
Nope - this extension is as simplified as possible. Just didn't add the avatar URL because it was a hacky affair.
For list of all my extensions go to https://github.com/satanasov
If you want custom functions in some of my products - PM me and we will discuss it.

voom
Registered User
Posts: 59
Joined: Tue Mar 22, 2016 1:31 am

Re: [BETA] Active Notifications

Post by voom » Wed Aug 17, 2016 10:48 pm

Hi! I adapted the ext to work with Comboot Bootstrap-Theme. Though that is not completely true, because only the update of the unread.toString() to the title worked at all and I added a little badge to show the unread notifications count to the forum with a link to reload page - instead of trying to update the whole notifications with the known drawbacks. I figured it be enough to know there are new messages and add another click to reload and then open the original notifications.

However - now my problem, wich is probably not related to my changes at all: when the extension is running while I am idle at the forum, after a while I get logged out. This happens all the time, but only after a long idle time. Still it breaks the extensions functionality because when logged out no more notifications are show, while it looks like I am still logged in. Is this a known issue and if yes, can that be fixed?

Anonther question: I saw the pull request at Github and also the same report here in the forum about the path in main_controller.php I applied that change to the code but it broke the extension. What is that suggested change supposed to fix? viewtopic.php?p=14338421#p14338421

voom
Registered User
Posts: 59
Joined: Tue Mar 22, 2016 1:31 am

Re: [BETA] Active Notifications

Post by voom » Wed Aug 17, 2016 11:10 pm

Here is the function I changed, everything else is as found on github....

Code: Select all

function parse(response)
	{
		var unread = response.unread;
		var notifs = response.notifs;
		var output = '';

		// Generate Unread-Badge (_ki)
		if (unread > 0)
		{
		$('#update_ki').html(function(n){
            return "<a class='badge' title='Es gibt " + unread.toString() + " ungelesene Benachrichtigung(en), hier klicken um diese Seite neu zu laden' href='#' onClick='window.location.reload();return false;'>" + unread.toString() + "</a>";
        });
		}
		// Now let's set window title
		if (unread > 0)
		{
			var docTitleWithNote;
			docTitleWithNote = '(' + unread.toString() + ')' + docTitle;
			document.title = docTitleWithNote;
		}
		else
		{
			var docTitleWithNote;
			docTitleWithNote = docTitle;
			document.title = docTitleWithNote;
		}
	}
#update_ki is an empty div placed in a fixed position in the forum. The above content is delivered to that div if there are unread notifications and shows their amount in the badge and the title-text for the mouseover.

voom
Registered User
Posts: 59
Joined: Tue Mar 22, 2016 1:31 am

Re: [BETA] Active Notifications

Post by voom » Thu Aug 18, 2016 3:22 pm

voom wrote:However - now my problem, wich is probably not related to my changes at all: when the extension is running while I am idle at the forum, after a while I get logged out. This happens all the time, but only after a long idle time. Still it breaks the extensions functionality because when logged out no more notifications are show, while it looks like I am still logged in. Is this a known issue and if yes, can that be fixed?
It makes sense, that this has to do with the cookies-part of the ext. Would it maybe help to create a completely unique cookie-name instead of adding a suffix to the phpbb-cookie-name? (From looking at the code it seems that is how it is done...)

Satanasov
Registered User
Posts: 1180
Joined: Sun Jul 29, 2012 5:48 am
Name: Stanislav Atanasov
Contact:

Re: [BETA] Active Notifications

Post by Satanasov » Thu Aug 18, 2016 6:15 pm

I will surely try this, but I don't think this is related ...

Do you have any idea how long does it take to log you off?

----

I've pushed a small patch that I think will do the trick ... but still not sure.
For list of all my extensions go to https://github.com/satanasov
If you want custom functions in some of my products - PM me and we will discuss it.

User avatar
Siava
Registered User
Posts: 135
Joined: Wed Jan 26, 2005 10:07 am
Contact:

Re: [BETA] Active Notifications

Post by Siava » Fri Aug 26, 2016 9:39 pm

All ajax/active notifications empties auto-login cookie on my forum after few hours or few days. Without this extension auto-login cookie works fine. :?

voom
Registered User
Posts: 59
Joined: Tue Mar 22, 2016 1:31 am

Re: [BETA] Active Notifications

Post by voom » Mon Aug 29, 2016 5:24 pm

Satanasov wrote:Do you have any idea how long does it take to log you off?
Same as:
Siava wrote:All ajax/active notifications empties auto-login cookie on my forum after few hours or few days. Without this extension auto-login cookie works fine. :?
"few hours to a few days"

It seems the longer someone has the forum-page open the faster they get logged out. Esp. the chatters where confronted with the issue most frequently.
Satanasov wrote:I've pushed a small patch that I think will do the trick ... but still not sure.
I cannot test anymore because I had to find a quick solution. So I switched to "tas2580/ajaxnotification" that one does not work with cookies. I reduced the reload frequency to 360sec to lower serverload. I believe not many people in our forum leave more than one window open and if some do with the setting of 6 minutes it is more than balanced.

With either ext I also took out the refresh of the notifications themselves - there is only a little badge to show new messages and users have to reload the page themselves.

What I tried to accomplish though, but did not succeed, was this: the original notification count would be updated and on opening the notifications modal the page would be reloaded and the modal shown. I mention this because it might be an alternative approach to get around all those issues with notifications layout, avatars etc. Also I suppose only retrieving the count instead of building the notification content every time even when not needed would reduce serverload quite a bit.

Satanasov
Registered User
Posts: 1180
Joined: Sun Jul 29, 2012 5:48 am
Name: Stanislav Atanasov
Contact:

Re: [BETA] Active Notifications

Post by Satanasov » Wed Nov 30, 2016 2:16 pm

Hello everybody ... I forgot to mention that there is new version of the extension. More stable.

Client side is rewritten by Kasimi

The extension is more stable and most of the bugs are out ... all of the reported that is ... Update and enjoy ...
For list of all my extensions go to https://github.com/satanasov
If you want custom functions in some of my products - PM me and we will discuss it.

Post Reply

Return to “Extensions in Development”