Info
AJ-Fork is, as the name implies - a fork. Based on the CuteNews 1.3.1 core, the aim of the project is to improve what can be improved, and extend what can be extended without adding too much bloat (in fierce opposition to the mainstream blogging/light publishing tools of today). The project aims to be backwards-compatible with CuteNews in what areas are sensible.
Installing
Installing CuteNews AJ-Fork is really quite simple, but to make it even more simple for you, this step-by-step guide has been written:
- Download the latest version of AJ-Fork
- Once downloaded, you'll need to unzip the contents to a temporary directory
- FTP to your server and create a directory named fork
- Upload all the files from the temporary directory you created in step two to the "fork"-folder you created in the previous step.
- Use your FTP client to CHMOD:
- 777 (755 might work): all files and folders in the data/ folder
- 644 (or just 777): index.php
- Open up a browser, point it to http://yoursite.com/fork/ and follow the instructions given by the installer
- Be sure to delete inc/install.mdu after the install has finished successfully (security reasons)
Upgrading?
If you're upgrading from an original CuteNews-version, here's what you need to do (if upgrading from an older version of AJ-Fork, you can skip step 4 and 5):
- Backup your files!
- Download the latest version of AJ-Fork
- Upload and Replace the following files and folders in your cutenews/ folder with ones from AJ-Fork:
- Make sure this file is present (don't overwrite if it is): data/active-plugins.php (chmod 777)
- Make sure this folder is present (don't overwrite if it is): data/plugins/ (chmod 777)
- skins/
- tools/
- inc/ (excluding install.mdu)
- plugins/
- all files in the main folder (index.php, etc)
- Copy auto_md5.php from the tools/ folder to the main folder of cutenews
- Open up a browser, point it to http://yoursite.com/cutenews/auto_md5.php. This tool will update your users.db.php to be compatible with the double-md5-encryption used for passwords in AJ-Fork.
- Log in as usual! ;) - You might need to clear your cookies.
- Make sure you stop by both System Configuration to save new options, and see if there are new template options in Options -> Edit Templates
Displaying News
One of the main strengths of cutenews aj-fork is its versability. You can include the news anywhere on any page (make sure the extension of the page is .php, not .htm) by simply using the include-codes described further down.
When including your news, you can use $number = "x"; to limit how many news are displayed simultaneously. If you have more news than this number is set to, prev/next-links will be generated at the bottom of your page. The same applies to comments if you've enabled comments-pagination in System Config. Just use $cnum = "x"; instead. You can customize the look of this and anything else aj-fork outputs in Options -> Edit Templates inside the admin area.
If you want to show news and archives from a certain category you can use $category = "ID"; where ID is the id (number) of the category. You can select multiple categories like this: $category = "ID1,ID2,ID3";
When you want to display news and headlines on one page for example, and want the headline clicked to be displayed where your news are included, you must use $static = TRUE; before including headlines.
Include-codes:
Showing active news
<?PHP include("path/to/show_news.php"); ?>
Showing active news with a specific template
<?PHP $template = "YOUR_TEMPLATE_NAME"; include("path/to/show_news.php"); ?>
Showing archives
<?PHP include("path/to/show_archives.php"); ?>
Showing the latest five articles
<?PHP $number = "5"; include("path/to/show_news.php"); ?>
Showing the latest five articles from category with id 2
<?PHP $number = "5"; $category = "2"; include("path/to/show_news.php"); ?>
Showing headlines and the latest article on the same page
<?PHP $static = TRUE; $template = "Headlines"; include("path/to/show_news.php"); $number = "1"; include("path/to/show_news.php"); ?>
Problems? Questions?
In all of the above examples you must replace path/to/... with the path where you installed AJ-Fork (do not use the URL but the path)
WRONG: include("http://site.com/cutenews/show_news.php");
CORRECT: include("cutenews/show_news.php");
In most cases where you include both news and headlines in one page, you must use $static = TRUE; .
When you use $number, $category, $template or any other variable, it must be used BEFORE include("show_news.php");
If you have any problems, you can always go to the official aj-fork site or even to the cutenews support forums and we'll be more than glad to help you out (check out the FAQ section of the forum before asking for help), AND make sure you state that you're using AJ-Fork and not standard CuteNews, as this will clear up alot of confusion.
New stuff
There's a few things you should know about AJ-Fork: To use the remember me-feature (so that commenters can check a box to make the script remember them till next time they comment), you need to update your add comment form-template with the following:
Input boxes for name and mail
Note {savedmail} and {savedname} - these are used to retrieve a users stored name and mail or url.
<input id="name" class="input" type="text" size="28" name="name" tabindex="1" value="{savedname}" /> <input id="mail" class="input" type="text" size="28" name="mail" tabindex="2" value="{savedmail}" />
"Remember me"-checkbox
{remember} will print the actual checkbox, while the rest will place a label for it.
{remember}<label for="rememberme">Remember info</label>
Header for comments
You can place a header that should show up above comments in the full story template, if you enclose it with [comheader]. The enable/disable comments-plugin will make sure the header is displayed where you have comments enabled, and that it is removed where comments are disabled.
[comheader]Comments:[/comheader]