• Welcome to PHPVIBE Forums. Please log in.

[ Video Sharing CMS v4 ] Category RSS feed

Started by korobert,

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

korobertTopic starter

How can i generate category selected RSS Feed?

Thanks Robert
  •  

Marius P.


Hi, same code as for feed type, but query the category, example (feed.php):



if(_get("m") && (intval(_get("m")) > 0)) {
$vq = "select ".$options.", ".DB_PREFIX."users.name as owner FROM ".DB_PREFIX."videos LEFT JOIN ".DB_PREFIX."channels ON ".DB_PREFIX."videos.category =".DB_PREFIX."channels.cat_id  LEFT JOIN ".DB_PREFIX."users ON ".DB_PREFIX."videos.user_id = ".DB_PREFIX."users.id WHERE ".DB_PREFIX."videos.views >= 0 and ".DB_PREFIX."videos.pub > 0 and ".DB_PREFIX."videos.media ='".intval(_get("m"))."' ORDER BY ".DB_PREFIX."videos.id DESC ".this_limit();
} else {



turned to





if(_get("m") && (intval(_get("m")) > 0)) {
$vq = "select ".$options.", ".DB_PREFIX."users.name as owner FROM ".DB_PREFIX."videos LEFT JOIN ".DB_PREFIX."channels ON ".DB_PREFIX."videos.category =".DB_PREFIX."channels.cat_id  LEFT JOIN ".DB_PREFIX."users ON ".DB_PREFIX."videos.user_id = ".DB_PREFIX."users.id WHERE ".DB_PREFIX."videos.views >= 0 and ".DB_PREFIX."videos.pub > 0 and ".DB_PREFIX."videos.media ='".intval(_get("m"))."' ORDER BY ".DB_PREFIX."videos.id DESC ".this_limit();
} elseif(_get("c") && (intval(_get("c")) > 0)) {
$vq = "select ".$options.", ".DB_PREFIX."users.name as owner FROM ".DB_PREFIX."videos LEFT JOIN ".DB_PREFIX."channels ON ".DB_PREFIX."videos.category =".DB_PREFIX."channels.cat_id  LEFT JOIN ".DB_PREFIX."users ON ".DB_PREFIX."videos.user_id = ".DB_PREFIX."users.id WHERE ".DB_PREFIX."videos.views >= 0 and ".DB_PREFIX."videos.pub > 0 and ".DB_PREFIX."videos.category ='".intval(_get("c"))."' ORDER BY ".DB_PREFIX."videos.id DESC ".this_limit();
}else {



This way if you go to :


www.yoursite.com/feed?c=1



It will show the rss with the videos in the category with the id 1.
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!
  •  

korobertTopic starter

Thanks

how can i random feed generate from category?
  •  

Marius P.

ORDER BY ".DB_PREFIX."videos.id DESC


changed to


ORDER BY rand()
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!
  •  

korobertTopic starter

  •  

Marius P.

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!
  •  

korobertTopic starter

I want on feed list only 10 feeds, or only 1.
  •  

Marius P.

Once again, based on what? The top 10 should be made with video select by which algorithm (views, likes, etc)?
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!
  •  

 

Similar topics (7)

Important Announcement: PHPVibe Video Sharing CMS End of Life

Started by Marius P.


Replies: 1
Views: 45649

The problem of video viewing PHPVibe 5.0

Started by Nayn


Replies: 25
Views: 73972

embed video does not work on v5

Started by neospider69


Replies: 6
Views: 55758

when slecting to unpublish music mp3 - next page says unpublished video ?

Started by spirog


Replies: 2
Views: 4946

insite ads issue when selecting above/below video player location

Started by georgepanaitescu


Replies: 3
Views: 26043

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

Started by spirog


Replies: 4
Views: 9158

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

Started by spirog


Replies: 3
Views: 8898