phpNUKEtutorial: phpNUKE tutorial in English
Posted on Thursday, January 23 @ 13:36:59 GMT+7 by admin
phpNuke Tutorial ( looks like its out of date now hmm? ....doctornuke 22/10/03)
***Please noted that this article was written since nuke 5.5 ***** Table Of Contents: (AIM: el2ik E-Mail: el2ik@hotmail.com) :: 1) Downloading Nuke 2) Make sure you have SQL Database 3) Downloading phpMyAdmin 4) Configuring phpMyAdmin 5) Uploading phpMyAdmin 6) Editing "config.php" in your nuke folder 7) Editing "sql_layer.php" in your nuke folder 8) Uploading Nuke & CHMOD Files In FTP 9) Finishing off the install, create super user (admin) 10) Useful tips for setting up your website 11) Themes: Adding, Changing, Deleting 12) Adding pages on your menu *** 13) Making Nuke site yoursite.com instead of yoursite.com/html/ 14) Resource Website's for Nuke (Themes, Addons, etc) 15) Recommended FTP Program's and HTML/Text Editors 16) Contact Me for any help, anytime!
1) Downloading Nuke
http://www.iawebdesign.com/PHP-Nuke-5.6.tar.gz (my host, dont have to sign up as in phpnuke.org)http://www.phpnuke.org (recommend version 5.6), and unzip it.
2) Make Sure you have SQL Database
Make sure you have a online database, (for those of you on powweb, under ops.powweb.comand add a user, it cost $10)
3) Downloading phpMyAdmin
Download phpMyAdmin-2.3.0 or phpMyAdmin-2.3.1 Go to http://www.phpmyadmin.net/ and click on "Download phpMyAdmin-2.3.1-rc1-php.zip" Keep folder named as is, the lines in config.inc are the same in both versions. If you download version 2.3.1, replace all the URL's I wrote with the 2.3.1 folder (I recommend phpMyAdmin-2.3.0 if you want to follow this tutorial exactly)
4) Configuring phpMyAdmin
In your phpMyAdmin folder, open the config.inc in any text editor or HTML editor (i.eCute HTML, Wordpad, etc)
PhpMyAdmin Settings - Note: Lines are the same for versions 2.3.0 & 2.3.1
Line 39: Between the ' and ' put your URL where you will upload your phpMyAdmin folder too (such as: http://www.yoursite.com/phpMyAdmin-2.3.0). Line 72: Between the ' and ' put your SQL User name you created on your host. Line 73: Between the ' and ' put the password for your SQL User name from your host. Line 75: Between the ' and ' put your SQL database name that you created on your host.Save the file, and close it.
5) Uploading phpMyAdmin
Now, upload the entire phpMyAdmin-2.3.0 folder to your host, and go to: http://www.yoursite.com/phpMyAdmin-2.3.0/index.php and on the left frame, you should see your database name, click on it, then at the top there should be 5 options, click "SQL". At this page, near the bottom, it says, "Or Location of the textfile:", click on browse, browse your computer to your nuke folder (where you unzipped it earlier), and go to the "sql" folder, in it should be "nuke.sql", select it, then click "go" or "submit" or whatever it says. Now you have imported your sql database needed for nuke. Half the battle is over :)
*Note - DO NOT change the folder name for your phpMyAdmin, KEEP IT AS "phpMyAdmin-2.3.0", itwon't work with a changed name.
6) Editing "config.php" in your Nuke folder
Now, on your computer, go to your nuke folder, then go into the "html" folder, now open the "config.php" file, here are the following lines that you will have to edit:
Line 32: $dbhost = "localhost"; <--- Make sure this line stays as localhost (refers to the server you're on) Line 33: $dbuname = "SQL User Name"; <--- Your database user name that you created on your host earlier Line 34: $dbpass = "Password"; <--- The password to your user name from the database Line 35: $dbname = "Database Name"; <--- Your database name Line 36: $prefix = "nuke"; <--- Keep as nuke Line 37: $user_prefix = "nuke"; <--- Keep as nuke Line 38: $dbtype = "mysql"; <--- Originally "MySQL", MUST CHANGE to "mysql", it is case sensitive and can cause errors
That's all of the editing you'll have to do in the config.php file, save it, and close it.
7) Editing "sql_layer.php" in your Nuke folder
Go back to your Nuke folder on your computer, go into the "Includes" folder, and open: "sql_layer.php" in your text/html editor. Here you are going to have to use the search option, (Edit, then search for some), search for "MySQL" and change everything that is "MySQL" to "mysql", yes, this is case sensitive and must be fixed. Note -- There are some other variations of it, make sure to JUST change "MySQL" to "mysql", when you are done, save it, and close it.
8) Uploading Nuke & CHMOD Files In FTP
Now here's the waiting part. Go into your FTP, upload the entire "html" folder from your nuke directory on your computer onto your website, just the "html" folder and all of it's contents. This may be a long wait (1/2 hour or so common). Remember, by now, you should have edited the necessary files and overwritted them so when you upload them they are fixed. Now, in your FTP, you are going to have to CHMOD. If you don't know how, for most FTP programs, you right click on the file/folder, and go to "Properties/CHMOD", CHMOD all files to 666, and all folders to 777. I don't believe you have to do everyfile, but it won't hurt. Essential files, would be ones like "config.php", "sql_layer.php", and all the folders. Once it is done uploading, and you CHMOD-ed everything, go to the next step.
9) Finishing off the install, create super user (admin)
So, it's done uploading, error free (I hope!), and now what. Well now you will have to go to this url: "http://www.yoursite.com/html/index.php", it should say "Create A Superuser" somewhere on the page, THIS IS YOUR ADMIN USER NAME AND PASSWORD, REMEMBER IT. Once you have created a super user, congrats!!! You have installed phpNuke, and the sky is the limit from there.
10) Useful tips for setting up your website
http://www.yoursite.com/html/admin.php?op=Configure Change general options (Title, theme, annoying text at the bottom, etc)
http://www.yoursite.com/html/admin.php (All from the admin page) Click on the blocks link, de-activate the blocks you do not want (such as, the Amazon one) Click on the modules link, de-activate and activate the links within your blocks that you want Click on add story, post's new's on your website Click on surveys, add/edit/delete the survey on your website
11) Themes: Adding, Changing, Deleting
If you want to change a theme that is already installed in Nuke (comes with around 10), go to "http://www.yoursite.com/admin.php?op=Configure" and go to "Default theme for your site:" and just select a new one, and go to save changes.
If you want to add a new theme for your site, you will have to download a theme off of a website, then upload the whole folder to /html/themes/ in your FTP. Then once it's done uploading, go back to "http://www.yoursite.com/html/admin.php?op=Configure" and go back to the "Select theme:" and select the theme you just uploaded, simple as that!
12) Adding pages on your menu
Adding pages on your menu's... Yes yes, can be hard to try, but VERY simple. Go to your FTP, go to your html/modules folder. Once there, create a folder, for what you want the link in the menu to be called. 2 Examples: "Test", but if you want spaces, you will have to do this, "Test_Test". Ok, now, go to your html/text editor on your computer, put this code in it:
?php // Add a "<" before ?php
if (!isset($mainfile)) { include("mainfile.php"); } $index = 0;
include("header.php");
OpenTable2(); // Use the html filename of your chosing below. include("yourpage.html");
CloseTable2();
include("footer.php");
?>
At Line: 10, where it says "yourpage.html" change that with the html file you will include, I recommend just using the same name as your folder, i.e, if the folder you created was named, About, on line 10, put about.html, easiest that way.
Now for the html file, all you have to do, is create a basic HTML file offline, UPLOAD IT TO YOUR ROOT NUKE DIRECTORY ON YOUR FTP, for example, /html, put the html file in there, you do not have to make it look like your Nuke site or anything, as the includes in that php code, added the blocks and whatnot, so you could do a simple code Save that as yourpage.html, put it in your root Nuke directory, and there you go, you have to do one more thing though, go to: "http://www.yoursite.com/html/admin.php", click on the Modules link, find whatever you named it in the list, and click "Activate" on the right, and it'll be on the menu. See it's easier than people think :)
13) Making Nuke site yoursite.com
Well all you have to do, is create this file, upload it to your root directory for your website saved as "index.php" and there you go!
?php // Add a "<" before ?php header('location: http://www.yoursite.com/html/index.php'); ?>
That's it! Save that as index.php and upload it to your root folder in your host.
14) Resource Website's for Nuke
Some helpful resource site's for Theme's, Add-Ons, etc!
I'm online almost all the time, so feel free anytime with any problems you're having, or just want to chat, tell me what you think of this tutorial too! :)