Notice

The forum is in read only mode.

Support Forum

Welcome! Support Forums have been reactivated
Welcome the Technical Support section. Help us in assisting you by providing us with a concise and descriptive elaboration of your issues. Be specific and if possible, provide us with a step-by-step instruction in replicating your problem.

Mod_notify show amount / numbers only when there is a notification

12 years 3 months ago
  • Tahir's Avatar
    Topic Author
  • Tahir
  • Offline
  • Fresh Boarder
  • Posts: 48
  • Thank you received: 2
Licenses:
JomSocial Expired

Hi.

I found this topic: www.jomsocial.com/forum/modules-plugins-...-when-not-zero#65675

I need the same solution and used the method mentioned in the topic above.

When i make the changes, the notification (0) numbers disappear. But when a notification comes in only my browser page heading and the address bar shows a (1) to let you know there is a new notification but the mod_notify don't shows me any notification until i refresh the page. *EDIT: I tested this with Mac OS Chrome, Firefox and Safari. Safari works very well but chrome and firefox need a page refresh to show the notification in the mod_notify module.

And after i clicked on the notification the notification should disappear, right? It doesn't disappear at all, it just changes the number from "1" to "0" and the blue bg of the number is there again. (This happens with all browsers but i don't have the chance to test with Internet Explorer)

Modified File: modules/mod_notify/tmpl/default.php
(Im pasting the code starting from line 46 to the end of the file.)

Original File:

<div id="cModule-Notify" class="cMods cMods-Notify<?php echo $params->get('moduleclass_sfx'); ?>">
	<div class="cMod-Notify">
		<?php if($show_global_notification ) : ?>
		<a href="javascript:joms.notifications.showWindow();" class="joms-module-global-notif" title="<?php echo JText::_('COM_COMMUNITY_NOTIFICATIONS_GLOBAL');?>">
			<i class="tool-icon-notification"></i>
			<span class="notifcount">
			<?php
			if ($newEventInviteCount) {
				echo $newEventInviteCount;
			} else {
				echo "0";
			}
			?>
			</span class="notifcount">
		</a>
		<?php endif; ?>

		<?php if($show_friend_request ) : ?>
		<a href="<?php echo CRoute::_('index.php?option=com_community&view=friends&task=pending');?>" onclick="joms.notifications.showRequest();return false;" class="joms-module-friend-invite-notif" title="<?php echo JText::_( 'COM_COMMUNITY_NOTIFICATIONS_INVITE_FRIENDS' );?>">
			<i class="tool-icon-friend"></i>
			<span class="notifcount">
			<?php
				if ($newFriendInviteCount)
				{
					echo $newFriendInviteCount;
				} else {
					echo "0";
				}
			?>
			</span class="notifcount">
		</a>
		<?php endif; ?>
		<?php if($enable_private_message ) : ?>
		<a href="<?php echo CRoute::_('index.php?option=com_community&view=inbox');?>" class="joms-module-new-message-notif" onclick="joms.notifications.showInbox();return false;" title="<?php echo JText::_( 'COM_COMMUNITY_NOTIFICATIONS_INBOX' );?>">
			<i class="tool-icon-inbox"></i>
			<span class="notifcount">
			<?php
				if ($newMessageCount)
				{
					echo $newMessageCount;
				} else {
					echo "0";
				}
			?>
			</span class="notifcount">
		</a>
		<?php endif; ?>
	</div>
</div>
<?php
	}
?>

Modified File:
<div id="cModule-Notify" class="cMods cMods-Notify<?php echo $params->get('moduleclass_sfx'); ?>">
	<div class="cMod-Notify">
		<?php if($show_global_notification ) : ?>
		<a href="javascript:joms.notifications.showWindow();" class="joms-module-global-notif" title="<?php echo JText::_('COM_COMMUNITY_NOTIFICATIONS_GLOBAL');?>">
			<i class="tool-icon-notification"></i>
<?php 
			if ($newEventInviteCount) { 
				echo '<span class="notifcount">';
				echo $newEventInviteCount;
				echo '</span></a>';
			} else { 
			} 
			?>
		</a>
		<?php endif; ?>

		<?php if($show_friend_request ) : ?>
		<a href="<?php echo CRoute::_('index.php?option=com_community&view=friends&task=pending');?>" onclick="joms.notifications.showRequest();return false;" class="joms-module-friend-invite-notif" title="<?php echo JText::_( 'COM_COMMUNITY_NOTIFICATIONS_INVITE_FRIENDS' );?>">
			<i class="tool-icon-friend"></i>
<?php
				if ($newFriendInviteCount) {
				    echo '<span class="notifcount">';
					echo $newFriendInviteCount;
					echo '</span></a>';
				} else {
				}
			?>
		</a>
		<?php endif; ?>
		<?php if($enable_private_message ) : ?>
		<a href="<?php echo CRoute::_('index.php?option=com_community&view=inbox');?>" class="joms-module-new-message-notif" onclick="joms.notifications.showInbox();return false;" title="<?php echo JText::_( 'COM_COMMUNITY_NOTIFICATIONS_INBOX' );?>">
			<i class="tool-icon-inbox"></i>
