WordPress.org

Support

Support » Plugins and Hacks » [Resolved] Integration user photo doesn't work anymore

[Resolved] Integration user photo doesn't work anymore

  • Hi,

    the user photo integration with

    Before: <img src=”http://url.org/wp-content/uploads/userphoto/
    After: “>

    worked fine in the past. But yet (after new version?) it doesn’t work anymore – any idea?

    Thx
    Martin

    http://wordpress.org/plugins/amr-users/

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author anmari

    @anmari

    More info would help. In what way is it ‘not working’? – ie: symptoms

    Is the html being generated ? (view source or inspect element to see)

    If the html is being generated is it ‘valid’ ?

    If it is valid, do the links generated work ? – ie do you have images to match the url generated ?

    What field were you using to do the before/after ? username?

    Aside: how are you managing the photo upload to match with whatever field you are using ?
    Did you consider using avatars ?

    The field name is userphoto_thumb_file an the nice name is Foto.
    The thumbnails are already in the directory …/wp-content/uploads/userphoto (uploaded witd plugin “user photo” via profile page)

    The configuration for Foto in the table looks like
    Before:<img src=”http://url.org/wp-content/uploads/userphoto/
    After:”>
    Link Type:none

    The html ist generated and valid but without any photo or link
    html code:
    </td>
    <td class=”userphoto_thumb_file td td2 “>
    </td>

    Plugin Author anmari

    @anmari

    Hi Xcross,

    if there is no value in the userphoto_thumb_file field, then the before and after fields are not generated either.

    If you have no before/after text – does a value for userphoto_thumb_file show at all ?

    when i remove the before/after text the value for userphoto_thumb_file is shown i.e. 78.thumbnail.jpg

    Plugin Author anmari

    @anmari

    HI Xcross,

    something going on.
    works fine 3.5.5 on older wp on my mac but in latest version on latest wp on windows, if you view source the doublequotes are being double quoted

    eg:

    <img src=””http://localhost/wp/wp-content/uploads/2013/04/bw225.jpg””>

    if i leave the quotes out of the before/ after it works….. but think that’s the browser adding the quotes as the source does not have it.

    so there’s double encoding happening. I suspect it’s a change made recently due to wp deprecating some functions.

    Looking into it

    Plugin Author anmari

    @anmari

    Interim solution for now would be to create a site specific plugin with a formatting function for your field. Then you could add more html in.
    see
    http://wpusersplugin.com/related-plugins/amr-user-plugin-add-ons/example-site-specific-add-on-using-filters/

    eg:
    function ausers_format_description($v, $u) {
    if (!empty($v))
    return (‘<img alt=”user image” src=”‘.$v.'”>’);
    else return ”;
    }

    Plugin Author anmari

    @anmari

    Don’t forget to remove the before / after text.
    and name the function with your field name (ie replace ‘description’ )

    Hi anmari,

    thanks for your help – without quotes in the before/after text everything works fine.
    I also will try the function as a future opportunity.

    Thx

    Martin

    Andrew W

    @andrew-whitacre

    Hiya — just wanted to jump in to mention I too am getting the “double” double quotation marks (“”) in my before/after. In my case, it’s messing with some inline CSS I use to hide a couple columns. It comes through like this:

    <span style=""visibility: hidden; display: block; width: 0; font-size: 0px"">

    It also seems to be a problem independent of amr users versions…I tried out each version back to 3.6.3 and had the same issue.

    Andrew W

    @andrew-whitacre

    And for what it’s worth, removing the original quotation mark or commenting it out doesn’t fix the problem either. (Not that I would expect it to.)

    Andrew W

    @andrew-whitacre

    Another note: it x2’s whatever number of quotations marks you have. I stuck two quotation marks in for fun and four came out.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘[Resolved] Integration user photo doesn't work anymore’ is closed to new replies.