[ Video Sharing CMS v4 ] Channels on Left sidebar

Started by ipeci,

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ipeciTopic starter

Hello

Wich code i net to put on sidebar.php to have all channel results at left sidebar

Thanks
  •  

PHPVibe A.

It's not an easy change. Look at 3.3 if you want, but better wait for us to finish 3.5 and I will write a step by step tutorial.

ipeciTopic starter

Okay
thanks for info.

Can you plz tell me wan comes a 3.5v


regards
  •  

PHPVibe A.

I would lie to you, I have no clue since Mario took over what is the progress.

x5000x

  •  

PHPVibe A.

The version from misterdevil.com (to speed things up) :

lib/functions.php:

function the_sidenav() {
global $db, $cachedb;
include_once( INC.'/class.tree.php' );
$tree = new Tree;
$nav = '<div class="CNav"> ';                 
$nav .=' <a href="'.canonical().'#!/#back" class="CNav-back hide tipN" title="'._lang("Back one level").'" id="CNav-back"><i class="icon-double-angle-left"></i></a>';
$nav .='<div class="CNav-body"><div class="CNav-wrapper" id="CNav">';
$categories = $cachedb->get_results("SELECT cat_id as id, child_of as ch, cat_name as name, picture FROM  ".DB_PREFIX."channels limit 0,10000");
if($categories) {	
foreach ($categories as $cat) {
if($cat->ch < 1) {$cat->ch = null;}
		$label = '<a href="'.channel_url($cat->id, $cat->name).'" title="'. stripslashes($cat->name).'"><img src="'.thumb_fix($cat->picture, true, 23, 23).'" class="cat-menu-img"/>'. stripslashes($cat->name).'</a>';
		$li_attr = '';		
		$tree->add_row($cat->id, $cat->ch, $li_attr, $label);
	}
$nav .=$tree->generate_list();	
}
$nav .='</div></div></div>';				
return apply_filters('the_navigation' , $nav);
}


tpl/main/sidebar.php:

echo the_sidenav();


between php bracelets if case.

tpl/main/js/phpvibe_app.js (very bottom of file):
var CNav = {
    o: {
        element: '',
        hideStep: 199,
        duration: 200,        
        backBtn: 'a#CNav-back',
        lastId: 0,
        lastelm: 0,
        currentStep: 0,
        ul_heights: {},
        running: false
    },
    option: {},
    init: function (customOption) {
        var self = this;
        self.option = $.extend({}, self.o, customOption);
        self.initCNav();
        self.observerClick()
    },
    initCNav: function () {
	var pathname = window.location.pathname;
        var self = this,
            el = self.option.element,
            $el = $(el),
            $first = $el.first();
        $el.css("height", $(self.option.element + " ul").first().height() + 20);
        $(self.option.element).scrollLeft(0);
        $first.find('ul').addClass('pos--1');
        $first.find('li').each(function (ii) {
            var $this = $(this),
                $firstUl = $this.find("ul").first();
            $firstUl.addClass("poz-" + ii);
            if ($firstUl.size() > 0) {
			var a_href =  $this.find('a').first().attr('href');
			var a_name = $this.find('a').first().text();
			var a_image = $this.find('img').attr("src");
                $this.find('a').first().append('<i class="icon-chevron-down"></i>').attr('href', pathname + '#!/' + $this.find('a').first().text()).addClass('haveSubItem');
                $this.find('a').first().next('ul').css('opacity', 0).css('visibility', 'hidden').prepend('<li><a href="' + a_href + '" title="' + a_name + '"><img src="'+ a_image +'"/><strong>' + a_name + '</strong></a></li>');
            }
        })
    },
    moveMenu: function ($this, direction) {
        var self = this;
        if (!self.option.running) {
            self.option.running = true;
            if (direction == 'next') {
                self.option.currentStep = parseInt($(self.option.element).scrollLeft()) + self.option.hideStep;
                $(self.option.element).animate({
                    height: $this.next('ul').height()
                }, self.option.duration);
                self.option.lastId = $this.parents('ul').attr('class');
                self.option.lastElm = $this.next('ul');
                $this.next('ul').css('visibility', 'visible').animate({
                    opacity: 1
                })
            } else {
                self.option.currentStep = parseInt($(self.option.element).scrollLeft()) - self.option.hideStep;
                $(self.option.element).animate({
                    height: self.option.lastElm.parent('li').parent('ul').height()
                }, self.option.duration, function () {
                    self.option.lastElm.animate({
                        opacity: 0
                    }, self.option.duration / 2).css('visibility', 'hidden');
                    self.option.lastElm = self.option.lastElm.parent('li').parent('ul');
                    self.option.lastId = $(this).attr('class')
                })
            }
            $(self.option.element).animate({
                scrollLeft: self.option.currentStep
            }, self.option.duration, function () {
                if ($(self.option.element).scrollLeft() > 0) {
                    $(self.option.backBtn).animate({
                        left: '-18px'
                    }, self.option.duration, function () {
                        $(this).css('z-index', 1);
						$(this).removeClass('hide');
                        self.option.running = false
                    });
                    $(self.option.backBtn).click(function () {
                        self.moveMenu($(this), 'prev')
                    })
                } else if (self.option.currentStep <= 0) {
                    $(self.option.backBtn).css('z-index', -1).animate({
                        left: '-14px'
                    }, self.option.duration, function () {
                        self.option.running = false;
						$(this).addClass('hide');
                    })
                }
            })
        }
    },
    observerClick: function () {
        var self = this;
        $(self.option.element + " ul a.haveSubItem").click(function () {
		    self.moveMenu($(this), 'next')
        })
    }
};



