The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Add the Messages button to the toolbar: AwesomeBB

3 posters

Go down

Add the Messages button to the toolbar: AwesomeBB Empty Add the Messages button to the toolbar: AwesomeBB

Post by كونان2000 January 17th 2022, 7:40 pm

Add the Messages button to the toolbar: AwesomeBB Animat12

Hello everyone, the following tutorial will help you to add message button to toolbar
 WORKS ON  FORUM VERSION: AwesomeBB 
__________________________________________________







Picture after receiving a new message
Add the Messages button to the toolbar: AwesomeBB Animat13
--------------------------------------



 ADMIN CONTROL PANEL SETTINGS,
__________________________________________________

1. Go to Admin Panel > Display > Templates > General
2. Please choose overall_header
3. Click modify Add the Messages button to the toolbar: AwesomeBB Editer button
4. Find this code:
Code:
<li><a id="navigation-recent" href="/latest"><i class="material-icons">comment</i>{L_TOPICS}</a></li>


5. And replace by this:
Code:
<li><a id="navigation-recent" href="/latest"><i class="material-icons">comment</i>{L_TOPICS}</a></li>
   <a href="{U_PRIVATEMSGS}"  rel="nofollow" style=" display: inline-block;"><i class="material-icons">mail</i>&nbsp;{PRIVATE_MESSAGE_INFO}</a>
  
6. Hit save and click publish Add the Messages button to the toolbar: AwesomeBB 1928220652
the modification is now installed
-------------------------------------

We hope you like this great little Trick and Tip on how to make the change.
Add the Messages button to the toolbar: AwesomeBB Icon_biggrin

--------------
This tutorial was written by @كونان2000,


Last edited by كونان2000 on June 24th 2023, 5:07 am; edited 1 time in total
كونان2000
كونان2000
Forumember

Male Posts : 205
Reputation : 93
Language : Arabic

https://anime.forumperso.com/

skouliki, Niko, TonnyKamper, TheCrow and Revelore like this post

Back to top Go down

Add the Messages button to the toolbar: AwesomeBB Empty Re: Add the Messages button to the toolbar: AwesomeBB

Post by SarkZKalie January 23rd 2022, 11:25 pm

Can we just extract number from that variable then make it short? Twisted Evil

For example :
Code:
You have x new message
replace by
Code:
<a title="{PRIVATE_MESSAGE_INFO}">Message (x)</a>


Add the Messages button to the toolbar: AwesomeBB Sarkzk10
SarkZKalie
SarkZKalie
Support Moderator
Support Moderator

Male Posts : 1420
Reputation : 220
Language : English

https://rotavn.forumotion.com/

Niko, TonnyKamper and كونان2000 like this post

Back to top Go down

Add the Messages button to the toolbar: AwesomeBB Empty Re: Add the Messages button to the toolbar: AwesomeBB

Post by Niko January 24th 2022, 2:33 am

@SarkZKalie what you can do is to extract the number from the private message text and use it to replace its content, for example

Code:
$(function() {$(function() {
var unread DMs = $('YYY');
var DMmenu = $('XXX');

  if(unreadDMs.length) {
   
    var checkExist = setInterval(function() {
  if (unreadDMs.text()) {
    var content_notif = unreadDMs.text().match(/\d+/g);
    DMmenu.html('Message ('+content_notif+')');
 
      clearInterval(checkExist);
  }
}, 100);
   
   
}});});

You then only need to replace:
  • Code:
    var unread DMs = $('YYY');
    with the selector of the menu link when there are new messages
  • Code:
    var DMmenu = $('XXX');
    with the selector of the menu link for private messages


It should do the trick Wink
I don't know the forum version you need so I can't test it, sorry :wouhou: Embarassed
Niko
Niko
Helper
Helper

Male Posts : 3110
Reputation : 245
Language : English, Italian, French
Location : Italy

https://www.fmcodes.net/

SarkZKalie, TonnyKamper and كونان2000 like this post

Back to top Go down

Add the Messages button to the toolbar: AwesomeBB Empty Re: Add the Messages button to the toolbar: AwesomeBB

Post by كونان2000 January 24th 2022, 2:51 pm

Hello @SarkZKalie Very Happy

Hello @Niko


new update

Add the Messages button to the toolbar: AwesomeBB Animat14



Picture after receiving a new message
Add the Messages button to the toolbar: AwesomeBB Animat16

new update:

Add the Messages button to the toolbar: AwesomeBB 3666372071

This tutorial was written by @كونان2000,
(The codes were written by @كونان2000, and @Ange Tuteur code was used in this thread)


Last edited by كونان2000 on June 24th 2023, 5:06 am; edited 1 time in total
كونان2000
كونان2000
Forumember

Male Posts : 205
Reputation : 93
Language : Arabic

https://anime.forumperso.com/

skouliki, BlackScorpion, Niko, SarkZKalie, TonnyKamper and Revelore like this post

Back to top Go down

Add the Messages button to the toolbar: AwesomeBB Empty Re: Add the Messages button to the toolbar: AwesomeBB

Post by Niko January 24th 2022, 7:01 pm

Wonderful, well done!
Niko
Niko
Helper
Helper

Male Posts : 3110
Reputation : 245
Language : English, Italian, French
Location : Italy

https://www.fmcodes.net/

SarkZKalie and كونان2000 like this post

Back to top Go down

Add the Messages button to the toolbar: AwesomeBB Empty Re: Add the Messages button to the toolbar: AwesomeBB

Post by SarkZKalie January 24th 2022, 7:36 pm

Hi guys, i was just asking an improvement, not for me hehe but you guys did it great Add the Messages button to the toolbar: AwesomeBB 1f607

Add the Messages button to the toolbar: AwesomeBB 200.gif?cid=78ff2c8f877tbwx42p42kzuk7ft17m41okbzpy7f1jb1u2cz&rid=200


Add the Messages button to the toolbar: AwesomeBB Sarkzk10
SarkZKalie
SarkZKalie
Support Moderator
Support Moderator

Male Posts : 1420
Reputation : 220
Language : English

https://rotavn.forumotion.com/

Niko and كونان2000 like this post

Back to top Go down

Add the Messages button to the toolbar: AwesomeBB Empty Re: Add the Messages button to the toolbar: AwesomeBB

Post by كونان2000 January 25th 2022, 6:32 am

thank you @SarkZKalie ^^

thank you @Niko ^^

Add the Messages button to the toolbar: AwesomeBB 587258
كونان2000
كونان2000
Forumember

Male Posts : 205
Reputation : 93
Language : Arabic

https://anime.forumperso.com/

Niko and SarkZKalie like this post

Back to top Go down

Back to top

- Similar topics

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