<?php
				if ($newMessageCount) {
				    echo '<span class="notifcount">';
					echo $newMessageCount;
					echo '</span></a>';
				} else {
				}
			?>
		</a>
		<?php endif; ?>
	</div>
</div>
<?php
	}
?>

Thanks in advance...

12 years 3 months ago
Licenses:

Hi, Tahir.

Please provide us with working administrator credentials.
I can't login to your site.
Please, edit your first post and add credentials to corresponding fields.


- Instead of saying: 'it's not working', explain the problem in detail.
- Screenshots with the URL visible in them and the problem marked are more than welcome.
- Tell us how to replicate the problem, we can't fix it if we can't find it.
- Make sure that your site/server meets JomSocial System Requirements
- Make sure to setup JomSocial Cron Job
- Always provide us with access details to the backend and ftp. We need it to debug problems.
- If you have a similar problem, but a solution you found isn't working, open a new thread instead of 'merging' with an existing one.

- Use the "Thank You" feature on any post that helped you
12 years 3 months ago
  • Tahir's Avatar
    Topic Author
  • Tahir
  • Offline
  • Fresh Boarder
  • Posts: 48
  • Thank you received: 2
Licenses:
JomSocial Expired

Hi Michal.

I have edited the admin credentials and also have added some new info after further testings.

Take a look.

Thanks.

12 years 3 months ago
Licenses:

Hi, Tahir.

Solution provided in thread you linked applied to previous versions. In JomSocial 3.2.0.7 we introduced real time notifications. So changing this code could damage that feature.

Roll back changes and maybe try to remove 0 so it should look like echo ''


- Instead of saying: 'it's not working', explain the problem in detail.
- Screenshots with the URL visible in them and the problem marked are more than welcome.
- Tell us how to replicate the problem, we can't fix it if we can't find it.
- Make sure that your site/server meets JomSocial System Requirements
- Make sure to setup JomSocial Cron Job
- Always provide us with access details to the backend and ftp. We need it to debug problems.
- If you have a similar problem, but a solution you found isn't working, open a new thread instead of 'merging' with an existing one.

- Use the "Thank You" feature on any post that helped you
12 years 3 months ago
  • Tahir's Avatar
    Topic Author
  • Tahir
  • Offline
  • Fresh Boarder
  • Posts: 48
  • Thank you received: 2
Licenses:
JomSocial Expired

I rolled back all modifications and tried to remove the zero (0) but the zero's are still visible in the module :(
I was so close to my goal with the solution for the previous version.

Is there any other way i can do this? In my opinion it is so illogical that there is a zero and also the color (blue by default) even if theres no notification at all. I will definately make a feature request for that, but its very difficult to wait for that feature as far its get accepted.

Did you checked my site? Do you have any idea or whatever?!?

Thanks in advance...

12 years 3 months ago
Licenses:

Hi, Tahir.

It seems that real time notification apply only to toolbar and not to Notify module... but I wait for develoepr response.
I'll update you ASAP.


- Instead of saying: 'it's not working', explain the problem in detail.
- Screenshots with the URL visible in them and the problem marked are more than welcome.
- Tell us how to replicate the problem, we can't fix it if we can't find it.
- Make sure that your site/server meets JomSocial System Requirements
- Make sure to setup JomSocial Cron Job
- Always provide us with access details to the backend and ftp. We need it to debug problems.
- If you have a similar problem, but a solution you found isn't working, open a new thread instead of 'merging' with an existing one.

- Use the "Thank You" feature on any post that helped you
12 years 3 months ago
  • Tahir's Avatar
    Topic Author
  • Tahir
  • Offline
  • Fresh Boarder
  • Posts: 48
  • Thank you received: 2
Licenses:
JomSocial Expired

Hi Michal.

The real time notifications work very well in the mod_notify the only one problem is when i modify the default.php like before than i got 2 problems with the module.

1. When new notification comes in only the browser recognize it but the module doesn't change, no numbers are shown.
(On my MacBook this only happens with Chrome and Firefox. Safari has no problems at all. Cant test Internet Explorer)
2. When new notification comes in and you click on the notification a small popup opens and shows you the activity and after closing window the numbers should disappear again but instead the 0 comes back again.

So i hope we can do something with this.

Thanks for the support. I really appreciate it.

12 years 3 months ago
Licenses:

Hi, Tahir.

I talked w js developer. Real time notification works based on ajax and script needs a value to change it. So this modification can't be done as it will break real time notification feature in some browsers.

There could be solution for this... but unfortunately paid and future one. Socialize template has JomSocial toolbar that now is independent. In next few days we'll update it so it will have also a real time notification. Then with small customization it could replace Notify module... but probably this solution is unacceptable...

Well, then only professional developer could help you: www.jomsocial.com/jomsocial-developers


