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.

Delete brackets in the notification button

+2
SLGray
bodahassan
6 posters

Go down

In progress Delete brackets in the notification button

Post by bodahassan August 29th 2016, 12:44 am

Technical Details


Forum version : #phpBB3
Position : Founder
Concerned browser(s) : Mozilla Firefox, Google Chrome
Screenshot of problem : https://i.servimg.com/u/f35/13/76/93/58/fm_des10.png
Who the problem concerns : Yourself
Forum link : http://www.koutstore.com

Description of problem

Good evening

Is there a way can do it with JavaScript or css
To delete the brackets in the notification button, I want only numbers without bracket

This is very important to me Because I want to edit the button

<span id="notif_unread">(5)</span>
bodahassan
bodahassan
Forumember

Posts : 35
Reputation : 1
Language : arabic

http://www.koutstore.com

Back to top Go down

In progress Re: Delete brackets in the notification button

Post by SLGray August 29th 2016, 4:31 am



 Delete brackets in the notification button Slgray10

When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
SLGray
SLGray
Administrator
Administrator

Male Posts : 51489
Reputation : 3519
Language : English
Location : United States

https://forumsclub.com/gc/128-link-directory/

Back to top Go down

In progress Re: Delete brackets in the notification button

Post by bodahassan August 29th 2016, 7:38 am

Thanks , but I guess you do not really try to help !!!!!!!!!!!!!!!!!!!!!!
You just put any reply

Can you @SLGray explain to me how this tutorial will help me to delete this brakets ?? Huh
bodahassan
bodahassan
Forumember

Posts : 35
Reputation : 1
Language : arabic

http://www.koutstore.com

Back to top Go down

In progress Re: Delete brackets in the notification button

Post by bodahassan August 30th 2016, 9:27 pm

Bumps !!!  Delete brackets in the notification button 3875570588

@Ange Tuteur Please help me to solve the problem  Delete brackets in the notification button 1f623
bodahassan
bodahassan
Forumember

Posts : 35
Reputation : 1
Language : arabic

http://www.koutstore.com

Back to top Go down

In progress Re: Delete brackets in the notification button

Post by Ange Tuteur August 31st 2016, 5:57 pm

Ange Tuteur
Ange Tuteur
Forumaster

Male Posts : 13246
Reputation : 3000
Language : English & 日本語
Location : Pennsylvania

https://fmdesign.forumotion.com

Back to top Go down

In progress Re: Delete brackets in the notification button

Post by bodahassan September 1st 2016, 1:43 am

Thank you a lots @Ange Tuteur

Code:
        $(document).ready(function(){
        $("span#notif_unread").text($("span#notif_unread").text().match(/[^()]+/g))
        });


When I add the code in consle it works
But when I add it in JavaScript panel it not working

Is there a solution ??
bodahassan
bodahassan
Forumember

Posts : 35
Reputation : 1
Language : arabic

http://www.koutstore.com

Back to top Go down

In progress Re: Delete brackets in the notification button

Post by SLGray September 1st 2016, 3:24 am

Do you have JavaScript Management activated?


 Delete brackets in the notification button Slgray10

When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
SLGray
SLGray
Administrator
Administrator

Male Posts : 51489
Reputation : 3519
Language : English
Location : United States

https://forumsclub.com/gc/128-link-directory/

Back to top Go down

In progress Re: Delete brackets in the notification button

Post by bodahassan September 1st 2016, 3:34 am

SLGray wrote:Do you have JavaScript Management activated?

yes
bodahassan
bodahassan
Forumember

Posts : 35
Reputation : 1
Language : arabic

http://www.koutstore.com

Back to top Go down

In progress Re: Delete brackets in the notification button

Post by SLGray September 1st 2016, 3:52 am

Did you try this one:
Code:
        
        $(function(){
        setInterval(function () {
            $("#notif_unread").length && $("#notif_unread").text(function (d, c) {
              return c.replace(/\(|\)/g, "")
            })
          }, 200);
        });


 Delete brackets in the notification button Slgray10

When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
SLGray
SLGray
Administrator
Administrator

Male Posts : 51489
Reputation : 3519
Language : English
Location : United States

https://forumsclub.com/gc/128-link-directory/

Back to top Go down

In progress Re: Delete brackets in the notification button

Post by bodahassan September 1st 2016, 4:05 am

SLGray wrote:Did you try this one:
Code:
        
        $(function(){
        setInterval(function () {
            $("#notif_unread").length && $("#notif_unread").text(function (d, c) {
              return c.replace(/\(|\)/g, "")
            })
          }, 200);
        });
Yes but it slows down browsing
bodahassan
bodahassan
Forumember

Posts : 35
Reputation : 1
Language : arabic

http://www.koutstore.com

Back to top Go down

In progress Re: Delete brackets in the notification button

Post by bodahassan September 2nd 2016, 9:42 am

Bumps mwii
bodahassan
bodahassan
Forumember

Posts : 35
Reputation : 1
Language : arabic

http://www.koutstore.com

Back to top Go down

In progress Re: Delete brackets in the notification button

Post by bodahassan September 4th 2016, 12:23 am

Where the support team, what all this carelessness !!!!!!!!!!!!!!!!

5 days and did not solve the problem

And if the support team is not qualified to answer queries and issues of Members why if they are within the staff
bodahassan
bodahassan
Forumember

