Viewing 6 replies - 16 through 21 (of 21 total)
  • Thread Starter Mark Scott

    (@mark-scott)

    Hey, I’ve come back to this after setting up a friend’s site.

    Thanks, mvirtualoffice, your instructions worked for me!

    getting the custom path is obviously a huge pain…. it also changes if working on a dev server before going live. i think it would be much simpler if the plugin just looked for an /icons folder in your theme. (left the customiconsurl and path for backcompatibility)

    /* Get Plugin Path */
    if($icon_pack == 'custom') {
    	$smw_path = $customiconsurl ? $customiconsurl : get_stylesheet_directory_uri() . '/icons';
    	$smw_dir = $customiconspath ? $customiconspath : get_stylesheet_directory() . '/icons';
    } else {
    	$smw_path = SMW_PLUGINPATH . 'images/' . $icon_pack. '/' . $icon_size;
    	$smw_dir = SMW_PLUGINDIR . 'images/' . $icon_pack. '/' . $icon_size;
    }

    i tried working on a solution that would test the existence of the file without need a path, getimagesize() seemed promising, but didn’t play well when the image wasn’t there (was supposed to return false).

    This is probably a stupid questions but I’m first and foremost a designer, this is my first developer job on a dynamic site like wordpress, but my client’s hosting is through godaddy.com, does anyone know where I can find the absolute path there? I don’t know why its so tedious to link these images up this way.

    https://www.htaccesstools.com/articles/full-path-to-file-using-php/

    create the file they discuss, upload it to the location you need to know the path to, and then visit that URL. the resulting page will tell you the path.

    agree this is highly inconvenient, b/c most people just flat don’t know the file path. the point is that the plugin performs a check as to whether the icon image exists before displaying it, but i’d rather take a broken image once than have to deal w/ paths.

    as a “designer” be prepared from some headaches. have you considered working with a wordpress developer?

    Totally unnecessary to require both a URL and the full Path. Bad dev practice. I am tempted to ditch this plugin purely because of the awkward nature of adding custom icons. It should be really easy.

    agreed. the if(file_exists()) that checks if the image is there is overkill. if we provide the wrong URL, show us a broken image. a broken image is well worth the ease of not needing to know full paths. if this were on github i’d send a pull request… that’s a pretty easy patch.

Viewing 6 replies - 16 through 21 (of 21 total)
  • The topic ‘[Plugin: Social Media Widget] Custom icons not displaying’ is closed to new replies.