Added : Boostrap.js
Added : ClipBucket header (Responsive) Added : Actions
This commit is contained in:
parent
1c224db010
commit
dd0c324373
12 changed files with 2409 additions and 48 deletions
|
@ -454,6 +454,9 @@ class ClipBucket
|
|||
//$this->smarty_version
|
||||
$template_details = $cbtpl->get_template_details($template);
|
||||
$cbtpl->smarty_version = $template_details['smarty_version'];
|
||||
|
||||
define('SMARTY_VERSION',$cbtpl->smarty_version);
|
||||
|
||||
return $this->template = $template;
|
||||
}
|
||||
|
||||
|
@ -499,9 +502,14 @@ class ClipBucket
|
|||
return $this->head_menu;
|
||||
}
|
||||
|
||||
|
||||
|
||||
function cbMenu($params = NULL)
|
||||
{
|
||||
$this->head_menu($params);
|
||||
|
||||
|
||||
|
||||
if (!$params['tag'])
|
||||
//$params['tag'] = 'li';
|
||||
if (!$params['class'])
|
||||
|
@ -539,39 +547,74 @@ class ClipBucket
|
|||
}
|
||||
}
|
||||
|
||||
$output = '';
|
||||
//if(($params['tag']))
|
||||
// $output .= "<".$params['tag'].">";
|
||||
foreach ($headMenu as $menu) {
|
||||
|
||||
$main_menu = array();
|
||||
foreach($headMenu as $menu)
|
||||
{
|
||||
if (isSectionEnabled($menu['this']))
|
||||
{
|
||||
|
||||
$selected = current_page(array("page" => $menu['this']));
|
||||
if($selected)
|
||||
$menu['active'] = true;
|
||||
|
||||
$output .= "<li ";
|
||||
$output .= "id = 'cb" . $menu['name'] . "Tab'";
|
||||
|
||||
$output .= " class = '";
|
||||
if ($params['class'])
|
||||
$output .= $params['class'];
|
||||
if ($selected)
|
||||
$output .= " selected";
|
||||
$output .= "'";
|
||||
|
||||
if ($params['extra_params'])
|
||||
$output .= ($params['extra_params']);
|
||||
$output .= ">";
|
||||
$output .= "<a href='" . $menu['link'] . "'>";
|
||||
$output .= $menu['name'] . "</a>";
|
||||
$output .= "</li>";
|
||||
$main_menu[] = $menu;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
$output = "";
|
||||
//if(($params['tag']))
|
||||
// $output .= "<".$params['tag'].">";
|
||||
foreach ($main_menu as $menu)
|
||||
{
|
||||
|
||||
$selected = $menu['active'];
|
||||
$output .= "<li ";
|
||||
$output .= "id = 'cb" . $menu['name'] . "Tab'";
|
||||
|
||||
$output .= " class = '";
|
||||
if ($params['class'])
|
||||
$output .= $params['class'];
|
||||
if ($selected)
|
||||
$output .= " selected";
|
||||
$output .= "'";
|
||||
|
||||
if ($params['extra_params'])
|
||||
$output .= ($params['extra_params']);
|
||||
$output .= ">";
|
||||
$output .= "<a href='" . $menu['link'] . "'>";
|
||||
$output .= $menu['name'] . "</a>";
|
||||
$output .= "</li>";
|
||||
}
|
||||
|
||||
|
||||
//if(($params['tag']))
|
||||
// $output .= "</".$params['tag'].">";
|
||||
|
||||
if ($params['echo'])
|
||||
echo $output;
|
||||
else
|
||||
return $output;
|
||||
|
||||
|
||||
if(SMARTY_VERSION<3)
|
||||
{
|
||||
|
||||
if ($params['echo'])
|
||||
{
|
||||
echo $output;
|
||||
}else
|
||||
{
|
||||
return $output;
|
||||
}
|
||||
}else
|
||||
{
|
||||
if ($params['echo'])
|
||||
{
|
||||
echo $output;
|
||||
}else
|
||||
{
|
||||
return $main_menu;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -4723,4 +4723,5 @@
|
|||
include( 'functions_video.php' );
|
||||
include( 'functions_user.php' );
|
||||
include( 'functions_photo.php' );
|
||||
include('functions_actions.php');
|
||||
?>
|
102
upload/includes/functions_actions.php
Normal file
102
upload/includes/functions_actions.php
Normal file
|
@ -0,0 +1,102 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* User: Arslan Hassan @arslancb
|
||||
* Date: 11/10/13
|
||||
* Time: 12:36 PM
|
||||
*
|
||||
* @Since : 2.7
|
||||
*
|
||||
* Add ClipBucket actions to apply custom functions on ClipBucket core functions.
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Register a clipbucket function
|
||||
*
|
||||
* @param String $func_name
|
||||
* @param String $place
|
||||
* @param Array $extra_params
|
||||
* @param Array $scope
|
||||
*/
|
||||
|
||||
function cb_register_action($func_name,$place,$extra_params=Array(),$scope=array('global'))
|
||||
{
|
||||
global $Cbucket;
|
||||
|
||||
$actions_list = $Cbucket->actions_list;
|
||||
$actions_list[$place][] = array(
|
||||
'action' => $place,
|
||||
'params' => $extra_params,
|
||||
'scope' => $scope
|
||||
);
|
||||
|
||||
|
||||
$Cbucket->actions_list = $actions_list;
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Call a register function and returns output if available.
|
||||
*
|
||||
* @param String $place
|
||||
* @param Array $params
|
||||
* @param Array $scope
|
||||
*/
|
||||
|
||||
function cb_do_action($place,$params=array(),$scope=array('global'))
|
||||
{
|
||||
|
||||
$actions = cb_get_actions($place,$scope);
|
||||
|
||||
if($actions)
|
||||
{
|
||||
foreach($actions as $action)
|
||||
{
|
||||
if(isset($output)) unset($output);
|
||||
|
||||
if(function_exists($action['action']))
|
||||
{
|
||||
if($params && $action['params'])
|
||||
{
|
||||
$params = array_merge($params,$action['params']);
|
||||
}elseif($action['params'])
|
||||
{
|
||||
$params = $action['params'];
|
||||
}
|
||||
|
||||
if($params)
|
||||
{
|
||||
$output = $action['action']($params);
|
||||
}else
|
||||
{
|
||||
$output = $action['action']();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
if(isset($output) && $output) return $output;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* get list of functions available for specific place under defined scope (default:global)
|
||||
*
|
||||
* @param String $place
|
||||
* @param Array $scope
|
||||
*/
|
||||
function cb_get_actions($place,$scope=array('global'))
|
||||
{
|
||||
global $Cbucket;
|
||||
|
||||
if(isset($Cbucket->actions_list) && isset($Cbucket->actions_list[$place]))
|
||||
{
|
||||
return $Cbucket->actions_list[$place];
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
|
@ -48,4 +48,13 @@ function Assign($name,$value)
|
|||
{
|
||||
global $cbtpl;
|
||||
$cbtpl->assign($name,$value);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Return Head menu of CLipBucket front-end
|
||||
*
|
||||
* @param Array $params
|
||||
* @return Array
|
||||
*/
|
||||
function cb_menu($params=NULL){ global $Cbucket; return $Cbucket->cbMenu($params); }
|
|
@ -10,6 +10,8 @@
|
|||
/**
|
||||
* FUNCTION USED TO REGISTER ACTIONS THAT ARE TO APPLIED
|
||||
* ON COMMENTS , TITLE, DESCRIPTIONS etc
|
||||
*
|
||||
* @deprecated : Since v2.7
|
||||
*/
|
||||
function register_action($name,$type=NULL)
|
||||
{
|
||||
|
@ -498,8 +500,10 @@
|
|||
$params = array("section"=>$section,"page"=>$page,"extra"=>$extra);
|
||||
return create_module_link($params);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* function used to get remote url function
|
||||
*/
|
||||
|
|
|
@ -1,7 +1,12 @@
|
|||
{include file="$style_dir/global_header.html"}
|
||||
<body>
|
||||
{include file="$style_dir/header.html" }
|
||||
<div class="container">
|
||||
<div id="container">
|
||||
|
||||
{foreach from=$template_files item=file}
|
||||
{include_template_file file=$file}
|
||||
{/foreach}
|
||||
|
||||
<div id="push"></div>
|
||||
</div>
|
||||
{include file="$style_dir/footer.html" }
|
||||
|
|
|
@ -33,7 +33,10 @@
|
|||
|
||||
<link href='http://fonts.googleapis.com/css?family=Sintony:400,700' rel='stylesheet' type='text/css'>
|
||||
<link rel="stylesheet" href="{$theme}/css/bootstrap.min.css?cache={$cache_buster}" />
|
||||
|
||||
{if !in_dev()}
|
||||
<link rel="stylesheet" href="{$theme}/css/main.css?cache={$cache_buster}" />
|
||||
{/if}
|
||||
|
||||
{if in_dev()}
|
||||
<link rel="stylesheet/less" href="{$theme}/less/main.less?cache={$cache_buster}" />
|
||||
|
|
|
@ -3,41 +3,72 @@
|
|||
<div class="navbar-container">
|
||||
<!-- Brand and toggle get grouped for better mobile display -->
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
|
||||
|
||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#khulja-sim-sim">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
|
||||
|
||||
<button type="button" class="navbar-toggle nav-toggle" data-toggle="collapse" data-target="#navbar-search-collapse">
|
||||
<span class="glyphicon glyphicon-search"></span>
|
||||
</button>
|
||||
|
||||
<a class="navbar-brand cb-logo" href="#">{$website_title}</a>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- Collect the nav links, forms, and other content for toggling -->
|
||||
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
|
||||
{$head_menu=cb_menu()}
|
||||
|
||||
<div class="navbar-collapse navbar-sm-search collapse" id="navbar-search-collapse">
|
||||
<form class="" role="search">
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" placeholder="Search">
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-default" type="button">Go!</button>
|
||||
</span>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
||||
<ul class="nav navbar-nav main-nav">
|
||||
<li><a href="#">Videos</a></li>
|
||||
<li><a href="#">Channels</a></li>
|
||||
<li><a href="#">Photos</a></li>
|
||||
<li><a href="#">Collections</a></li>
|
||||
<ul class="nav navbar-nav main-nav navbar-collapse collapse" id="khulja-sim-sim">
|
||||
|
||||
|
||||
{foreach $head_menu as $menu}
|
||||
{if $menu@iteration < 5}
|
||||
<li {if $menu.active}class="active"{/if}><a href="{$menu.link}">{$menu.name}</a></li>
|
||||
{/if}
|
||||
{/foreach}
|
||||
|
||||
|
||||
<!-- Shown to small devices only Start @todo : Add condition for logged in user -->
|
||||
|
||||
<li class="navbar-sm-login-links"><a href="#" data-toggle="modal" data-target="#login-modal">{lang code='login'}</a></li>
|
||||
<li class="navbar-sm-login-links"><a href="{link name="signup"}">{lang code='Create new account'}</a></li>
|
||||
<!-- Ends -->
|
||||
|
||||
{if count($head_menu)>4}
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown">More <b class="caret"></b></a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="#">Action</a></li>
|
||||
<li><a href="#">Another action</a></li>
|
||||
<li><a href="#">Something else here</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="#">Separated link</a></li>
|
||||
|
||||
{foreach $head_menu as $menu}
|
||||
{if $menu@iteration > 4}
|
||||
<li {if $menu.active}class="active"{/if}><a href="{$menu.link}">{$menu.name}</a></li>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</ul>
|
||||
</li>
|
||||
{/if}
|
||||
</ul>
|
||||
|
||||
|
||||
<form class="navbar-form navbar-left" role="search">
|
||||
<!-- Shown to small devices only Start-->
|
||||
<form class="navbar-form navbar-search navbar-left" role="search">
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" placeholder="Search">
|
||||
<span class="input-group-btn">
|
||||
|
@ -46,7 +77,13 @@
|
|||
</div>
|
||||
|
||||
</form>
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<!-- Ends -->
|
||||
|
||||
|
||||
<!-- Shown to Large displays only Start -->
|
||||
<ul class="nav navbar-nav navbar-right nav-login-btns">
|
||||
|
||||
{if userid()}
|
||||
<li class="dropdown myaccount-dd">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown"> <img class="img-circle" src="http://lorempixel.com/output/people-q-c-40-40-7.jpg" /> Dropdown <b class="caret"></b></a>
|
||||
<ul class="dropdown-menu">
|
||||
|
@ -57,8 +94,104 @@
|
|||
<li><a href="#">Separated link</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
{else}
|
||||
<li>
|
||||
<div>
|
||||
<a href="{link name="signup"}" class="btn btn-primary btn-success btn-sm">{lang code="Create Account"}</a>
|
||||
<a href="#" data-toggle="modal" data-target="#login-modal" class="btn btn-primary btn-sm">{lang code="Login"}</a>
|
||||
</div>
|
||||
|
||||
</li>
|
||||
{/if}
|
||||
</ul>
|
||||
</div><!-- /.navbar-collapse -->
|
||||
</div>
|
||||
<!-- Ends -->
|
||||
|
||||
|
||||
<!-- SHown to middle size displays only @todo : Add condition for logged in user -->
|
||||
<ul class="nav navbar-nav navbar-right nav-login-dd">
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="glyphicon glyphicon-search"></i></a>
|
||||
<div class="dropdown-menu container">
|
||||
<form>
|
||||
<input class="form-control" placeholder="Search your stuff up!"/>
|
||||
</form>
|
||||
</div>
|
||||
</li>
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="glyphicon glyphicon-user"></i></a>
|
||||
<div class="dropdown-menu">
|
||||
<form name="login-form" role="form" action="{link name='signup'}" method="post">
|
||||
<div class="form-group">
|
||||
<label for="login_username">{lang code="Username"}</label>
|
||||
<input type="email" class="form-control" id="login_username" placeholder="Enter username">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="login_password">{lang code="Password"}</label>
|
||||
<input type="email" class="form-control" id="login_password" placeholder="Enter password">
|
||||
</div>
|
||||
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input type="checkbox"> {lang code="Remeber me"}
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<button class="btn btn-primary btn-sm btn-block">{lang code="Login"}</button>
|
||||
<a href="{link name='signup'}" class="btn btn-primary btn-sm btn-block">{lang code="Create new accoutn"}</a>
|
||||
</form>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<!-- Ends -->
|
||||
|
||||
|
||||
</nav>
|
||||
</header>
|
||||
|
||||
<script>
|
||||
$('.nav-login-dd li .dropdown-menu').click(function(e){
|
||||
e.preventDefault();
|
||||
return false;
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<div class="modal fade" id="login-modal" role="dialog" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<form name="login-form" role="form" action="{link name='signup'}" method="post">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h4 class="modal-title">{lang code="Login"}</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
<div class="form-group">
|
||||
<label for="login_username">{lang code="Username"}</label>
|
||||
<input type="email" class="form-control" id="login_username" placeholder="Enter username">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="login_password">{lang code="Password"}</label>
|
||||
<input type="email" class="form-control" id="login_password" placeholder="Enter password">
|
||||
</div>
|
||||
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input type="checkbox"> {lang code="Remeber me"}
|
||||
</label>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">{lang code="Cancel"}</button>
|
||||
<button type="submit" class="btn btn-primary">{lang code="Login"}</button>
|
||||
</div>
|
||||
</div><!-- /.modal-content -->
|
||||
</form>
|
||||
</div><!-- /.modal-dialog -->
|
||||
</div><!-- /.modal -->
|
11
upload/styles/cb_2013/layout/signup.html
Normal file
11
upload/styles/cb_2013/layout/signup.html
Normal file
|
@ -0,0 +1,11 @@
|
|||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-lg-7">
|
||||
<h2>Yahoo!!</h2>
|
||||
</div>
|
||||
<div class="col-lg-5">
|
||||
<h2>Google!</h2>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
0
upload/styles/cb_2013/template.php
Normal file
0
upload/styles/cb_2013/template.php
Normal file
|
@ -8,12 +8,13 @@ body {
|
|||
color: #000000;
|
||||
font-family: Sintony, "Segoe UI", "Helvetica neue", Helvetica, sans-serif;
|
||||
font-size: 14px;
|
||||
padding-top: 70px;
|
||||
}
|
||||
html,
|
||||
body {
|
||||
height: 100%;
|
||||
}
|
||||
.container {
|
||||
#container {
|
||||
width: 1170px;
|
||||
min-height: 100%;
|
||||
height: auto !important;
|
||||
|
@ -29,7 +30,7 @@ body {
|
|||
max-width: 1170px;
|
||||
margin: auto;
|
||||
}
|
||||
.navbar-container .navbar-form {
|
||||
.navbar-container .navbar-search {
|
||||
width: 300px !important;
|
||||
line-height: 37px;
|
||||
margin-left: 50px;
|
||||
|
@ -50,8 +51,53 @@ body {
|
|||
padding-top: 6px;
|
||||
}
|
||||
}
|
||||
.navbar-container .navbar-nav > li > a {
|
||||
line-height: 31px;
|
||||
}
|
||||
.navbar-container .nav-login-btns,
|
||||
.navbar-container .nav-login-dd,
|
||||
.navbar-container .nav-collapse-btn,
|
||||
.navbar-container .navbar-search {
|
||||
display: none;
|
||||
}
|
||||
@media (min-width: 1145px) {
|
||||
.navbar-container .nav-login-btns,
|
||||
.navbar-container .navbar-search {
|
||||
display: inline-block !important;
|
||||
}
|
||||
}
|
||||
@media (min-width: 768px) and (max-width: 1144px) {
|
||||
.navbar-container .nav-login-dd {
|
||||
display: inline-block;
|
||||
}
|
||||
.navbar-container .nav-login-dd li .dropdown-menu {
|
||||
max-width: 900px;
|
||||
min-width: 300px;
|
||||
margin-left: 20px;
|
||||
padding: 10px;
|
||||
line-height: 1.5;
|
||||
}
|
||||
}
|
||||
@media (max-width: 767px) {
|
||||
.navbar-container .nav-collapse-btn {
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
@media (min-width: 767px) {
|
||||
.navbar-container .navbar-sm-search {
|
||||
display: none !important;
|
||||
}
|
||||
.navbar-container .navbar-sm-login-links {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
.navbar-container .nav-toggle {
|
||||
line-height: 12px;
|
||||
padding-left: 15px;
|
||||
padding-right: 15px;
|
||||
}
|
||||
.navbar {
|
||||
line-height: 70px;
|
||||
line-height: 60px;
|
||||
box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2);
|
||||
-moz-box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2);
|
||||
-webkit-box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2);
|
||||
|
@ -77,6 +123,8 @@ body {
|
|||
#push,
|
||||
footer {
|
||||
height: 60px;
|
||||
}
|
||||
footer {
|
||||
box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2);
|
||||
-moz-box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2);
|
||||
-webkit-box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2);
|
||||
|
|
2002
upload/styles/cb_2013/theme/js/bootstrap.js
vendored
Normal file
2002
upload/styles/cb_2013/theme/js/bootstrap.js
vendored
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Add table
Reference in a new issue