• Welcome to PHPVIBE Forums. Please log in.

[ Video Sharing CMS v4 ] New fields in upload context

Started by krejcis,

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

krejcisTopic starter

Hello everybody,
I would appreciate your help in my issue. I need little cusumize my php vibe website.
Do you know how to add new custom field in upload menu for videos, embed videos and images (where description, etc is located)??
Ideally I would like to define in sql 5 possibilities and then call these possibilities in upload form and user should chose one of the possibility...
Can somebody provide steps and files which have to be modified?
thanks
Jan
  •  

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

krejcisTopic starter

Hi Mario,
partly helpful...
I need to modify upload context for youtube embed, upload from pc, and upload of pictures and music.Can you provide just where changes must be done? (com/com_add, ...).
Steps for editing are the same I guee flike in feed which you mentioned.

Thanks

Jan
  •  

Marius P.

com_add.php -> Uploads
com_share.php -> Youtube and sources; receiver is lib/ajax/AddVideo.php
com_image.php -> Images


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

krejcisTopic starter

:-) thanks...fields are made. 1 problem still occur and it is that new filled field  is not written to the database. I created the line in table vibe_videos. called "custom".

Give me please an advice how to connect with DB.. It seems to be little different then in user reg. field

thanks
  •  

Marius P.

You have the $db connection, just alter the insert query to include that field.
We use ezSql http://justinvincent.com/ezsql which has an good documentation you can learn really fast.
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!
  •  

krejcisTopic starter

 :rolleyes: goood I will learn it.  Can you just now give me hit and check com_add.php what to add in the com_add.php for successful filliing database? I would like to solve this issue asap and then I will read the documentation which you provided...now I am little bit time pressed for that.. Thanks
for understanding.
Jan
  •  

Marius P.

Well, that file is tricky.
do you use ffmpeg or not, because it depends on this (different queries).

If you don't use ffmpeg, altering this is enough:

$db->query("UPDATE  ".DB_PREFIX."videos SET thumb='".toDb($thumb )."' WHERE user_id= '".user_id()."' and id = '".intval($doit->id)."'");



like for example:




$db->query("UPDATE  ".DB_PREFIX."videos SET thumb='".toDb($thumb )."', custom =".toDb(_post('custom'))."'  WHERE user_id= '".user_id()."' and id = '".intval($doit->id)."'");



change 'custom' with your field name (from form) in .toDb(_post('custom'))


If you use ffmpeg do the same (add the custom field) with



else {
$db->query("UPDATE  ".DB_PREFIX."videos SET privacy = '".intval(_post('priv'))."', pub = '".intval(get_option('videos-initial'))."',title='".toDb(_post('title'))."', description='".toDb(_post('description') )."', category='".toDb(intval(_post('categ')))."', tags='".toDb(_post('tags') )."', nsfw='".intval(_post('nsfw') )."'  WHERE user_id= '".user_id()."' and id = '".intval($doit->id)."'");
}




PS: This file doesn't do inserts, it just updates the insert from the uploader handler :)



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)