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.

JS hides the menu buttons for the mobile version.

+2
SarkZKalie
smurfavr
6 posters

Go down

Solved JS hides the menu buttons for the mobile version.

Post by smurfavr Thu 18 Jul - 1:01

This code is used to change the legend of my forum in Bulgarian, but this code currently hides the menu buttons for the mobile version. Can some fix it?

Code:
$(function() {
  var last24 = 'Потребители за последните 24 часа:',
      nobday = 'Няма рожденици днес: ',
      bdaytoday = 'Потребители, които имат рожден ден днес : ',
      nobdaynext7 = 'Няма  рожденици през следващите 7 дни:',
      bdaynext7 = 'Рожденици през следващите 7 дни:',
      legend = 'Легенда:',
      inchat = 'В момента има $1 потребители в чата:',
  who = document.getElementById('whois_online');
  who.innerHTML = who.innerHTML.replace('Members connected during last 24 hours :',last24).replace('No users have a birthday today',nobday).replace('Users having a birthday today',bdaytoday).replace('Users with a birthday within the next 7 days: ',bdaynext7).replace('No users are having a birthday in the upcoming 7 days',nobdaynext7).replace('Legend : ',legend).replace(/There are currently (d+) user(s) on the ChatBox : /,inchat);
});


Last edited by smurfavr on Wed 7 Aug - 11:20; edited 1 time in total
smurfavr
smurfavr
Active Poster

Male Posts : 1881
Reputation : 22
Language : Bulgarian

http://smurfa.bulgarianforum.net/

Back to top Go down

Solved Re: JS hides the menu buttons for the mobile version.

Post by SarkZKalie Sat 20 Jul - 3:28

I can see menu button on mobile platform. Have you ever tried to clear the browser cache before re-loading your site?

JS hides the menu buttons for the mobile version. Mobile10


JS hides the menu buttons for the mobile version. Sarkzk10
SarkZKalie
SarkZKalie
Support Moderator
Support Moderator

Male Posts : 1443
Reputation : 220
Language : English

https://rotavn.forumotion.com/

Back to top Go down

Solved Re: JS hides the menu buttons for the mobile version.

Post by SLGray Sat 20 Jul - 3:55

I believe the member has removed it.


JS hides the menu buttons for the mobile version. 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 : 51554
Reputation : 3524
Language : English
Location : United States

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

Back to top Go down

Solved Re: JS hides the menu buttons for the mobile version.

Post by skouliki Wed 24 Jul - 12:28

is this solved ?
skouliki
skouliki
Manager
Manager

Female Posts : 15391
Reputation : 1709
Language : English,Greek
Location : Greece

http://iconskouliki.forumgreek.com

Back to top Go down

Solved Re: JS hides the menu buttons for the mobile version.

Post by Ape Wed 24 Jul - 21:49

The member asked me to help find the problem codes and I found this code that was the problem and then told the member to ask you the members to help find the problem in the code.

The problem no longer shows up on the forum as I removed the code to stop the problem in the first place.

All the member needs is for the code posted in the first topic fixed so it will work again and not remove the tools for mobile users.


JS hides the menu buttons for the mobile version. Left1212JS hides the menu buttons for the mobile version. Center11JS hides the menu buttons for the mobile version. Right112
JS hides the menu buttons for the mobile version. Ape_b110
JS hides the menu buttons for the mobile version. Ape1010
Ape
Ape
Administrator
Administrator

Male Posts : 19435
Reputation : 2010
Language : fluent in dork / mumbojumbo & English haha

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

Back to top Go down

Solved Re: JS hides the menu buttons for the mobile version.

Post by smurfavr Wed 24 Jul - 21:50

SarkZKalie wrote:I can see menu button on mobile platform. Have you ever tried to clear the browser cache before re-loading your site?

I have removed the code to see the button for the mobile version.

@APE helped me to find the problem I'm grateful for.
smurfavr
smurfavr
Active Poster

Male Posts : 1881
Reputation : 22
Language : Bulgarian

http://smurfa.bulgarianforum.net/

Back to top Go down

Solved Re: JS hides the menu buttons for the mobile version.

Post by smurfavr Tue 30 Jul - 1:01

