Related Topics


[Video CMS v4]How to limit number of channels in sidebar.  (Read 1357 times) Print

1 2  All B


hamnawa  April 24, 2014, 11:24:05 PM

How can we limit number of channels in the sidebar also display channels by id, alphabet, number of videos etc.

Logged



hamnawa  April 24, 2014, 11:40:07 PM

Another issue I only have Video Channels and they are displaying in all Video/Audio/Images channel. I have imported the videos table from a 3.4 version of the script.

My Sidebar:

Code
<div id="sidebar-wrapper" class="span2 left-sidebar top10 hidden-phone hidden-tablet">
<div id="sidebar">
<div class="close-me visible-phone visible-tablet hidden-desktop">
<a id="mobi-hide-sidebar" class="topicon tipN" href="javascript:void(0)" title="<?php echo _lang('Hide'); ?>"><i class="icon-plus"></i></a>
</div>
<?php echo '<div class="searchWidget visible-phone hidden-tablet hidden-desktop" style="margin:10px 6%;">
            <form action="" method="get" id="searchform" onsubmit="location.href=\''.site_url().show.'/\' + encodeURIComponent(this.tag.value).replace(/%20/g, \'+\'); return false;">
                <input type="text" name="tag" id="suggest-videos" value="'._lang("Search videos").'" onfocus="if (this.value == \''._lang("Search videos").'\') {this.value = \'\';}" onblur="if (this.value == \'\') {this.value = \''._lang("Search videos").'\';}" />
             <button type="submit" class="btn btn-primary pull-right"><i class="icon-search"></i></button>
</form>       
</div>'
?>
<?php
//The menu
echo '<div class="sidebar-nav blc"><div class="head"><h4>'._lang('Video Channels').'</h4></div>'.the_nav().'<div class="clearfix"></div></div>';
if(get_option('musicmenu') == 1 ) {
echo '<div class="sidebar-nav blc"><div class="head"><h4>'._lang('Music Channels').'</h4></div>'.the_nav(2).'<div class="clearfix"></div></div>';
}
if(get_option('imagesmenu') == 1 ) {
echo '<div class="sidebar-nav blc"><div class="head"><h4>'._lang('Image Categories').'</h4></div>'.the_nav(3).'<div class="clearfix"></div></div>';
}
?>
<?php
$postsx = $db->get_results("select title,pid,pic from ".DB_PREFIX."posts ORDER BY title ASC ".this_limit()."");
 /* The posts lists */
 if($postsx) {
echo '<div class="box">
<div class="box-head">
<h4 class="box-heading">'._lang('Latest articles').'</h4>
</div>
<div class="box-body list">
<ul>';
foreach ($postsx as $px) {
echo '<li><img src="'.thumb_fix($px->pic, true, 23, 23).'"><a href="'.article_url($px->pid, $px->title).'" title="'._html($px->title).'"> '._cut(_html($px->title),19).'</a></li>';


}
echo '<li><i class="icon-folder-close"></i><a href="'.site_url().blog.'" title="'._html($px->title).'"> '._("All articles").'</a></li>';

  echo '  </ul>   
    </div>
    </div>';
}
$pagesx = $db->get_results("select title,pid,pic from ".DB_PREFIX."pages WHERE menu = '1' ORDER BY title ASC ".this_limit()."");
 /* The pages lists */
 if($pagesx) {
echo '<div class="box">
<div class="box-head">
<h4 class="box-heading">'._lang('Information').'</h4>
</div>
<div class="box-body list">
<ul>';
foreach ($pagesx as $px) {
echo '<li><img src="'.thumb_fix($px->pic, true, 23, 23).'"><a href="'.page_url($px->pid, $px->title).'" title="'._html($px->title).'"> '._cut(_html($px->title),19).'</a></li>';


}

  echo '  </ul>   
    </div>
    </div>';
}

?>
</div>
</div>

Logged


Alexander  April 24, 2014, 11:43:29 PM

Check the upgrade in the pack, the video moving sql commands.

Logged

hamnawa  April 25, 2014, 12:14:35 AM

I have only moved contents of video and users table everything else is fresh. Do I still need to run the database converter?

Logged


Alexander  April 25, 2014, 12:19:55 AM

The database converter also contains the split by media types...
You can extract those queries from it.

Logged

hamnawa  April 25, 2014, 01:47:08 AM

I have worked around this alot without any luck:

I run the queries one by one through PhpMyAdmin same result.

When I execute the 4up5.php I get following error:

Code
ezSQL (v2.17) Debug..
Last Error -- [Duplicate column name 'mtype']