tpl/main/css/vibe.style.css (very bottom of file):

/* Continous Nav */

.CNav {
    display:block;
	position: relative;
	clear:both;
}

.CNav .CNav-body {
	width: 100%; 
	padding-bottom:20px;
	display:block;
	position: relative;
}
.CNav ul {
	top:0;
	left:0;
	position:absolute;
	display: block;
	width: 100%; 
	text-align: left;
	margin: 15px 0px;
	list-style: none;
	list-style-position: inside;
}
.CNav .CNav-wrapper {
	position: relative;
	width: 100%; 
	overflow:hidden;
	margin:0;
	padding-bottom: 10px;
}
.CNav ul  li {
	display: block;
	margin: 0;
	padding: 5px 0px 0px;
	overflow:hidden;
}
.CNav ul  img {
margin-right: 5px;
border: 1px solid #666;
-webkit-border-radius: 2px;
-moz-border-radius: 2px;
border-radius: 2px;
}
.CNav ul  li i{float:right; margin-right:4px; margin-top:4px;}

.CNav ul  li:last-child {
	border-bottom: 0px;
}
.CNav ul  li a {
	text-decoration: none;
	text-transform:capitalize;
	display:block;
}

.CNav .CNav-back{
	position:absolute;
	top:16px;
	left: -14px;
	z-index:-1;
	color:#555;
}
.CNav-back a, .CNav .CNav-back i  {font-size:24px; color:#555;}
/* hide elements */
.CNav ul ul {
	width: 100%; 
	display:block;
	top:0;
	left: 200px;
	position:absolute;
	margin-top: 0px;
}


}



Is this what you guys want?

ipeciTopic starter

Hi,
Thanks for your efforts, but it does not work for me! - [

  •  

Marius P.

Hi! What's the actual issue you are experiencing? The code is correct (I know cause I've built it) but it was not tested on 3.4
Happy with my help? Buy me a coffee.
Please, always use the search before opening a new topic! We're all here on our (limited) free time! Make sure you help yourself too!
  •  

PHPVibe A.


ipeciTopic starter

I have the whole back away, he had no fault but since it also reallocated nothing, it were see no changes!
  •  

ipeciTopic starter

Quote from: @Mario on
Hi! What's the actual issue you are experiencing? The code is correct (I know cause I've built it) but it was not tested on 3.4

