[ Video Sharing CMS v4 ] Add Text in Front of the Video Title ?

Started by megaman79,

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

megaman79Topic starter

Hello PHP Vibe,

Can this be done?

1. Add a text in front of all the Video Title before when is Imported:

Example: John Michael - Glory to God => to => VIDEO - John Michael - Glory to God

2. Use individually Cron PHP file for each cron Task ?

Instead of using one sigle Cron File to run all Task, use one cron file for each task ?


"Very Happy with PHPVibe"
  •  

Marius P.

1. Yes, you can code that easily in the lib/class.youtube.php
2. Makes no sense to me, you'll need to code a php file yourself for every cron in the database.
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!
  •  

megaman79Topic starter

Quote from: @Mario on
1. Yes, you can code that easily in the lib/class.youtube.php
2. Makes no sense to me, you'll need to code a php file yourself for every cron in the database.

Hello @Mario,

Can you give me an example how I would Add Text in front of the Video?
I'm going to make a site with just one topic.

I will appreciate your help Mario.
"Very Happy with PHPVibe"
  •  

PHPVibe A.

You can do this, after:

$video["path"] = 'http://www.youtube.com/watch?v='.$video["videoid"];

do this:

$video["title"] = "My own text ".$video["title"];


In the file Mario pointed, if you wish to store all this in the database (but I advice against).

Or if you want a text on the title in Google (meta?) you should do this:

open com/com_video.php

find:

// SEO Filters
function modify_title( $text ) {
global $video;
    return strip_tags(_html($video->title));
}


change it to

// SEO Filters
function modify_title( $text ) {
global $video;
$mytext = "My own custom text ";
    return $mytext.strip_tags(_html($video->title));
}


Obviously change
$mytext = "My own custom text ";

megaman79Topic starter

Hello Alexander,

When I changed in the /lib/class.youtube.php:

Code: [Select]
$video["path"] = 'http://www.youtube.com/watch?v='.$video["videoid"];

do this:

Code: [Select]
$video["title"] = "My own text ".$video["title"];


I try to import Video Manual, I got this error:
Notice: Undefined index: path in /home/descarga/public_html/lib/class.youtube.php on line 262

Also, I try view the Video Import, but is show a Blank Page.

"Very Happy with PHPVibe"
  •  

megaman79Topic starter

Thanks,

I got it working. I did something wrong.

Thanks for the support.
"Very Happy with PHPVibe"
  •  

PHPVibe A.

You don't need to remove the path, but after it to past that :)

Similar topics (7)