Skip to:
Content
Pages
Categories
Search
Top
Bottom

Rank images not showing

  • Avatar of shoeyn
    shoeyn
    Participant

    @shoeyn

    http://shoeynet.com
    I’ve put images for all my ranks all 18×18 or less and none of them are showing
    this is the code which is visible from firebug (extension for firefox) but it’s grayed out

    do you have any idea why my images aren’t loading ?

Viewing 25 replies - 1 through 25 (of 45 total)
  • Avatar of Hugo
    Hugo
    Moderator

    @hnla

    Hadn’t actually played with rank images until you mentioned it, but looking I can’t see where thy are applying any rules, I assume they are trying to place the image as a background to that empty span but that will require some specific rules as it’s an inline element, I’ll have a closer look when I have a moment, but it feels like another little oversight? I’m finding a few little niggles with the original plugin.

    Avatar of Hugo
    Hugo
    Moderator

    @hnla

    @xberserker was jut looking at this issue, had thought it rested with the core plugin.

    This appears to be the issue as it returns NULL when dumped :

    cp_getRankImage(cp_getPoints($bp->displayed_user->id))

    Can’t see why though?

    Avatar of Gpo1
    gpo1
    Participant

    @gpo1

    Awaiting the fix?

    Avatar of Tosh
    Tosh
    Participant

    @xberserker

    Try contacting the creating of CubePoints, not sure about the rank images not showing up. Are you on WordPressMU?

    Avatar of shoeyn
    shoeyn
    Participant

    @shoeyn

    Yes, I’m running WordPressMU

    Avatar of Hugo
    Hugo
    Moderator

    @hnla

    @xberserker you tried to pull in the rank image into the profile area alongside the points and rank name displays, but that method seems to return null, perhaps out of scope? or not excepting the arguments you are trying to feed it? any ideas ? I played with it for a while but couldn’t see where it was failing (my post a little earlier for ref)

    Avatar of Tosh
    Tosh
    Participant

    @xberserker

    I don’t have a WordPressMU site to test this one right now. But does the rank image display if you go to the CubePoints > Manage?

    Avatar of Gpo1
    gpo1
    Participant

    @gpo1

    I’ve added the images after (cudepoints> add ranks ) but no display …. using WP single
    I can see the images set in the cubepoints ranks (backend) and points required is all set,but I think maybe cubePoints BP is not calling the images to BP!

    Some icons

    http://www.webiconsets.com/

    Avatar of Tosh
    Tosh
    Participant

    @xberserker

    If you add the widget that comes with cubepoints. If you click on a member, does the rank image show there?

    Avatar of Hugo
    Hugo
    Moderator

    @hnla

    Yep the images work in respect of the parent cubepoint and I believe the only place those rank images are actually shown is the member links to the thickbox about overlay.

    It’s where you tried to integrate details into a members profile pages that this particular aspect fails, check the snippet I posted above and var_dump it.

    Avatar of Hugo
    Hugo
    Moderator

    @hnla

    Ok I have tracked down the issue – after virtually re-writing cubepointsBP if(get_option('cp_ranks_enabled')) and managing finally to get the image to kick in it became apparent where the real issue was which was with the use of file_exists() in the original cubepoints.php function cp_getRankImage($points)

    File_exists() is fed a relative path, this is problematical unless that relative path matches the current php dir, at least there is advise to use relative paths with caution in file_exists() if one checks the PHP manual – using the super global $_SERVER(‘DOCUMENT_ROOT’) corrects things.

    I am still slightly confused as to why it’s reported as working in single WP mode though? @xberserker can you confirm that with WP single that in the members account /profile pages you do get the icon displayed in the span you wrote for it <span class="cupepoints_buddypress_rank_image"> as it’s this that is slightly confusing me as I would expect it to fail regardless of whether WP or WPMU and if that isn’t the case there is possibly one final piece of this mystery to understand and my fix might not be 100% appropriate.
    When I’m relatively happy that I haven’t missed something further I’ll post up the amendment to make to the cubepoints.php file.

    Avatar of Gpo1
    gpo1
    Participant

    @gpo1

    @xberserker @hnla Pls can you amend the CPBP plugin when fixed!

    Avatar of Tosh
    Tosh
    Participant

    @xberserker

    @hnla I let the CubePoints guys know about this. Thanks for looking into that :)

    [Update already]

    They don’t have a lot of time to work on the plugin lately. But if you manage to find a fix. They will test it and merge it into the next CubePoints release.

    Avatar of Hugo
    Hugo
    Moderator

    @hnla

    Well if they fix it they will need to make the plugin WPMU aware which isn’t difficult and was promised by them a year! ago :) I will go ahead with my own fixes for the moment.

    @Gpo1 this isn’t a CPBP issue it’s a parent plugin issue well more or less, the original probably never thought it might be extended by a further plugin so the issue may never have arisen but the solution lies in the original nonetheless. gpo1 I was hoping for a little feedback asked here? http://buddypress.org/community/groups/cubepoints-buddypress-integration/forum/topic/version-1-7-beta/#post-54769 however I think it’s probably a moot point now so you can disregard.

    @xberserker I would still love to know if it’s working in single WP as this still worries me.

    Avatar of thekmen
    thekmen
    Participant

    @thekmen

    just noticed this issue on my site too, single WP 2.9.2 install.
    @hnla any chance you can post your fix here.
    @xberserker how about adding the fix to the plugin as a renamed function & using that to call the image. Save waiting on CubePoints to fix it for now…

    Avatar of Tosh
    Tosh
    Participant

    @xberserker

    @hnla Yes the rank image displays fine on my single WP 2.9.2 install actually. That’s how I got this screenshot.

    @thekmen I’ll look into that.

    Avatar of Hugo
    Hugo
    Moderator

    @hnla

    It’s a simple fix that needs to be made to cubepoints.php but equally I did run up a revised version of Tosh’s function for rankImage basically taking the DB query from the original and running it within cubepointsBP

    @thekmen I’ll post what I did in a moment and you can add it to your file or perhaps see a better approach once the issue is apparent.

    Avatar of Hugo
    Hugo
    Moderator

    @hnla

    @xberserker :lol: yes saw that screenshot elsewhere and slowly realised it answered my own question, and yes that is what simply doesn’t work with MU but it should????? it’s a path issue? how have paths changed from WP to WPMU *puzzled*

    Avatar of thekmen
    thekmen
    Participant

    @thekmen

    @hnla it’s definitely the use of if(file_exists(…
    commenting out that line works for me.

    Avatar of Hugo
    Hugo
    Moderator

    @hnla

    Exactly that’s how I found the true culprit in all this, give me two secs and I’ll post my fix , just checked on local dev production site.

    Avatar of Hugo
    Hugo
    Moderator

    @hnla

    In cubepoints.php:
    Find function cp_getRankImage($points) around lines ~ 213 – 217?

    locate line:
    if(file_exists('../wp-content/plugins/cubepoints/ranks/'.$result) || file_exists('ranks/'.$result)){

    Change it to:

    if(file_exists($_SERVER{'DOCUMENT_ROOT'} . '/wp-content/plugins/cubepoints/ranks/'.$result) || file_exists('ranks/'.$result)){

    N.B note the use of curly braces {‘DOCUMENT_ROOT’}

    Avatar of Tosh
    Tosh
    Participant

    @xberserker

    @hnla Just sent that off to the CubePoints guys. :) Thanks!

    Avatar of Hugo
    Hugo
    Moderator

    @hnla

    mention my name :)

    Avatar of Tosh
    Tosh
    Participant

    @xberserker

    I sent the code and a link back to this forum post. I’ll mention your name though :)

    Avatar of Hugo
    Hugo
    Moderator

    @hnla

    Kidding :wink:

    Actually there are probably better ways to deal with all these issues but that the guys – as they state – are resting and waiting until WP 3.0 is stable to tackle things.

    I have a notion that it might not be too difficult to bring WPMU blogs into the equation and might have a think about that if I have a minute.

    One thing I’m sure of is that having a production site running on WPMU I will be very cautious in upgrading to WP 3.0 from WPMU 2.9.2 so would like cubepoints running as well as possible under WPMU

Viewing 25 replies - 1 through 25 (of 45 total)

You must be logged in to reply to this topic.