JS hides the menu buttons for the mobile version.

Go down

Solved JS hides the menu buttons for the mobile version.

Post by smurfavr on July 18th 2019, 12:01 am

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 August 7th 2019, 10:20 am; edited 1 time in total
smurfavr
smurfavr
Active Poster

Male Posts : 1871
Reputation : 21
Language : Bulgarian

View user profile http://smurfa.bulgarianforum.net/

Back to top Go down

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

Post by SarkZKalie on July 20th 2019, 2:28 am

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 : 1193
Reputation : 194
Language : English

View user profile https://rotavn.forumotion.com/

Back to top Go down

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

Post by SLGray on July 20th 2019, 2:55 am

I believe the member has removed it.


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

View user profile https://help.forumotion.com/

Back to top Go down

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

Post by skouliki on July 24th 2019, 11:28 am

is this solved ?
skouliki
skouliki
Manager
Manager

Female Posts : 9683
Reputation : 1243
Language : English,Greek
Location : Greece

View user profile http://iconskouliki.forumgreek.com

Back to top Go down

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

Post by Ape on July 24th 2019, 8:49 pm

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. Keep_s10
JS hides the menu buttons for the mobile version. Ape1010
Ape
Ape
Administrator
Administrator

Male Posts : 15908
Reputation : 1711
Language : fluent in dork / mumbojumbo & English haha

View user profile http://chatworld.forumotion.co.uk/

Back to top Go down

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

Post by smurfavr on July 24th 2019, 8:50 pm

@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 : 1871
Reputation : 21
Language : Bulgarian

View user profile http://smurfa.bulgarianforum.net/

Back to top Go down

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

Post by smurfavr on July 30th 2019, 12:01 am

Up
smurfavr
smurfavr
Active Poster

Male Posts : 1871
Reputation : 21
Language : Bulgarian

View user profile http://smurfa.bulgarianforum.net/

Back to top Go down

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

Post by smurfavr on August 6th 2019, 10:32 am

Up
smurfavr
smurfavr
Active Poster

Male Posts : 1871
Reputation : 21
Language : Bulgarian

View user profile 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 on August 6th 2019, 10:39 am

@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

View user profile http://milanwake.forum2x2.ru

Back to top Go down

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

Post by Occultist on August 6th 2019, 11:09 am

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.
Occultist
Occultist
Forumember

Posts : 225
Reputation : 63
Language : English and couple others

View user profile https://idonthaveaforum.forumotion.com

Back to top Go down

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

Post by smurfavr on August 6th 2019, 1:51 pm

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 August 7th 2019, 10:22 am; edited 1 time in total
smurfavr
smurfavr
Active Poster

Male Posts : 1871
Reputation : 21
Language : Bulgarian

View user profile http://smurfa.bulgarianforum.net/

Back to top Go down

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

Post by Occultist on August 6th 2019, 8:50 pm

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);
});
Occultist
Occultist
Forumember

Posts : 225
Reputation : 63
Language : English and couple others

View user profile https://idonthaveaforum.forumotion.com

Back to top Go down

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

Post by smurfavr on August 7th 2019, 10:20 am

Thank you @Occultist
smurfavr
smurfavr
Active Poster

Male Posts : 1871
Reputation : 21
Language : Bulgarian

View user profile http://smurfa.bulgarianforum.net/

Back to top Go down

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

Post by skouliki on August 7th 2019, 11:30 am

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

Female Posts : 9683
Reputation : 1243
Language : English,Greek
Location : Greece

View user profile http://iconskouliki.forumgreek.com

Back to top Go down

Back to top


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