Jump to content


Photo
- - - - -

description box


  • Please log in to reply
11 replies to this topic

#1 jv6642

jv6642

    Senior Member

  • Members
  • PipPipPipPip
  • 325 posts

Posted 13 June 2010 - 11:44 PM

how to add a description to a video :D


HOW TO ADD A DESCRIPTION IS BELOW




this is in thanks to boon

Edited by jv6642, 14 June 2010 - 10:31 PM.

My site: PoonPlanet :cool: Link Exchange:Link
Free chat: Poon Chat:eek: Free Sex: F*CK Fest

#2 GILBERTO

GILBERTO

    Senior Member

  • Members
  • PipPipPipPip
  • 264 posts

Posted 14 June 2010 - 07:30 AM

Nice but i think something is missed in css cuz description is at the middle of the box , but nice tip thank u !

#3 jv6642

jv6642

    Senior Member

  • Members
  • PipPipPipPip
  • 325 posts

Posted 14 June 2010 - 08:05 AM

UPDATE

you might need edit few files.

1. add the input field to the tpl file: /templates/frontend/yourcolor/upload_video.tpl
name the field as description


<div class="separator">
<label for="description">Description:</label>
<textarea name="description" id="upload_video_description">{$video.description} </textarea><br />
<span class="expl">Description of video required.</span><br />
<span id="video_tags_error" class="error" style="display: none;">{t c='upload.video_description_empty'}</span>
</div>

2. edit : modules/upload/video.php

below this : $anonymous = $filter->get('video_anonymous');

add: $description = $filter->get('description');


below this: channel = " .$category. ", keyword = '" .mysql_real_escape_string($keywords). "',
add: description = '".mysql_real_escape_string($description)."',

3. edit video.php

find: $sql = "SELECT v.VID, v.UID, v.title, v.channel, v.keyword, v.viewnumber, v.type,

replace with: $sql = "SELECT v.VID, v.UID, v.title, v.channel, v.keyword, v.viewnumber, v.type, v.description,

4. edit: /templates/frontend/yourcolor/video.tpl


find:
<div class="video_addtime">
{insert name=time_range assign=addtime time=$video.addtime}
{$addtime}
</div>

below that add:
<div>
Description: {$video.description}
</div>


step 5

edit:
templates/backend/default/videos_edit.tpl

below
<label for="keyword">Keywords (tags): </label>
<textarea name="keyword">{$video[0].keyword}</textarea><br>

add:

<label for="description">Description: </label>
<textarea name="description">{$video[0].description}</textarea><br>

step 6

edit
siteadmin/modules/videos/edit.php

below:
$keyword = trim($_POST['keyword']);

add:
$description = trim($_POST['description']);

- next -
below:

elseif ( strlen($keyword) < 3 )
$errors[] = 'Video keyword(tags) field cannot be blank!';

add:

elseif ( strlen($description) < 3 )
$errors[] = 'Video Description field cannot be blank!';

- next -

AFTER:
keyword = '" .mysql_real_escape_string($keyword). "',

ADD:
description = '" .mysql_real_escape_string($description). "',



step 7

edit
templates/frontend/your color/edit.tpl

find:

<div class="separator">
<label for="upload_video_keywords">{t c='global.tags'}:</label>
<textarea name="keyword" id="upload_video_keywords">{$video.keyword}</textarea><br />
<span class="expl">{t c='upload.tags_expl'}</span><br />
<span id="video_tags_error" class="error" style="display: none;">{t c='upload.video_tags_empty'}</span>
</div>


add below:

<div class="separator">
<label for="description">Description:</label>
<textarea name="description" id="upload_video_description">{$video.description } </textarea><br />
<span class="expl">Description of video required.</span><br />
<span id="video_tags_error" class="error" style="display: none;">{t c='upload.video_description_empty'}</span>
</div>

step 8

edit

public html/edit.php

find

$thumb = $filter->get('thumb', 'INTEGER');

add below

$description = $filter->get('description');

find

if ( $keyword == '' ) {
$errors[] = $lang['upload.video_tags_empty'];
} else {
$keyword = prepare_string($keyword, false);
}

add below

if ( $description == '' ) {
$errors[] = $lang['upload.video_description_empty'];
}

find

keyword = '".mysql_real_escape_string($keyword)."',

add below

description = '".mysql_real_escape_string($description)."'



step 9

edit
public_html/language/en_US.lang.php

find
$lang['upload.video_file_empty'] = 'Please selected a video file!';

add after
$lang['upload.video_description_empty'] = 'Please enter a video description!';



THIS LAST STEP WITH THE LANGUAGE NEEDS TO BE DONE WITH ALL THE LANGUAGES YOU WILL BE USING





thats all, i'm not including any css part so you might have to adjust the position of the css layout your self. You can do this also for games, by default the game table inside the database dont have description field, you might try to add it your self.

Hope that help, good luck.

Edited by jv6642, 14 June 2010 - 10:31 PM.

My site: PoonPlanet :cool: Link Exchange:Link
Free chat: Poon Chat:eek: Free Sex: F*CK Fest

#4 Pablo_br

Pablo_br

    Junior Member

  • Members
  • PipPip
  • 21 posts

Posted 11 July 2010 - 11:48 PM

thnx works fine ;)

#5 Doudingue

Doudingue

    Junior Member

  • Members
  • Pip
  • 7 posts

Posted 31 July 2010 - 12:16 PM

thank you for that.

I tried to adapt it only for the albums but I can not.
Can tell me how to do it?
I have no need for videos.

big thank you

#6 SamK

SamK

    Member

  • Members
  • PipPip
  • 32 posts

Posted 20 August 2010 - 11:26 PM

I am not sure if this is a bug with the edit or not but I have applied the edits and double/triple checked them.

I went into admin panel and edited a video and added a "description" but when you go to the frontend and view the video there is no description shown.

Edit: When a member "edits" their video and saves it the description does not save.

Edited by SamK, 21 August 2010 - 12:12 AM.


#7 SamK

SamK

    Member

  • Members
  • PipPip
  • 32 posts

Posted 21 August 2010 - 03:32 PM

This needs to be done in the file 2 times.

4. edit: /templates/frontend/yourcolor/video.tpl


find:
<div class="video_addtime">
{insert name=time_range assign=addtime time=$video.addtime}
{$addtime}
</div>

below that add:
<div>
Description: {$video.description}
</div>



#8 mamzy26

mamzy26

    Junior Member

  • Members
  • Pip
  • 15 posts

Posted 05 October 2010 - 12:56 AM

Thanks working perfect.....also can someone tell me after this mod, will it improve my videos SEO by any chance?

#9 coeus

coeus

    Member

  • Members
  • PipPip
  • 62 posts

Posted 08 June 2011 - 08:56 PM

Thanks that's a great tool to have. Need some work on the front side when a member edits the video because it doesnt's get saved, like samK said. Cheers.

#10 videopornoitalia

videopornoitalia

    Junior Member

  • Members
  • Pip
  • 2 posts

Posted 09 May 2012 - 09:28 AM

hi
how do I implement this change?
why is not allowed to change video.tpl?

I bought the license regularly

#11 apple82

apple82

    Member

  • Members
  • PipPipPipPip
  • 293 posts
  • LocationSpain

Posted 18 May 2013 - 07:39 PM

Thanks!

default this would have to come now!

#12 apple82

apple82

    Member

  • Members
  • PipPipPipPip
  • 293 posts
  • LocationSpain

Posted 07 July 2013 - 02:01 PM

there is an error when a user tries to edit the video is not saved.

instead on siteadmin if kept well. :(