File: /home/httpd/html/baretube.com.new/admin/special_documentation/awe_implementation_instructions.txt
Manual AWEmpire Integration on Mechbunny 6.x
- Upload /controllers/control.aweonlinecams.php
- Upload /controllers/control.video.php, or:
Change the first few lines to:
if(!$_GET['awe']) {
if (!is_numeric($_GET['id'])) {
pageNotFound();
} else {
$id = (int) $_GET['id'];
}
} else {
$id = mysqli_real_escape_string($dblink, $_GET['id']);
}
and
if($_GET['awe']) {
//video is from AWE API.
$rrow = getAweDetails($id);
} else {
EXISTING QUERIES GO HERE
}
- Upload /admin/functions.awempire.php
- Upload /admin/db.php, or manually add this line above "modulesInclude()";
include($basepath . "/admin/functions.awempire.php"); //modules functions
- Upload /admin/modules/awempire/ and all it's contents
- Upload .htaccess or manually add following rules:
### ONLINE CAMS AWEMPIRE ###
RewriteRule ^online-cams/$ index.php?controller=aweonlinecams&page=1 [QSA]
RewriteRule ^online-cams/page([0-9]+).html$ index.php?controller=aweonlinecams&page=$1 [QSA]
RewriteRule ^webcam-video/(.*)-(.*).html$ index.php?controller=video&id=$2&awe=1 [QSA]
- Access admin area, go to external->awempire api. The first time you access this page, it will add some database entries into your settings.
- Go to settings & server status -> settings, find the AWEmpire variables at the bottom of General Settings and insert your PSID and Access Key and press save.
The remaining parts of the setup involve the templates.
If you are running the default templates, you can upload the included template files.
If you are running customized templates, you must integrate manually using the default template files as examples.
There are two new template files:
- template.awe_item.php (repeating item, same as content_item template but slightly different thumbnail url. Use the "embed" if version from yours. Different $link at the top as well)
- template.aweonlinecams.php (new template, for /online-cams/ page - you can probably just use the one included here on most templates)
and one new widget that must be placed in /templates/TEMPLATENAME/widgets/
- widget.index.awe.php
To actually display the videos, you can use
<?php getWidget('widget.index.awe.php'); ?>