WordPress.org

Ready to get started?Download WordPress

Forums

amr users
[resolved] Integration user photo doesn't work anymore (12 posts)

  1. XCross
    Member
    Posted 7 months ago #

    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/

  2. anmari
    Member
    Plugin Author

    Posted 7 months ago #

    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 ?

  3. XCross
    Member
    Posted 7 months ago #

    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>

  4. anmari
    Member
    Plugin Author

    Posted 7 months ago #

    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 ?

  5. XCross
    Member
    Posted 7 months ago #

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

  6. anmari
    Member
    Plugin Author

    Posted 7 months ago #

    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

  7. anmari
    Member
    Plugin Author

    Posted 7 months ago #

    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 '';
    }

  8. anmari
    Member
    Plugin Author

    Posted 7 months ago #

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

  9. XCross
    Member
    Posted 7 months ago #

    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

  10. Andrew W
    Member
    Posted 7 months ago #

    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.

  11. Andrew W
    Member
    Posted 7 months ago #

    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.)

  12. Andrew W
    Member
    Posted 7 months ago #

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

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.