• Resolved Wendihihihi

    (@wendihihihi)


    Hoi,

    My plugins dir is not the standard wp-content/plugins but wp-content/myplugins. When I want to use your plugin the video won’t show.

    This is the url I got:
    https://www.domain.com/wp-content/plugins/wp-youtube-lyte/lyte/lyte-min.js?wyl_version=1.5.0 and it should be https://www.domain.com/wp-content/myplugins/wp-youtube-lyte/lyte/lyte-min.js?wyl_version=1.5.0

    Other plugins do work btw

    Thanks

    https://www.ads-software.com/plugins/wp-youtube-lyte/

Viewing 15 replies - 1 through 15 (of 19 total)
  • Thread Starter Wendihihihi

    (@wendihihihi)

    Has to do with dirname(__FILE__). It works again when I hard coded it.

    Plugin Author Frank Goossens

    (@futtta)

    Hi Wendihihihihihihihihi:
    I can confirm non-default wp-content dirs were never taken into account until now (you’re the first to ask, I think). That being said, I’ll have a look at the code and report back here ??

    kind regards,
    frank

    Thread Starter Wendihihihi

    (@wendihihihi)

    Sounds good! Thanks

    Plugin Author Frank Goossens

    (@futtta)

    Middag Wendi;
    Could you open up /wp-content/myplugins/wp-youtube-lyte/wp-youtube-lyte.php and on line 45 change

    $wp_lyte_plugin_url = trailingslashit(get_bloginfo('wpurl')) . PLUGINDIR . '/' . dirname(plugin_basename(__FILE__)) . '/';

    into

    // $wp_lyte_plugin_url = trailingslashit(get_bloginfo('wpurl')) . PLUGINDIR . '/' . dirname(plugin_basename(__FILE__)) . '/';

    so essentially just putting that line in comment, same on line 65 which should become;

    // $lyteSettings['path']=$wp_lyte_plugin_url.'lyte/';

    and finally around line 82 change

    function lyte_parse($the_content,$doExcerpt=false) {
    	global $lyteSettings;
    
    	$urlArr=parse_url($lyteSettings['path']);

    into

    function lyte_parse($the_content,$doExcerpt=false) {
    	global $lyteSettings;
    
    	$lyteSettings['path']=plugins_url() . "/" . dirname(plugin_basename(__FILE__)) . '/';
    	$urlArr=parse_url($lyteSettings['path']);

    plugins_url() is a stock WP function which should know about your deviant config, but it isn’t available in the global context, so it has to be called inside lyte_parse instead, hence above juggling.

    Let me know if that solved your “myplugins”-troubles ??

    Groetjes,
    Frank

    Thanks Frank. Would this be something that you would implement in the next update or is this only a fix for me?

    Plugin Author Frank Goossens

    (@futtta)

    Hi Okoth1 and/or Wendihihihi;
    If you can confirm this indeed fixes the problem, then indeed this would go in the next version (which will focus on the switch to the YouTube v3 API with required authentication by the way)!

    Kind regards,
    frank

    Great, replying with my hubby’s account!

    I’ll do this probably on Saturday, no time tomorrow.

    Nice guys, these Google people. Just when everything runs smoothly you can change it again…

    Thread Starter Wendihihihi

    (@wendihihihi)

    Hi Frank,

    Temporary bad news: it doesn’t work yet with the changes above.

    Shouldn’t there also not be some modifications in player_sizes.inc.php and options.php?

    Thread Starter Wendihihihi

    (@wendihihihi)

    Sorry, here is a bit more helpful info:

    Someone wanted to go to https://www.domein.com/wp-content/myplugins/wp-youtube-lyte/lyte-min.js?wyl_version=1.5.0, but it doesn't exist.

    Thread Starter Wendihihihi

    (@wendihihihi)

    And this solved it…

    function lyte_parse($the_content,$doExcerpt=false) {
    	global $lyteSettings;
    
    	$lyteSettings['path']=plugins_url() . "/" . dirname(plugin_basename(__FILE__)) . '/lyte/';
    	$urlArr=parse_url($lyteSettings['path']);
    Plugin Author Frank Goossens

    (@futtta)

    super Wendihihihihi, thanks for fixing that! ??

    as confirmed earlier, this will go into wp youtube lyte 1.6.0 (hope to be able to push that out in the 2nd half of february).

    Thread Starter Wendihihihi

    (@wendihihihi)

    My pleasure!

    Looking forward to v1.6.0

    Thanks for the help!

    Plugin Author Frank Goossens

    (@futtta)

    Hi Wendihihihi;
    I’ve got a beta of 1.6.0, which includes this fix, ready. Main new feature; support for YouTube API v3 (as v2 is going to be decommissioned soon). Biggest impact; you’ll need an API key for Lyte to be able to access YouTube’s API.

    Would be great if you could test-drive it, there’s more info here; https://blog.futtta.be/2015/02/18/wanted-testers-for-wp-youtube-lyte-the-one-with-the-new-yt-api/ ??

    Kind regards,
    frank

    Thread Starter Wendihihihi

    (@wendihihihi)

    Hi Frank,

    You want me to test it on a WP install with a renamed plugins folder?

    Regards

    Plugin Author Frank Goossens

    (@futtta)

    well, test it in the same circumstances as when you created this thread here;

    My plugins dir is not the standard wp-content/plugins but wp-content/myplugins. When I want to use your plugin the video won’t show.

    and then play around with WP YouTube Lyte, I’m esp. interested in your experience with the YouTube API change ??

    frank

Viewing 15 replies - 1 through 15 (of 19 total)
  • The topic ‘Plugin doesn't work in custom plugins dir’ is closed to new replies.