The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

Delete brackets in the notification button

View previous topic View next topic 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 : https://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>

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.


SLGray
Administrator
Administrator

Male Posts : 36735
Reputation : 2447
Language : English
Location : United States

http://ztwds.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

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

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


Ange Tuteur
Forumaster

Male Posts : 13028
Reputation : 2704
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

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 ??

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.


SLGray
Administrator
Administrator

Male Posts : 36735
Reputation : 2447
Language : English
Location : United States

http://ztwds.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

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.


SLGray
Administrator
Administrator

Male Posts : 36735
Reputation : 2447
Language : English
Location : United States

http://ztwds.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

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

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

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.






APE
Manager
Manager

Male Posts : 8648
Reputation : 760
Language : fluent in dork / mumbojumbo & English haha
Location : STUCK IN FORUMOTIONS SERVERS HELP ME !!!!!!

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

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.


SLGray
Administrator
Administrator

Male Posts : 36735
Reputation : 2447
Language : English
Location : United States

http://ztwds.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.

Draxion
Helper
Helper

Male Posts : 589
Reputation : 86
Language : English
Location : USA

http://dawnofthedragons.forumotion.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, "")
            })
          });

Ch@lo Valdez
Forumember

Male Posts : 100
Reputation : 31
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))
      });
});

Ch@lo Valdez
Forumember

Male Posts : 100
Reputation : 31
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.

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:

Ch@lo Valdez
Forumember

Male Posts : 100
Reputation : 31
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

bodahassan
Forumember

Posts : 35
Reputation : 1
Language : arabic

http://www.koutstore.com

Back to top Go down

View previous topic View next topic Back to top


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