[ABD] [BETA] Active Notifications

Any abandoned Extensions will be moved to this forum.

WARNING: Extensions in this forum are not currently being supported or maintained by the original Extension author. Proceed at your own risk.
Forum rules
IMPORTANT: Extension Development Forum rules

WARNING: Extensions in this forum are not currently being supported nor updated by the original Extension author. Proceed at your own risk.
User avatar
DesignerMix
Registered User
Posts: 40
Joined: Thu Jul 17, 2014 11:03 am
Location: Russia, Belgorod

Re: [BETA] Active Notifications

Post by DesignerMix »

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 »

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: 154
Joined: Wed Jan 26, 2005 10:07 am

Re: [BETA] Active Notifications

Post by Siava »

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: 1315
Joined: Sun Jul 29, 2012 5:48 am
Name: Stanislav Atanasov

Re: [BETA] Active Notifications

Post by Satanasov »

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 »

I would like use with the bootlike theme, is possible?
Satanasov
Registered User
Posts: 1315
Joined: Sun Jul 29, 2012 5:48 am
Name: Stanislav Atanasov

Re: [BETA] Active Notifications

Post by Satanasov »

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: 677
Joined: Mon Mar 30, 2015 10:48 am

Re: [BETA] Active Notifications

Post by SalazarAG »

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: 1315
Joined: Sun Jul 29, 2012 5:48 am
Name: Stanislav Atanasov

Re: [BETA] Active Notifications

Post by Satanasov »

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 »

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 »

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 »

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: 1315
Joined: Sun Jul 29, 2012 5:48 am
Name: Stanislav Atanasov

Re: [BETA] Active Notifications

Post by Satanasov »

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: 154
Joined: Wed Jan 26, 2005 10:07 am

Re: [BETA] Active Notifications

Post by Siava »

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 »

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: 1315
Joined: Sun Jul 29, 2012 5:48 am
Name: Stanislav Atanasov

Re: [BETA] Active Notifications

Post by Satanasov »

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.

Return to “Abandoned Extensions”