Hi mario ,nice to see you active.

I have 3.4 at moment.

regards
  •  

ipeciTopic starter

Quote from: Alexander on
Link? Errors?
I tryed to install again but i happens nothing.No errors nothing,just like befor.
I put the link to my homepage after my profile photo, plz check!

thanks
  •  

Marius P.


Thanks   :)

Show me the code in tpl/main/sidebar.php where you've placed
echo the_sidenav();
before and after this line, including it.
Happy with my help? Buy me a coffee.
Please, always use the search before opening a new topic! We're all here on our (limited) free time! Make sure you help yourself too!
  •  

ipeciTopic starter

Quote from: @Mario on
Thanks   :)

Show me the code in tpl/main/sidebar.php where you've placed
echo the_sidenav();
before and after this line, including it.

Hi mario,
Here i send you a complett sidebar.php as .txt

thnx :D
  •  

PHPVibe A.

Find in lib/functions.php

include( INC.'/class.tree.php' );


and replace it with:

include_once( INC.'/class.tree.php' );


Should be once more in the menu function.

ipeciTopic starter

Hi Alex,

I Have Done, but nothing Happening :-(
  •  

PHPVibe A.


x5000x

Alex,
On my side no categories shows either. When you check his site if you get it to work please post here the changes so we can apply it to.
Thanks!
  •  

PHPVibe A.

You need to place

echo the_sidenav();


right before:

if (is_user()) {


and for Ipeci I had to do a css fix (height problem), added this to tpl/main/css/vibe.style.css

.CNav, .CNav-body ,.CNav-wrapper{
	min-height:240px;
	display:block;
}


But he had some css modifications on sidebar.

ipeciTopic starter

Thank You Alex ,

Now its work for me Perfect  ::)


Regards
  •  

x5000x

Alex,

It works for me as well.
But can you post us code how to have boarders and tables between and around categories same like it is done on "Browse" "Most Viewed" "Featured" "Most Liked"

We would be thankful and it would look much better.

Thanks in advance,
  •  

ipeciTopic starter

Hi there,

How to make that the ( child channels ) show after (mothercategory ) to dropdown,
like by misterdevils homepage ... ( More Porn )

Thanks
  •  

PHPVibe A.

You just have to attach some childs to that category.

@x5000x It's not easy to style that menu. I honestly never tried.

ipeciTopic starter

Hi,

i have maked a childs but not see them as dropdown in meny :-(
  •  

ipeciTopic starter

Plz, look at my homepage , by Tv Live are lot of childs , but if i click Tv live dont show in menu the childs only on right side :(

If you can plz.fix it i just cant fix that, you have ftp
regards
  •  

PHPVibe A.

Change

.CNav, .CNav-body ,.CNav-wrapper{
	min-height:240px;
	display:block;
}


to a bigger minimum height.
This is why we have discontinued this menu.

PHPVibe A.

Did you clear cache? Cause I don't see the childs in html source either.

ipeciTopic starter

Now have maked a min-height= 940px ( just for testing), clared the cache  and still dont show !

Loock at the menu at the top , there showing the childs by (Tv Live )
  •  

Marius P.

#28
Here is a secondary approach (added it to Ipeci):

In sidebar.php:

echo '<div class="sidebar-nav">'.the_nav().'</ div>';





In css/vibe.style.css:



/* Sidebar navigation */
.sidebar-nav {
display:block;
clear:both;
overflow:visible;
width:170px;
}
.sidebar-nav ul {
margin: 10px 0 0 0;
_margin: 0;
position: relative;
float:left;
z-index: 1000;
background: #fff;
}
.sidebar-nav ul ul{
_margin: 0;
opacity: 0;
visibility: hidden;
position: absolute;
top: 50px;
left: 0;
z-index: 1000;
background: #fff;
border-top: 3px solid #eb6a5a;
box-shadow: 0px 2px 5px rgba(0,0,0,.15);
-moz-box-shadow: 0px 2px 5px rgba(0,0,0,.15);
-webkit-box-shadow: 0px 2px 5px rgba(0,0,0,.15);
-o-box-shadow: 0px 2px 5px rgba(0,0,0,.15);
-ms-box-shadow: 0px 2px 5px rgba(0,0,0,.15);
transition: all .2s ease-in-out;
-moz-transition: all .2s ease-in-out;
-webkit-transition: all .2s ease-in-out;
-o-transition: all .2s ease-in-out;
border-radius: 3px;
}
.sidebar-nav li{
float: none;
display: block;
border: 0;
_line-height: 0;
border-bottom: 1px solid #f1f1f1;
}
.sidebar-nav a {
	float: left;
	margin: 0 5px 0 0;
	color: #888;
	text-decoration: none;
	padding: 10px 0 10px 0;
	font-size: 15px;
}


.sidebar-nav  ul li i {
 color: #f15a23;
    font-size: 15px; 
	line-height:22px;	
margin-right: 2px;
}
.sidebar-nav  ul li i:last-of-type{
margin-right: 12px;
}


.sidebar-nav li li:hover > a {
	color: #eb6a5a;
	background-color: #fafafa;
	background-image: linear-gradient(#fcfcfc, #f8f8f8);
}


*html .sidebar-nav li a:hover { /* IE6 only */
	color: #eb6a5a;
}




.sidebar-nav li:hover > ul {
	opacity: 1;
	visibility: visible;
	margin: 0;
}


.sidebar-nav ul ul {
	top: -3px; /* this value is equal to the border top for the next levels "ul" of navigation [ like 2nd and 3rd "ul" ] */
	left: 160px; /* this value must be equal or less than the specified 2nd level ul links */
	margin: 0 0 0 10px; /* right distance effect for fading of the second level "ul" */
	_margin: 0; /*IE6 only*/
	visibility: hidden;
}


.sidebar-nav ul li {
	float: none;
	display: block;
	border: 0;
	_line-height: 0; /*IE6 only*/
	border-bottom: 1px solid #f1f1f1;
}


.sidebar-nav ul li:last-child {   
	box-shadow: none; 
	border: none;
}


.sidebar-nav ul a {    
	width: 170px; /* width of next levels of "ul" [ like 2nd and 3rd "ul" ] */
	_height: 10px; /*IE6 only*/
	display: block;
	/* white-space: nowrap; */
	float: none;
	text-transform: none;
	margin: 0;
	padding: 4px 10px 6px; /* padding of next levels links */
	border-top: 1px solid #fff;
	font-size: 12px;
}


.sidebar-nav ul a.current {
	color: #eb6a5a;	
}




.sidebar-nav ul li ul a {
	padding-left: 12px;	
}
.sidebar-nav ul a img {
	margin-right: 12px;	
	-webkit-border-radius: 2px;
    -moz-border-radius: 2px;
    border-radius: 2px;
	border: 1px solid transparent;
}
.sidebar-nav ul a:hover img {
border: 1px solid #eb6a5a;
}


.sidebar-nav ul li a:last-child {
	border-radius: 0 0 3px 3px;	
}


.sidebar-nav ul a:hover {
	background-color: #fafafa;
	background-image: linear-gradient(#fafafa, #f8f8f8);
	-moz-background-image: linear-gradient(#fafafa, #f8f8f8);
	-webkit-background-image: linear-gradient(#fafafa, #f8f8f8);
	-o-background-image: linear-gradient(#fafafa, #f8f8f8);
	-ms-background-image: linear-gradient(#fafafa, #f8f8f8);
}


.sidebar-nav ul li:first-child > a {
	border-radius: 0px 0px 0 0;
}


.sidebar-nav ul ul li:first-child > a:after {
	content: '';
	position: absolute;
	left: 5px;
	top: -11px; /* -10 */
	border: 10px solid transparent;
	border-top-width: 0;
border-bottom-color: #eb6a5a;
}


.sidebar-nav ul ul li:first-child a:after {
	left: -9px; /* -7 */
	top: 55%;
	margin-top: -6px;
	border-left: 0;	
	border-bottom: 9px solid transparent; /* 6 */
	border-top: 0px solid transparent; /* 6 */
	border-right: 9px solid #eb6a5a; /* 7 */
}


.sidebar-nav ul li:first-child a:hover:after {
	border-bottom-color: #eb6a5a; 
}


.sidebar-nav ul ul li:first-child a:hover:after {
	border-right-color: #eb6a5a; 
	border-bottom-color: transparent; 	
}


.sidebar-nav ul li:last-child > a {
	
}


/* navigation main-nav response fix */


.sidebar-nav_trigger { /* Hide it initially */
	display: none;
}
Happy with my help? Buy me a coffee.
Please, always use the search before opening a new topic! We're all here on our (limited) free time! Make sure you help yourself too!
  •  

Marius P.

This will copy the top menu and adapt it to the sidebar, the old menu had issues, better remove it fully.
Happy with my help? Buy me a coffee.
Please, always use the search before opening a new topic! We're all here on our (limited) free time! Make sure you help yourself too!
  •  

PHPVibe A.

Quote from: @Mario on
This will copy the top menu and adapt it to the sidebar, the old menu had issues, better remove it fully.

:D lol, reworked the css fully?

ipeciTopic starter

Thank you Mario
I've watched you and saw that you have tried more than 20 minutes to fix my problem just to help me, so I really thank you.
In the background, I tried to help you as I have cleared the cache all the time so you can see the changes in real-time.

What I wanted to ask you about this thing is who I am logged in I see somehow a line via the menu (please see photo) ... how do I remove it?
And second question, what do you mean by "the old menu had issues, better remove it fully," Do you mean remove the entire code, ie changes in lib / funktions.php and all others who are up here?

This menu It looks awesome and I love it  ::)

Thanks again and have a nice day :-)
  •  

Marius P.

Quote from: ipeci on
And second question, what do you mean by "the old menu had issues, better remove it fully," Do you mean remove the entire code, ie changes in lib / funktions.php and all others who are up here?

Yes.

I need to create an account to check the first issue but...I can't see how?
Happy with my help? Buy me a coffee.
Please, always use the search before opening a new topic! We're all here on our (limited) free time! Make sure you help yourself too!
  •  

ipeciTopic starter

I leave the option to register for a short time one so that you can register and receive the LOG


By the way, the only reason why I is not authorizing the registrations ... here we are again at tema (private channels) who register user and upload anything from youtube, I want that the videos can not embed in my private channels, but only by me as administrator in shared channel.
  •  

PHPVibe A.

Just make a custom account and pm it pls, I still see if closed.

ipeciTopic starter

Quote from: @Mario on
This will copy the top menu and adapt it to the sidebar, the old menu had issues, better remove it fully.

If i remote the modifikated (funktions.php ) and put the orginal file dosnt work , better i keep this with the fixed code from Alexander here at the top!

Thnx
  •  

x5000x

@Mario,

When I add your code
echo '<div class="sidebar-nav">'.the_nav().'<>';
on top of Alexanders code,  why are all videos showing on the sidebar.php section on main page?
  •  

PHPVibe A.

Quote from: x5000x on
@Mario,

When I add your code
echo '<div class="sidebar-nav">'.the_nav().'<>';
on top of Alexanders code,  why are all videos showing on the sidebar.php section on main page?

The forum scripts out close div tag and replaces it with <> it should be </ div> without the space.

x5000x

Alex,

Thank you very much that did the trick. Now menu look the way it should but when you log in as user or admin it messes up "My subscription box" could you please check out this and see how to fix it.

Thanks!
  •  

PHPVibe A.

Add

style="display:block;clear:both;"

to the div with class "box"  under the menu

<div class="box">


to

<div class="box" style="display:block; clear:both;">


x5000x

Alex,

When I add
style="display:block;clear:both;"
fixes the problem but on site it displays this code in text as well. Maybe i am punting it in wrong spot could you please be more specific?
  •  

PHPVibe A.

Quote from: x5000x on
Alex,

When I add
style="display:block;clear:both;"
fixes the problem but on site it displays this code in text as well. Maybe i am punting it in wrong spot could you please be more specific?

I've already posted how the code should look like fully, did you checked?

x5000x

I did try everything i added
<div class="box" style="display:block; clear:both;">
and not fix the problem.

  •  

PHPVibe A.

Not there!

To the first div under

<div class="box">
<div class="box-head">
<h4 class="box-heading"><?php echo _lang('My subscriptions'); ?></h4><a class="pull-right" href="<?php echo profile_url(user_id(), user_name()); ?>&sk=subscribed"><?php echo _("View all"); ?></a>
</div>
<div class="box-body">


That

<div class="box">



to

<div class="box" style="display:block; clear:both;">


x5000x

  •  

PHPVibe A.


x5000x

Just have patience with us beginners :)

Last thing. Since Mario changed the css code this does not have effect:
.CNav, .CNav-body ,.CNav-wrapper{
	min-height:540px;
	display:block;
}


Where now to do you change height of the channels box left side?
  •  

PHPVibe A.

It does not affect this last menu, that's another menu. CNav is the jquery menu from misterdevil.com
I'm not very good at giving support, hope soon some new team member will replace me, I'm better coding in the background :)

x5000x

Quote from: Alexander on
It does not affect this last menu, that's another menu. CNav is the jquery menu from misterdevil.com
I'm not very good at giving support, hope soon some new team member will replace me, I'm better coding in the background :)

Alex,

You are more then better keep that in mind.
  •  

PHPVibe A.


ipeciTopic starter

Quote from: ipeci on
Thank you Mario
I've watched you and saw that you have tried more than 20 minutes to fix my problem just to help me, so I really thank you.
In the background, I tried to help you as I have cleared the cache all the time so you can see the changes in real-time.

What I wanted to ask you about this thing is who I am logged in I see somehow a line via the menu (please see photo) ... how do I remove it?
And second question, what do you mean by "the old menu had issues, better remove it fully," Do you mean remove the entire code, ie changes in lib / funktions.php and all others who are up here?

This menu It looks awesome and I love it  ::)

Thanks again and have a nice day :-)


Hi can you fix my problem plz,
the menu box is over the My Playlist box , and showing only if im loged in !
  •  

PHPVibe A.

Quote from: ipeci on

Hi can you fix my problem plz,
the menu box is over the My Playlist box , and showing only if im loged in !

What did we discussed up? :)

x5000x

ipeci,

replace this:
<div class="box">
<div class="box-head">
<h4 class="box-heading"><?php echo _lang('My subscriptions'); ?></h4><a class="pull-right" href="<?php echo profile_url(user_id(), user_name()); ?>&sk=subscribed"><?php echo _("View all"); ?></a>
</div>
<div class="box-body">


with this code:
<div class="box" style="display:block; clear:both;"> 
<div class="box-head">
<h4 class="box-heading"><?php echo _lang('My subscriptions'); ?></h4><a class="pull-right" href="<?php echo profile_url(user_id(), user_name()); ?>&sk=subscribed"><?php echo _("View all"); ?></a>
</div>
<div class="box-body">
  •  

ipeciTopic starter

@ x500x Hvala ti brate ,
ali problem stoji poslje login ,tek tada se vidi da je echo von navi prije boxa (My subscriptions )( My playlists ) znaci nisu odvojeni !

@all
After login come the box of My subscriptions and the echo of navi show OVER the box of My subscriptions! ( My playlists )

Thank @ all

  •  

PHPVibe A.

I don't really understand. It seems fine

ipeciTopic starter

Hi,

Yes but this is my modifikation :-) i have make the _nav at Top . But if i put the nav after sitemap than i become the error .
Thanks
  •  

Similar topics (7)