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:

Username:   Password:
Locked Topic
[ C ] Auto Disable guest View on Blogs
Topic Started: May 22 2013, 11:50 PM (501 Views)
welshtony
Member Avatar
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.
Offline Profile Goto Top
 
DaPizzaMan
Member Avatar
#TeamSupport

This should do the trick:
Code:
 
<style type="text/css">
#blog_settings tr:nth-child(4) {
display:none;
}
</style>
Just place it in the Javascripts section of your Board Template.
Offline Profile Goto Top
 
Cory
Member Avatar
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:
Code:
 
<script type="text/javascript">
//<![CDATA[
$('#blog_settings input[name="guest_vistors"][value="0"]').attr('checked', 'checked');
//]]>
</script>
Offline Profile Goto Top
 
welshtony
Member Avatar
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?
Offline Profile Goto Top
 
Cory
Member Avatar
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.
Offline Profile Goto Top
 
welshtony
Member Avatar
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
Offline Profile Goto Top
 
Eccentric Feline
Member Avatar
梦想
[ *  *  *  *  *  *  *  * ]
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.
Offline Profile Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · Closed Requests · Next Topic »
Locked Topic