FM Design
Would you like to react to this message? Create an account in a few clicks or log in to continue.

IMPORTANT

FM Design is in read-only mode, please click here for more information.

Latest topics
» Forumactif Edge - Releases
by Ange Tuteur Tue 03 Sep 2019, 11:49

» GIFActif - Giphy Button for the Editor
by Ange Tuteur Wed 08 May 2019, 17:21

» Forum Closure
by Ange Tuteur Mon 01 Jan 2018, 01:28

» Chit Chat Thread
by Valoish Sun 31 Dec 2017, 19:15

» Font/Text background color.
by Valoish Sun 31 Dec 2017, 19:11

» Forumactif Messenger - Instant Message Application for Forumotion
by Wolfuryo Sun 31 Dec 2017, 18:24

» [GAME] Count to One Million!
by brandon_g Fri 29 Dec 2017, 18:58

» Post Cards
by manikbiradar Wed 20 Dec 2017, 07:50

» [GAME] Countdown from 200,000
by Valoish Wed 13 Dec 2017, 23:22

» GeekPolice Tech Support Forums - GeekPolice.net
by Dr Jay Mon 11 Dec 2017, 19:12

» Asking about some plugin for Forumotion
by Dr Jay Mon 11 Dec 2017, 19:10

» [GAME] What are you thinking right now?
by Van-Helsing Sat 09 Dec 2017, 14:51

» Widget : Similar topics
by ranbac Wed 06 Dec 2017, 18:11

» Change the Background of the Forum and put an image and how to make prefixs?
by Clement Wed 06 Dec 2017, 15:19

» Hello from Western Australia
by SarkZKalie Wed 06 Dec 2017, 05:34

Recent Tutorials
Top posting users this month

Who is online?
In total there are 44 users online :: 0 Registered, 0 Hidden and 44 Guests :: 1 Bot

None

[ View the whole list ]


Most users ever online was 515 on Tue 14 Sep 2021, 15:24

[SOLVED] How to remove parenthesis on notifications?

View previous topic View next topic Go down

Wilson
Wilson

Gender : Unspecified
Age : 38
Posts : 868
Points : 4821
Reputation : 124
Language : Filipino and Engrish
Browser : Browser : Google Chrome Forum Version : Forum Version : phpBB3
http://generalaxis.forums.com.bz/

PostWilson Sat 25 Jun 2016, 03:10

Removing notif_unread's parenthesis? I saw a tutorial similar to this but I forgot where and what. Thank you.
Wolfuryo
Wolfuryo

Gender : Male
Posts : 256
Points : 3806
Reputation : 81
Language : Romanian and English
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : Other

PostWolfuryo Sat 25 Jun 2016, 08:53

Hello,

Add this JS code with placement on all pages:
Code:
$(document).ready(function(){
$("span#notif_unread").text($("span#notif_unread").text().match(/[^()]+/g))
});
Ch@lo Valdez
Ch@lo Valdez

Gender : Male
Age : 49
Posts : 65
Points : 3897
Reputation : 5
Location : Mexico
Language : eng spa
Browser : Browser : Google Chrome Forum Version : Forum Version : phpBB3

PostCh@lo Valdez Tue 05 Jul 2016, 08:09

here my solution
Code:

$(function(){
setInterval(function () {
    $("#notif_unread").length && $("#notif_unread").text(function (d, c) {
      return c.replace(/\(|\)/g, "")
    })
  }, 200);
});
Wilson
Wilson

Gender : Unspecified
Age : 38
Posts : 868
Points : 4821
Reputation : 124
Language : Filipino and Engrish
Browser : Browser : Google Chrome Forum Version : Forum Version : phpBB3
http://generalaxis.forums.com.bz/

PostWilson Tue 05 Jul 2016, 09:22

Thank you for both of you and your answers. I'll try it all later, meanwhile

Ch@lo Valdez wrote:here my solution
Code:

$(function(){
setInterval(function () {
    $("#notif_unread").length && $("#notif_unread").text(function (d, c) {
      return c.replace(/\(|\)/g, "")
    })
  }, 200);
});

May I ask what's the difference between yours and Andrei's? Grin
Wolfuryo
Wolfuryo

Gender : Male
Posts : 256
Points : 3806
Reputation : 81
Language : Romanian and English
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : Other

PostWolfuryo Thu 07 Jul 2016, 09:38

My code replaces the number of notifications with one without paranthesis, while his code sets an interval of 200 miliseconds(meaning the code runs every 200 miliseconds).
I am not sure which code is best. Smile
Anonymous
Guest
Guest

PostGuest Thu 07 Jul 2016, 09:43

Yours is best @Andrei34 Smile

Ask LG for some slight improvements though when he's back. I'm sure he'd be delighted to help you!
Wolfuryo
Wolfuryo

Gender : Male
Posts : 256
Points : 3806
Reputation : 81
Language : Romanian and English
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : Other

PostWolfuryo Thu 07 Jul 2016, 09:46

Thank you, @Samantha. I'll make sure to ask LG when he'll be back. Smile
Anonymous
Guest
Guest

PostGuest Thu 07 Jul 2016, 09:48

You're most welcome, Andrei.
Wilson
Wilson

Gender : Unspecified
Age : 38
Posts : 868
Points : 4821
Reputation : 124
Language : Filipino and Engrish
Browser : Browser : Google Chrome Forum Version : Forum Version : phpBB3
http://generalaxis.forums.com.bz/

PostWilson Fri 08 Jul 2016, 00:26

I'll use yours then Andrei, Ch@lo Valdez' code sounds like it would request too much thus slowing the page. But thanks to both of you.
Sponsored content

PostSponsored content

View previous topic View next topic Back to top

Create an account or log in to leave a reply

You need to be a member in order to leave a reply.

Create an account

Join our community by creating a new account. It's easy!


Create a new account

Log in

Already have an account? No problem, log in here.


Log in

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