|
PRIVATE ENTRIES
|
Have you always wanted to make a private blog, but don't know how in cutenews? Wordpress is too complicated for you? Well, then this is the right tutorial for you. ^_^ You can see a sample of how I used cutenews for both my private and public entries here.
- If you don't know how to install cutenews, then go back and read the other tutorial. Then come back here when you are done.
- Okay, first you need to install a new cutenews. Why? Because it requires that you use categories and if you've archives your news, then you can't go back and change the category. Why not? I don't know. I tried doing it and it didn't work. If it works for you, then that's great. You don't have to install a new cutenews.
If you are already using categories, you don't have to install a new one either. You *must* put all the news, archives or not archives, in a category in order for this to work.
Still want to keep your old news though. Just make a page called "oldarchives.php" and put this:
<?PHP
include("/path/to/show_archives.php");
?>
Your path/to will be where you originally have your cutenews. For example, if it's in the cutenews folder, then it will be cutenew/show_archives.php.
This will allows people to have access to your old news.
- So install a new cutenews and give the new folder a different name. For the purpose of this tutorial, let's say we name the new cutenews folder "cutenews2." ^_^ You can name it whatever you want, but you can't name it the same as the old one.
- Now login to your cutenews and make 2 categories: Private and Public. You can have more, of course, but let's not confuse ourself right now.
After you've make both the categories, do you see something like...ID, name, icons, and action?
Your private should have the ID of 1 and your public should have the ID of 2, but if it's different, then that's okay. Just remember what they are.
- Next, you will put the public and privates on different pages. Your main page or index page should be where visitors can view the public entries and another page should contain the private entries.
[A] Index page -- Public
On your main page or index.php page, put the following code:
<?PHP
$category = "2";
include("cutenews2/show_news.php");
?>
[B] Other page -- Private
Make another page and name it whatever you want (ie. private.php). Put the following code:
<?PHP $category = "1"; include("cutenews2/show_news.php"); >
Notice that the category ID matches the categories ID that you've just make. If you want the private entries to show both private AND public, then just change $category = "1"; to $category = "1,2"; and that should make it show both.
- Now, whenever you add a new entry, make sure that you select a category, otherwise, it won't show up.
- Last, but not least, for Part 1, you will make the archives. Like the news, you'll need two new pages for the archives.
[A] archives.php -- Public
Put the following code:
<?PHP
$category = "1";
include("cutenews2/show_archives.php");
?>
Now, link this page on the index page.
[B] archives2.php -- Private
Put the following code:
<?PHP
$category = "2";
include("cutenews2/show_archives.php");
?>
And if you want the archives2.php to show both private and private, just change $category = "1"; to $category = "1,2"; like the other one.
- Then now all you have to do is find a good scripts that lets you protect that page where your private entries are on. Try and find one that uses sessions and/or cookies. Here are a couple that you can use:
+ Simple Protection - I think this one has sessions.
+ Yoursite.nu - In the tutorial section, they have a php tutorial for password protecting. However, it doesn't have sessions or cookies.
+ DDG - In the PHP tutorials section.
+ If you go to google, search for -- copy and paste this --> "Password Protections" and "scripts" and "PHP". It should look for all the words.
- If you need help, go to the forum because I don't do help anywhere else.
Tutorial is written by Lingling. Do not take this tutorial and put it on your site without my permission. WRITTEN ON: APRIL 9, 2005 | UPDATED ON: JULY 30, 2005 ~ Cutenews ~
|