Skins

Is it possible to have a private blog?

Yes, it is pretty possible.

Allthough Nucleus doesn't have a private post feature built-in, it is quite easy to tell it to only display certain content to logged-in site members. This is a example of how it could be done:

  1. duplicate ('Clone') your skin on the Skins page of the admin area
  2. Go to each of the Skin parts of the cloned skin and add this to the very beginning of each and every one, just before <html> : <%if(loggedin)%>
  3. Add the following to the end of each skin part, right after </html> : <%else%>Sorry, you have to be logged in to view this content<%endif%>

Create a new blog and use this skin on it. Now the content of this blog will only be viewable by the members of your site (and they have to be logged in to view it). But, if someone knows Nucleus well enough, they can force it to display an item/blog though another skin. For instance, through an url like this: http://yoursite.com/index.php?skinid=1&blogid=2

To prevent this from happening, you have to force that index.php file to display content from one certain blog using one certain skin. This can be achieved by editing the index.php file (or whatever it is called in your situation) that displays your Nucleus blog. If you change it to the following:

<?php
 
$CONF['Self'] = 'index.php';
include('./config.php');
selectBlog('shortblogname');
selectSkin('skinname');
selector();
 
?>

...only content from one blog using one skin. (the selectBlog and selectSkin methods are explained here)

However, this is only a foolproof 'Private Blog' solution if you there is no copy of the Nucleus index.php file residing on your server. Because if that is the case, smart Nucleus-savvy visitors of your site can use those other copies of the index.php file to call 'private' content using a string like this:

yoursite.com/copy-of-index.php?blogid=X&itemid=Y&skinid=Z 

You can only prevent this by restricting those files to a specific skin and blog, using the above mentioned selectSkin and selectBlog methods.

section: Skins | submitted by roel on 2004.Sep.23 | 7106 views

item rate
Total votes: 19 - Rating: 7.95

Please tell us how useful this answer was to you (0 = useless, 10 = very very helpful):

10