- Instead of saying: 'it's not working', explain the problem in detail.
- Screenshots with the URL visible in them and the problem marked are more than welcome.
- Tell us how to replicate the problem, we can't fix it if we can't find it.
- Make sure that your site/server meets JomSocial System Requirements
- Make sure to setup JomSocial Cron Job
- Always provide us with access details to the backend and ftp. We need it to debug problems.
- If you have a similar problem, but a solution you found isn't working, open a new thread instead of 'merging' with an existing one.

- Use the "Thank You" feature on any post that helped you
12 years 3 months ago
  • Tahir's Avatar
    Topic Author
  • Tahir
  • Offline
  • Fresh Boarder
  • Posts: 48
  • Thank you received: 2
Licenses:
JomSocial Expired

Hi Michal.

You name it a Jomsocial Developer but they look like normal freelancers. Right?
How i can know that the person is really qualified for the task?
How easy or difficult is this task for a developer?

Cant you recommend me a developer who is a good programmer and also knows Jomsocial really good? That would be easy for me and i think i will need this kind of modifications from time to time. Would be nice to know some developers instead looking in a huge directory!?!? I am very low in time.

Can you give me some informations about where to look for that specific files for the modifications you talked about?

I really like jomsocial but there are a lot of things which look a little bit pitty. I will work on it since it is what we need. I appreciate any Developer recommendation.

Thanks.

12 years 3 months ago
  • Tahir's Avatar
    Topic Author
  • Tahir
  • Offline
  • Fresh Boarder
  • Posts: 48
  • Thank you received: 2
Licenses:
JomSocial Expired

No reply?

12 years 3 months ago
  • Tahir's Avatar
    Topic Author
  • Tahir
  • Offline
  • Fresh Boarder
  • Posts: 48
  • Thank you received: 2
Licenses:
JomSocial Expired

Hey Michal, still alive?

12 years 3 months ago
Licenses:

Hi, Tahir.

I'm sorry, I had few days off.

I can't recommend you a developer by name. We can't favor any of them. Just look how many stars they have, how many reviews.

File I mentioned is located here: ROOT/components/com_community/assets/_source/js/utils/ajax.js and in Azrul plugin in plugins folder.

Well, any site is specific and we receive a lot different - even contrary - request to change JomSocial look and work like... It's still an open source so can by modified by any users that has programming skills or by hired developer. So our policy is not to develop on demand or do any customizations. JomSocial is delivered as it is and any customizations are user concern.

Users can post their feature requests here: uservoice.jomsocial.com/forums/101561-feature-request
Or post suggestions here: www.jomsocial.com/community/groups/viewg...stions-for-the-staff


- Instead of saying: 'it's not working', explain the problem in detail.
- Screenshots with the URL visible in them and the problem marked are more than welcome.
- Tell us how to replicate the problem, we can't fix it if we can't find it.
- Make sure that your site/server meets JomSocial System Requirements
- Make sure to setup JomSocial Cron Job
- Always provide us with access details to the backend and ftp. We need it to debug problems.
- If you have a similar problem, but a solution you found isn't working, open a new thread instead of 'merging' with an existing one.

- Use the "Thank You" feature on any post that helped you
12 years 3 months ago
  • Tahir's Avatar
    Topic Author
  • Tahir
  • Offline
  • Fresh Boarder
  • Posts: 48
  • Thank you received: 2
Licenses:
JomSocial Expired

Hey Michal,

It's me again ;)

I just updated my site to the 3.2.1.1 and recognized that the notifications in the jomsocial toolbar is now exactly how i need it. But the mod_notify module is still old school. So my problem would be fixed and i would be 100% satisfied and happy if i could have the same notifications style in mod_notify. Isn't that planned for the module? Or is the module fixed too but i have done something wrong?
Logicaly the notifications in mod_notify should be like the same as in the toolbar right?!?

Can you give me some information about that?

12 years 3 months ago
Licenses:

Hi, Tahir.

I'm in charge of Socialzie template product so any changes requested here I can approve.. or not.
This one was introduced in latest version after user requests.

Module "Notify" is beyond my authority so you need to post a feature request here:
uservoice.jomsocial.com/forums/101561-feature-request
www.jomsocial.com/community/groups/viewg...stions-for-the-staff


- Instead of saying: 'it's not working', explain the problem in detail.
- Screenshots with the URL visible in them and the problem marked are more than welcome.
- Tell us how to replicate the problem, we can't fix it if we can't find it.
- Make sure that your site/server meets JomSocial System Requirements
- Make sure to setup JomSocial Cron Job
- Always provide us with access details to the backend and ftp. We need it to debug problems.
- If you have a similar problem, but a solution you found isn't working, open a new thread instead of 'merging' with an existing one.

- Use the "Thank You" feature on any post that helped you
Moderators: Piotr Garasiński
Powered by Kunena Forum

Join 180,000 websites creating Amazing communities

JomSocial is the most complete, easy-to-use addon that turns Joomla CMS into a
full -fledged, social networking site

TRY NOW BUY NOW