• Welcome to PHPVIBE Forums. Please log in.

[ 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)

Important Announcement: PHPVibe Video Sharing CMS End of Life

Started by Marius P.


Replies: 1
Views: 32561

Better Idea for PHPVibe v5 Channels page

Started by DeadFish


Replies: 2
Views: 1962

insite ads issue when selecting above/below video player location

Started by georgepanaitescu


Replies: 3
Views: 16631

The problem of video viewing PHPVibe 5.0

Started by Nayn


Replies: 25
Views: 59475

embed video does not work on v5

Started by neospider69


Replies: 6
Views: 42240

Video that I've uploaded needs to have that value in admin to upload

Started by spirog


Replies: 4
Views: 1317

video,playlist,images, etc. (frontend) select all deselect all reselect all

Started by spirog


Replies: 3
Views: 1794