MyBB Hacks

Full Version: Conditional for "reponsive"
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi there, I'm trying to make some modifications for mobile users and one thing I want is to set collapsed by default the categories on my index.

For this I need to change in forumbit_depth1_cat

<tbody style="{$expdisplay}" id="cat_{$forum['fid']}_e">

to

<tbody style= "display: none" id="cat_{$forum['fid']}_e">

But I'm not quire sure for the 'responsive' conditional. I've tried:

Code:
<if media=(max-width: 420px) then>
	<tbody style= "display: none" id="cat_{$forum['fid']}_e">
<else>
               <tbody style="{$expdisplay}" id="cat_{$forum['fid']}_e">
</if>


And some variations with "" and the @media but they don't work. If someone could guide me, I would be very grateful. Thank you.

Note that any conditional will be translated into PHP.
media=(max-width: 420px) is not a PHP thingy (AFAIK).
Reference URL's