WordPress.org

Ready to get started?Download WordPress

Forums

Add To Facebook plugin (1 post)

  1. sudhakararaog
    Member
    Posted 5 years ago #

    hi

    i have downloaded Add To Facebook plugin and it has been istalled and is working fine.

    my question is about displaying the facebook icon. with the Add To Facebook files there is an image called facebook_share_icon.gif

    in the addtofacebook.php i have added the path to this gif file as mentioned below however this image is not appearing when i preview, i also looked at the source code after previewing the page however facebook_share_icon.gif is not in the source code.

    code in both the functions add_to_facebook($data){} and addtofacebook()

    =====================================================================

    function add_to_facebook($data){
    global $post;
    $current_options = get_option('add_to_facebook_options');
    $linktype = $current_options['link_type'];
    switch ($linktype) {
    case "text":
    $data=$data."<p class=\"facebook\">ID)."\" target=\"_blank\" title=\"Share on Facebook\">Share on Facebook</p>";
    break;
    case "image":
    $data=$data."<p class=\"facebook\">ID)."\" target=\"_blank\"><img src=\"wp-content/plugins/add-to-facebook-plugin/facebook_share_icon.gif".get_bloginfo(wpurl)."/wp-content/plugins/add-to-facebook-plugin/facebook_share_icon.gif\" alt=\"Share on Facebook\" title=\"Share on Facebook\" /></p>";
    break;
    case "both":
    $data=$data."<p class=\"facebook\">ID)."\" target=\"_blank\"><img src=\"wp-content/plugins/add-to-facebook-plugin/facebook_share_icon.gif".get_bloginfo(wpurl)."/wp-content/plugins/add-to-facebook-plugin/facebook_share_icon.gif\" alt=\"Share on Facebook\" title=\"Share on Facebook\" />ID)."\" target=\"_blank\" title=\"Share on Facebook\">Share on Facebook</p>";
    break;
    }
    return $data;
    }

    function addtofacebook(){
    global $post;
    $current_options = get_option('add_to_facebook_options');
    $insertiontype = $current_options['insertion_type'];
    if ($insertiontype != 'auto'){
    $linktype = $current_options['link_type'];
    switch ($linktype) {
    case "text":
    echo "<p class=\"facebook\">ID)."\" target=\"_blank\" title=\"Share on Facebook\">Share on Facebook</p>";
    break;
    case "image":
    echo "<p class=\"facebook\">ID)."\" target=\"_blank\"><img src=\"wp-content/plugins/add-to-facebook-plugin/facebook_share_icon.gif".get_bloginfo(wpurl)."/wp-content/plugins/add-to-facebook-plugin/facebook_share_icon.gif\" alt=\"Share on Facebook\" title=\"Share on Facebook\" /></p>";
    break;
    case "both":
    echo "<p class=\"facebook\">ID)."\" target=\"_blank\"><img src=\"wp-content/plugins/add-to-facebook-plugin/facebook_share_icon.gif".get_bloginfo(wpurl)."/wp-content/plugins/add-to-facebook-plugin/facebook_share_icon.gif\" alt=\"Share on Facebook\" title=\"Share on Facebook\" />ID)."\" target=\"_blank\" title=\"Share on Facebook\">Share on Facebook</p>";
    break;
    }
    }
    }

    =====================================================================

    i have added the url of the gif file in both the functions.

    can anyone please suggest as to how i can get the gif image to appear along with the word Share on Facebook.

    thanks.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags