Forum Replies Created

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter jonesgaming2105

    (@jonesgaming2105)

    Solved – thank you ??

    Thread Starter jonesgaming2105

    (@jonesgaming2105)

    Ah ok – i didn’t know the API just returns 500 values. No problem – not your fault ??

    Thanks again for support!

    Thread Starter jonesgaming2105

    (@jonesgaming2105)

    I am running the plugin for about 2 or 3 weeks now. I don’t think the site had much traffic so it could be related to php’s timeout. Today i changed it to 240 seconds.

    .TUBE Curator tells me it has 2577 video available but i have only 617 posts. I changed the results to 50 and looked at each page. All videos are published but i have only 13 pages. There are also no skipped videos.

    Thread Starter jonesgaming2105

    (@jonesgaming2105)

    It looks like the Oria Template breaks when nothing gets returned. So i changed the code to always return $the_content. Otherwise the content is missing. I also added Hashtag replacement. So Hashtags from YouTube will link to search results from my page ??

    add_filter( 'the_content', 'mytube_prewrap_post_content', 5 );
    
    function mytube_prewrap_post_content( $the_content ){
    
    	$the_content = preg_replace("/#([A-Za-z0-9\/\.]*)/", "<a href=\"https://jones-gaming.de/tag/$1\">#$1</a>", $the_content);
    
    // make sure single post main query
    	if ( ! ( is_singular( 'post' ) && is_main_query() ) ) return $the_content;
    
    // return the wrapped content
    	$customContent = <<<EOD
    [su_expand more_text="Mehr anzeigen" less_text="ausblenden"
    height="140" text_color="#888888" link_color="#a86400" link_style="underlined"
    more_icon="icon: eye" less_icon="icon: eye-slash" class="collapse"]
    $the_content
    [/su_expand]
    EOD;
    
    	return $customContent;
    }
    Thread Starter jonesgaming2105

    (@jonesgaming2105)

    Thank you for the quick reply!

    That helped a lot. I changed the string returned by the function to trigger a shortcode from Shortcodes Ultimate Plugin. Works perfect ??

    function mytube_prewrap_post_content( $the_content ){
    
    	// make sure single post main query
    	if ( ! is_singular( 'post' ) || ! is_main_query() ) return;
    
    	// return the wrapped content
    	$customContent = <<<EOD
    	[su_expand more_text="Mehr anzeigen" less_text="Beschreibung ausblenden"
    	height="140" text_color="#888888" link_color="#a86400" link_style="underlined"
    	more_icon="icon: eye" less_icon="icon: eye-slash" class="collapse"]
    	$the_content
    	[/su_expand]
    EOD;
    
    	return $customContent;
    }
Viewing 5 replies - 1 through 5 (of 5 total)