| We hope you enjoy your visit. You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free. Join our community! If you're already a member please log in to your account to access all of our features: |
| [ C ] Auto Disable guest View on Blogs | |
|---|---|
| Tweet Topic Started: May 22 2013, 11:50 PM (501 Views) | |
| welshtony | May 22 2013, 11:50 PM Post #1 |
|
www.f6oc.co.uk
![]() ![]() ![]() ![]() ![]()
|
Board Address: http://www.f6oc.co.uk Board Software: ZetaBoards Description: Remove the Allow guests to view your blog? in blogs If you never seen my other thread I had a major issue with spam on my blogs. I think it is sorted but would like this code to reduce any risk of it happening again. Basicly as standard members have this option Allow guests to view your blog? What I would like to do is remove is set it to no and remove it altogether as I don't want any guests ever seeing blogs. Ideally id like it done without javascript if possible. As most of you know thats easy to get around. If javascript will be the only way then its better than nothing. Or if you have a better idea I am willing to listen as I class this as a major security issue. |
![]() |
|
| DaPizzaMan | May 23 2013, 03:54 PM Post #2 |
![]()
#TeamSupport
![]()
|
This should do the trick: Just place it in the Javascripts section of your Board Template. |
![]() |
|
| Cory | May 23 2013, 04:48 PM Post #3 |
|
Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
'Allow guests to view your blog?' is set to Yes by default, so you would have to use a combination of AJAX and cookies to automatically change that setting to No when a user logs in, or you could use DaPizzaMan's suggestion and the following code, but this will require users that already have a blog to edit their blog settings:
|
![]() |
|
| welshtony | May 24 2013, 11:00 AM Post #4 |
|
www.f6oc.co.uk
![]() ![]() ![]() ![]() ![]()
|
So if I use both codes all new blogs will be set as No and they wont be able to set it as yes? |
![]() |
|
| Cory | May 24 2013, 05:12 PM Post #5 |
|
Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
The coding DaPizzaMan posted hides the option altogether if your web browser supports the CSS3 :nth-child() selector. The coding I posted changes the option to No instead of the default Yes. A user that already has a blog that had the default setting saved will have to edit their blog settings in order for the change to take affect. By edit blog settings, I mean all they have to do is click the 'Save Settings' link when the codes are added to your board. |
![]() |
|
| welshtony | Jun 6 2013, 07:38 AM Post #6 |
|
www.f6oc.co.uk
![]() ![]() ![]() ![]() ![]()
|
Woops forgot about this. Right so far so good seems to be working. Can't see the bit to select yes. so looks like it is working. Time to put it to the test. Thanks guys. Admin might as well mark this as complete and if I have an issue I will PM whoever completes it to re open this. Thanks again all |
![]() |
|
| Eccentric Feline | Jun 7 2013, 07:37 AM Post #7 |
|
梦想 ツ
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Completed! Your request has been completed. If you have any questions or concerns regarding the state of your request, please feel free to contact me via PM. |
![]() |
|
| 1 user reading this topic (1 Guest and 0 Anonymous) | |
| « Previous Topic · Closed Requests · Next Topic » |
| Track Topic · E-mail Topic |
8:57 PM Jul 10
|


![]](http://b1.ifrm.com/0/1/0/p601690/pipright.png)




8:57 PM Jul 10