Delete brackets in the notification button

Go down

In progress Delete brackets in the notification button

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

Technical Details


Forum version : #phpBB3
Position : Founder
Concerned browser(s) : Mozilla Firefox, Google Chrome
Screenshot of problem : http://i35.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>
avatar
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 on August 29th 2016, 4:31 am



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

avatar
SLGray
Administrator
Administrator

Male Posts : 43134
Reputation : 3059
Language : English
Location : United States

https://fmthemes.forumotion.com/

Back to top Go down

In progress Re: Delete brackets in the notification button

Post by bodahassan on 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
avatar
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 on August 30th 2016, 9:27 pm

Bumps !!!

@Ange Tuteur Please help me to solve the problem
avatar
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 on August 31st 2016, 5:57 pm

avatar
Ange Tuteur
Forumaster

Male Posts : 13195
Reputation : 2910
Language : EN10, FR5, JA5
Location : Macungie, PA

https://github.com/SethClydesdale

Back to top Go down

In progress Re: Delete brackets in the notification button

Post by bodahassan on 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 ??
avatar
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 on September 1st 2016, 3:24 am

Do you have JavaScript Management activated?


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

avatar
SLGray
Administrator
Administrator

Male Posts : 43134
Reputation : 3059
Language : English
Location : United States

https://fmthemes.forumotion.com/

Back to top Go down

In progress Re: Delete brackets in the notification button

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

@SLGray wrote:Do you have JavaScript Management activated?

yes
avatar
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 on 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);
        });


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

avatar
SLGray
Administrator
Administrator

Male Posts : 43134
Reputation : 3059
Language : English
Location : United States

https://fmthemes.forumotion.com/

Back to top Go down

In progress Re: Delete brackets in the notification button

Post by bodahassan on 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
avatar
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 on September 2nd 2016, 9:42 am

Bumps mwii
avatar
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 on 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
avatar
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 on 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.




avatar
APE
Administrator
Administrator

Male Posts : 12133
Reputation : 1235
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 on 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
avatar
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 on 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.


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

avatar
SLGray
Administrator
Administrator

Male Posts : 43134
Reputation : 3059
Language : English
Location : United States

https://fmthemes.forumotion.com/

Back to top Go down

In progress Re: Delete brackets in the notification button

Post by Draxion on 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.
avatar
Draxion
Support Moderator
Support Moderator

Male Posts : 2120
Reputation : 271
Language : English
Location : USA

http://www.draxionsgameden.com/

Back to top Go down

In progress Re: Delete brackets in the notification button

Post by Ch@lo Valdez on 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, "")
            })
          });
avatar
Ch@lo Valdez
Forumember

Male Posts : 134
Reputation : 48
Language : spanish

Back to top Go down

In progress Re: Delete brackets in the notification button

Post by Ch@lo Valdez on 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))
      });
});
avatar
Ch@lo Valdez
Forumember

Male Posts : 134
Reputation : 48
Language : spanish

Back to top Go down

In progress Re: Delete brackets in the notification button

Post by bodahassan on 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.
avatar
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 on September 4th 2016, 5:20 pm

mmm is in this forum ?

Spoiler:
avatar
Ch@lo Valdez
Forumember

Male Posts : 134
Reputation : 48
Language : spanish

Back to top Go down

In progress Re: Delete brackets in the notification button

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

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

Posts : 35
Reputation : 1
Language : arabic

http://www.koutstore.com

Back to top Go down

Back to top


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