Joomla 3.6 + k2 2.7 hosted on my own linux server.
I am assuming someone else's webmaster job. He has had hundreds of k2 items on hte site, with a major problem: most of the articles have some inline javascript snippet(jwplayer) to play videos in them, but the width and height of the video player are set to fixed numbers instead of percentage and aspectratio. Now it is up to me to fix this issue. Of course I can edit the items from back-end one by one, but there are hundreds of them.
Since the modification of each item follows a certain pattern, I think I should be able to do it programatically. There are 3 possible ways I can think of:
1) Using phpmyadmin, directly edit the k2_item
table's fulltext
field. This is the most straightforward way, but I am not sure if directly editing database is going to cause some potential problem. Besides I am not very familiar with SQL, so I am reluctant to do it this way.
2) Hardcode some PHP file, get connected with the database, read the fulltext
field, do the modification with PHP and put them back to the table. I am more comfortable with PHP, but I've never done such things before.
3) Is there any extension that can accomplish such job?
Which approach would be the best practice?