Posts : 35
Reputation : 1
Language : arabic

http://www.koutstore.com

Back to top Go down

In progress Re: Delete brackets in the notification button

Post by Ape September 4th 2016, 12:36 am

bodahassan wrote:Where the support team, what all this carelessness !!!!!!!!!!!!!!!!

5 days and did not solve the problem

And if the support team is not qualified to answer queries and issues of Members why if they are within the staff

Please don't use bold or color and keep to the default text. This is reserved for the staff for moderation. Thank you.
Please read our forum rules: ESF General Rules

Please Don't be so rude we are here to help if we can

Please note all the staff here are voluntary all but the pro admin's that work in the head office.
We all work from our homes and give up our own time to help you and others around here.

Not all of us know coding but we know more about the way our system works and how to help other on other things.



 Delete brackets in the notification button Left1212 Delete brackets in the notification button Center11 Delete brackets in the notification button Right112
 Delete brackets in the notification button Ape_b110
 Delete brackets in the notification button Ape1010
Ape
Ape
Administrator
Administrator

Male Posts : 19122
Reputation : 1993
Language : fluent in dork / mumbojumbo & English haha

http://chatworld.forumotion.co.uk/

Back to top Go down

In progress Re: Delete brackets in the notification button

Post by bodahassan September 4th 2016, 1:36 am

If every team had no coding experience why this  Scripts (Coding) Problems forum exists ؟!

I haven't found any solutions to my problems since i registered on support forum only find silly responses from the support team ,All this and tell me that I'm rude And not the rudeness of your team. !!!!

Strong support does not make members waiting more than five days to solve his problem
bodahassan
bodahassan
Forumember

Posts : 35
Reputation : 1
Language : arabic

http://www.koutstore.com

Back to top Go down

In progress Re: Delete brackets in the notification button

Post by SLGray September 4th 2016, 4:08 am

Since @Ange Tuteur is the one who offered a solution, you will have to wait until Ange Tuteur logs on and sees that you still need help.


 Delete brackets in the notification button Slgray10

When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
SLGray
SLGray
Administrator
Administrator

Male Posts : 51489
Reputation : 3519
Language : English
Location : United States

https://forumsclub.com/gc/128-link-directory/

Back to top Go down

In progress Re: Delete brackets in the notification button

Post by Draxion September 4th 2016, 4:51 am

Hi, I tested your code and it works fine. I haven't noticed it slowing down my browsing.

If it is slowing down yours, it's cause the code you are using basically is set to run every 200 milliseconds.
Draxion
Draxion
Helper
Helper

Male Posts : 2518
Reputation : 321
Language : English
Location : USA

https://www.talesoftellene.com/

Back to top Go down

In progress Re: Delete brackets in the notification button

Post by Ch@lo Valdez September 4th 2016, 9:07 am

Code:

 $(function(){
        setInterval(function () {
            $("#notif_unread").length && $("#notif_unread").text(function (d, c) {
              return c.replace(/\(|\)/g, "")
            })
          }, 200);
        });
i wrote this code, and works fine, remove the setinterval if you forum go slow, but if you see the FM toolbar internal code it have many setinterval function, in a new notification the brackets return

Code:

 $(function(){
        $("#notif_unread").length && $("#notif_unread").text(function (d, c) {
              return c.replace(/\(|\)/g, "")
            })
          });
Ch@lo Valdez
Ch@lo Valdez
Forumember

Male Posts : 138
Reputation : 50
Language : spanish

Back to top Go down

In progress Re: Delete brackets in the notification button

Post by Ch@lo Valdez September 4th 2016, 9:12 am

bodahassan wrote: Thank you a lots @Ange Tuteur

Code:
        $(document).ready(function(){
        $("span#notif_unread").text($("span#notif_unread").text().match(/[^()]+/g))
        });


When I add the code in consle it works
But when I add it in JavaScript panel it not working

Is there a solution ??

try this way:
Code:
       
$(function(){
    $(function(){
var a =  $("span#notif_unread");
        a.text(a.text().match(/[^()]+/g))
      });
});
Ch@lo Valdez
Ch@lo Valdez
Forumember

Male Posts : 138
Reputation : 50
Language : spanish

Back to top Go down

In progress Re: Delete brackets in the notification button

Post by bodahassan September 4th 2016, 10:38 am

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

Code:

             
        $(function(){
            $(function(){
        var a =  $("span#notif_unread");
                a.text(a.text().match(/[^()]+/g))
              });
        });

Thank you but this codes did not work with me.
bodahassan
bodahassan
Forumember

Posts : 35
Reputation : 1
Language : arabic

http://www.koutstore.com

Back to top Go down

In progress Re: Delete brackets in the notification button

Post by Ch@lo Valdez September 4th 2016, 5:20 pm

mmm is in this forum ?

Spoiler:
Ch@lo Valdez
Ch@lo Valdez
Forumember

Male Posts : 138
Reputation : 50
Language : spanish

Back to top Go down

In progress Re: Delete brackets in the notification button

Post by bodahassan September 4th 2016, 5:44 pm

in this link bro : http://sd.koutstore.com
bodahassan
bodahassan
Forumember

Posts : 35
Reputation : 1
Language : arabic

http://www.koutstore.com

Back to top Go down

Back to top

- Similar topics

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