vBadvanced Forums  
Go Back   vBadvanced Forums > vBadvanced Products > vBadvanced CMPS > vBa CMPS v3.0 Support > "How Do I..." Questions

Reply
 
Thread Tools Display Modes
  #1  
Old 03-11-2008, 01:53 PM
LenB LenB is offline
Senior Member
 
Join Date: Jun 2007
Posts: 196
Default Background colors in modules

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.
Reply With Quote
  #2  
Old 03-11-2008, 02:05 PM
bobster65 bobster65 is offline
Senior Member
 
Join Date: Mar 2006
Posts: 587
Default Re: Background colors in modules

Quote:
Originally Posted by LenBackus View Post
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.
Depends on the Module..

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..
Reply With Quote
  #3  
Old 03-11-2008, 02:11 PM
LenB LenB is offline
Senior Member
 
Join Date: Jun 2007
Posts: 196
Default Re: Background colors in modules

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.
Reply With Quote
  #4  
Old 03-11-2008, 04:54 PM
Brian's Avatar
Brian Brian is offline
Administrator
 
Join Date: Jan 2004
Location: Georgia, USA
Posts: 34,240
Default Re: Background colors in modules

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.
Reply With Quote
  #5  
Old 03-11-2008, 05:44 PM
LenB LenB is offline
Senior Member
 
Join Date: Jun 2007
Posts: 196
Default Re: Background colors in modules

Brian, can you tell me does this mean randomly or what?
Quote:
automatically switches
Reply With Quote
  #6  
Old 03-12-2008, 12:11 PM
Brian's Avatar
Brian Brian is offline
Administrator
 
Join Date: Jan 2004
Location: Georgia, USA
Posts: 34,240
Default Re: Background colors in modules

It alternates between them. The 1st module will use alt1, the 2nd will use alt2, the 3rd will use alt1, etc.
Reply With Quote
  #7  
Old 03-12-2008, 12:53 PM
LenB LenB is offline
Senior Member
 
Join Date: Jun 2007
Posts: 196
Default Re: Background colors in modules

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.
Reply With Quote
  #8  
Old 03-13-2008, 11:47 AM
Brian's Avatar
Brian Brian is offline
Administrator
 
Join Date: Jan 2004
Location: Georgia, USA
Posts: 34,240
Default Re: Background colors in modules

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.
Reply With Quote
  #9  
Old 07-25-2008, 11:57 PM
dklassen dklassen is offline
Member
 
Join Date: Nov 2006
Posts: 56
Default

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!
Reply With Quote
  #10  
Old 08-31-2009, 03:04 PM
Mobo Mobo is offline
Member
 
Join Date: May 2004
Posts: 73
Default

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>
It is a straight copy of the 'adv_portal_module_wrapper' template with only the change in red made. I then put the name "vba_annc_wrapper" into the Site Announcement module's in the 'Alternative Module Wrapper Template' setting. It is still not changing the color of my background for that module.

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?
Reply With Quote
  #11  
Old 08-31-2009, 03:09 PM
Mobo Mobo is offline
Member
 
Join Date: May 2004
Posts: 73
Default

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?
Attached Images
File Type: jpg ann.jpg (180.4 KB, 37 views)
Reply With Quote
  #12  
Old 09-01-2009, 11:49 AM
Brian's Avatar
Brian Brian is offline
Administrator
 
Join Date: Jan 2004
Location: Georgia, USA
Posts: 34,240
Default

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.
Reply With Quote
  #13  
Old 09-04-2009, 05:06 AM
Mobo Mobo is offline
Member
 
Join Date: May 2004
Posts: 73
Default

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.
Reply With Quote
  #14  
Old 09-04-2009, 01:35 PM
Brian's Avatar
Brian Brian is offline
Administrator
 
Join Date: Jan 2004
Location: Georgia, USA
Posts: 34,240
Default

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>
Replace the X in the code above with the modid of your Site Announcements module and that should apply the code to that single module.
__________________
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.
Reply With Quote
  #15  
Old 09-05-2009, 02:00 AM
Mobo Mobo is offline
Member
 
Join Date: May 2004
Posts: 73
Default

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;
}
And then adding this code to my template

Code:
<if condition="$mods['modid'] == 19">< class="siteann"></if>
This only placed the actual text from .siteann into one of the columns of the Module. I trade several other things, but nothing worked. Could you please give me a little more help with this?

Thanks!
Reply With Quote
  #16  
Old 09-07-2009, 12:20 PM
Brian's Avatar
Brian Brian is offline
Administrator
 
Join Date: Jan 2004
Location: Georgia, USA
Posts: 34,240
Default

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.
Reply With Quote
  #17  
Old 09-07-2009, 06:37 PM
Mobo Mobo is offline
Member
 
Join Date: May 2004
Posts: 73
Default

Thanks Brian, that did the trick!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

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


All times are GMT -4. The time now is 08:42 AM.

Forums Powered by vBulletin, Copyright ©2000-2009, Jelsoft Enterprises Ltd.
Please note that vBadvanced is in no way affiliated with Jelsoft Enterprises Ltd, nor will Jelsoft be able to provide any support for our products.