News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

ENotify

Started by SMFHacks.com Team, October 18, 2009, 04:40:06 PM

Previous topic - Next topic

Jorge_CS_


Jorge_CS_

This mod is not working fine in SMF 1.1.13

Let's say there are 3 users, A, B and C.

Everyone wrote something in one particular topic, then A answer to this topic but only one of the others can see the notification, once its viewed by B, C will not see it. :(

DHC

Quote from: purplepaisley68 on January 03, 2011, 02:57:53 PM
Of course I have a few members who don't like it so I've added a Profile option to disable it.

Profile.template.php, find:

</tr><tr>
<td colspan="2">
<input type="hidden" name="default_options[view_newest_pm_first]" value="0" />
<label for="view_newest_pm_first"><input type="checkbox" name="default_options[view_newest_pm_first]" id="view_newest_pm_first" value="1"', !empty($context['member']['options']['view_newest_pm_first']) ? ' checked="checked"' : '', ' class="check" /> ', $txt['recent_pms_at_top'], '</label>
</td>


Add after:

</tr><tr>
<td colspan="2"><label for="profile_enotify_disable">Enotifications</label>
<select name="default_options[profile_enotify_disable]" id="profile_enotify_disable">
<option value="0"', empty($context['member']['options']['profile_enotify_disable']) ? ' selected="selected"' : '', '>Enabled</option>
<option value="1"', !empty($context['member']['options']['profile_enotify_disable']) ? ' selected="selected"' : '', '>Disabled</option>
</select>
</td>


And in Load.php, find:

// enotify
global $settings, $modSettings, $scripturl;

$context['html_headers'] .=  '
<link rel="stylesheet" type="text/css" href="' . $settings['default_theme_url'] . '/jquery.jgrowl.css" />
<script type="text/javascript" src="' . $settings['default_theme_url'] . '/enotify.js"></script>
<script type="text/javascript">
jQuery.noConflict();
(function($){
$(document).ready(function(){
        $.getJSON("' . $scripturl . '?action=enotify",
                function(data){
                  $.each(data.items, function(i,item){
                    $.jGrowl(item.message, { header: item.title, life: ' . $modSettings['enotify_life'] . ' });
                  });
                });
setInterval( function() {
          $.getJSON("' . $scripturl . '?action=enotify",
                  function(data){
                    $.each(data.items, function(i,item){
                      $.jGrowl(item.message, { header: item.title, life: ' . $modSettings['enotify_life'] . ' });
                    });
                  });
} , ' . $modSettings['enotify_refresh'] . ' );
});
})(jQuery);
</script>';
//end enotify


Replace with:

// enotify
global $settings, $modSettings, $scripturl, $options;
$options['profile_enotify_disable'] = !isset($options['profile_enotify_disable']) ? 0 : $options['profile_enotify_disable'];
if ($options['profile_enotify_disable'] == 0):
$context['html_headers'] .=  '
<link rel="stylesheet" type="text/css" href="' . $settings['default_theme_url'] . '/jquery.jgrowl.css" />
<script type="text/javascript" src="' . $settings['default_theme_url'] . '/enotify.js"></script>
<script type="text/javascript">
jQuery.noConflict();
(function($){
$(document).ready(function(){
        $.getJSON("' . $scripturl . '?action=enotify",
                function(data){
                  $.each(data.items, function(i,item){
                    $.jGrowl(item.message, { header: item.title, life: ' . $modSettings['enotify_life'] . ' });
                  });
                });
setInterval( function() {
          $.getJSON("' . $scripturl . '?action=enotify",
                  function(data){
                    $.each(data.items, function(i,item){
                      $.jGrowl(item.message, { header: item.title, life: ' . $modSettings['enotify_life'] . ' });
                    });
                  });
} , ' . $modSettings['enotify_refresh'] . ' );
});
})(jQuery);
</script>';
    endif;
//end enotify


There's probably a better way than using the $options as a global.
Edited to correct undefined index.

Which version does this apply to?

Can the ability for each user to enable/disable ENotify be made available for RC5?

Jorge D. Fuentes

The members of my forum have brought up to my attention some issues similar, if not identical, to the questions/comments people are posing.

Because of this, I've decided to remove eNotify... except I can't.  It gives me a failure to remove a few key files (I think I mentioned it before).
Can anyone help me remove this?  I'm on SMF 1.1.13. :)

ms_ukyankee

SMF since 2004 <3


Biology Forums

Is there a way of putting the (X) [Closed notifications] as the first thing that pops up and then everything else follows? Currently it's the opposite way around 

Jorge D. Fuentes

No response, huh...
I don't know what to do.  I really need to get this thing uninstalled, but I don't want to wreck my forum because of it.
If anyone knows what modifications I need to do to remove the error here:
4.    Execute Modification    ./Sources/ModSettings.php    Test failed
please let me know.

OnlineFunCorner

hy
nice mod
but why my users getting again and again same notification
sometimes me got the notification of 6 months old reply of post
plz help

PLAYBOY

Quote from: Dr.IT on May 25, 2011, 10:35:36 AM
hy
nice mod
but why my users getting again and again same notification
sometimes me got the notification of 6 months old reply of post
plz help

Same problem here.

ms_ukyankee

It would be my guess that for some reason those old posts are still marked as unread in the database because this mod checks that, does anyone try Mark All Posts Read? Are those posts being notified for appearing in the unread posts page? Typically when my users have read/unread issues I tell them to delete their cookies, mark all posts as read, and it fixes the problem. If not that, then try check/repairs on the database.
SMF since 2004 <3

PLAYBOY

most of My members including me dont really use that button. So that may be the problem i donno. But it is definetely a wierd problem.

Gryzor

Hello,

I just found out that, with the mod installed login is not working perfectly. Enotify's is the only modification that I see in /sources/LogInOut.php, that's why I think it's the mod's fault.

What happens is that after logging in the user is not redirected to the last page he was reading (HTTP referral) but instead goes to the forum's main page...

Any help?

Thanks!

vbgamer45

Quote from: Gryzor on June 07, 2011, 06:25:21 AM
Hello,

I just found out that, with the mod installed login is not working perfectly. Enotify's is the only modification that I see in /sources/LogInOut.php, that's why I think it's the mod's fault.

What happens is that after logging in the user is not redirected to the last page he was reading (HTTP referral) but instead goes to the forum's main page...

Any help?

Thanks!
Posted an update let me know if it helps
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

MissyNL

Nice :)

