Content Injector - Version 1.5 Manual - (C) Andrew Pemberton 2004. All Rights Reserved
This manual contains instructions on what you need to do to get Content Injector up and running on your site, and basic usage information and a simple walkthrough of the functions.
At the end I have also included some Frequently Asked Questions and answers, it is advised you read the readme.txt as well as this document.
Please visit the Faq & support section at my site www.p3mbo.com before emailing for support.
Contents:
1.0 Installation - Step By Step
---- 1.1 Requirements
---- 1.2 Uploading
---- 1.3 Using the Installer
2.0 Setting Content Injector Up
---- 2.1 Logging In
---- 2.2 Changing Your Password
---- 2.3 System Setup
3.0 FAQ
1.0 Installation - Step By Step
1.1 Requirements
Okay, first of all what you need to do is check with your host whether you have support for both PHP & MYSQL, if you don't have both of these, then there's a big problem, and I'm afraid you won't be able to use this script (unless you find somewhere else to host your site that is ;) )
If your site supports PHP and MYSQL, thats great - but you'll need some more settings before you can continue, firstly you'll need your database host name (usually localhost), you'll also need the username and password too. (for the database)
And, if you haven't already, unzip the contents of the zip file you downloaded being sure to maintain the directory structure of it
Once you've done all the above, we can get started.
1.2 Uploading
Now, fire up your ftp client, if you don't have one, try and find a good one with CHMOD capabilities, such as cuteFTP (http://www.globalscape.com), I will not provide support on how to use these as thats up to your FTP Client provider to do so.
Connect to your site, and upload the files from the zip file, maintaining the directory structure, I recommend uploading to the root of your directory, although it is not necessary.
Your uploaded structure should look something like the following:
/admin/*.* (where *.* means all files within it)
/lang/*.*
/add-ins/*.*
/sql/*.*
/files/
/setup.php
/config.php
/function.php
/generate.php
/index.php
/install.php
/menu.php
/news.php
/pagemap.php
/readme.txt
What we now need to do is CHMOD the files and admin directory, and the setup.php file to the value of 777 (rwxrwxrwx). If you are unsure how to do this, consult your FTP manual.
And thats the uploading step complete!
1.3 Using The Installer
This is probably the trickiest step of the install (for the beginner anyway) what we now need to do is create the database that you wish to use for the Content injector. Again, I cannot tell you how to do this as everyone uses different tools for it. the sql would be:
CREATE DATABASE content_inj
Or, using PHP My Admin, goto the first page (or click home) and fill in the "Create database" text box and press Create. Once the table is created, open the table and look for the SQL import section, on different version of PHP my Admin it differs, but I'm sure you'll be able to find it, once you have click Browse (to select a file) and locate tables.sql (from the zip file you extracted) then press Go, and if it returns a successful command, we're all ready, if you get a failed command or other problem, consult the appropriate manual.
Step 1: File Checks
After the database is created navigate to http://yoursite.com/install.php, where yoursite.com is obviously your site (but you knew that anyway - right?). Once your there, the installer should check to see if all the files are found.
If you get a "Not Found" Error, then you will need to re-download the script again from www.p3mbo.com to obtain the missing files. If you get a "Not Writable" error, that means that you didn't CHMOD the relevant file.
If all goes well, you should see something similar to below.

Step 2: Database Setup
Click to go onto step 2, this step involves setting up your database, and configuring some paths - you should see something similar to the below. Enter the correct settings and click next to proceed. If you receive any errors, then a database connection could not be established, and you should check your settings with your host.

If you are unsure of the ROOT Path or URL Root, leave them as they are set. If they are not set then you should ask your host for these.
The ROOT PATH is the system path to where content injector is installed on your server, the URL ROOT is the location relative to your domain. For example www.yoursite.com/contentinjector/ would have a URL root of /contentinjector/.
Step 3: SQL Setup
Now you need to populate (enter the information) into the database, but it is not as complicated as it sounds - as it is all done in an automated process. What you must do though, is choose the correct SQL file to use.
In readme.txt there is a list of which file is for which purpose.
New installations should use tables.sql

Once you have selected the correct SQL file, click to continue and hopefully you should be shown a "Success" screen, if not check the error and try to resolve the problem.
You are now ready to use Content Injector! But first you should delete the install.php file (for security reasons) and then you can login by using (admin/admin - for new installations)
If you have any troubles with the above, email support@p3mbo.com or post on the support sefction of my site (www.p3mbo.com) for help.
2.0 Setting Content Injector Up:
2.1 Logging In
Goto your site to the location you uploaded the content injector too, and affix /admin/ on the end of it ie. http://www.mysite.com/contentinj/admin/. You should see a login screen similar to the one below:

If you see the above, then enter the details: (all in lower case)
username: admin
password: admin
You should now (hopefully) be logged in. If there are any errors on the page, it's likely a file path is wrong or a file is missing, take a look at the error message and try and decrypt it, ie if it says "Cannot find file x.php in xxx" it **could** (and does) mean that the file x.php can't be found :) If there are no errors, then you've done everything right.
2.2 Changing your password
If everything looks okay, click the Edit Users button:

Then click Edit, (next to admin)

You should then be displayed with some basic user information, you can change the admin username, email address and password here. It is recommended you change your admin password right away!
2.3 System Setup
Next, click System Setup. And fill in the basic options in here. Note: Upload path should be an absolute directory (look at the Absolute Root Dir text for an idea of how this should look). Edit the necessary templates (extra information is provided besides them for the allowed (Case sensitive) fields you can use in them.
The system setup area should look like the following:

Once you've filled in your settings and hit submit! That's it! Away we go!
3.0 FAQ
Question:
The Date and Time Settings I want aren't allowed in the System Setup - how do I add a new one?
Answer:
To add a new date or time format, you'll first need to know the PHP standard date & time formatting options, there is a list of them all on the php site (http://www.php.net/manual/en/function.date.php).
What you then need to do, is open /admin/setup.php and goto the $date_formats array (around line 750) or $time_formats (around line 800). And add a new format on the end in a similar style, be sure to put a , on the end of each line (apart from the last).
An Example, if I wanted to add a new date format to match this "03 Nov, 03" the format would be d M, y so therefore i would add 'd M, y'
below, making sure to add a , on the previous element
.....
'n/j/Y',
'Y-m-d', // Note the added ,
'd M, y'
And thats it!! - Easy! - the Same format goes for time and file extensions (see upload.php)
Question:
The script says it has a news archive feature in it? Yet I cannot find it?
Answer:
From your main page, simply use index.php?action=news_archive and that's your archive.
Question:
I don't want the news displayed on the main page like it defaults too? Is there anything I can do?
Answer:
Of course there is, we just need to edit some files (you knew i was going to say that).
Open /generate.php and find the line $ptitle="News"; (around line 72) change this to whatever you want your default page title to be for example $ptitle="Welcome to my site";
Then in /function.php fine the line include('news.php'); (around line 364) and change news.php to point to the default page you want to show, ie mainpage.php.
Then in your /index.php template use <? include ('news.php');?> wherever you want the news to appear and content() wherever you want your content to appear. (SO you could have it appearing down the side like on my site)
If you don't want news displayed at all, turn off News in system setup and then set your welcome page up from there.
Question:
What are tags to call the content in index.php?
Answer:
USABLE FIELDS:
<? include ('menu.php'); ?> --> includes the menu into the page
<?content(); ?> --> includes the content
<? print "$ptitle"; ?> --> includes the page title as appears in the menu
<? print "$mtitle"; ?> --> includes the title of the menu the page belongs too
<? print "$prevnext"; ?> --> includes a previous and next link in the page (when needed)
ADD-INS FIELDS: (you may not have these depending on the version you downloaded) visit www.p3mbo.com for more of these.
MY ADD-INS:
<? headlines(x);?> --> includes news headlines, where x is the amount you want, ie <? headlines(5);?>
<? lastX(x);?> --> includes the last x page links in your page, where x is the amount you want, ie <? lastX(5);?>
<? pageTrace(); ?> --> provides the menu path to the current page ie Menu 1 > Sub Menu 1 > Submenu 1.1 > Sub Menu 1.1.2
Question:
Content injector is winging saying it cannot redeclare function parseCode? Help!
Answer:
If you upgraded from v1.2, or downloaded the BB Code addon then this problem is caused, that is due to the BB Parser being moved into the core of the script. To fix the problem, simple delete BBCode.cinj from the /addins/ directory
Question:
Content Injector is saying it cannot find the files directory?
Answer:
This problem is caused when content injector can't find your files directory :), firstly ensure it is CHMOD 777'ed and then check the path to it in System Setup, if it still continues to moan, then kick it and try again - hopefully this should fix it.
Question:
Can you add feature x into the script?
Answer:
Ever since the initial release of the script, the only things I've been changing are the user requested ones, so so long as it isn't something stupid like "can you add a gardening program to your script?" then I'll probably add it, so let me know! andy@p3mbo.com
Question:
Why have you done 'feature x' like that? Wouldn't it be better to do it like this?
Answer:
Probably would be, but you have to remember one thing... I'm lazy, and if using a cheap and nasty way that works will save me 12 hours, then the cheap / nasty way wins hands down. Feel free to modify if yourself if it really bothers you that much.
Question:
The admin panel won't let me login at all? Any ideas?
Answer:
Firstly, check your /admin/cinj_info.php if everything looks okay (which I'm sure it does) then check your not using a stupid browser, by stupid I mean anything not past version 4 yet (sorry to all those IE 3 users who thing plain text websites are the way forward). If your using a sensible browser (IE6 ;) ) then check cookies are enabled, if they're not - enable them - they don't bite. If this still doesn't fix it, then I guess you could email me and I'll take a look at it for you.
Question:
What kind of licence the script released under?
Answer:
Basically, the script is free and will remain free unless I say otherwise, you may edit, burn, destroy, drown or admire whatever you wish within the script, so long as my copyright tags and documentation remain intact. You may NOT sell this script and or claim it to be of your own work, anyone found to be doing so will suffer my wrath! If you wish to use bits of my code in your script, then feel free to do so, but a nice note saying "thanks to the good man from p3mbo.com" wouldn't hurt now would it?
Question:
I want to make an addin - how do I do this?
Answer:
Visit my brilliant site at www.p3mbo.com and look at the developers information in the add-ins section. There and only there shall you find the information you seek.
Question:
I love you! - Will you marry me?
Answer:
If your rich... ;)
Got a Question you really want answered? Email it to help@p3mbo.com.