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.

what is the problem in this JS code

4 posters

Go down

Solved what is the problem in this JS code

Post by omarpop23 June 17th 2016, 9:56 pm

i wrote JS code to remove some Id in my Forum when user is online
but it didn't work i don't know why ?!!
The Code
Code:
$(function() {
  if (_userdata.session_logged_in) {
  document.getElementById("visitor-msg").innerHTML = '<style>.contact-item {display: none;}</style>'
    });
  }
//by omarpop23;
});
omarpop23
omarpop23
Forumember

Male Posts : 182
Reputation : 3
Language : Arabic
Location : Egypt

http://devs.ahlamontada.com

Back to top Go down

Solved Re: what is the problem in this JS code

Post by SLGray June 17th 2016, 10:20 pm

Are you trying you remove the visitor message tab?


what is the problem in this JS code 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 : 51482
Reputation : 3519
Language : English
Location : United States

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

Back to top Go down

Solved Re: what is the problem in this JS code

Post by omarpop23 June 17th 2016, 10:34 pm

Pic when i logged out
what is the problem in this JS code Visito10
pic when i logged in
what is the problem in this JS code Logedi10


i want to remove that when i logged in Wink
omarpop23
omarpop23
Forumember

Male Posts : 182
Reputation : 3
Language : Arabic
Location : Egypt

http://devs.ahlamontada.com

Back to top Go down

Solved Re: what is the problem in this JS code

Post by SLGray June 18th 2016, 6:59 am

So you want to remove all contact fields from the profiles in messages? If yes, all you have to do is uncheck the message box for those fields: AP > Users & Groups > Users > Profiles > Contact Tab

Did that sentence appear before you added the code?


what is the problem in this JS code 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 : 51482
Reputation : 3519
Language : English
Location : United States

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

Back to top Go down

Solved Re: what is the problem in this JS code

Post by SSYT June 18th 2016, 7:17 am

Code:
$(function() {
  if (_userdata.session_logged_in == 0) {
  document.getElementById("visitor-msg").innerHTML = '<style>.contact-item {display: none;}</style>'
    });
  }
//by omarpop23;
});
SSYT
SSYT
Forumember

Male Posts : 77
Reputation : 15
Language : RO-10, EN-3, FR-1
Location : Romania

http://help.forumgratuit.ro/forum

Back to top Go down

Solved Re: what is the problem in this JS code

Post by omarpop23 June 18th 2016, 11:08 pm

SLGray wrote:So you want to remove all contact fields from the profiles in messages? If yes, all you have to do is uncheck the message box for those fields: AP > Users & Groups > Users > Profiles > Contact Tab

Did that sentence appear before you added the code?

Invision version of forums dosen't had this part of contact user in profile details you have to add it by template
i add it but lable of Contact info appears to guests so i add that sentence "You have to login to view content"
i want to remove this sentence when user being logged in

sorry for my language hhhhhhhhhh
omarpop23
omarpop23
Forumember

Male Posts : 182
Reputation : 3
Language : Arabic
Location : Egypt

http://devs.ahlamontada.com

Back to top Go down

Solved Re: what is the problem in this JS code

Post by omarpop23 June 18th 2016, 11:09 pm

SLGray wrote:So you want to remove all contact fields from the profiles in messages? If yes, all you have to do is uncheck the message box for those fields: AP > Users & Groups > Users > Profiles > Contact Tab

Did that sentence appear before you added the code?

Invision version of forums dosen't had this part of contact user in profile details you have to add it by template
i add it but lable of Contact info appears to guests so i add that sentence "You have to login to view content"
i want to remove this sentence when user being logged in

sorry for my language hhhhhhhhhh
omarpop23
omarpop23
Forumember

Male Posts : 182
Reputation : 3
Language : Arabic
Location : Egypt

http://devs.ahlamontada.com

Back to top Go down

Solved Re: what is the problem in this JS code

Post by SLGray June 19th 2016, 12:26 am

omarpop23 wrote:
SLGray wrote:So you want to remove all contact fields from the profiles in messages?   If yes, all you have to do is uncheck the message box for those fields:  AP > Users & Groups > Users > Profiles > Contact Tab

Did that sentence appear before you added the code?

Invision version of forums dosen't had this part of contact user in profile details you have to add it by template
i add it but lable of Contact info  appears to guests so i add that sentence "You have to login to view content"
i want to remove this sentence when user being logged in

sorry for my language hhhhhhhhhh
Yes, it does.  AP > Users & Groups > Users > Profiles
Contact Tab
Modify the fields you want to remove from messages.  Uncheck the box called messages (display option).


what is the problem in this JS code 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 : 51482
Reputation : 3519
Language : English
Location : United States

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

Back to top Go down

Solved Re: what is the problem in this JS code

Post by Nemo June 28th 2016, 2:07 pm

Hello @omarpop23,

Is this solved? If it is, please mark it as Solved.

Hello
Nemo
Nemo
Active Poster

Male Posts : 1203
Reputation : 119
Language : Greek, English, French

http://www.helpgr.forumgreek.com

Back to top Go down

Solved Re: what is the problem in this JS code

Post by omarpop23 June 30th 2016, 9:20 am

yes i had solved it close topic
omarpop23
omarpop23
Forumember

Male Posts : 182
Reputation : 3
Language : Arabic
Location : Egypt

http://devs.ahlamontada.com

Back to top Go down

Solved Re: what is the problem in this JS code

Post by Nemo June 30th 2016, 9:38 am

Problem solved & topic archived.
Please read our forum rules: ESF General Rules
Nemo
Nemo
Active Poster

Male Posts : 1203
Reputation : 119
Language : Greek, English, French

http://www.helpgr.forumgreek.com

Back to top Go down

Back to top

- Similar topics

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