Up
smurfavr
smurfavr
Active Poster

Male Posts : 1881
Reputation : 22
Language : Bulgarian

http://smurfa.bulgarianforum.net/

Back to top Go down

Solved Re: JS hides the menu buttons for the mobile version.

Post by smurfavr Tue 6 Aug - 11:32

Up
smurfavr
smurfavr
Active Poster

Male Posts : 1881
Reputation : 22
Language : Bulgarian

http://smurfa.bulgarianforum.net/

Back to top Go down

Solved Re: JS hides the menu buttons for the mobile version.

Post by Storyteller of Wonderland Tue 6 Aug - 11:39

smurfavr wrote:Up

Good day!

Sorry, I don’t understand what is your problem?

Can you show me what you want in the screenshots? It seems to me that this is all easy to do.
Storyteller of Wonderland
Storyteller of Wonderland
Forumember

Female Posts : 108
Reputation : 10
Language : Russian, German, French, English.
Location : Russia

http://milanwake.forum2x2.ru

Back to top Go down

Solved Re: JS hides the menu buttons for the mobile version.

Post by Guest Tue 6 Aug - 12:09

Hello,

The problem is most probably the fact that the code tries to modify the legend even on mobile, despite the fact that there is no legend there.
You can try replacing it with this:
Code:
document.addEventListener('DOMContentLoaded', function(){
var last24 = 'Потребители за последните 24 часа:',
nobday = 'Няма рожденици днес: ',
bdaytoday = 'Потребители, които имат рожден ден днес : ',
nobdaynext7 = 'Няма  рожденици през следващите 7 дни:',
bdaynext7 = 'Рожденици през следващите 7 дни:',
legend = 'Легенда:',
inchat = 'В момента има $1 потребители в чата:',
who = document.getElementById('whois_online');
if(who===null) return false;
who.innerHTML = who.innerHTML.replace('Members connected during last 24 hours :',last24).replace('No users have a birthday today',nobday).replace('Users having a birthday today',bdaytoday).replace('Users with a birthday within the next 7 days: ',bdaynext7).replace('No users are having a birthday in the upcoming 7 days',nobdaynext7).replace('Legend : ',legend).replace(/There are currently (d+) user(s) on the ChatBox : /,inchat);
});
It will check to see if the legend exists before trying to modify it.
avatar
Guest
Guest


Back to top Go down

Solved Re: JS hides the menu buttons for the mobile version.

Post by smurfavr Tue 6 Aug - 14:51

Thank you @Occultist now works.
I noticed that the forumotion team added a translation for most things. If you can make the code translate only this caption.

Рожденици през следващите 7 дни


Last edited by smurfavr on Wed 7 Aug - 11:22; edited 1 time in total
smurfavr
smurfavr
Active Poster

Male Posts : 1881
Reputation : 22
Language : Bulgarian

http://smurfa.bulgarianforum.net/

Back to top Go down

Solved Re: JS hides the menu buttons for the mobile version.

Post by Guest Tue 6 Aug - 21:50

Yeah sure. Try this code:
Code:
        document.addEventListener('DOMContentLoaded', function(){
var bdaynext7='Рожденици през следващите 7 дни:';
var who=document.getElementById('whois_online');
if(who===null) return false;
who.innerHTML=who.innerHTML.replace('Users with a birthday within the next 7 days: ',bdaynext7);
});
avatar
Guest
Guest


Back to top Go down

Solved Re: JS hides the menu buttons for the mobile version.

Post by smurfavr Wed 7 Aug - 11:20

Thank you @Occultist
smurfavr
smurfavr
Active Poster

Male Posts : 1881
Reputation : 22
Language : Bulgarian

http://smurfa.bulgarianforum.net/

Back to top Go down

Solved Re: JS hides the menu buttons for the mobile version.

Post by skouliki Wed 7 Aug - 12:30

Problem solved & topic archived.
Please read our forum rules:  ESF General Rules
skouliki
skouliki
Manager
Manager

Female Posts : 15391
Reputation : 1709
Language : English,Greek
Location : Greece

http://iconskouliki.forumgreek.com

Back to top Go down

Back to top

- Similar topics

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