Thank you for purchasing my theme. If you have any questions that are beyond the scope of this help file, please feel free to email via my user page contact form here. Thanks so much!
Buzzybuzz is script for making news social network. It is inspired by diferent social network and news websites (Pinterest, Huffington post, Facebook, Twitter) It contains two main part (Frontend and admin area), both created with Bootstrap.
Main page in frontend area (index.php) contains grid list of uploaded news with javascript animation of grid. By default, there is 3 columns, but you can change it to 4 or 2 columns.
Also you can choose between 8 different animations and 3 animation speed.
20 colors, google fonts and 20 languages to choose make this script very customizable. Script is connected with facebook and twitter, admin and users can post youtube videos and other medias to uploaded news, Admin can manage all news and users
send users messages, block them, delete them. Also users can interact between themselves, follow, block and contact mutualy. Users may choose which news to pin, which user to follow and which to block.
All news can be sorted by views, likes, date.
News part is a part where you have particular news which user can vote up and vote down with beautifull AJAX buttons.
User part is part where user posr his own infos, profile and cover images. In info location of user is automatically generated by his IP address.
Admin area is part where you can choose between different website options, grid animations, fonts, colors and website languages. You can also add news as an admin, aprove and delete news posted by users and manage users.
Admin is very user-friendly like frontend area and managing is very easy.
Part of code in index.php
Index.php file is main script file with grid list with all uploaded news. This is example of code:
<!-- WRAPPER --------- START --> <div id="wrapper"> <div class="full-column"> <!-- Sort button start --> <div class="btn-group"> <button type="button" class="btn btn-primary" id="sort-button"><?php echo $sort_by;?></button> <button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown" aria-expanded="false"> <span class="caret"></span> <span class="sr-only">Toggle Dropdown</span> </button> <ul class="dropdown-menu" role="menu"> <li><a href="index.php"> <span class="glyphicon glyphicon-star sort"></span><?php echo $recent_news;?></a></li> <li><a href="index.php?sort=most-popular"><span class="glyphicon glyphicon-thumbs-up sort"></span><?php echo $most_popular_news;?></a></li> <li><a href="index.php?sort=most-viewed"><span class="glyphicon glyphicon-eye-open sort"></span><?php echo $most_viewed_news;?></a></li> </ul> </div> <!-- Sort button end --> <!-- GRID NEWS LIST --------- START --> <?php include 'HTML/grid-list-all-news.html'; ?> <!-- GRID NEWS LIST --------- END --> <a href="#0" class="cd-top">Top</a> <script src="js/main.js"></script> <!-- Gem jQuery --> </div> </div> <!-- WRAPPER --------- END -->
News.php is file where is every particular news located. There is example of code:
<!-- NEWS CONTAINER --------- START --> <div class="news-container"> //HERE IS LOCATED NEWS CODE <div class="vote-container"> <?php if (isset ($_SESSION["buzzyuser_id"])){ include 'HTML/vote-links.html'; } else{ include 'HTML/vote-links-without-session.html'; } ?> </div> <div class="clearfix"></div> <br> <?php echo $buzzynews_text; ?> <br> <div class="fb-comments" style="width:100%!important;" data-href="http://<?php echo $buzzysiteurl; ?>/news.php?news-url=<?php echo $buzzynews_url;?>" data-numposts="5" data-mobile="Auto-detected" data-colorscheme="light"></div> <?php } ?> <?php } ?> </div> <!-- NEWS CONTAINER --------- END -->
User.php contains from user imagegas and infos like date of birth, current location and number of uploaded news. Here is example of profile info code:
<div id="profile-info"> <span class="glyphicon glyphicon-calendar info-box aero"></span><span class="info-text"><strong><?php echo $date_of_birth;?>:</strong> <?php echo $buzzyuser_birthdate; ?></span> <br><br> <span class="glyphicon glyphicon-pushpin info-box gold"></span><span class="info-text"><strong><?php echo $location;?>: </strong><?php echo $buzzyuser_location; ?></span> <br><br> <span class="glyphicon glyphicon-envelope info-box green-cyan"></span><span class="info-text"><strong><?php echo $email;?>:</strong> <?php echo $buzzyuser_email; ?></span> <br><br> <span class="glyphicon glyphicon-picture info-box african-violet"></span><span class="info-text"><strong><?php echo $user_news_count;?>:</strong> <?php if($count_user_news!='0'){ ?><a href="user-news-box.php?user-id=<?php echo $user_id; ?>"><?php echo $count_user_news; ?> <?php echo $uploaded_news;?></a></span> <?php } ?> <?php if($count_user_news=='0'){ ?>0 <?php echo $uploaded_news;?></span> <?php } ?> <br><br> <span class="glyphicon glyphicon-pencil info-box lava"></span><span class="info-text"><strong><?php echo $about_me; ?>:</strong> <?php echo $buzzyuser_aboutme; ?></span> </div>
There are 2 main folder where styles are hosted for frontend. In HTML folder there is css-styles.html file where all styles are connected with pages. So in page there is <?php include 'HTML/css-styles.html'; ?> which is connection between page and styles. In css folder there are some main styles for frontend. In color-css folder there are 20 colors of website that you could choose in admin panel, in font-css folder there are fonts for headlines and in body-font-css fonts for articles.
Here's a list of the stylesheet files I'm using with this template, you can find more information opening each file:
File Name | Description |
---|---|
style.css |
This is main style file which generates main look for script together with bootstrap.css in bootstrap folder. |
component.css |
Component.css is a file which host various grid animation that you activate through javascript command and choose it in admin panel. |
four-columns.css, three-columns.css and two-columns.css |
Administrator choose one of this files in admin and it commands how many columns will be at the first page. |
Component.css file is a file with 8 grid effects. These effects can be choosen in admin panel, but here you can set your animation manually.
/* Effect 1: opacity */ .grid.effect-1 li.animate { -webkit-animation: fadeIn 0.65s ease forwards; animation: fadeIn 0.65s ease forwards; } @-webkit-keyframes fadeIn { 0% { } 100% { opacity: 1; } } @keyframes fadeIn { 0% { } 100% { opacity: 1; } } /* Effect 2: Move Up */ .grid.effect-2 li.animate { -webkit-transform: translateY(200px); transform: translateY(200px); -webkit-animation: moveUp 0.65s ease forwards; animation: moveUp 0.65s ease forwards; } @-webkit-keyframes moveUp { 0% { } 100% { -webkit-transform: translateY(0); opacity: 1; } } @keyframes moveUp { 0% { } 100% { -webkit-transform: translateY(0); transform: translateY(0); opacity: 1; } }
There are 2 main and important folder for javascript files of frontend, js and animation-js. In js folder there are files for grid animation and in animation-js there are three files:
These files affect animation speed. There is posibility to enter these files and set speed manually.
Tag | Description |
---|---|
jquery-1.9.1.min.js |
jQuery is a Javascript library that greatly reduces the amount of code that you must write. |
AnimOnScroll.js |
jQuery plugin that animates elements based on scrollbar position. |
imagesloaded.js |
jQuery plugin that triggers a callback after all images have been loaded. |
classie.js |
Classie.js is an awesome mega lightweight script that allows you to add, remove, toggle, and check for classes in the DOM very easily. |
Tag | Description |
---|---|
css-styles.html |
All css files are located here. You can add, delete or edit styles here manually. |
grid-list-all-news.html |
Grid list that containes all news are here. In grid-list-pinned-news.html are news that user pinned and in grid-list-userbox-news.html are news that user created. |
Other HTML files wich are included in pages are here like for header, pin buttons and so on...
Basic.php is file where most data frome database is selected. There is example of code:
<?php if (isset ($_GET['category'])){ $category=$_GET['category']; $this_category_query = "SELECT * FROM buzzynewscategories WHERE buzzynewscategory='$category'"; foreach ($connread->query($this_category_query) as $row) { $buzzynewscategory_id=$row['buzzynewscategory_id']; $basic_news_query = "SELECT * FROM buzzynews WHERE buzzynewscategory_id=$buzzynewscategory_id AND buzzynews_approval_status=1 ORDER by buzzynews_id DESC"; } } else if (isset ($_GET['sort'])){ $sort=$_GET['sort']; if ($sort=='most-viewed'){ $basic_news_query = "SELECT * FROM buzzynews WHERE buzzynews_approval_status=1 ORDER by buzzynews_views DESC"; } else if ($sort=='most-popular'){ $basic_news_query = "SELECT * FROM buzzynews WHERE buzzynews_approval_status=1 ORDER by buzzynews_likes DESC"; } } else{ $category=''; $buzzynewscategory_id=''; $basic_news_query = "SELECT * FROM buzzynews WHERE buzzynews_approval_status=1 ORDER by buzzynews_id DESC"; } $website_options_query = "SELECT * FROM buzzysiteoptions WHERE buzzysiteoptions_id=1"; $website_css_options_query = "SELECT * FROM buzzycss WHERE buzzycss_id=1"; $count_categories_query = "SELECT COUNT(*) FROM buzzynewscategories"; $all_news_query = "SELECT buzzynews_id,buzzynews_title,buzzynews_image,buzzynews_text, DATE_FORMAT(buzzynews_datetime,'%d. %m. %Y') as buzzynews_datetime,buzzynewscategory_id,buzzynews_likes,buzzynews_unlikes,buzzynews_views,buzzynews_comments,buzzynews_visitors,buzzynews_source_name,buzzynews_source_url FROM buzzynews"; $all_category_query = "SELECT * FROM buzzynewscategories ORDER by buzzynewscategory_id ASC"; $basic_category_query = "SELECT * FROM buzzynewscategories ORDER by buzzynewscategory_id ASC LIMIT 7"; $extended_category_query = "SELECT * FROM buzzynewscategories WHERE (buzzynewscategory_id) LIMIT 18446744073709551615 OFFSET 7;"; $most_viewed_news_query = "SELECT * FROM buzzynews WHERE buzzynews_approval_status=1 ORDER by buzzynews_views DESC LIMIT 3"; $popular_news_query = "SELECT * FROM buzzynews WHERE buzzynews_approval_status=1 ORDER by buzzynews_likes DESC LIMIT 3"; $website_language_query = "SELECT * FROM buzzylanguages WHERE buzzylanguage_id=1";
Usercode.php is file where user data are connected with website. There is example of code:
<?php $user_id=$_GET["user-id"]; $this_user_query = 'SELECT buzzyuser_id,buzzyuser_first_name,buzzyuser_last_name,buzzyuser_username,buzzyuser_image,buzzyuser_location, buzzyuser_cover,buzzyuser_email,DATE_FORMAT(buzzyuser_birthdate, "%d/%m/%Y") as formated_buzzyuser_birthdate,buzzyuser_password,buzzyuser_registration_date, buzzyuser_aboutme, buzzyuser_status FROM buzzyusers WHERE buzzyuser_id='.$user_id.''; $user_basic_news_query = "SELECT * FROM buzzynews WHERE buzzyuser_id=$user_id AND buzzynews_approval_status=1 ORDER by buzzynews_id DESC"; $user_basic_count_news_query = "SELECT COUNT(*) FROM buzzynews WHERE buzzyuser_id=$user_id AND buzzynews_approval_status=1"; if (isset($_SESSION["buzzyuser_id"])) { $check_block_status_query = "SELECT COUNT(*) FROM buzzyblocks WHERE buzzyblocker_id=$session_user_id AND buzzyblocking_id=$user_id"; $check_blocked_status_query = "SELECT COUNT(*) FROM buzzyblocks WHERE buzzyblocker_id=$user_id AND buzzyblocking_id=$session_user_id";
Here's a brief information about how to install your script and create website from scratch
Connection.inc.php is file where you should set your database options. There is example of code:
<?php // THIS IS PART FOR THE CONNECTING DATABASE AND FRONTEND function dbConnect($usertype, $connectionType = 'mysqli') { $host = 'localhost';// Your host here $db = 'buzzybuzz';// Database name here // the password for this core user is factional if ($usertype == 'read') { $user = 'admin'; // Database user name here $pwd = 'admin'; // Database password here } elseif ($usertype == 'write') { $user = 'admin'; // Database user name here $pwd = 'admin'; // Database password here } else { exit('Unrecognized connection type'); } if ($connectionType == 'mysqli') { $conn = new mysqli($host, $user, $pwd, $db); if ($conn->mysqli_error) { die('Cannot open database'); } return $conn; } else { try { return new PDO("mysql:host=$host;dbname=$db", $user, $pwd); } catch (PDOException $e) { echo 'Cannot connect to database'; exit; } }
Connection.php is file where you should set your database options. There is example of code:
<?php // DB Connection Configuration define('DB_HOST', 'localhost'); // Your host here define('DB_USERNAME', 'admin'); // Database user name here define('DB_PASSWORD', 'admin'); // Database password here define('DATABASE', 'buzzybuzz');// Database name here // Global Vars $base_url = 'http://localhost/buzzybuzz/'; // Your absolute url here $base_root = ''; $perpage = 6; $contacts_per_page = 8;
Thank you for choosing my theme. I will provide you support for instalation of theme and connection to social networks.
Branko 83