• Hello, if you press “Generate Favorite Icons and Store locally” it save for thumbs and favicons allways .JPG files. But favicons are native .PNG files.
    I have make a change to your code to solve this problem.

    Change code:

    $img = $uploads['basedir'] . "/" . $filepath. "/" . $linkid . ".jpg";
    $status = file_put_contents($img, file_get_contents($genthumburl));
    
    if ($status !== false)
    {
    $newimagedata = array("link_id" => $linkid, "link_image" => $uploads['baseurl'] . "/" . $filepath . "/" . $linkid . ".jpg");

    Replace with following code (or a better solution):

    if ($mode == 'thumb')
    {
    $img = $uploads['basedir'] . "/" . $filepath. "/" . $linkid . ".jpg";
    }
    else
    {
    $img = $uploads['basedir'] . "/" . $filepath. "/" . $linkid . ".png";
    }
    
    $status = file_put_contents($img, file_get_contents($genthumburl));
    
    if ($status !== false)
    {
    
    if ($mode == 'thumb')
    {
    $newimagedata = array("link_id" => $linkid, "link_image" => $uploads['baseurl'] . "/" . $filepath . "/" . $linkid . ".jpg");
    }
    else
    {
    $newimagedata = array("link_id" => $linkid, "link_image" => $uploads['baseurl'] . "/" . $filepath . "/" . $linkid . ".png");
    }

    Thanks for your great work.

    http://wordpress.org/extend/plugins/link-library/

  • The topic ‘[Plugin: Link Library] Type of favicon files is faulty’ is closed to new replies.