Page MenuHomePhabricator

Remove inline styling from Video
Open, Needs TriagePublic

Description

./Video/providers/MovieClipsVideo.php:  protected $embedTemplate = '<object width="$width" height="$height" type="application/x-shockwave-flash" data="http://static.movieclips.com/embedplayer.swf?config=http://config.movieclips.com/player/config/embed/$video_id/%3Floc%3DUS&endpoint=http://movieclips.com/api/v1/player/test/action/&start=0&v=1.0.15" style="display:block; overflow:hidden;">

./Video/i18n/fr.json:   "video-addvideo-instructions": "C'est facil sur ajouter une video à {{SITENAME}}.\nSimplement coller le code d'intégration ou l'URL de la vidéo sur le formulaire suivant, ajoutez un nom pour la vidéo et cliquez sur « {{int:video-addvideo-button}} ».\nSi vous voulez intégrer la vidéo sur une page, utiliser le format suivant : '''<nowiki>[[</nowiki>{{ns:video}}:Titre de la vidéo<nowiki>]]</nowiki>'''.\nVous pouvez ajouter une vidéo à partir des fournisseurs suivants :\n{{int:video-provider-list}}\n===Exemple d'un code intégration===\nVoici une exemple d'un code intégration de la vidéo de YouTube :\n\n<pre style=\"background-color: #F9F9F9; border: 1px dashed #2F6FAB; color: black; line-height: 1.1em; padding: 1em;\">\n<nowiki><object width=\"425\" height=\"355\">\n<param name=\"movie\" value=\"http://www.youtube.com/v/hUcFWPgB8oY\"></param>\n<param name=\"wmode\" value=\"transparent\"></param>\n<embed src=\"http://www.youtube.com/v/hUcFWPgB8oY\" type=\"application/x-shockwave-flash\"\nwmode=\"transparent\" width=\"425\" height=\"355\"></embed>\n</object></nowiki>\n</pre>\n\n===Exemple d'une URL de la vidéo===\nVoici une exemple d'une URL de la vidéo YouTube :\n<pre style=\"background-color: #F9F9F9; border: 1px dashed #2F6FAB; color: black; line-height: 1.1em; padding: 1em;\">http://www.youtube.com/watch?v=hUcFWPgB8oY</pre>",

./Video/i18n/fi.json:   "video-addvideo-instructions": "Videon lisääminen {{GRAMMAR:illative|{{SITENAME}}}} on helppoa.\nLiitä vain videon upotuskoodi ''tai'' videon URL seuraavaan lomakkeeseen, lisää nimi videolle ja paina \"{{int:video-addvideo-button}}\" -painiketta.\nJos haluat upottaa videon sivulle, käytä seuraavaa muotoa: '''<nowiki>[[</nowiki>{{ns:video}}:Videon otsikko<nowiki>]]</nowiki>'''.\nVoit lisätä videoita seuraavista palveluista:\n{{int:video-provider-list}}\n===Esimerkki videon upotuskoodista===\nTämä on esimerkki videon upotuskoodista YouTubesta:\n\n<pre style=\"background-color: #F9F9F9; border: 1px dashed #2F6FAB; color: black; line-height: 1.1em; padding: 1em;\">\n<nowiki><object width=\"425\" height=\"355\">\n<param name=\"movie\" value=\"http://www.youtube.com/v/hUcFWPgB8oY\"></param>\n<param name=\"wmode\" value=\"transparent\"></param>\n<embed src=\"http://www.youtube.com/v/hUcFWPgB8oY\" type=\"application/x-shockwave-flash\"\nwmode=\"transparent\" width=\"425\" height=\"355\"></embed>\n</object></nowiki>\n</pre>\n\n===Esimerkki videon URL:ista===\nAlapuolella on esimerkki YouTube-videon URL:ista:\n<pre style=\"background-color: #F9F9F9; border: 1px dashed #2F6FAB; color: black; line-height: 1.1em; padding: 1em;\">http://www.youtube.com/watch?v=hUcFWPgB8oY</pre>",

