General Admin CP:
The section covers the general use of the Admin CP.
Site Configuration
This section allows you to change dozens of variables that affect different things throughout the site. You can add your own, but it isn't recommended unless necessary.
Site Includes
This section allows you mainly to change whether or not a user needs to be logged in to access different areas of the site. Other options and adding your own includes are for advanced users.
Article Types
This section allows you to create, edit and delete article types. Sufficient information is given in this section for each field when adding an article type.
More to come...
General Content CP:
The section covers the general use of the Content CP.
Albums
Albums are essentially directories in which you upload files to. Albums can be related to a game and then files in that album can become the game's specific screenshots. When creating a new game, selecting "Colsolidate Albums" will create a new album with that game's name. Alternatively, you may create an album from the "Create Album" section of the Control Panel. Albums are usually created with games by default and you will usually only be creating your own albums for images, files or movies that are not related to a specific game.
Article Auto_Images
To insert one or more recent screenshots into an article, put ":img:" (without the "s) anywhere in the body text of an article. The frontend code when displaying the article will then use the most recent screenshots and insert them where the ":img:"s are placed.
mod_rewrite:
The section covers the setup and modifying of mod_rewrite. mod_rewrite essentially changes your URLs to be eye and search engine friendly. Activating mod_rewrite will change a link that goes to http://yoursite.com/index.php?view=gamepage&game=75&cat=3, to something simple that search engines can access and index like http://yoursite.com/3/game/75.html. VGPortal's defauly mod_rewrite settings get the job done, but you can also custimise the rewrite rules to suit your site.
Turning On & Off
This is done through the mod_rewrite value in the Admin CP's Site Configuration. "1" turns it on, "2" turns it off (without quotation marks).
.htaccess
This file (located in the root directory) is where the mod_rewrite actually occurs. In it you'll find the rewrite rules and you can add your own or edit existing ones. Here's how:
This is a rewrite rule - RewriteRule ^games.html$ index.php?view=games . The spaces seperate it into 3 sections, 'RewriteRule', '^games.html$' and 'index.php?view=games'. 'RewriteRule' is how you let it know that it's a rewrite rule and thus begins each rule. '^games.html$' is the new URL that will mask the old URL. Don't worry about the ^ at the start and $ at the end, they're not part of the URL, but are required in this instance to let it know where the URL begins and ends. 'index.php?view=games' is the old URL that will be rewritten. So the rule knows that when games.html is called, it will use the URL 'index.pgp?view=games'.
This rewrite rule uses variables - RewriteRule ^(.*)/news.html$ index.php?view=news&cat=$1 . You'll notice the '(.*)' in the "new" URL and the '$1' in the old URL. Basically, $1 will be replaced with the number that is in the location of the (.*). So if the URL being called is 3/news.html, it will insert the 3 into the "old" URL, $index.php?view=news&cat=3. You can have multiple variables in a URL by increase the number sequentially (eg. $1, $2, $3) and adding more '(.*)'s. The "old" URL will place the variables into it's variable locations in the order of the numbers and the order they're placed in the "new" URL. For example, RewriteRule ^blah-(.*)-hah-(.*)-boo-(.*).html$ index.php?view=blah&id=$3&game=$1&cat=$2 with the URL being blah-700-hah-100-boo-300.html will put them into the URL like this: index.php?view=blah&id=300&game=700&cat=100.
It may seem complicated at first, but give it a try and look at the existing rules and you should be able to figure it all out.
What you will most likely want to do is insert your own rules for your categories. By default the rules use the category IDs, but you might want to use the names or abbreviations of categories. For example, instead of www.yoursite.com/3/news.html for the news page for the category with ID 3, you may want to make it www.yoursite.com/xbox/news.html if XBox was the category with the ID of 3. You could achieve this by a rewrite rule like this - RewriteRule ^xbox/news.html$ index.php?view=news&cat=3 .
rewriteFunctions.php
This file (located in the root directory) compliments the .htaccess file by being a location where you can change how different URLs are rewritten as all links in the VGPortal script use this functions page to determine how they're displayed when mod_rewrite is enabled. One thing you may want to do in this file is make category IDs be displayed as category names or abbreviations. One way to do this would be to entire IF statements for each possible category ID and have the category ID variable changed to the category name. This is an example of how to do this:
if ($game_category == "2") { $game_category = "ps2"; }
if ($game_category == "3") { $game_category = "xbox"; }
You could insert this in a function with the category variable of "$game_category" above the declaration of the $rewrittenURL variable.
You can insert and modify your own functions in this file to match your rewrite rules in the .htaccess file.
Menu Links
Simply change the link location of menu items in the Admin CP. Eg. "?view=games" to "/games.html". Remember to put a forward slash at the start.
File Management:
The section covers the setup, uploading and maintenance of screenshots and movies.
Albums
Albums are essentially directories in which you upload files to. Albums can be related to a game and then files in that album can become the game's specific screenshots. When creating a new game, selecting "Colsolidate Albums" will create a new album with that game's name. Alternatively, you may create an album from the "Create Album" section of the Control Panel. Albums are usually created with games by default and you will usually only be creating your own albums for images, files or movies that are not related to a specific game.
You may also edit and delete albums from the "Browse/Manage Albums" section in the Content CP.
Image Options
Admin Only: These can be changed from the 'images'
section of the Site Configuration options in the Admin CP.
Thumbnail Width - $img_tm_width - The width image thumbnails will have when
created.
Thumbnail Height - $img_tm_height - The height image thumbnails will have when
created.
Watermark Transparent Color - $img_wm_color - The color on the watermark PNG
that will be transparent (if any). Do not use transparency in the the PNG file
itself, instead make the areas you want to be transparent a certain color and
enter that color in this setting.
Watermark Transparency - $img_wm_trans - The opacity of the watermark ('100'
= not tranparent, '0' = completely transparent).
watermark.png - This file resides in the admin directory. The default file is a VGPortal watermark and is there as an example. Create you own watermark.png and replace the default one. Do not use transparency in the the PNG file itself, instead make the areas you want to be transparent a certain color and enter that color in the $img_wm_color setting in the Site Configuration.
Know that images you had before the update will not have the new watermark added to them unless you re-upload them. If you create a new watermark then the same thing applies, you will need to re-upload old images to have the new watermark. The same applies with thumbnails and old images, you will need to re-upload old images to have thumbnails of them created.
File Upload
Go to the "Upload New Files" section of the Content CP. You can change the amount of files to upload at a time by putting the desired number in the Multiplier field and clicking the "Multiply!" button.
Select the album you wish to add the files to from the drop down list. There are three fields for each file, "File Name", "File" and "Description". For images, "File Name" does not get recognised and the images are given a "random" file name. Clicking "Browse" next to the "File" field allows you to search through your computer to find the file you wish to upload. "Description" may or may not be used on your VGPortal frontend, it is a field that allows you to describe the image. It would most commonly be used as an image caption. When you have inserted all the files, click the "Upload File(s)" button. If you uploaded an image, it will upload it with the watermark on it and also a thumbnail version. Other files will simply be uploaded normally.
Movie Thumbnails
Go to the "Manage/Browse Albums" section of the Content CP. You will see a "Movie Thumbs" column and "Upload" for each of the albums. Select "Upload" to go to the thumbnail upload section for that album.
Article Screenshots Insertion :
The section covers the new screenshot insertion addition.
Use
You'll notice below each WYSIWYG editor when adding/editing an article, there's a link to choose a screenshot and a button beside the link. The link opens a new window where you can select and album andview it's screenshots. Once you've chosen the screenshot you want to insert, click on the thumbnail and you'll see that the image source has been entered into the "Screenshot Chosen" field. You may then enter text into the "Caption" field if you want a caption for the image, otherwise leave it blank. Now click the "Insert Screen" button and the window should close and you'll notice that the button below the WYSIWYG editor is now clickable. Click in the text WYSIWYG editor to select where you want the screenshot to be placed and then click the "Insert Screenshot" button below the WYSIWYG editor. It should now be inserted.
Errors
Visit the VGPortal forum for help.
Forum Integration:
The section covers the setup of the Forum Integration.
Setup/Activation
You will want to create a usergroup on your forum for admin members and one for staff members. The member system relies on the forum and this includes the admin and staff.
Setup and activation of the forum integration is done from the Site Configuration area of the Admin CP. Filter the contents by 'integration'.
$forum_admin = IMPORTANT You
must provide the correct information here before activating the integration.
Enter the id # of the admin usergroup on your forum. You can find this from
the forum database or usually in the Admin CP of your forum under usergroup
management.
phpBB Note: This uses the user's rank. So you'll want a rank
for VGPortal admin users and staff users.
$forum_location = The full location of your forum (eg. http://yoursite.com/forum).
$forum_reg = The full location of of your forum's registration page (eg. http://yoursite.com/forum/register.php).
$forum_staff = Enter the id # of the staff usergroup
on your forum. You can find this from the forum database or usually in the Admin
CP of your forum under usergroup management.
phpBB Note: This uses the user's rank. So you'll want a rank
for VGPortal admin users and staff users.
$vb_host/$ipb_host/$phpbb_host = Your forum database host (usually 'localhost').
$vb_dbname/$ipb_dbname/$phpbb_dbname = Your forum database name.
$vb_user/$ipb_user/$phpbb_user = Your forum database user.
$vb_pass/$ipb_pass/$phpbb_pass = Your forum database password.
$vb_prefix/$ipb_prefix/$phpbb_prefix = If you have a prefix for your the forum tables in your database, enter it here (including '_').
$vb_switch/$ipb_switch/$phpbb_switch = '0' = integration off, '1' = integration on. Make sure you have the correct admin id number in the $forum_admin field before setting this to '1' otherwise you will not be able to access you control panel.
Errors
If you made an error and have locked yourself out of the Admin CP, you can change the settings from PHPMyAdmin (or similar) in the vg_settings table.
Before visiting the forum for help, please ensure that you have entered your database information correctly. Visit the VGPortal forum for help.