1. REGISTRATION REQUIREMENTS:

    Register with your xenforo.com Username then start a conversation at xenforo.com w/Bob and provide the following:
    1. Your XenForo License Validation Token
    2. The Domain Name associated with the License
    NOTE: Your account will be validated once ALL requirements are verified/met. Thank you for your patience.

Index / home

Discussion in 'Power Rankings Support' started by Regs, Oct 24, 2015.

  1. Regs

    Regs Active Member AMS Premium SC Premium Sportsbook Pickem Power Rankings Survivor

    Is it possible to put sport icons on the home page rather than the current way that just shows the 'primary' sport rankings list and the drop-down switcher?

    PR-home-suggestion.png

    The logos are the sport logos assigned in the backend which don't seem to be used at this point.

    In responsive view, they just stack.

    Cheers,

    Regs.
     
  2. Bob

    Bob Developer Staff Member

    Possible? YES. Something that I'd add to the Addon? NO. This would be THE PERFECT learning opportunity for you (and if you need a little coaching, I can do that). The DATA necessary to do this is exposed, so its just a matter of adding some HTML/CSS with some Xen Syntax.
     
  3. Regs

    Regs Active Member AMS Premium SC Premium Sportsbook Pickem Power Rankings Survivor

    Oh FFS!

    :)

    How do I find the data exposed to call the sport image?

    Code:
    <xen:foreach loop="$switchSport" value="$swsport">
                                        <div><a class="{xen:if '{$season.sport_id} == {$swsport.sport_id}', selected}" href="{xen:link powerrankings, '', 'sport_id={$swsport.sport_id}'}">
                                        <img src="" border="0"><br />{$swsport.sport_name}</a></li>
                                    </xen:foreach>
                                    </div>
     
  4. Bob

    Bob Developer Staff Member

    Tons of examples... look at Sportsbook, Survivor, Pickem etc ;)

    HTML:
    <img width="48" height="48" border="0" alt="{$swsport.sport_name}" src="@imagePath/nflj/powerrankings/logos/{$swsport.sport_logo}" />
     
  5. Regs

    Regs Active Member AMS Premium SC Premium Sportsbook Pickem Power Rankings Survivor

    Nevermind :)

    Code:
    <xen:foreach loop="$switchSport" value="$swsport">
                                        <div><a class="{xen:if '{$season.sport_id} == {$swsport.sport_id}', selected}" href="{xen:link powerrankings, '', 'sport_id={$swsport.sport_id}'}">
                                        <img src="@imagePath/nflj/powerrankings/logos/{$swsport.sport_logo}" /><br />{$swsport.sport_name}</a></li>
                                    </div>
                                    </xen:foreach>
    
     
  6. Regs

    Regs Active Member AMS Premium SC Premium Sportsbook Pickem Power Rankings Survivor

    Giddy Up

    upload_2015-10-24_13-7-38.png
     
  7. Regs

    Regs Active Member AMS Premium SC Premium Sportsbook Pickem Power Rankings Survivor

    Done and dusted for the day, thanks for the push @Bob

    I'll come back to this to tidy up CSS stuff but I'm happy for now:

    upload_2015-10-24_13-22-17.png

    Code:
    <xen:foreach loop="$switchSport" value="$swsport">
                                        <div style="float: left; margin-left: 10px; border: 1px solid #e1e1e1; padding: 5px;"><a style="font-size: 16px; font-weight: bold;" href="{xen:link powerrankings, '', 'sport_id={$swsport.sport_id}'}">
                                        <img src="@imagePath/nflj/powerrankings/logos/{$swsport.sport_logo}" /><br />{$swsport.sport_name}</a></li>
                                    </div>
                                    </xen:foreach>
    
     
    Bob and tajhay like this.
  8. Bob

    Bob Developer Staff Member

    yank that rouge </li> out of there.
     
    Regs likes this.
  9. Regs

    Regs Active Member AMS Premium SC Premium Sportsbook Pickem Power Rankings Survivor

    Where is there? I need you to be SPECIFIC.

    done.

    :)
     
  10. Svoboda

    Svoboda New Member AMS Showcase Pickem Power Rankings

    Can you be kind enough to release the code to do this? My end users state it is difficult to find the content and if they're new to Xenforo (which many are) I'd agree with them as the drop down picker just isn't prominent enough.
     
  11. Bob

    Bob Developer Staff Member

    He did, its posted above. Its nothing but a simple foreach loop. This will work on any template that has the "Switch Sport" dropdown select. Edit the template and add the below code where you want it to display.

    HTML:
    <xen:foreach loop="$switchSport" value="$swsport">
                                        <div style="float: left; margin-left: 10px; border: 1px solid #e1e1e1; padding: 5px;"><a style="font-size: 16px; font-weight: bold;" href="{xen:link powerrankings, '', 'sport_id={$swsport.sport_id}'}">
                                        <img src="@imagePath/nflj/powerrankings/logos/{$swsport.sport_logo}" /><br />{$swsport.sport_name}</a></li>
                                    </div>
                                    </xen:foreach>
     
    Svoboda likes this.
  12. Svoboda

    Svoboda New Member AMS Showcase Pickem Power Rankings

    Thanks. I didn't realize that was all there was to it. Was just able to implement it and makes a big difference IMO. Fun addon for sure and I'm hoping this change will get more users using it.
     
  13. Bob

    Bob Developer Staff Member

    This is what is coming with Power Rankings 1.2.0. Makes a big difference for Desktop and Tablet that can take advantage of having a sidebar where you can display stuff in the open. The Dropdowns come in handy for Mobile View as the sidebar is at the bottom in Mobile view.

    Selection_613.png
     
    Svoboda likes this.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.