Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Author finnj

    (@finnj)

    I expect that you are using WPML, this is a known bug/challenge with WPML.

    If the file “comments.png” exists in your images subfolder of your active theme, Frontier post will use this.

    A workaround could be to copy the comment icon (wp-includes/images/wlw/wp-comments.png)

    to:

    ?../wp-content/themes/[Your Active Theme]/images/comments.png

    It might work …..

    Thread Starter leontb

    (@leontb)

    Hi Finnj,

    Yes, I’m using WPML. I copied the ‘wp-comments.png’ as ‘wp-comments.png’ as well as ‘comments.png’ to both the images folder and the active theme images subfolder, but it doesn’t work. Good that you mention it as a known issue with WPML, I can ask them to fix it.

    Thanks,
    Leon

    Plugin Author finnj

    (@finnj)

    Hi,

    If you can ask them how to avoid that /?lang=fr/ is addedto the url.

    I am using this piece of code to display the comment icon, and I believe that WordPress finds the icon as a file, but the url to the file is wrong, as WPML most likely appends the language to the bloginfo

    Code:

    function frontier_get_comment_icon()
    	{
    	$comment_icon			= TEMPLATEPATH."/images/comments.png";
    
    	if (file_exists($comment_icon))
    		{
    		$comment_icon_html	= "<img src='".get_bloginfo('template_directory')."/images/comments.png'></img>";
    		}
    	else
    		{
    		$comment_icon		= ABSPATH."/wp-includes/images/wlw/wp-comments.png";
    		// if no icon in theme, check wp-includes, and if it isnt the use a space
    		if (file_exists($comment_icon))
    			{
    			$comment_icon_html	= "<img src='".get_bloginfo('url')."/wp-includes/images/wlw/wp-comments.png'></img>";
    			}
    		else
    			{
    			$comment_icon_html	= "&nbsp;";
    			}
    		}
    	return $comment_icon_html;
    	}

    My name is Helena and I am from WPML team. I am contacting you about Leon’s problem.
    We would like to work together in solving this problem and making your theme/plugin compatible with WPML.

    Could you please drop me a line back? [email protected]

    Thread Starter leontb

    (@leontb)

    Hi Finnj and Helena,

    any news on this subject?

    Best regards,
    Leon

    Plugin Author finnj

    (@finnj)

    No, not yet.

    WPML could not help with the issue unless I did a full registration in their partner program – I will do that once I am ready with the new version (a couple of weeks), and then I dont know how long time it will take.

    As for the specific issue, I might have an idea to solve it, buta I need your help as I dont have WPML.

    Do you have a test system, and are you capable of editing php files ?

    Plugin Author finnj

    (@finnj)

    If you have a test system, can you try and insert the below code temporarily in the frontier_list form in the forms directory, in the line after <?php

    and then let me know what the output is.

    //test comment icon
    	echo "<hr>";
    	$theme_icon 	= get_template_directory_uri()."/images/comments.png";
    	$frontier_icon	= get_stylesheet_directory_uri()."/plugins/frontier-post/comments.png";
    	$wp_icon		= includes_url()."/images/wlw/wp-comments.png";
    	echo "Theme Icon: get_template_directory_uri() -->".$theme_icon."/plugins/frontier-post/comments.png"." | icon: <img src='".$theme_icon."'></img>"."<br>";
    	echo "Child theme Icon: get_stylesheet_directory_uri() -->".$frontier_icon." | icon: <img src='".$frontier_icon."'></img>"."<br>";
    	echo "WP Icon: includes_url() -->".$wp_icon." | icon: <img src='".$wp_icon."'></img>"."<br>";
    	echo "<hr>";
    Thread Starter leontb

    (@leontb)

    Hi Finnj,

    that had not the result you wanted. If you mail me an e-mailadress I can send you a screenshot.

    Plugin Author finnj

    (@finnj)

    Email: finnj at wpfrontier dot com

    Plugin Author finnj

    (@finnj)

    Hi,

    This should work, and will be in the new version.

    Go to the php file frontier_post_util.php and find the function
    and the comment out the existing function by adding /* before the function and */ after the function, and then paste the below in:

    function frontier_get_comment_icon()
    	{
    
    	// first Frontier Post template folder
    	$comment_icon				= get_stylesheet_directory()."/plugins/frontier-post/comments.png";
    	if (file_exists($comment_icon))
    		{
    		$comment_icon_html			= "<img src='".get_stylesheet_directory_uri()."/plugins/frontier-post/comments.png'></img>";
    		}
    	else
    		{
    		// Then the theme (not child theme folder)
    		$comment_icon				= get_template_directory()."/images/comments.png";
    		// if no icon in theme, check wp-includes, and if it isnt the use a space
    		if (file_exists($comment_icon))
    			{
    			$comment_icon_html			= "<img src='".get_template_directory_uri()."/images/comments.png'></img>";
    			}
    		else
    			{
    			// Fallback, the standard wp comment icon
    			$comment_icon_html	= "<img src='".includes_url()."/images/wlw/wp-comments.png'></img>";
    			}
    		}
    	return $comment_icon_html;
    	}

    Thread Starter leontb

    (@leontb)

    Hi Finnj,

    thanks, it works!

    Best regards,
    Leon

    Plugin Author finnj

    (@finnj)

    It will be in the next version – thanks for your assistance

    Plugin Author finnj

    (@finnj)

    This is now included in the new version 3.3.2 – You will have to install it manually, I would like some users to test it, before i make it the stable release

    Documentation: https://wpfrontier.com

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Missing image’ is closed to new replies.