Support » Plugin: Featured Image from URL (FIFU) » $src is emty with using plugin “featured image from url 2”

  • The following code is used in the file “content.php” in the theme, but when the plug-in “featured image from url 2” is activated, $src will be blank if an external image URL is specified. I want to specify the flickr URL, so I’m thinking of converting it to the “Square 150” URL, but what is the appropriate variable to use from the plug-in “featured image from url” ?

    			<?php
    // the_post_thumbnail( 'post-image' );
    $myEyeCatch_attr = array(
    	'src'   => $src,
    	'class' => "attachment-$size",
    	'alt'   => trim( strip_tags( $wp_postmeta->_wp_attachment_image_alt ) ),
    	'align'	=> "left",
    	'style'	=> "margin:0 10px 0 0;"
    );
    the_post_thumbnail( 'thumbnail' , $myEyeCatch_attr );
    ?>
    
    Version:Featured Image from URL:2.5.4;
    Site:https://motpresse.votre.space;
    Theme:Lovecraft 1.30;
    Plugins:Akismet Anti-Spam (akismet), All In One SEO Pack (all-in-one-seo-pack), Classic Editor (classic-editor), CSS & JavaScript Toolbox (css-javascript-toolbox), Featured Image from URL (featured-image-from-url), Google XML Sitemaps (sitemap), Merge + Minify + Refresh (merge-minify-refresh), Movable Type and TypePad Importer (movabletype-importer), Nelio External Featured Image (discontinued) (nelioefi), Really Simple SSL (really-simple-ssl), WordPress Ping Optimizer (wordpress-ping-optimizer), WP Multibyte Patch (wp-multibyte-patch);
    PHP:7.1.30;
    WooCommerce:;
    WordPress:5.2.2;
    Pages:3;
    Posts:30;
    Products:;
    fifu_auto_alt:toggleon;
    fifu_column_height:64;
    fifu_content:toggleoff;
    fifu_content_page:toggleoff;
    fifu_css:;
    fifu_data_clean:toggleoff;
    fifu_data_generation:toggleoff;
    fifu_default_url:;
    fifu_enable_default_url:toggleoff;
    fifu_fake:toggleoff;
    fifu_fake2:toggleon;
    fifu_get_first:toggleoff;
    fifu_grid_category:toggleoff;
    fifu_hide_page:toggleoff;
    fifu_hide_post:toggleoff;
    fifu_image_height_arch:;
    fifu_image_height_cart:;
    fifu_image_height_ctgr:;
    fifu_image_height_home:;
    fifu_image_height_page:;
    fifu_image_height_post:;
    fifu_image_height_prod:;
    fifu_image_height_shop:;
    fifu_image_width_arch:;
    fifu_image_width_cart:;
    fifu_image_width_ctgr:;
    fifu_image_width_home:;
    fifu_image_width_page:;
    fifu_image_width_post:;
    fifu_image_width_prod:;
    fifu_image_width_shop:;
    fifu_lazy:toggleoff;
    fifu_original:toggleoff;
    fifu_ovw_first:toggleoff;
    fifu_pop_first:toggleoff;
    fifu_priority:toggleoff;
    fifu_save_dimensions:toggleoff;
    fifu_save_dimensions_all:toggleoff;
    fifu_social:toggleoff;
    fifu_wc_lbox:toggleoff;
    fifu_wc_zoom:toggleoff;
    
Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Marcel

    (@marceljm)

    Hi, @ujikioo.

    All variables are eventually empty. So let me know what’s your real problem. Isn’t the image shown?

    Thread Starter Ujiki.oO

    (@ujikioo)

    1. NOPROBLEM ! each post of WordPress.
    Example my WP :
    http://votre.space/naturaldisaster2humandisaster/
    http://ujikioo000webhostcom.000webhostapp.com/naturaldisaster2humandisaster/
    http://wordpress.votre.space/naturaldisaster2humandisaster/

    USING IMAGE URL: https://live.staticflickr.com/7816/40377683183_380b7c7c32_b.jpg

    2. PROBLEM ?
    Example : My Main WordPress
    http://votre.space/

    I am using content.php in the theme lovecraft http://www.andersnoren.se/teman/

    I want :

    1. Extarnal image url of the FLICKR
    2. I put a url of some large size image of FLICKR.
    3. At top page, using url of the “Square 150” FLICKR.

    I will modify this code …..

    <!-- content.php of the theme -->
    <div id="post-<?php the_ID(); ?>" <?php post_class( 'post' ); ?>>
    
    	<?php
    	$post_format = get_post_format() ? get_post_format() : 'standard';
    	$post_type = get_post_type();
    	?>
    
    	<?php if ( has_post_thumbnail() ) : ?>
    
    		<a class="NoThankYou2020 post-image" title="<?php the_title_attribute(); ?>" href="<?php the_permalink(); ?>#post-<?php the_ID(); ?>">
    
    			<?php
    // the_post_thumbnail( 'post-image' );
    $myEyeCatch_attr = array(
    	'src'   => $src,
    	'class' => "attachment-$size",
    	'alt'   => trim( strip_tags( $wp_postmeta->_wp_attachment_image_alt ) )
    ,	'align'	=> "left"
    ,	'style'	=> "margin:0 10px 0 0;"
    );
    the_post_thumbnail( 'thumbnail' , $myEyeCatch_attr );
    ?>
    
    		</a><!-- .featured-media -->
    
    	<?php endif; ?>
    
    	<div class="post-inner">
    
    		<?php if ( $post_format !== 'aside' ) : ?>
    
    			<div class="post-header">
    
    				<?php if ( get_the_title() ) : ?>
    
    					<h2 class="post-title"><div align="right" style="margin-right:10px;"><a href="<?php the_permalink(); ?>#post-<?php the_ID(); ?>" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></div></h2>
    
    					<?php
    				endif;
    
    				if ( is_sticky() ) : ?>
    
    					<a href="<?php the_permalink(); ?>" title="<?php _e( 'Sticky post', 'lovecraft' ) ?>" class="sticky-post">
    						<div class="genericon genericon-star"></div>
    					</a>
    
    					<?php
    				endif;
    
    				if ( $post_type === 'post' ) {
    					lovecraft_post_meta();
    				}
    
    				?>
    
    			</div><!-- .post-header -->
    
    		<?php endif; ?>
    
    		<?php if ( get_the_content() ) : ?>
    
    			<div class="post-content">
    				<?php the_content(); ?>
    			</div>
    
    			<div class="clear"></div>
    
    			<?php
    		endif;
    
    		if ( $post_type === 'post' && $post_format === 'aside' ) {
    			lovecraft_post_meta();
    		}
    
    		?>
    
    	</div><!-- .post-inner -->
    
    </div><!-- .post -->
    
    Plugin Author Marcel

    (@marceljm)

    Hi, @ujikioo.

    I’ve installed LOVECRAFT here and I had no problem to show the image on post or home. All is working fine.

    The plugin allows you to use URLs from Flickr. Any size you want. However, the plugin doesn’t define the area where the image is shown. The theme does that. So here, you should contact the theme developer and ask him if the theme supports what you want to do or if he could provide a solution for that.

    About to show a small Flickr image on home and a big one on post, take a look at FIFU settings > Performance > Flickr Integration.

    Thread Starter Ujiki.oO

    (@ujikioo)

    Was the WordPress theme implemented and tested? Thank you very much!
    The default value of the source of the WordPress theme PHP file “content.php” is as follows, it is normal! !
    the_post_thumbnail ('post-image');

    As I want to make it smaller, I replace it with the following source.
    the_post_thumbnail ('thumbnail', $ myEyeCatch_attr);
    I asked a question because “thumbnail” parameters will be blank. I will introduce a reference image. Images do not appear where they are filled in red.
    SPthe_post_thumbnail

    Plugin Author Marcel

    (@marceljm)

    Sorry, I didn’t understand your question: “Was the WordPress theme implemented and tested?”

    Thread Starter Ujiki.oO

    (@ujikioo)

    Thank you for your advice !
    > what you want to do or if he could provide a solution for that.
    I had modified the unique PHP file “content.php” of the Theme Lovecraft myself.
    It was very nice to wrote my question at this page, becase I got the best hint !
    The result : I will be able to erase all data under the “/wp-content/uploads” This result will be able to speed up my WordPress main processing.
    I made the content about that how to hacking PHP file “content.php” : https://motpresse.votre.space/revisedfeaturedimagefromurl/#post-1708
    Thank you and accessed everybody.

    https://twitter.com/andersnoren?ref_src=twsrc%5Etfw

    • This reply was modified 3 years, 2 months ago by Ujiki.oO.
    • This reply was modified 3 years, 2 months ago by Ujiki.oO.
    • This reply was modified 3 years, 2 months ago by Ujiki.oO.
    Plugin Author Marcel

    (@marceljm)

    Sorry, I’m not understanding…

    “/wp-content/uploads” is not related to FIFU. This plugin doesn’t save images. It saves URLs (database).

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘$src is emty with using plugin “featured image from url 2”’ is closed to new replies.