Post "Icon"

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • alexxxmk
    New Member
    • Apr 2014
    • 3
    • 5.0.X

    #16
    Thank you so much Glenn, I am going to try it now.

    Inspecting the elements I also found something that maybe can be useful: the data-channel-id="40". I notice every channel has an specific id, is theres any way I can assign a different icon for each channel using the data-channel-id in the code?

    Comment


    • glennrocksvb
      glennrocksvb commented
      Editing a comment
      You can but the same thing with widget ids, the channel ids might change when you upgrade or re-install.
  • alexxxmk
    New Member
    • Apr 2014
    • 3
    • 5.0.X

    #17
    Just tried but didn't work out for me.

    /* forum icon for forums with no new posts */
    .canvas-widget[data-widget-id="922"].forum-list-container .forum-item .cell-forum .icon {
    background: transparent url("http://eurocrewpr.com/forum/images/css/wheel-old.png") no-repeat;
    }

    Comment

    • glennrocksvb
      Former vBulletin Developer
      • Mar 2011
      • 4021
      • 5.7.X

      #18
      Originally posted by alexxxmk
      Just tried but didn't work out for me.
      What exactly did you try that doesn't work?

      Flag Icon Postbit Insert GIPHY Impersonate User BETTER INITIALS AVATAR Better Name Card Quote Selected Text Bookmark Posts Post Footer Translate Stop Links in Posts +MORE!

      Comment

      • glennrocksvb
        Former vBulletin Developer
        • Mar 2011
        • 4021
        • 5.7.X

        #19
        Originally posted by alexxxmk
        Just tried but didn't work out for me.
        Ok I saw you already fixed it in your site http://eurocrewpr.com/forum/ by modifying the display_Forums_item template and adding a class called iconclass<channelid> for each forum.

        But you actually don't have to modify that template, you can simply add this in your css_additional.css template:

        Code:
        .forum-list-container .forum-item[COLOR=#0000FF][data-channel-id="114"][/COLOR] .cell-forum .icon {
            background: transparent url("http://eurocrewpr.com/forum/images/css/offtopic-old.png") no-repeat;
        }
        .forum-list-container .forum-item.new[COLOR=#0000FF][data-channel-id="114"][/COLOR] .cell-forum .icon {
            background: transparent url("http://eurocrewpr.com/forum/images/css/offtopic-new.png") no-repeat;
        }
        That's for the Off-Topic forum in your site. Notice I didn't use additional class. You can also use HTML attributes in CSS selectors to target specific elements.
        Last edited by glennrocksvb; Fri 18 Apr '14, 11:24am.

        Flag Icon Postbit Insert GIPHY Impersonate User BETTER INITIALS AVATAR Better Name Card Quote Selected Text Bookmark Posts Post Footer Translate Stop Links in Posts +MORE!

        Comment

        Related Topics

        Collapse

        Working...