![]() |
|
#1
|
|||
|
|||
|
I only have one skin enabled but it seems I have 3 different background colors on the different modules that I have created. I am trying to sort through this. How does one initially establish the color and how does one change it.
|
|
#2
|
|||
|
|||
|
Quote:
If you create a template module, just add one of the background classes to the initial TD tag .. ie, <tr><td class="alt1"> YOUR CUSTOM CODE HERE </td></tr> alt1 and alt2 are the two most popular backgrounds used within most styles.. If you are getting an odd color with the BBCode module, that is going to have to be manually changed.. I am sure Brian can point you to the template or file that would need modified.. I don't use BBCode modules at all.. |
|
#3
|
|||
|
|||
|
Thanks, that worked for the template module.
Most of mine are BB modules so I will hope Brian can help me there. PLUS...one more mystery. At least one of my BB modules is a different color depending on which page is is displayed. What's up with that? Last edited by LenB; 03-11-2008 at 02:22 PM. |
|
#4
|
||||
|
||||
|
The CMPS automatically switches between the 'alt1' and 'alt2' classes for modules. If you would like to use a static class, you could edit your 'adv_portal_module_wrapper' template and replace the $bgclass variable with the class you would like to use.
|
|
#5
|
|||
|
|||
|
Brian, can you tell me does this mean randomly or what?
Quote:
|
|
#6
|
||||
|
||||
|
It alternates between them. The 1st module will use alt1, the 2nd will use alt2, the 3rd will use alt1, etc.
|
|
#7
|
|||
|
|||
|
When you say first module, do you mean the first module to be created? And I assume a module keeps its assigned color then?
Is there a way to change the BB module color? Thanks. |
|
#8
|
||||
|
||||
|
I mean the first module that is displayed on the page.
If you only want to change the color for certain modules, then your best bet would be to create a new template using the code from the 'adv_portal_module_wrapper' template and change the class and/or anything else in your new template to your liking. Then edit the module and add the name of the template that you just created in the 'Alternative Module Wrapper Template' setting. |
|
#9
|
|||
|
|||
|
I'd like to make all my modules the same background color (white) can someone give me the exact code and place to change it. I'm a little lost.
Thanks! |
|
#10
|
|||
|
|||
|
Brian, I've created a new template called "vba_annc_wrapper" with the following code in it...
Code:
$mods[formcode]
<div style="padding-bottom:$vba_style[portal_vspace]px">
<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder" width="100%">
<thead>
<tr>
<td class="tcat" colspan="$mods[colspan]">
<if condition="$vba_style['portal_collapsemods']">
<a href="#top" onclick="return toggle_collapse('module_$mods[collapse]')" style="float:$stylevar[right]"><img alt="" border="0" id="collapseimg_module_$mods[collapse]" src="$stylevar[imgdir_button]/collapse_tcat$modimgcollapse.jpg" /></a>
</if>
<span class="smallfont"><strong>$vba_style[portal_blockbullet] <if condition="$mods['link']"><a href="$mods[link]">$mods[title]</a><else />$mods[title]</if></strong></span></td>
</tr>
</thead>
<tbody id="collapseobj_module_$mods[collapse]" style="$modcollapse">
<if condition="$show['tablerow']">
<tr>
<td bgcolor="#e6bbbb">
$modulehtml
</td>
</tr>
<else />
$modulehtml
</if>
</tbody>
</table>
</div>
<if condition="$show['endform']"></form></if>
I did this to my vBstyle style, which has 3 child styles to it. My CMS page is set to use one of the child styles. Any thoughts as to why it is not working? |
|
#11
|
|||
|
|||
|
Actually, looking at this further, I don't think it will do what I want it to do. What I'm trying to do is call attention to the module outlined in red on the attached image. What would be the best way to go about this?
|
|
#12
|
||||
|
||||
|
Your original change wouldn't work with the Recent Threads module since that module does not use the table row (see the <if condition="$show['tablerow']"> above your code?)
If you want to change the border, title bar, or something like that for the module then those changes could be made to your new vba_annc_wrapper template. If you want to change the background color or something else within the content there then you'll need to edit your 'adv_portal_recthreads_exp' template and make the changes there.
__________________
Frequently Asked Questions CMPS Users Manual For vBadvanced software assistance, please use the support forums. Unsolicted PMs, IMs, and email will not be responded to. If you have a non-software related question or problem with your account, please submit a support ticket. |
|
#13
|
|||
|
|||
|
Thanks Brian, that got me in the right spot. However, I only wanted to change the Site Announcement section I showed in the image above. Editing the 'adv_portal_recthreads_exp' template also changed the Recent Threads as well.
|
|
#14
|
||||
|
||||
|
You would need to wrap an <if condition> around your code changes then to limit it to just the single module.
Code:
<if condition="$mods['modid'] == X">Your background color code here</if>
__________________
Frequently Asked Questions CMPS Users Manual For vBadvanced software assistance, please use the support forums. Unsolicted PMs, IMs, and email will not be responded to. If you have a non-software related question or problem with your account, please submit a support ticket. |
|
#15
|
|||
|
|||
|
Brian, I was able to use that If statement to effect only the module I wanted. However, my lack of coding knowledge kept me from doing what I wanted. All I want to do is change the background color of any of the columns in that Module to #ffd8d8.
I tried adding this code to my Additional CSS Definitions Code:
.siteann {
background-color: #ffd8d8;
}
Code:
<if condition="$mods['modid'] == 19">< class="siteann"></if> Thanks! |
|
#16
|
||||
|
||||
|
Looks like the code for your <if> tag is a bit off. Try something more like this instead:
Code:
<td class="<if condition="$mods['modid'] == 19">siteann<else />$bgclass</if>">
__________________
Frequently Asked Questions CMPS Users Manual For vBadvanced software assistance, please use the support forums. Unsolicted PMs, IMs, and email will not be responded to. If you have a non-software related question or problem with your account, please submit a support ticket. |
|
#17
|
|||
|
|||
|
Thanks Brian, that did the trick!
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Changing background color of modules? | sunrunner_pei | "How Do I..." Questions | 3 | 12-11-2007 01:38 PM |
| Change the background of modules | G3MM4 | "How Do I..." Questions | 5 | 01-12-2007 03:25 PM |
| left right and center background colors? | Dorfdad | "How Do I..." Questions | 6 | 06-27-2006 06:58 PM |
| Inconsistent Background in Custom Modules | MikeM79 | Troubleshooting & Problems | 1 | 01-30-2006 01:26 PM |
| Modules background images do not show up | stark | Troubleshooting / "How do I..." Questions | 2 | 03-18-2005 09:40 AM |