I'm quite new to drupal, but have managed to install & configure drupal 4.6by following all the different forum discussions. I am trying to apply the backport patch to get the additional functionality to work on the 4.6 video module,. I have searched the site and googled but can't figure out howto apply this patch. I took the advise on how to install a patch from another node http://drupal.org/node/14231 and did the following:

1) I copied the file patch46.patch to the same folder on my local machine where video.module is
2) Opening a console in that folder I issued the following command: patch video.module < video46.patch
with the plan to then upload the newly patched video.module and replace the old one
3)Hmmmm....hit the fan
4)Here's what I got:

patching file video.module
Hunk #1 FAILED at 299.
Hunk #2 FAILED at 310.
Hunk #3 FAILED at 347.
Hunk #4 FAILED at 380.
Hunk #5 FAILED at 945.
5 out of 5 hunks FAILED -- saving rejects to file video.module.rej

I am not very technical so please forgive stupid noobie questions, but please, I don't know what to do anymore. If there is anybody out there that can tell me in astep by step way for dummies how to apply this patch I will be extremely greatful

Comments

agentpt’s picture

I have installed is 4.6.3

agentpt’s picture

OK, I have figured it out and will post step by step instructions to all the other Non-Technical guys as I find the forums, how-to's and documentation to be very technical and confusing. Hope this will help others:

This is if you have Drupal 4.6.3 installed with the video module already installed:

nb) Make sure you back up all your videos first

First we need to get rid of the currently installed version of the video module and its database table:

1) Open up Cpanel, go to MySql databases, then select phpMyAdmin at the bottom
2) Select your drupal database
3) You'll see all the installed tables, select the video table, then select "drop" at the bottom. Your video table is now deleted
4) Now go back to Cpanel and select file manager
5) Navigate to the modules folder in your drupal installation
6) Select the video.module and delete it

Now to get a fresh copy of the video module and patch it

1)Download yourself a copy of the CVS version of the Video module here: http://drupal.org/project/Modules/cvs. Unzip and copy the file video.module to a new directory you must create (The sandbox you're gonna play in)
2)Download the patch (video46.patch) from this node http://drupal.org/node/32504 and copy it to your sandbox directory you just created.
3) Also download this file (video.4.6.module) from the same node and put it in the sandbox directory
4) If you are on a linux system (I run Ubuntu) make sure you have all these files in the same directory (Sandbox).
5a) Open a console in this directory and type this command: patch video.module < video46.patch. Upload your patched file video.module to the modules directory
5b) If you are running Win or Mac upload video46.patch and video.module to your modules directory. You'll need shell access on your web server and run the same command as in point 5a).
You can find help here on Shell Access and patching http://drupal.org/node/14231

Let's create the new database table

6) Repeat steps 1 and 2
7) Select the SQL tab (next to structure)

6) Now open the file video.4.6.module you downloaded. You'll see it is a HTML file
7) Around the top of the code you'll see a line starting with " CREATE TABLE video ( "
8) copy all the code including this line to where this block of code ends (Everything Just before you see: " * @endcode"
9) Now paste all of this code into the first textbox in phpMyAdmin where you see " Run SQL query/queries on database" and select "GO" Your new table should now be created
10) Go to Administer>Modules>Video and configure as you like

This worked for me, but I don't guarantee it and I'm sure there are better ways of doing it. If anyone (especially the more technically advanced guys) sees any errors here, please correct me

fax8’s picture

Good work...
please note that not all the people will use Cpanel wich your
guide refers to.

ALSO:
please note that this steps will delete all your videos informations.
(x and y sizes, video file, clicks...)

If you are upgrading a newly installed video.module for 4.6 the above
steps will works ok becouse you will not need to save any video infos.

If you are upgrading a working video.module for 4.6 installations
(with thousend of videos...) you probably don't want to loose all your
video informations.

Don't run this step:

3) You'll see all the installed tables, select the video table, then select "drop" at the bottom. Your video table is now deleted

instead use this:

ALTER TABLE `video`
  CHANGE `videox` `videox` smallint(4) unsigned NOT NULL default '0',
  CHANGE `videoy` `videoy` smallint(4) unsigned NOT NULL default '0',
  CHANGE `size` `size` bigint(13) unsigned default NULL,
  CHANGE `clicks` `download_counter` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0',
  ADD play_counter int(10) unsigned NOT NULL default '0',
  ADD video_bitrate int(11) unsigned default NULL,
  ADD audio_bitrate int(11) unsigned default NULL,
  ADD audio_sampling_rate int(11) unsigned default NULL,
  ADD audio_channels enum('','5.1','stereo','mono') default NULL,
  ADD playtime_seconds int(11) unsigned default NULL,
  ADD download_folder varchar(255) NULL default NULL,
  ADD disable_multidownload tinyint(1) unsigned NOT NULL default '0',
  ADD use_play_folder tinyint(1) unsigned NOT NULL default '0',
  ADD custom_field_1 varchar(255) NULL default NULL,
  ADD custom_field_2 varchar(255) NULL default NULL,
  ADD custom_field_3 varchar(255) NULL default NULL,
  ADD custom_field_4 varchar(255) NULL default NULL,
  ADD custom_field_5 varchar(255) NULL default NULL,
  ADD custom_field_6 varchar(255) NULL default NULL
;

Do not do anything of

Let's create the new database table

6) Repeat steps 1 and 2
7) Select the SQL tab (next to structure)

6) Now open the file video.4.6.module you downloaded. You'll see it is a HTML file
7) Around the top of the code you'll see a line starting with " CREATE TABLE video ( "
8) copy all the code including this line to where this block of code ends (Everything Just before you see: " * @endcode"
9) Now paste all of this code into the first textbox in phpMyAdmin where you see " Run SQL query/queries on database" and select "GO" Your new table should now be created

Fabio

----
My websites adrenalinteam.it - windsmpeg.tk - falcoarredamenti.it

insomoz’s picture

I used the premade 4.6 patch, but it cannot play the videos

agentpt’s picture

about what you did ,otherwise it is impossible to help you :)

malrock’s picture

I have the problem that I can't use the patch command in my shell access - I can use diff but not patch - very very annoying. I'm using drupal 4.6.3 - is it possible for the patch version of video.module to be posted OR emailed to me directly please?

email to
malrock@verticalresources.org

cheers

Mal Haskins
www.verticalresources.org

fax8’s picture

Uwe Hermann is maintaining an already patched video module:
http://cvs.drupal.org/viewcvs/drupal/contributions/sandbox/uwe/

Hope this helps you.

Fabio