Creating Notifications for PMs and Profile Comments
#21
Doesn't show up? Copy pasted everything, adjusted code slightly since I'm not working with my root image directory, here's what I have.

<span style="float:right;">{$lang->welcome_current_time}</span>
		{$lang->welcome_back}<a href="{$mybb->settings['bburl']}/private.php" id="pm_notification">{$mybb->user['pms_unread']}</a> (<a href="{$mybb->settings['bburl']}/usercp.php"><strong>{$lang->welcome_usercp}</strong></a>{$modcplink}{$admincplink} &mdash; <a href="{$mybb->settings['bburl']}/member.php?action=logout&amp;logoutkey={$mybb->user['logoutkey']}">{$lang->welcome_logout}</a>)<br />
				<span class="links">
					<a href="#" onclick="MyBB.popupWindow('{$mybb->settings['bburl']}/misc.php?action=buddypopup', 'buddyList', 350, 350);">{$lang->welcome_open_buddy_list}</a>
				</span>
				<a href="{$mybb->settings['bburl']}/search.php?action=getnew">{$lang->welcome_newposts}</a> | <a href="{$mybb->settings['bburl']}/search.php?action=getdaily">{$lang->welcome_todaysposts}</a> | <a href="{$mybb->settings['bburl']}/private.php">{$lang->welcome_pms}</a> {$lang->welcome_pms_usage}

<script type="text/javascript">
jQuery.noConflict()
jQuery(function($) {
var pmcontents = jQuery("#pm_notification").text();
    if(pmcontents == 0){
        $("#pm_notification").hide();
    } else { return false; };
});
</script>

Fixed, I was a total idiot and forgot to change my style to my beta one...
Please don't PM me for support. Smile
Reply
#22
Hey guys, redid the JS without jQuery so it doesn't flash before being hidden.

var pm_container = document.getElementById('pm_notification');
if (pm_container.innerHTML == "0"){
	pm_container.style.display = 'none';  
} 
Reply
#23
its possible add a dropdown menu to see the separate notifications?, if i use your tutorial i only can see a link for the PMs and if the notificacion is for comments the link is always for PMs
Exclamation MyBB-Es.Com, spanish support for MyBB Wink
Reply
#24
Well, yeah, but with the amount of work involved you'd be best using euantor's notification plugin. This is for if you want a simple red box to let people know they have new stuff waiting.
Reply
#25
hello can you add this to myAlert
help please
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)