./Video/i18n/en.json:   "video-addvideo-instructions": "Adding a video to {{SITENAME}} is easy.\nJust paste the video embed code ''or'' the video's URL into the following form, add a name for the video, and press the \"{{int:video-addvideo-button}}\" button.\nIf you want to embed the video on a page use the following format: '''<nowiki>[[</nowiki>{{ns:video}}:Video Title<nowiki>]]</nowiki>'''.\nYou can add a video from the following providers:\n{{int:video-provider-list}}\n===Example of a Video Embed Code===\nThis is an example video embed code from YouTube:\n\n<pre style=\"background-color: #F9F9F9; border: 1px dashed #2F6FAB; color: black; line-height: 1.1em; padding: 1em;\">\n<nowiki><object width=\"425\" height=\"355\">\n<param name=\"movie\" value=\"http://www.youtube.com/v/hUcFWPgB8oY\"></param>\n<param name=\"wmode\" value=\"transparent\"></param>\n<embed src=\"http://www.youtube.com/v/hUcFWPgB8oY\" type=\"application/x-shockwave-flash\"\nwmode=\"transparent\" width=\"425\" height=\"355\"></embed>\n</object></nowiki>\n</pre>\n\n===Example of a Video URL===\nBelow is an example of a video's URL from YouTube:\n<pre style=\"background-color: #F9F9F9; border: 1px dashed #2F6FAB; color: black; line-height: 1.1em; padding: 1em;\">http://www.youtube.com/watch?v=hUcFWPgB8oY</pre>",

./Video/VideoPage.php:                                  <input name="embed_code" style="width: 300px; font-size: 10px;" type="text" value="' . $code . '" onclick="javascript:document.embed_video.embed_code.focus();document.embed_video.embed_code.select();" readonly="readonly" />

./Video/VideoGallery.php:                               $thumbhtml = "\n\t\t\t" . '<div style="height: ' . ( $this->mHeights * 1.25 + 2 ) . 'px;">'

./Video/VideoGallery.php:                               $thumbhtml = "\n\t\t\t" . '<div class="thumb" style="padding: ' . $vpad . 'px 0; width: ' . ( $this->mWidths + 30 ) . 'px;">'

./Video/VideoGallery.php:                               "\n\t\t" . '<td><div class="gallerybox" style="width: ' . ( $this->mWidths * 1.25 ) . 'px;">'

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptOct 4 2016, 3:22 AM
SamanthaNguyen added a comment.EditedJan 29 2017, 5:30 PM

We should probably break the video instruction i18n messages into smaller, separate messages (and the inline code for the video shouldn't be in the i18n file). The heading can be it's own title, where in the code it's something like:

<h3><?php wfMessage( 'video-addvideo-instruction-title' ) ?></h3>

Repeat similar process for other stuff.
Thoughts @ashley?


./Video/providers/MovieClipsVideo.php:  protected $embedTemplate = '<object width="$width" height="$height" type="application/x-shockwave-flash" data="http://static.movieclips.com/embedplayer.swf?config=http://config.movieclips.com/player/config/embed/$video_id/%3Floc%3DUS&endpoint=http://movieclips.com/api/v1/player/test/action/&start=0&v=1.0.15" style="display:block; overflow:hidden;">
./Video/VideoGallery.php:                               $thumbhtml = "\n\t\t\t" . '<div style="height: ' . ( $this->mHeights * 1.25 + 2 ) . 'px;">'

./Video/VideoGallery.php:                               $thumbhtml = "\n\t\t\t" . '<div class="thumb" style="padding: ' . $vpad . 'px 0; width: ' . ( $this->mWidths + 30 ) . 'px;">'

./Video/VideoGallery.php:                               "\n\t\t" . '<td><div class="gallerybox" style="width: ' . ( $this->mWidths * 1.25 ) . 'px;">'

We can't do anything about this if we want to allow people to enter custom values. Although, maybe we could provide custom classes that vary by size, similar to how there's set sizes for avatars? (small, medium, large, extra large?), and also similar to how RandomUsersWithAvatars does it.

Restricted Application added a subscriber: jeblad. · View Herald TranscriptJun 30 2018, 8:42 PM