does the member also have option to enable / disable?

I can imagine that the member would like to have notification for the email... but maybe not for the forum part..
Sorry for my poor English, but i think it's probably better then your Dutch :)

vbgamer45

Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Gryzor

Quote from: vbgamer45 on June 07, 2011, 06:53:59 AM
Quote from: Gryzor on June 07, 2011, 06:25:21 AM
Hello,

I just found out that, with the mod installed login is not working perfectly. Enotify's is the only modification that I see in /sources/LogInOut.php, that's why I think it's the mod's fault.

What happens is that after logging in the user is not redirected to the last page he was reading (HTTP referral) but instead goes to the forum's main page...

Any help?

Thanks!
Posted an update let me know if it helps

That was fast!!

Could you tell me what change you did so I can do it manually? Thanks!!

vbgamer45

Made a change to Subs.php check the file .xml file for details
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Gryzor

Quote from: vbgamer45 on June 07, 2011, 09:44:28 AM
Made a change to Subs.php check the file .xml file for details

I guess the change is action=viewsmfile-->action=entofiy so that the "remember URL' section reads:


// Remember this URL in case someone doesn't like sending HTTP_REFERER.
if (strpos($_SERVER['REQUEST_URL'], 'action=dlattach') === false && strpos($_SERVER['REQUEST_URL'], 'action=entofiy') === false
$_SESSION['old_url'] = $_SERVER['REQUEST_URL'];


Is this a typo? But even correcting entofiy to enotify makes my forum unable to load... can anyone else confirm?

Jorge_CS_

What about the other issues? Are you planning to fix them?

Advertisement: