Sandbox project page:

https://drupal.org/sandbox/mosewrite/2137455

Git repository:

http://drupalcode.org/sandbox/mosewrite/2137455.git

YouTube Simple Embedding (YSE) provides Wordpress-like shortcodes for embedding a YouTube video in any body text in Drupal 7.

YSE doesn't have a lot of adjustable parameters and it's not meant to. That's the 'simple' part. The user will be able set the height and width of the embed video. The embed code will be an iframe with two css classes: 'yse-yt' for every video, and 'yse-id-', which will be a unique class for the individual videos.

Comments

PA robot’s picture

Status: Needs review » Needs work

There are some errors reported by automated review tools, did you already check them? See http://pareview.sh/pareview/httpgitdrupalorgsandboxmosewrite2137455git

We are currently quite busy with all the project applications and we prefer projects with a review bonus. Please help reviewing and put yourself on the high priority list, then we will take a look at your project right away :-)

Also, you should get your friends, colleagues or other community members involved to review this application. Let them go through the review checklist and post a comment that sets this issue to "needs work" (they found some problems with the project) or "reviewed & tested by the community" (they found no major flaws).

I'm a robot and this is an automated message from Project Applications Scraper.

pignaz’s picture

function into .module file must have naming convention: [module name]_[name_function]. For example:

Now: function syembed_parse_markup($markup_text) {

Correct: function simple_youtube_embed_parse_markup($markup_text) {

Into syembed_parse_markup function into code row:

// Get subordinate array that contains matches.
$matches = $results[1];

Add this code:

if (!empty($results)) {

// Get subordinate array that contains matches.
$matches = $results[1];

.............................................
}

So you not have warning into screen.

Automated review:

There is still one error. You should delete the master branch as explained here: http://drupal.org/node/1127732

auworks’s picture

Thanks for your contribution to the community.

AUTOMATIC REVIEW:
http://pareview.sh/pareview/httpgitdrupalorgsandboxmosewrite2137455git
Please make sure that you fix the code as per pareview.sh suggestion before setting status back to needs review.

MANUAL REVIEW:
LINE 32 - preg_match_all
Looks like the regex supplied do not work if width and height parameter are supplied. Please fix.

Also, rather than forcing user to supply URL as http://www.youtube.com... wouldn't it be a good idea to add those bits automatically? Any thoughts?

Good luck!

andystone78’s picture

Thank you for your contribution.

As has already been pointed out, there are issues with the coding standards. Also, (and this is purely personal preference) when using php functions its nice to use the documented variable names. For example in preg_match_all() arg 3 using $matches rather than $results.

In addition, when trying to use with the example from the README ([yt[http://www.youtube.com/watch?v=FRTlT3DEydU]yt]), I encountered the following issue:
Within function syembed_parse_markup() the url comes from out from preg_match_all as http://www.youtube.com/watch?v=FRTlT3DEydU (good) but when its sent to syembed_validate_yturl() the url has been amended to w.youtube.com/watch?v=FRTlT3DEydU (bad ) which is failing validation in syembed_validate_yturl() as the host is not 'www.youtube.com'.

On a more global note, the functionality you are creating here feels more like that of an input filter (see hook_filter_info). Would it not be better to have this short-code replacement as an input filter which can then be restricted by input format / role etc etc? this would also allow the replacement to be placed before / after other input filters from the relevant admin pages.

Best of luck

PA robot’s picture

Status: Needs work » Closed (won't fix)

Closing due to lack of activity. Feel free to reopen if you are still working on this application (see also the project application workflow).

I'm a robot and this is an automated message from Project Applications Scraper.

mlmoseley’s picture

I am still working on it. Please review the most current commit. By the way, I got no notification this thread existed. I just found it on my dashboard. Thank you for your time.

mlmoseley’s picture

Status: Closed (won't fix) » Active
PA robot’s picture

Status: Active » Closed (duplicate)
Multiple Applications
It appears that there have been multiple project applications opened under your username:

Project 1: https://www.drupal.org/node/2352997

Project 2: https://www.drupal.org/node/2146995

As successful completion of the project application process results in the applicant being granted the 'Create Full Projects' permission, there is no need to take multiple applications through the process. Once the first application has been successfully approved, then the applicant can promote other projects without review. Because of this, posting multiple applications is not necessary, and results in additional workload for reviewers ... which in turn results in longer wait times for everyone in the queue. With this in mind, your secondary applications have been marked as 'closed(duplicate)', with only one application left open (chosen at random).

If you prefer that we proceed through this review process with a different application than the one which was left open, then feel free to close the 'open' application as a duplicate, and re-open one of the project applications which had been closed.

I'm a robot and this is an automated message from Project Applications Scraper.

avpaderno’s picture