• Welcome to PHPVIBE Forums. Please log in.

[ Video Sharing CMS v4 ] Finding the code where the videos are chosen for a category.

Started by gaunt93,

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

gaunt93Topic starter

Hello, I have been trying to add support for multiple categories, I have already written code that decodes tags and compares them against any existing categories and inputs that into the category field on in the database. I have yet to find exactly where the code is that grabs the category, so that I can decode the new category scheme.

I am using PHPVibe 3.5. If you need more info, I am glad to give it! Thanks!

Once I am done, and it is fully functional, I will be posting about it.
  •  

PHPVibe A.

To which page? Such a mod would affect a lot:
- video page
- channels page
- related videos

For video page:

com/com_video.php

$video = $cachedb->get_row("SELECT ".DB_PREFIX."videos.*, ".DB_PREFIX."channels.cat_name as channel_name ,".DB_PREFIX."users.avatar, ".DB_PREFIX."users.name as owner, ".DB_PREFIX."users.avatar 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.`id` = '".$v_id."' limit 0,1");


Notice the:
".DB_PREFIX."channels.cat_name as channel_name
and

LEFT JOIN ".DB_PREFIX."channels ON ".DB_PREFIX."videos.category =".DB_PREFIX."channels.cat_id

gaunt93Topic starter

Awesome, I am assuming these are relatively the same for channels and related videos?
  •  

PHPVibe A.

Not sure what to say, depends how you approach...

If you store them as 1,2,3 you can use where category in ($video->category) for the queryes...

Similar topics (7)