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
كونان2000
كونان2000
Forumember

Other / Decline to state Posts : 36
Reputation : 21
Language : arabic

View user profile https://i.servimg.com/u/f30/20/35/61/89/din12.jpg

skouliki, Niko, TonnyKamper and TheCrow 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 : 1332
Reputation : 214
Language : English

View user profile 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
Hyperactive

Male Posts : 2462
Reputation : 127
Language : English, Italian, French
Location : Italy

View user profile 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
كونان2000
كونان2000
Forumember

Other / Decline to state Posts : 36
Reputation : 21
Language : arabic

View user profile https://i.servimg.com/u/f30/20/35/61/89/din12.jpg

skouliki, BlackScorpion, Niko, SarkZKalie and TonnyKamper 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
Hyperactive

Male Posts : 2462
Reputation : 127
Language : English, Italian, French
Location : Italy

View user profile 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 : 1332
Reputation : 214
Language : English

View user profile 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

Other / Decline to state Posts : 36
Reputation : 21
Language : arabic

View user profile https://i.servimg.com/u/f30/20/35/61/89/din12.jpg

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