Showcase resources using WF

Discussion in '[bd] Widget Framework' started by Andy, Apr 17, 2013.

  1. Andy

    Andy Member

    I know the latest WF supports RM and have numerous hook locations.
    Would it be possible to have it something like this http://addons.nfljunkies.com/ to show the latest resources added to a specific category where we can show it on portal and forum index.

    I imagine we can use the resource avatar, the title, the rating stars and the number of reviews.
     
  2. xfrocks

    xfrocks XenForo rocks!
    Staff Member

    Yes. You can use the Resources renderer. It has several modes for you to choose from.
     
    1. Andy

      Andy Member

      Andy @xfrocks I'm having a play with them now but the caching lag is causing some difficulties to test such as
      1) When I change the modes on the ACP, it does not reflect right away on the front end.
      2) The location I'm testing is hook:page_container_content_top but when use Top resources/newest resources, it does not follow the order on the RM page. Also, the rating is shown as 3/5, on all pages except on the resources pages where it shows 3 stars.
      I wonder if there is some caching issues that affects all pages outside of the resources pages.
      3) I remember you got a trick for admin to use a specific url to refresh cache so that I can debug better.
      4) The item list is better to span horizontally when on locations not sidebar.
       
  3. xfrocks

    xfrocks XenForo rocks!
    Staff Member

    Attached is the new version with that caching problem fixed. You can use it to test with your site (it will be released to xenforo.com later).
     

    Attached Files:

    Andy likes this.
  4. Andy

    Andy Member

    Updated
    1) Choosing newest resources model from ACP seems to show Highest rated resources instead. It also has a different order than RM. See pic
    Screen Shot 2013-04-18 at 9.33.49 AM.png

    2) Choosing highest rated model seems to show newest resources instead. It also does not follow the order from RM

    Screen Shot 2013-04-18 at 9.38.14 AM.png

    The rating stars seem flaky on pages outside of RM. It will show the stars once and if I refresh the page, it will show 0/5, etc.

    3) In all modes, I think it's good that we can use the thumbnail, the title, the star rating and the votes count.
     
  5. xfrocks

    xfrocks XenForo rocks!
    Staff Member

    Congrats, you found another bug! :D Below is the fixed version. Please try to see if it fixes (1) + (2).

    About (3), it will show the rating if the mode is rating only.
     

    Attached Files:

    Andy likes this.
  6. Andy

    Andy Member

    It fixed (1) and (2). Congrats :)
    In rating mode, please consider adding x votes after the stars so it is consistent with the RM.

    1) The issue remains that the star rating does not show properly on any page outside of RM
    Screen Shot 2013-04-18 at 9.55.48 AM.png

    2) what expression can I use to not show it on RM pages.
    Thanks very much

    EDIT: to replicate 1) just make any change in the ACP in rating mode (such as change the number of item shown) and save. Then view it on forum index for example, it will first display the star correctly, reload the page and it will show numeric values.
     
  7. xfrocks

    xfrocks XenForo rocks!
    Staff Member

    (1) It shows okie on forum_list for me...

    Screen Shot 2013-04-18 at 9.27.35 PM.png
    (2) You can use

    PHP:
    empty($resource)
     
    Andy likes this.
    1. Andy

      Andy Member

      Andy @xfrocks It does not show on RM index page. Do we have a different expression for it? I think the RM index has the left sidebar so it's different
      Thanks
       
    2. xfrocks

      xfrocks XenForo rocks!
      Staff Member

      xfrocks @Andy You asked for an expression show it doesn't show up in RM page? But you want it shows up in RM list page?
       
    3. Andy

      Andy Member

      Andy @xfrocks Clarification.
      That expression is for the RM widgets. I'm asking for the sidebar banner ads :)
       
  8. Andy

    Andy Member

    I change to forum_list and it displays correctly the first time on sidebar. Refresh the browser and it shows numeric numbers. Is there any conflict with APC, etc?
    I can let you test on my live site. Just give me some expression so that it only shows to userid= x ;)
    By the way, I think your xfrocks account on my site has been deleted by mistake. Sorry about it.
     
  9. xfrocks

    xfrocks XenForo rocks!
    Staff Member

    Nice job. It was another bug.
     

    Attached Files:

    Andy likes this.
  10. Andy

    Andy Member

    Fixed :)
    Why I'm paying to find bug for you?
    Oh, wait....:)
     
  11. xfrocks

    xfrocks XenForo rocks!
    Staff Member

    Nice joke :cool:
     
  12. Andy

    Andy Member

    Now that the bugs are fixed (hopefully until we find something else), hope to see some visual improvements like adding the vote count after the star rating. There are plenty of space left so it shouldn't be a problem.
    i think using the hook: page_container_content_top location would need some custom job since it wouldn't make sense to display vertical list there.
    I think RM 1.0.1 and XF 1.1.5 would be released soon with many improvements.
     
  13. xfrocks

    xfrocks XenForo rocks!
    Staff Member

    I'm looking for 1.2...
     
  14. xfrocks

    xfrocks XenForo rocks!
    Staff Member

    I still don't understand :p
     
  15. Andy

    Andy Member

    I'm using this expression to show the sidebar banner. It shows where I want except the sidebar on RM index
    Code:
    empty($thread)
    OR !empty($resource)
    OR $visitor['user_id'] == 0
    Top notch support by the way. Worth the money.
     
  16. xfrocks

    xfrocks XenForo rocks!
    Staff Member

    Try this then

    PHP:
    empty($thread)
    OR !empty(
    $resource)
    OR !empty(
    $ressources)
    OR 
    $visitor['user_id'] == 0
     
  17. Andy

    Andy Member

    You got an extra s in the third line. Still not work.
    Using reveal mode and it shows that there is no hook on the left sidebar
     
  18. xfrocks

    xfrocks XenForo rocks!
    Staff Member

    You will need the position "resource_index" and the expression to make it show up in resource list.

    PHP:
    empty($thread)
    OR !empty(
    $resource)
    OR !empty(
    $resources)
    OR 
    $visitor['user_id'] == 0
     
    Andy likes this.
Loading...