MyBB Community Forums

Full Version: MyAlerts
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
It's very hard to just give you the code. You have to style it to look like your theme. Plus, this isn't a support thread for SimpleLikes.
If I put this inline with the search, memberlist and help inside that <ol> it messes up the display of the alerts.

I am not real good at the CSS side of things, but assume it is inheriting its style from the parent <ol>??

Is anyone able to help with this? I would love to have the alerts up there as they stand out more.
(2013-05-27, 07:45 PM)Euan T Wrote: [ -> ]It's very hard to just give you the code. You have to style it to look like your theme. Plus, this isn't a support thread for SimpleLikes.

yea i know that but i cannot register to your forum seems email confirmation not work
(2013-05-28, 02:45 AM)Dannymh Wrote: [ -> ]If I put this inline with the search, memberlist and help inside that <ol> it messes up the display of the alerts.

I am not real good at the CSS side of things, but assume it is inheriting its style from the parent <ol>??

Is anyone able to help with this? I would love to have the alerts up there as they stand out more.

Yeah, it will likely be inheriting. If you PM me some temporary admin details, I could take a look for you? It's much easier to fix that way Smile

(2013-05-28, 07:36 AM)mostarac Wrote: [ -> ]
(2013-05-27, 07:45 PM)Euan T Wrote: [ -> ]It's very hard to just give you the code. You have to style it to look like your theme. Plus, this isn't a support thread for SimpleLikes.

yea i know that but i cannot register to your forum seems email confirmation not work

Just manually activated the user "mostarac" Smile
Euan I have moved it for now. I will set you up some temp admin soon. We were hacked last week so very testy about security at the moment Smile
Completely understandable Smile
nightmare recovery, hacked the morning of my daughters second birthday was informed whilst on the road to Australia Zoo, had to work some magic with my mobile to save what I could, I had a backup from the night before but didn't want to run with that.

Anyway I am pretty sure it is inheritence I just don't know how to fix that, I will set it all back there tomorrow and then set you up an account
Ok, no problem at all. It's almost certainly inheritance. COuld possibly be fixed with a few !importants, but each theme is different.
Hi @Shade

I tried changing the js file as suggested but then the notification link doesn't work at all!

Eco

(2013-05-01, 08:46 AM)Shade Wrote: [ -> ]If anyone's interested in modifying the popup menu's animations, here's a catchy "tooltip" effect which elegantly moves the popup from high to bottom with fading animations. Replace your myalerts.js file with:

jQuery.noConflict();

jQuery(document).ready(function($)
{
	$('body').on({
		click: function(event)
		{
			event.preventDefault();
			var popup_id = $(this).attr('id') + '_popup';
			
			var state = $(this).data('state');
			
			switch(state) {
				case 1:
				case undefined:
					$('#' + popup_id).attr("top", $(this).height() + 'px').animate({opacity: 'toggle', marginTop: "+=15px"}, 400, 'easeInOutQuint', function() {
						var toMarkRead = new Array;
						$('[id^="alert_row_popup_"]').each(function() {
							toMarkRead.push($(this).attr('id').substr(16));
						});
		
						$.get('xmlhttp.php?action=markRead', {
							my_post_key: my_post_key,
							toMarkRead: toMarkRead
						}, function(data) {
		
						});
					});
					$(this).data("state", 2);
					break;
				case 2:
					$('#' + popup_id).animate({opacity: 'toggle', marginTop: "-=15px"}, 400, 'easeInOutQuint');
					$(this).data("state", 1);
					break;
			}
			return false;
		}
	}, '.myalerts_popup_hook');

	$('.myalerts_popup *').on('click', function(event) {
		event.stopPropagation();
	});

	$("body:not('.myalerts_popup:visible')").on('click', function() {
   		$('.myalerts_popup:visible').animate({opacity: 'toggle', marginTop: "-=15px"}, 400, 'easeInOutQuint', function() {
			$(".myalerts_popup_hook").data('state', 1);
		});
	});

	$('#getUnreadAlerts').on('click', function(event) {
		event.preventDefault();
		$.get('xmlhttp.php?action=getNewAlerts', function(data) {
			$('#latestAlertsListing').prepend(data);
		});
	});

	$('.deleteAlertButton').on('click', function(event) {
		event.preventDefault();
		var deleteButton = $(this);

		$.getJSON(deleteButton.attr('href'), {accessMethod: 'js'}, function(data) {
			if (data['success'])
			{
				deleteButton.parents('tr').get(0).remove();
				if (data['template'])
				{
					$('#latestAlertsListing').html(data['template']);
				}
			}
			else
			{
				alert(data['error']);
			}
		});
	});

	if (typeof myalerts_autorefresh !== 'undefined' && myalerts_autorefresh > 0)
	{
		window.setInterval(function() {
			$.get('xmlhttp.php?action=getNewAlerts', function(data) {
				$('#latestAlertsListing').prepend(data);
			});
		}, myalerts_autorefresh * 1000);
	}

	if (typeof unreadAlerts !== 'undefined' && unreadAlerts > 0)
	{
		document.title = document.title + ' (' + unreadAlerts + ')';
	}

});
Check out the classes of the link, sounds like the class "myalerts_popup_hook" is missing if it isn't fired.