Query [12] -- [CREATE TABLE IF NOT EXISTS `vibe_posts` ( `pid` int(11) NOT NULL AUTO_INCREMENT, `ch` int(11) NOT NULL DEFAULT '1', `date` text COLLATE utf8_swedish_ci NOT NULL, `title` varchar(300) COLLATE utf8_swedish_ci NOT NULL, `pic` longtext COLLATE utf8_swedish_ci NOT NULL, `content` longtext COLLATE utf8_swedish_ci NOT NULL, `tags` varchar(500) COLLATE utf8_swedish_ci NOT NULL, PRIMARY KEY (`pid`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_swedish_ci AUTO_INCREMENT=0]

Query Result..

No Results

Logged


Alexander  April 25, 2014, 02:36:11 AM

You only need this ones

Code
$db->query("Update `".DB_PREFIX."videos` set media = '2' WHERE source like '%.mp3'");
Code
$db->query("UPDATE `".DB_PREFIX."videos` set media = '3' WHERE source like 'localimage%'");

If you run them trough phpmyadmin and your prefix is vibe_ then just run:
Code
Update `vibe_videos` set media = '2' WHERE source like '%.mp3'
and

Code
UPDATE `vibe_videos` set media = '3' WHERE source like 'localimage%'

Logged

hamnawa  April 25, 2014, 01:51:18 PM

I did run these 2 queries in to PhpMyAdmin. Results same as before no fix.

Logged


Alexander  April 25, 2014, 01:52:43 PM

Did you clear cache via Tools -> Cache in the backend?

Logged

hamnawa  April 25, 2014, 04:59:07 PM

Yes I did.

Logged


Alexander  April 26, 2014, 11:41:32 PM

If you did it right, there is no way on earth this would not work.
When you run the queries what does it say?
Are you sure you don't have more tables with different prefixes there?

Logged

hamnawa  April 27, 2014, 12:41:53 AM

I run these queries with successful results. But the issue not solved I mean video channels are listed in all categories.

Also I do have other tables in the database but I have only restored vibe_videos and vibe_channels to newly installed PhpVibe.


I do have all tables without vibe_ prefix it was used with version 2 or earlier after upgrading to 3.1 the updater converted the db and now I see new updates are listed in the tables with vibe prefix.

Logged


Alexander  April 27, 2014, 04:05:25 PM

I mean video channels are listed in all categories.

I don't get this, those gueries move videos to types, don't touch channels at all.
If you want to move an type to a specific category you need to run:

For music

Code
Update `vibe_videos` set category = 'insert category id' WHERE media = '2'

For images

Code
Update `vibe_videos` set category = 'insert category id' WHERE media = '3'

Logged

hamnawa  April 27, 2014, 07:22:45 PM

I apologize as i could not explain it correctly actually i have followed the steps with successful results no error during sql execution the end point same results with same results I mean:

Video Channels
Video Channel 1
Video Channel 2
Video Channel 3

Music Channels
Video Channel 1
Video Channel 2
Video Channel 3

Image Categories
Video Channel 1
Video Channel 2
Video Channel 3


I currently only have videos channels no image or audio and they are displayed under all those categories (video, image, music) in the left.

Logged


hamnawa  April 27, 2014, 11:02:55 PM

Hello again,

Just wanted to write that i was able this time to fix this issue but I am facing server down issue as described here: http://www.phprevolution.com/forum/troubleshooting-issues/php-vibe-3-6-crashing-dedicated-server/

The entire server goes down while I browse the website.

Also it is very slow comparing to other website of mine.

Logged


Alexander  April 28, 2014, 04:14:31 PM

You could have just hidden them from config (images and music channels).
If you removed them by code, you may have broken the code.
That thread has an solution listed.

Logged

hamnawa  April 29, 2014, 02:15:51 AM

In a new fresh install facing again channel listing have just dropped an e-mail to you guys please have a look.

Logged


Alexander  April 29, 2014, 01:29:50 PM

Why not send me an message with an link?
I don't have direct access to the pre-sale e-mails, I have to ask the girls every time to look for the mail.

Logged

hamnawa  April 29, 2014, 03:08:12 PM

I am not able to send you message.

User 'Alexander' has blocked your personal message.

Logged


Alexander  April 29, 2014, 03:17:08 PM

Try now, forgot to enable them after the vacation.

Logged

hamnawa  April 29, 2014, 03:19:18 PM

Done.

Logged



Alexander  April 29, 2014, 03:26:17 PM


For slow browsing:
- how many videos do you have?
 - Did you check and optimize your database lately?

Logged

hamnawa  April 29, 2014, 03:33:58 PM

For the images if you browse at the bottom of the page you can see few noimage.png appear in good size but rest of the at the top not.

- The media cache are already writable.
- I currently have 463 videos all embedded from youtube or vimeo.
- I have checked and analyzed the DB if you want you can see for your self I have provided you with cpanel details as well. and the DB tables which I have restored is available in root DB folder.

Logged