How can I change the background color or style of the new content slider?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mangoz
    Senior Member
    • Jan 2015
    • 127
    • 5.1.x

    How can I change the background color or style of the new content slider?

    As the title says.
    The reputation bar is hard coded. This is bad design.
    http://tracker.vbulletin.com/browse/VBV-14349
    Facebook 2 step registration doesn't work
    http://tracker.vbulletin.com/browse/VBV-9490
    Vbulletin android app does not work with VB5 and has no roadmap -- don't buy it! Demand better.
    http://tracker.vbulletin.com/browse/...Aroadmap-panel
  • jdj
    Senior Member
    • Jan 2009
    • 824
    • 5.1.x

    #2
    The easiest way to do that is to only feature posts that have an attachment.



    If you want to change the background image of the default image then my test site tells me it's at?

    mysite.com/images/contentslider_default_background.png

    So if you just replace the contentslider_default_background.png with a background image of your choice then that ought to change the background for you.

    Comment


    • mangoz
      mangoz commented
      Editing a comment
      That's exactly what I was looking for. Thanks! I'd like my mods featuring topics but can't trust them to edit and add a relevant pic every time.

    • jdj
      jdj commented
      Editing a comment
      If you're lucky, one of the support team might post back and tell you where the bit of code is that points the widget at contentslider_default_background.png. So you might then be able to put another image in the images directory as mysite_contentslider_default_background.png. Otherwise, unless you put your own image back, every time you upgrade the upgrade will probably overwrite your new image. I don't know where this code sits but if it sits in a template somewhere you might be able to update it. Alternatively they might be able to give you a bit of extra code to stick in the widget itself. I can see that if you deploy the slider in site builder then hit the 'edit' (pencil) icon before saving the page there's an area where you can add code. It might be possible to add something here to point it at your own image but I wouldn't know what code is required.
  • jdj
    Senior Member
    • Jan 2009
    • 824
    • 5.1.x

    #3
    Originally posted by jdj
    The easiest way to do that is to only feature posts that have an attachment.



    If you want to change the background image of the default image then my test site tells me it's at?

    mysite.com/images/contentslider_default_background.png

    So if you just replace the contentslider_default_background.png with a background image of your choice then that ought to change the background for you.
    For the admins: What bit of code would you need to add and where to point the slider at a different background image e.g. at mysite_contentslider_default_background.png rather than at contentslider_default_background.png, and where would you put it? Can it be added to a template? Can you change it in the images section of the stylevars? Or can you add it to the widget code itself, and if so, what code do you use?

    Comment


    • jdj
      jdj commented
      Editing a comment
      Just had a look in the stylevars. Under 'images' I can see that there's a stylevar for slideshow_image_background with an empty box saying 'background image'. So I wouldn't know whether this is the stylevar that controls contentslider_default_background.png or not. Wayne Luke has put up a link to a complete list of the stylevars for vB5, but the boxes next to slideshow_image_background just say 'MISSING PHRASE'.

      Just found another stylevar in Wayne's list which says module_contentslider_background.

      OK: So if you go to the stylevars there's a new subsection...see post below.
      Last edited by jdj; Wed 4 Feb '15, 7:34am.

    • jdj
      jdj commented
      Editing a comment
      That says one of the updated templates is the widget_contentslider template. So I'm guessing that somewhere in there is the code specifying the name of the background image. Must be possible to change it somewhere.

      I can see in this template on line 60 there is a line of code saying

      Quote: if condition = empty then style="background-image:url({vb:raw $imageUrl});

      So if I've read that right that's the bit of code that specifies the background image and I'm guessing that 'style' refers to the css. Best guess then is that you can change the name of the background image using the additional.css template. Admins should be able to advise.
      Last edited by jdj; Wed 4 Feb '15, 7:21am.
  • jdj
    Senior Member
    • Jan 2009
    • 824
    • 5.1.x

    #4
    Just found the bit of the stylevars you can use to change the background image for the content slider.

    Go to the stylevars. There's a new section called Module ContentSlider. The stylevar saying module_contentslider_background has a box with a URL in it. So you can change the box saying 'background image' to the url with name of whatever you want your new image to be. All you then have to do is upload your new image to the same directory specified in the image path in this box.

    Comment

    Related Topics

    Collapse

    Working...