Guide Category

134

Install Bullet Energy

Install Bullet Energy is as easy as install any modules/hacks in Datalife Engine but we have so many users that got stuck with Bullet Energy Forum Installation guide, also users have problem after upgraded Datalife Engine to new version because the original old files are overwritten, so in this tutorial we will walk you through the installation process as easy step as possible. Bullet Energy - is a new Forum Module for DataLife Engine CMS. Thanks to an amazing structure, lightweight design and clever development as well as modern design and flexible configuration, the component will work stably with any amount of data without creating a heavy load. Ease of configuration and integration of their own design which allows you to run a forum right the way without the high material costs.
dlestarter
Install Bullet Energy Install Bullet Energy is as easy as install any modules/hacks in Datalife Engine but we have so many users that got stuck with Bullet Energy Forum Installation guide, also users have problem after upgraded Datalife Engine to new version because the original old files are overwritten, so in this tutorial we will walk you through the installation process as easy step as possible. Bullet Energy - is a new Forum Module for DataLife Engine CMS. Thanks to an amazing structure, lightweight design and clever development as well as modern design and flexible configuration, the component will work stably with any amount of data without creating a heavy load. Ease of configuration and integration of their own design which allows you to run a forum right the way without the high material costs.

This tutorial will be based on Bullet Energy Forum version 1.3 as the latest version available from the distributor website at the time this tutorial is written.
Please, be very careful when edit the system files. Always make full backup before start this tutorial (Make full backup all of your files in your server and also make full backup of your database, we strongly recommend that you turnoff your DLE main site to start the installation
  1. Download the Bullet Energy Forum 1.3 from DLESTarter.com main site for English version (From distributor website for Russian version)
  2. Extract the content of the package and upload all files and folders/subfolder within the folder "upload" to "root" directory of your website
  3. Upload the folder theme files: (based on your encoder version of Datalife Engine)
    • If you are using utf8 encoder, upload folder "bullet_energy" from the folder "Forum Template/utf-8/"
    • If you are using cp1251 encoder, upload folder "bullet_energy" from the folder "Forum Template/windows-1251/"
    (Note: to identify which encoder you are using, you can easily fine the encoder from /engine/data/dbconfig.php under "define ("COLLATE",")
  4. Set CMOD to the following files and folders:
    File/Folder CHMOD
    uploads/forum 777
    uploads/forum/images 777
    uploads/forum/files 777
    engine/bullet_energy/cache/system 777
    engine/bullet_energy/data 755
  5. Run the install.php file which is located at http://www.yoursite.com/install.php and follow the instructions carefully

Install Bullet Energy 1.3 after upgraded DLE script to new version

The installation screen process

In some cases users might get confuse on step on screen, so we would like to bring it here to explain in some steps that might not understand...Also you need to follow the step below if you have upgraded DLE script to new versions like upgrade from 9.6 to 9.7 etc...

These steps are for post installation for DLE templates and file modifications after you went through all steps above, you will end up with this instruction
  • 1) Open your template main.tpl file (/templates/YOUR THEME/main.tpl)

    Before </head> add: (skip this step if you upgrade DLE script to newer version - it might be already implemented)

    {forumStyle}
    
  • 2) Open file .htaccess from root of your site

    Find:

    RewriteEngine On
    

    Add below:

    RewriteRule ^forum(/?)+$ index.php?do=forum&action=index [L]
    RewriteRule ^forum/moderation(/?)+$ index.php?do=forum&action=moderation [L]
    RewriteRule ^forum/moderation/page-([0-9]+)(/?)+$ index.php?do=forum&action=moderation&page=$1 [L]
    RewriteRule ^forum/categories-([0-9]+)(/?)+$ index.php?do=forum&action=categories&id=$1 [L]
    RewriteRule ^forum/categories-([0-9]+)/page-([0-9]+)(/?)+$ index.php?do=forum&action=categories&id=$1&page=$2 [L]
    RewriteRule ^forum/showtopic-([0-9]+)(/?)+$ index.php?do=forum&action=showtopic&id=$1 [L]
    RewriteRule ^forum/showtopic-([0-9]+)/page-([0-9]+)(/?)+$ index.php?do=forum&action=showtopic&id=$1&page=$2 [L]
    RewriteRule ^forum/showtopic-([0-9]+)/findpost-([0-9]+)(/?)+$ index.php?do=forum&action=findpost&id=$1&findpost=$2 [L]
    RewriteRule ^forum/newtopic-([0-9]+)(/?)+$ index.php?do=forum&action=newtopic&id=$1 [L]
    RewriteRule ^forum/search(/?)+$ index.php?do=forum&action=search [L]
    RewriteRule ^forum/new_post(/?)+$ index.php?do=forum&action=new_post [L]
    RewriteRule ^forum/new_post/page-([0-9]+)(/?)+$ index.php?do=forum&action=new_post&page=$1 [L]
    RewriteRule ^forum/subscribe-([0-9]+).xml(/?)+$ engine/bullet_energy/modules/rss.php?action=tree_rss&id=$1  [L]
    RewriteRule ^forum/attachment-([0-9]+)(/?)+$ engine/bullet_energy/modules/download.php?id=$1 [L]
    RewriteRule ^forum/feed-([0-9]+).xml(/?)+$ engine/bullet_energy/modules/rss.php?action=topic_rss&id=$1  [L]
    RewriteRule ^forum/discussion-([0-9]+)(/?)+$ index.php?do=forum&action=discussion&id=$1 [L]
    RewriteRule ^forum/categories/([0-9]+)-([^/]*)(/?)+$ index.php?do=forum&action=categories&id=$1&name=$2 [L]
    RewriteRule ^forum/categories/([0-9]+)-([^/]*)/page-([0-9]+)(/?)+$ index.php?do=forum&action=categories&id=$1&name=$2&page=$3 [L]
    RewriteRule ^forum/showtopic/([0-9]+)-([^/]*)(/?)+$ index.php?do=forum&action=showtopic&id=$1&name=$2 [L]
    RewriteRule ^forum/showtopic/([0-9]+)-([^/]*)/page-([0-9]+)(/?)+$ index.php?do=forum&action=showtopic&id=$1&name=$2&page=$3 [L]
    RewriteRule ^forum/showtopic/([0-9]+)-([^/]*)/findpost-([0-9]+)(/?)+$ index.php?do=forum&action=findpost&id=$1&name=$2&findpost=$3 [L]
    RewriteRule ^forum/unread/([0-9]+)(/?)+$ index.php?do=forum&action=unread&id=$1 [L]
    RewriteRule ^forum/watched(/?)+$ index.php?do=forum&action=watched [L]
    RewriteRule ^forum/watched/page-([0-9]+)(/?)+$ index.php?do=forum&action=watched&page=$1 [L]
    RewriteRule ^forum/watched/all(/?)+$ index.php?do=forum&action=watched&param=all [L]
    RewriteRule ^forum/vote-([0-9]+)/([^/]*)(/?)+$ index.php?do=forum&action=vote&id=$1&param=$2 [L]
    RewriteRule ^forum/vote-([0-9]+)/result/([0-9]+)(/?)+$ index.php?do=forum&action=vote&id=$1&param=result&id_answer=$2 [L]
    RewriteRule ^forum/warning-([0-9]+)/([0-9]+)/([^/]*)(/?)+$ index.php?do=forum&action=warning&id=$1&log_warn=$2&param=$3 [L]
    RewriteRule ^forum/set/([^/]*)(/?)+$ index.php?do=forum&action=set&param=$1 [L]
    RewriteRule ^forum/editor/([^/]*)(/?)+$ index.php?do=forum&action=editor&param=$1 [L]
    RewriteRule ^forum/feed/([0-9]+)/([^/]*)(/?)+$ index.php?do=forum&action=feed&id=$1&param=$2 [L]
    RewriteRule ^forum/post/([0-9]+)/([^/]*)/([^/]*)(/?)+$ index.php?do=forum&action=post&id=$1&param=$2&hash=$3 [L]
    RewriteRule ^forum/add/([0-9]+)/([^/]*)(/?)+$ index.php?do=forum&action=newpost&id=$1&param=$2 [L]
    RewriteRule ^forum/upload$ engine/bullet_energy/modules/upload.php [L]
    RewriteRule ^forum/post_mass/([^/]*)$ index.php?do=forum&action=post_mass&param=$1 [L]
    RewriteRule ^forum/preview(/?)+$ index.php?do=forum&action=preview [L]
    RewriteRule ^forum/reads/([^/]*)/([0-9]+)(/?)+$ index.php?do=forum&action=reads&param=$1&id=$2 [L]
    RewriteRule ^forum/complaint/([0-9]+)/([^/]*)(/?)+$ index.php?do=forum&action=complaint&id=$1&hash=$2 [L]
    RewriteRule ^forum/rerouting/([^/]*)/([0-9]+)(/?)+$ index.php?do=forum&action=rerouting&param=$1&id=$2 [L]
    RewriteRule ^user/([^/]*)/message(/?)+$ index.php?do=forum&action=user&name=$1&param=message [L]
    RewriteRule ^user/([^/]*)/message/page-([0-9]+)(/?)+$ index.php?do=forum&action=user&name=$1&page=$2&param=message [L]
    RewriteRule ^user/([^/]*)/topic(/?)+$ index.php?do=forum&action=user&name=$1&param=topic [L]
    RewriteRule ^user/([^/]*)/topic/page-([0-9]+)(/?)+$ index.php?do=forum&action=user&name=$1&page=$2&param=topic [L]
    RewriteRule ^user/([^/]*)/like(/?)+$ index.php?do=forum&action=user&name=$1&param=like [L]
    RewriteRule ^user/([^/]*)/like/page-([0-9]+)(/?)+$ index.php?do=forum&action=user&name=$1&page=$2&param=like [L]
    RewriteRule ^user/([^/]*)/trophies(/?)+$ index.php?do=forum&action=user&name=$1&param=trophies [L]
    
    Please note: the code above is automatically generated by your script installation with default settings without change your forum url so that you can access to your forum using http://www.site.com/forum in the step that asked you to change the path to forum, if you choose different name than default then you will get different htaccess code, so please follow that screen very carefully!
  • 3) - DLE 10.3 and older - Open the file index.php
         - DLE 10.4 Open engine/modules/main.php

    Find:

    $tpl->load_template('main.tpl');
    

    Add AFTER:

    $tpl->set('{forumStyle}', require_once ROOT_DIR . '/engine/bullet_energy/modules/load_style.php');
    
  • 4) Open file engine.php:

    Find:

    switch ($do) {
    

    Add AFTER:

    case "forum": include ENGINE_DIR . '/bullet_energy/index.php'; break;
    
  • 5) Open file engine/modules/banned.php:

    Find:

    if( $row['users_id'] ) $db->query( "UPDATE " . USERPREFIX . "_users SET banned='' WHERE user_id = '{$row['users_id']}'" );
    

    Replace with:

    if($row['users_id']) {
          $db->query("UPDATE " . USERPREFIX . "_users SET banned='' WHERE user_id = '{$row['users_id']}'");
          $forumInfoUser = $db->super_query("SELECT forum_warning FROM " . PREFIX . "_users WHERE user_id = '{$row['users_id']}'");
          if($forumInfoUser == 100) {
             $db->query("INSERT INTO " . PREFIX . "_be_user_warning (id, moderator_id, post_id, date, description, id_user, date_out, action, type, ball) VALUES (NULL, '1', '0', '{$this_time}', 'Lower the level of warning after blocked.', '{$row['users_id']}', '0', 'down', 'message', '10')");
             $db->query("UPDATE " . PREFIX . "_users SET forum_warning = forum_warning - 10 WHERE user_id = {$row['users_id']} LIMIT 1");
          }
    }
    
  • 6) Open the file /engine/init.php:

    Find:

    include_once ENGINE_DIR . '/modules/rssinform.php';
    

    Add AFTER:

    require_once ('engine/bullet_energy/api/bullet_api.class.php');
    
  • 7) Open file engine/inc/editusers.php:

    Find:

    $db->query("UPDATE " . PREFIX . "_images SET author='$editlogin' WHERE author='{$row['name']}'") ;
    

    Add AFTER:

    $db->query("UPDATE " . PREFIX . "_be_attachment SET attachment_user_name = '$editlogin' WHERE attachment_user_name = '{$row['name']}'") ;
    $db->query("UPDATE " . PREFIX . "_be_complaint SET ct_from = '$editlogin' WHERE ct_from = '{$row['name']}'") ;
    $db->query("UPDATE " . PREFIX . "_be_message SET message_autor = '$editlogin' WHERE message_autor = '{$row['name']}'") ;
    $db->query("UPDATE " . PREFIX . "_be_moderator SET moderator_name = '$editlogin' WHERE moderator_name = '{$row['name']}'");
    $db->query("UPDATE " . PREFIX . "_be_topic SET autor = '$editlogin' WHERE autor = '{$row['name']}'") ;
    

    Find:

    $db->query("delete FROM " . USERPREFIX . "_pm WHERE user='$id'") ;
    

    Add AFTER:

    $db->query("DELETE FROM " . PREFIX . "_be_complaint WHERE ct_from = '{$row['name']}'") ;
    $db->query("DELETE FROM " . PREFIX . "_be_feed WHERE id_user ='$id'") ;
    $db->query("DELETE FROM " . PREFIX . "_be_message WHERE autors_id ='$id'") ;
    $db->query("DELETE FROM " . PREFIX . "_be_moderator WHERE moderator_id ='$id'") ;
    $db->query("DELETE FROM " . PREFIX . "_be_thanks WHERE thanks_id_user = '$id'") ;
    $db->query("DELETE FROM " . PREFIX . "_be_topic WHERE autor_id = '$id'") ;
    

    Find:

    {$output}
    

    Add BEFORE:

    <tr><td colspan="3"><hr></td></tr><tr><td style="padding:4px;">Delete all posts and topics on the forum</td><td colspan="2"><input type="checkbox" name="del_post_forum" value="yes" /></td></tr>
    

    Find:

    if($_POST['del_comments']) {
    

    Add BEFORE:

    if($_POST['del_post_forum']) {   $result = $db->query("SELECT COUNT(*) as count, id_topic FROM " . PREFIX . "_be_message WHERE autors_id='$id' GROUP BY id_topic") ;
        while ($row = $db->get_array($result)) {
          $db->query("UPDATE " . PREFIX . "_be_topic SET reply_count=reply_count-{$row['count']} where id='{$row['id_topic']}'") ;
        }
        $db->free($result) ;
        $db->query("DELETE FROM " . PREFIX . "_be_topic WHERE autor_id = '$id'") ;
        $db->query("DELETE FROM " . PREFIX . "_be_message WHERE autors_id = '$id'") ;
        $db->query("UPDATE " . USERPREFIX . "_users set forum_post_count='0',forum_topic_count='0' where user_id ='$id'") ;
      }
    
  • Attention: The step below this line is only for those who are using Datalife Engine 9.6 and newer only!, If you are using DLE 9.5 and older version please visit the forum topic: http://white-master.ru/forum/showtopic-1372 for more information.
    In DLE System Settings in the "Enable support for the status of 'Online' for users on the site" should be "Yes" if you do not, then the function e-mail notifications may not work (this setting is not present in DLE 9.6, so you can follow the instructions below).
    Open the file engine/modules/sitelogin.php

    Find:

    $db->query("UPDATE LOW_PRIORITY " . USERPREFIX . "_users SET lastdate='{$_TIME}' WHERE user_id='{$member_id['user_id']}'") ;
    

    Add AFTER:

    $db->query("DELETE FROM " . PREFIX . "_be_event_log WHERE id_user = {$member_id['user_id']}") ;
    

    Find:

    if($config['log_hash']) {
    

    REPLACE WITH:

     if($config['log_hash']) {
       $db->query("DELETE FROM " . PREFIX . "_be_event_log WHERE id_user = {$member_id['user_id']}") ;
    

    Find:

    } else
            $db->query("UPDATE LOW_PRIORITY " . USERPREFIX . "_users set lastdate='{$_TIME}', logged_ip='" . $_IP . "' WHERE user_id='{$member_id['user_id']}'") ;
          $is_logged = TRUE ;
    

    REPLACE WITH:

    } else {
            $db->query("UPDATE LOW_PRIORITY " . USERPREFIX . "_users set lastdate='{$_TIME}', logged_ip='" . $_IP . "' WHERE user_id='{$member_id['user_id']}'") ;
            $db->query("DELETE FROM " . PREFIX . "_be_event_log WHERE id_user = {$member_id['user_id']}") ;
          }
          $is_logged = TRUE ;
    
  • Installation process is complete.
Datalife Engine 10.2 and 10.3 ONLY
If you are install Bullet Energy in Datalife Engine 10.2 and 10.3, please do the following step in order to make the Bullet Energy Forum compatible...

Open index.php and find:

if( $_SERVER['QUERY_STRING'] AND !$tpl->result['content'] AND !$tpl->result['info'] AND !$custom_news) {

Replace with

if( $_SERVER['QUERY_STRING'] AND !$tpl->result['content'] AND !$tpl->result['info'] AND !$custom_news AND !class_exists('Bullet_Energy_Main')) {
Special thanks: RDN TEAM
Datalife Engine 10.4 ONLY
If you are install Bullet Energy in Datalife Engine 10.4, please do the following step in order to make the Bullet Energy Forum compatible...

Open /engine/modules/main.php and find:

if( $_SERVER['QUERY_STRING'] AND !$tpl->result['content'] AND !$tpl->result['info'] AND !$custom_news) {

Replace with

if( $_SERVER['QUERY_STRING'] AND !$tpl->result['content'] AND !$tpl->result['info'] AND !$custom_news AND !class_exists('Bullet_Energy_Main')) {

Setup Forum for the first use

Before you can visit your forum, you must first create at least 1 forum section and 1 forum category, do so, login to your Bullet Energy Forum Administration at http://yoursite.com/admin.php?mod=bullet_energy
- Click on "Forum Categories" on the right pane side or click on "Customize Forum > Forum Category" in left pane side
- Click "Add new Forum" button to add new forum section, this section will create your main forum main section (or you can call top level main category) before create forum category, fill out the necessary information: Site Name: (The name for forum section - for example V.I.P. Room etc...), Description: give some descriptions, Forum Category type: you must select this first option as "Forum Category" (This is very important!), Select Usergroup you want to have access to this forum section: group of your choice
- Click "Add" button to add Forum Section
- Click "Add new Forum" button again to add forum category for this "main forum category" also called "subforum" where you can add topics to.
- Fill in all necessary information like step above but select "Subforum" from "Forum Category type:" instead
- Fill out all other details and option as you wish, including "Parent Category:" which should be belong to "Forum Category" which you created previously as V.I.P. Room for example, and fill out all the way down to usergroup settings and permissions
- Click "Add" button...
- Now your forum is ready for you to view and add your topics, simply visit your forum by click on link "View Live Forum" on the very top navigation menu...

Related Tutorials

Review/Leave Comment

comments powered by Disqus