[ Video Sharing CMS v4 ] Category Videos in 404 Page.

Started by megaman79,

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

megaman79Topic starter

Hello PHPVibe,

I would like to know how can I Show a Specific Video Category inside 404 Page.
I want to make my 404 Page like the Recent Videos section, but I want to call an specific
Category.

Why? I am re-building my old video sites under PHPVibe, all my links in Google, will be broken, all visitors from broken links will be redirected to the 404 Page, so I want to show then a Specific Video Category.

I want to use this as Recommend Video Videos, because the video content they was looking is not available any more under the old link.

Thanks for the support.
"Very Happy with PHPVibe"
  •  

PHPVibe A.

tpl/{theme}/404.php

should be edited to contain something like this...

$id = 10;
/* Change 10 to your channel's id. */
$options = DB_PREFIX."videos.id,".DB_PREFIX."videos.media,".DB_PREFIX."videos.title,".DB_PREFIX."videos.user_id,".DB_PREFIX."videos.thumb,".DB_PREFIX."videos.views,".DB_PREFIX."videos.liked,".DB_PREFIX."videos.duration,".DB_PREFIX."videos.nsfw";
$vq = "select ".$options.", ".DB_PREFIX."users.name as owner FROM ".DB_PREFIX."videos LEFT JOIN ".DB_PREFIX."users ON ".DB_PREFIX."videos.user_id = ".DB_PREFIX."users.id WHERE ".DB_PREFIX."videos.category in (SELECT cat_id from ".DB_PREFIX."channels where cat_id = '".$id."' or child_of = '".$id."' ) and ".DB_PREFIX."videos.pub > 0 ORDER BY ".DB_PREFIX."videos.id DESC ".this_offset(bpp());

include_once(TPL.'/video-loop.php');


megaman79Topic starter

Alexander,

Thank you so much for the support. It works excellent.
"Very Happy with PHPVibe"
  •  

TigerClaw

Will the 404 page be cached with the new 4.0 Full Cache system after using this mod?

Thanks
  •  

PHPVibe A.


Similar topics (7)