The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

New messages link

View previous topic View next topic Go down

Solved New messages link

Post by Niko on Sun 22 Apr - 12:57

Hello,I created an extra navbar... And I want to change the "mailbox link" when I receive new messages...I know this problem was posted on this forum many times but i can't find it...please, Help me...Thanks


Last edited by Niko! on Fri 4 May - 14:56; edited 3 times in total
avatar
Niko
Hyperactive

Male Posts : 2298
Reputation : 98
Language : English, French, Italian, Spanish, Latin

Back to top Go down

Solved Re: New messages link

Post by Niko on Sun 22 Apr - 14:56

I want to have You have no new messages and You have Xnew messages with a customized navbar in templates... (:
avatar
Niko
Hyperactive

Male Posts : 2298
Reputation : 98
Language : English, French, Italian, Spanish, Latin

Back to top Go down

Solved Re: New messages link

Post by LGforum on Sun 22 Apr - 16:06

[Have you removed the old navbar? As you should keep it in your page but hidden in order to access this information.

If you have kept the old navbar you can do this:
Code:

if(document.getElementById('i_icon_mini_new_message')) {
  //the user has a new message, do something.
}
avatar
LGforum
Hyperactive

Male Posts : 2262
Reputation : 260
Language : English
Location : UK

http://www.avacweb.com/

Back to top Go down

Solved Re: New messages link

Post by Niko on Wed 25 Apr - 7:13

@LGforum wrote:[Have you removed the old navbar? As you should keep it in your page but hidden in order to access this information.

If you have kept the old navbar you can do this:
Code:

if(document.getElementById('i_icon_mini_new_message')) {
  //the user has a new message, do something.
}

No, I have a new navbar...
avatar
Niko
Hyperactive

Male Posts : 2298
Reputation : 98
Language : English, French, Italian, Spanish, Latin

Back to top Go down

Solved Re: New messages link

Post by LGforum on Wed 25 Apr - 16:13

I'd recommend adding it back into the page but in a hidden DIV, so you can access the information it provides.
avatar
LGforum
Hyperactive

Male Posts : 2262
Reputation : 260
Language : English
Location : UK

http://www.avacweb.com/

Back to top Go down

Solved Re: New messages link

Post by Niko on Thu 26 Apr - 12:17

@LGforum wrote:I'd recommend adding it back into the page but in a hidden DIV, so you can access the information it provides.

Which infos do I need? Mr. Green
avatar
Niko
Hyperactive

Male Posts : 2298
Reputation : 98
Language : English, French, Italian, Spanish, Latin

Back to top Go down

Solved Re: New messages link

Post by LGforum on Thu 26 Apr - 21:45

Well you need the private message info, thats what this thread is about Razz

Just put the old navigation bar back, but in a div with style display:none. I know you know what I mean lol.

then the script in my posts above can be used.
avatar
LGforum
Hyperactive

Male Posts : 2262
Reputation : 260
Language : English
Location : UK

http://www.avacweb.com/

Back to top Go down

Solved Re: New messages link

Post by Niko on Fri 27 Apr - 12:41

Well, I'm trying on my test forum...
I have the default navbar Smile

But what I have to edit? O.o

@LGforum wrote:
Code:
if(document.getElementById('i_icon_mini_new_message')) {
  //the user has a new message, do something.
}
avatar
Niko
Hyperactive

Male Posts : 2298
Reputation : 98
Language : English, French, Italian, Spanish, Latin

Back to top Go down

Solved Re: New messages link

Post by LGforum on Fri 27 Apr - 17:57

Rideem is right, just anything in the IF statement.

The best thing to do (imo) is to have a widget/announcement (anywhere which takes HTML) and design yourself a pop up. Make it look nice and however you want it then stick 'style="display:none" on it so it is hidden. Then in the if statement put:
Code:
document.getElementById('ID_OF_POPUP').style.display='';

Which will mean your pop up will popup whenever there is a new message.

I also shared a tutorial on your site of a good way of making a nice pop up using a template trick.
avatar
LGforum
Hyperactive

Male Posts : 2262
Reputation : 260
Language : English
Location : UK

http://www.avacweb.com/

Back to top Go down

Solved Re: New messages link

Post by Niko on Sat 28 Apr - 8:53

Well,

I added this code:
Code:
<div style="display: none;">{GENERATED_NAV_BAR}</div>
now, I want to have this popup (example) when I receive a private message:

Code:
<div class="popupclass" id="popupid">You received a new message. Read it</div>
.
Which code I need to put? Can you gt it ready for me? U.u
avatar
Niko
Hyperactive

Male Posts : 2298
Reputation : 98
Language : English, French, Italian, Spanish, Latin

Back to top Go down

Solved Re: New messages link

Post by LGforum on Sat 28 Apr - 18:04

Put this in an announcement or template or somthing:

Code:

<div class="popupclass" id="privmsgpopup">You received a new message. Read it</div>
<script>
if(document.getElementById('i_icon_mini_new_message')) {
  document.getElementById('privmsgpopup').style.display = '';   
}
</script>
avatar
LGforum
Hyperactive

Male Posts : 2262
Reputation : 260
Language : English
Location : UK

http://www.avacweb.com/

Back to top Go down

Solved Re: New messages link

Post by Niko on Sun 29 Apr - 8:31

It doesn't work Sad
avatar
Niko
Hyperactive

Male Posts : 2298
Reputation : 98
Language : English, French, Italian, Spanish, Latin

Back to top Go down

Solved Re: New messages link

Post by Niko on Thu 3 May - 15:37

Solved Smile
I tried to do the opposite...
avatar
Niko
Hyperactive

Male Posts : 2298
Reputation : 98
Language : English, French, Italian, Spanish, Latin

Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum