Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Adding "Options Gear" after Category in "Mixed" Category view

2

Comments

  • DoyceTDoyceT ✭✭✭
    edited June 2014

    I don't really care, necessarily, except that I'd like it to behave the same way in all three category views. The other two use the mouseover thing (and it's that way on all the discussions), so I'd like the interface to be consistent (and hiding the gear til it's needed makes the page cleaner, imo).

    I wish I could figure out what Modern and Table views are doing/including, and simply copy/include that exact thing in the Mixed view.

  • @DoyceT said:
    Oh... and one other issue: when you switch to any of the other category views, you get two identical gears on mouseover, since the other two views are already calling helper_functions in some fashion.

    Nice catch. Checking the current layout and jumping ship should suffice:

    public function CategoriesController_AfterCategoryTitle_Handler($Sender) {
      if(C('Vanilla.Categories.Layout') == 'mixed') {
        if (!function_exists('GetOptions')) {
          include $Sender->FetchViewLocation('helper_functions', 'categories');
        }
        $Category = $Sender->EventArguments['Category'];
        echo GetOptions($Category);    
      }
    }
    

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • edited June 2014

    Oh... and one other issue: when you switch to any of the other category views, you get two identical gears

    Yes thats because it is being rendered twice.

    This gives an always-visible gear after all categories while in mixed view

    Ok so what this does is add the cog by the Category not by the individual discussions in that specific category ?

    I get the cog for the category, example : general category has a cog, but the discussions in the general category list do not have a cog when hovering if you are logged in as member. In the mixed view.

    I do get the cog for individual discussions in the General category in the other views.

    I also prefer to see it always rather than hovering to find something...

  • peregrineperegrine MVP
    edited June 2014

    .

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • I used the following CSS with success:

    .CategoryBox .OptionsTitle {
       visibility: hidden;
    }
    
    .CategoryBox:hover .OptionsTitle {
       visibility: visible;
    }
    

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • edited June 2014

    This can work too which is how it is set up in the main style

    .Item a.Title:hover .OptionsTitle {
       visibility: visible;
    display:block;
    }
    

    to see it all the time just use the code I gave plus the body if you only want that in the categories pages

    body.Vanilla.Categories .OptionsTitle {
        visibility: visible;
        display:block;
        }
    
  • DoyceTDoyceT ✭✭✭

    hg's css did a slightly weird thing where if I hovered over the Category header, it would show the gear for the category as well as all the discussions in that same CategoryBox div.

    I did the following, which seems to be working in Mixed. (Going to go make sure it didn't break the other views in some weird way.)

    .H .OptionsTitle {
        visibility: hidden;
        }
    .H:hover .OptionsTitle {
        visibility: visible;
        }
    
  • peregrineperegrine MVP
    edited June 2014

    another good question by DoyceT, and solution

    and should possibly be added or fixed in the core in the next release. don't you think. instead of needing a plugin.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • yea he needs the solutionsayerbadge @Linc he has come back with solutions to his problems several times!!

  • DoyceTDoyceT ✭✭✭

    Thanks, guys!

    My main hurdle right now is not knowing where things are, more than anything. If I can find it, I can usually stumble toward the light.

    (My secondary hurdle is the fact that what little css skill I have is... dusty.)

  • @vrijvlinder said:
    yea he needs the solutionsayerbadge Linc he has come back with solutions to his problems several times!!

    or a "model Questioner" badge.

    • you provided your version
    • you provided all the info requested of you to arrive at a workable solution.
    • you came back and mentioned what worked in a timely manner.
    • you clicked awesome or insightful for posters who tried to help you
    • and you said thanks.
    • we can't ask for more. In essence you made it a pleasure to work with, because you helped all of us help you and a new solution for the community was provided.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • DoyceTDoyceT ✭✭✭

    I'd wear "Model Questioner" with pride.

  • @linc - what do you say?

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • That sounds better than the Model inquisitor badge I was making... ;)

  • peregrineperegrine MVP
    edited June 2014

    @vrijvlinder said
    That sounds better than the Model inquisitor badge I was making... ;)

    how about the rude inquisitor. >:) badge

    • you tried to help
    • you got frustrated when you were foiled in your attempt to help
    • because - the user wouldn't provide info or follow instructions.
    • you were rude.
    • that was inexcusable
    • choose a different hobby.

    I'd wear it, not proudly though.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • I was thinking of a student behind a desk with a gold star in one corner and a question mark in the other.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • that would be nice but when you make it small the size of the badges here you can't see much detail.

    this represents a ray of hope and sunshine when someone contributes to their question by providing as many details and helping the community at the same time.

    Did you not get a star when you were a student ?

  • Did you not get a star when you were a student ?

    I don't remember getting any stars in detention.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Why did I know you were going to say that ?

Sign In or Register to comment.