The Joomla! Forum ™



Forum rules


Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.



Post new topic Reply to topic  [ 7 posts ] 
Author Message
PostPosted: Sun Nov 15, 2009 6:41 pm 
Joomla! Fledgling
Joomla! Fledgling

Joined: Sun Jan 28, 2007 12:36 am
Posts: 3
Hi
not sure if this is possible
I'm running the comuna3_plazza template from TemplatePlazza
and the random background module from joomla4more

The comuna3 templale has a style switcher
I would like a random background only when the website first loads
after which the stylechanger can change the look of the site.
is this posible?

right now when ever i change to another style the background changes as well
not good...

not very php savy any help is appreciated

edit:
I know this requisres some type of if else condition just dont know where or how to construct it

random background module uses "<jdoc:include type="modules" name="user1" style="xhtml"/>;"
placed in template index after css statment

style changer stores variable for styles is this statement i believe:
$d_fstyle = $this->params->get('templatestyle');

how should code look if style = style1 execute code other wise skip or exclude type

EDIT: found style variable
with this code
<?php
if ( $style == "style1" ) {
echo "<font color='white'>Style1 selected</font><br />";
}
else {echo "Not style1!";
}
?>
just need to figure how to insert the
"<jdoc:include type="modules" name="user1" style="xhtml"/>;"
command

and exclude it if a different style sheet is select

am i on the right track?

anyone here speak php?


/tia

RC


Top
 Profile  
 
PostPosted: Mon Nov 16, 2009 8:44 am 
Joomla! Fledgling
Joomla! Fledgling

Joined: Sun Jan 28, 2007 12:36 am
Posts: 3
Well figured out the solution after looking thru lots of php code I constructed this
code:

<?php if($style == "style1") { ?>
<div id="headermodule">
<jdoc:include type="modules" name="user1" style="xhtml"/>
</div>
<?php } ?>

may not be the best way to do it but it works

may help some one else trying to figure out how to do this

/rc


Top
 Profile  
 
PostPosted: Sat Dec 19, 2009 3:53 pm 
User avatar
Joomla! Guru
Joomla! Guru

Joined: Fri Nov 10, 2006 7:05 pm
Posts: 572
Location: Detroit, Michigan, USA
@pcuser.. I was wondering if you could help me adapt your code to what an effect I'm looking to achieve.

I have three URL's I want to work with..

url1.com, url2.com, url3.com

now.. url1.com is the primary url, the other two are just addon domains which end up pointing at the same server, but the domain name gets rewritten to reflect.

If you would like to see an example of what I mean.. this is the site I'm working on and where this project is going to take place.

Michigan Circle Track

If you go there, you'll see in your browser window, your at michigancircletrack.com

Now.. I have parked MARC Times Racing News and Michigan Racing Scene at the same server.. so if you click on those URL, you will see the same website, but the URL in the browser window reflects the add-on domain name.

Okay... but the problem.. the header still says "Michigan Circle Track"

I was wondering if there was a way to have the logo file load based on the URL which called it..

So if the person browsed michigancircletrack.com.. then the mct_logo.png would load into the header..

But if they went to marctimesracingnews.com.. then the mtrn_logo.png would load..

and same for any other add-on domain.

Outside that, nothing else changes.. the browser bar already does what it is suppose to do, but I think the site visitor is confused when they type in the URL "marctimesracingnews.com" and they get "MichiganCircleTrack.com"

IF it is not possible to call a different logo.png, is it possible to call a different template ?

would it be possible to call:

template/red for MichiganCircleTrack.com
template/blue for MarcTimesRacingNews.com
template/black for MichiganRacingScene.com

that way the logo.png in the template/color/images folder for each template would reflect the correct name ?

Maybe this is a better option ? As then the site colors could be different also, even though everything else.. module positions, content, menus, everything else would stay the same.

Anyone have any thoughts or ideas how this could be accomplished or if it is already readily available and I am just not aware ?

Thank you in advance for any assistance.


Top
 Profile  
 
PostPosted: Wed Jan 06, 2010 6:14 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Tue Jan 05, 2010 11:49 pm
Posts: 10
seems like working fine now...


Top
 Profile  
 
PostPosted: Wed Jan 06, 2010 6:43 am 
User avatar
Joomla! Guru
Joomla! Guru

Joined: Fri Nov 10, 2006 7:05 pm
Posts: 572
Location: Detroit, Michigan, USA
not on my site, i don't have it yet


Top
 Profile  
 
PostPosted: Sat Dec 03, 2011 12:15 am 
Joomla! Fledgling
Joomla! Fledgling

Joined: Sat Dec 03, 2011 12:10 am
Posts: 1
Did anyone figure out how to do this. I need something similar. I have one company name and branding for the west coast and a different company name and branding for the east coast.


Top
 Profile  
 
PostPosted: Sat Dec 03, 2011 6:22 am 
User avatar
Joomla! Guru
Joomla! Guru

Joined: Fri Nov 10, 2006 7:05 pm
Posts: 572
Location: Detroit, Michigan, USA
Chamleon does this..


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 



Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group