-
AuthorPosts
-
metamar Friend
metamar
- Join date:
- January 2009
- Posts:
- 117
- Downloads:
- 0
- Uploads:
- 0
- Thanks:
- 33
- Thanked:
- 9 times in 1 posts
February 23, 2009 at 7:34 pm #138477I found a funny little mod that adds snow fall to my website. The thing is…I would like to use it only when people choose the “white” color styling where I will put snow image background too. How can I just make the snowfall module enabled when I turn on that color.css ?
😎
wooohanetworks Friendwooohanetworks
- Join date:
- September 2008
- Posts:
- 1239
- Downloads:
- 0
- Uploads:
- 2
- Thanks:
- 148
- Thanked:
- 138 times in 41 posts
February 23, 2009 at 7:42 pm #293118<em>@metamar 114209 wrote:</em><blockquote>I found a funny little mod that adds snow fall to my website. The thing is…I would like to use it only when people choose the “white” color styling where I will put snow image background too. How can I just make the snowfall module enabled when I turn on that color.css ?
:cool:</blockquote>
[ You should also ask the developers of this module, I guess Yootheme, as they have their Yootheme Holidays Module out there or when it is not from them, ask the ones you have it from. ]
Only way to do this with hacking the JA Template codes, may be to get some php override, that disables this module when all the other styles are used, but still this module is activated. That means you add some codes that manually disable it when style xyz is used and not the white one. (Basically working like some .htaccess, you activate it to work on all parts of the site by default but block the display in certain styles manually.) The solution may be found in the templates’ ja_vars or ja_templatetools.php, as there the style switcher is mostly located. So when you make an override looking somehow like “if style red do not show module” but in PHP code, than it may work. But how you can do this exactly and if the solution is to corehack those template files, I am not sure. Maybe some other member has more help to offer. Maybe it is also to hack the codes of the module php or both in conjunction, seems not to be sooo easy but who knows, that is relative to the knowledge one has about php.
Much success with your idea though!
1 user says Thank You to wooohanetworks for this useful post
metamar Friendmetamar
- Join date:
- January 2009
- Posts:
- 117
- Downloads:
- 0
- Uploads:
- 0
- Thanks:
- 33
- Thanked:
- 9 times in 1 posts
February 24, 2009 at 6:53 am #293208<em>@wooohanetworks 114211 wrote:</em><blockquote>[ You should also ask the developers of this module, I guess Yootheme, as they have their Yootheme Holidays Module out there or when it is not from them, ask the ones you have it from. ]
Only way to do this with hacking the JA Template codes, may be to get some php override, that disables this module when all the other styles are used, but still this module is activated. That means you add some codes that manually disable it when style xyz is used and not the white one. (Basically working like some .htaccess, you activate it to work on all parts of the site by default but block the display in certain styles manually.) The solution may be found in the templates’ ja_vars or ja_templatetools.php, as there the style switcher is mostly located. So when you make an override looking somehow like “if style red do not show module” but in PHP code, than it may work. But how you can do this exactly and if the solution is to corehack those template files, I am not sure. Maybe some other member has more help to offer. Maybe it is also to hack the codes of the module php or both in conjunction, seems not to be sooo easy but who knows, that is relative to the knowledge one has about php.
Much success with your idea though!</blockquote>
Sounds out of my league as I don’t know shat about PHP code. But I will screw around with it a bit. God willing it will be!
ShannonN FriendShannonN
- Join date:
- July 2006
- Posts:
- 1947
- Downloads:
- 0
- Uploads:
- 9
- Thanks:
- 16
- Thanked:
- 172 times in 49 posts
February 24, 2009 at 7:33 am #293214metamar;114317Sounds out of my league as I don’t know shat about PHP code. But I will screw around with it a bit. God willing it will be!
sounds like you are using a java effect script for the snow?
If so test that it doesn’t conflict with existing java js and set the colour changer icon to trigger both the white bkg on the java effect . . . that is code the icon to trigger the effect with the (onclick) parameter or something similar
Hope this gives you ideas
ShannonN1 user says Thank You to ShannonN for this useful post
metamar Friendmetamar
- Join date:
- January 2009
- Posts:
- 117
- Downloads:
- 0
- Uploads:
- 0
- Thanks:
- 33
- Thanked:
- 9 times in 1 posts
February 27, 2009 at 9:28 am #293762I will try that thank you very much
anisjolly Friendanisjolly
- Join date:
- April 2008
- Posts:
- 661
- Downloads:
- 0
- Uploads:
- 15
- Thanks:
- 33
- Thanked:
- 96 times in 55 posts
February 27, 2009 at 10:36 am #293782i know which module you’re on about – i used the same thing on my site over Christmas – but why would you want to use it in Feb / Mar when the weather’s getting milder.
Oh wait – forgot – I live in the UK, might be winter somewhere else around the other side of the globe.
Stupid me! :((
wooohanetworks Friendwooohanetworks
- Join date:
- September 2008
- Posts:
- 1239
- Downloads:
- 0
- Uploads:
- 2
- Thanks:
- 148
- Thanked:
- 138 times in 41 posts
February 27, 2009 at 11:05 am #293787<em>@ShannonN 114323 wrote:</em><blockquote> . . . that is code the icon to trigger the effect with the (onclick) parameter or something similar
Hope this gives you ideas
ShannonN</blockquote>How shall that work? Needs an override via PHP and the module position it is set on…do not mess JS when you just try it.
http://developer.joomla.org/tutorials/165-understanding-output-overrides-in-joomla.html
http://docs.joomla.org/Understanding_Output_Overrides
http://docs.joomla.org/How_to_override_the_output_from_the_Joomla!_coreShannonN FriendShannonN
- Join date:
- July 2006
- Posts:
- 1947
- Downloads:
- 0
- Uploads:
- 9
- Thanks:
- 16
- Thanked:
- 172 times in 49 posts
February 27, 2009 at 11:45 am #293798wooohanetworks;115036How shall that work? Needs an override via PHP and the module position it is set on…do not mess JS when you just try it.
http://developer.joomla.org/tutorials/165-understanding-output-overrides-in-joomla.html
http://docs.joomla.org/Understanding_Output_Overrides
http://docs.joomla.org/How_to_override_the_output_from_the_Joomla!_coreIts merely a suggestion, brainstorming we call it, get a life and stop contradicting and pulling apart everything we all say,
metamar Friendmetamar
- Join date:
- January 2009
- Posts:
- 117
- Downloads:
- 0
- Uploads:
- 0
- Thanks:
- 33
- Thanked:
- 9 times in 1 posts
February 28, 2009 at 6:37 pm #293940Don’t fight over this guys 🙂 As much as the Shannon’s tip is usefull to me, the warning is too, but I always try stuff locally, I muss mess up my website a few times a week but I never modify my online site unless its an emergency. I backup every change I do. God bless people who brainstorm 🙂
I love messing things up ! That’s why I got married 😀
scotty Friendscotty
- Join date:
- March 2008
- Posts:
- 2339
- Downloads:
- 0
- Uploads:
- 13
- Thanks:
- 76
- Thanked:
- 827 times in 595 posts
February 28, 2009 at 9:24 pm #293966As I don’t know what template you are using I’ve used Uvite to test this.
I’ve used Shannons suggestion above to write a conditional statement into the templates index.php. Uvite doesn’t have White so I’m using Blue instead. I’ve tested it and it works perfect.
[php]<?php if ($tmpTools->getParam(JA_TOOL_COLOR) == ‘blue’) : ?>
<!– BEGIN: SNOW MODULE –>
<div id=”ja-snow”>
<jdoc:include type=”modules” name=”snow” />
</div>
<!– END: SNOW MODULE –>
<?php endif; ?>[/php]So what this does is call the option from the color selector, as Shannon suggested, and IF that colour is blue then the module with the name ‘snow’ is rendered. If the colour is NOT blue then it isn’t.You publish your snow module to the ‘snow’ position and it will only show when the blue option has been selected. Quiet a handy little hack actually. You could have a completely different layout for each colour.
@Whoo: What on earth has this topic got to do with core overrides?
1 user says Thank You to scotty for this useful post
wooohanetworks Friendwooohanetworks
- Join date:
- September 2008
- Posts:
- 1239
- Downloads:
- 0
- Uploads:
- 2
- Thanks:
- 148
- Thanked:
- 138 times in 41 posts
February 28, 2009 at 10:07 pm #293979I never fight, some members must have some tickle that makes them wonna know more, show off with knowing something and do just like to see their post as the ultimate well of knowledge to others. I referred to the case, that you should know what you do when you touch a JS file, simple css codes are much different. I really hope that you find the solution, this is my only wish here, not that you use my version or idea or whatever. That is why I also do not reply a lot when some members post such replies again and again, they simply must have some issues that make them think any post is an attack or something, I do not know. When Scotty had the time to test it and it really works out, you can simply adopt this to your template and the thing snows only on the white version etc.., than perfect. All I can say!
wooohanetworks Friendwooohanetworks
- Join date:
- September 2008
- Posts:
- 1239
- Downloads:
- 0
- Uploads:
- 2
- Thanks:
- 148
- Thanked:
- 138 times in 41 posts
February 28, 2009 at 10:09 pm #293980<em>@scotty 115261 wrote:</em><blockquote>As I don’t know what template you are using I’ve used Uvite to test this.
I’ve used Shannons suggestion above to write a conditional statement into the templates index.php. Uvite doesn’t have White so I’m using Blue instead. I’ve tested it and it works perfect.
[php]<?php if ($tmpTools->getParam(JA_TOOL_COLOR) == ‘blue’) : ?>
<!– BEGIN: SNOW MODULE –>
<div id=”ja-snow”>
<jdoc:include type=”modules” name=”snow” />
</div>
<!– END: SNOW MODULE –>
<?php endif; ?>[/php]So what this does is call the option from the color selector, as Shannon suggested, and IF that colour is blue then the module with the name ‘snow’ is rendered. If the colour is NOT blue then it isn’t.You publish your snow module to the ‘snow’ position and it will only show when the blue option has been selected. Quiet a handy little hack actually. You could have a completely different layout for each colour.
@Whoo: What on earth has this topic got to do with core overrides?</blockquote>
BTW, that is a PHP Overide I mentioned and came up with, Shannon referred to use onclick JS and not the simple thing I talked about…and as I read something about fighting, I did not feel the lust no more to read her posts above, as you can imagine. So, PHP Override, what I mentioned, lol…!
scotty Friendscotty
- Join date:
- March 2008
- Posts:
- 2339
- Downloads:
- 0
- Uploads:
- 13
- Thanks:
- 76
- Thanked:
- 827 times in 595 posts
February 28, 2009 at 10:15 pm #293983wooohanetworks;115277BTW, that is a PHP Overide
Huh? I’m baffled. Override what exactly? To OVERride something it has to have been set in the first place. Where was this condition set that it now needs to be overridden.
Do you know the first thing about what you are talking about?
Answering questions and actually helping people on these forums is not ‘showing off’ (not that you would know anything about helping people here). It’s giving a little back in the spirit of Open Source which none of us would have if people didn’t give up their free time to contribute to.
Do you contribute? I think not.
As Shannon (who is male BTW) said… your nothing more than a Troll. You’ll find the report button on the left but you know that don’t you!
ShannonN FriendShannonN
- Join date:
- July 2006
- Posts:
- 1947
- Downloads:
- 0
- Uploads:
- 9
- Thanks:
- 16
- Thanked:
- 172 times in 49 posts
March 1, 2009 at 2:51 am #293996scotty;115261As I don’t know what template you are using I’ve used Uvite to test this.
I’ve used Shannons suggestion above to write a conditional statement into the templates index.php. Uvite doesn’t have White so I’m using Blue instead. I’ve tested it and it works perfect.
[php]<?php if ($tmpTools->getParam(JA_TOOL_COLOR) == ‘blue’) : ?>
<!– BEGIN: SNOW MODULE –>
<div id=”ja-snow”>
<jdoc:include type=”modules” name=”snow” />
</div>
<!– END: SNOW MODULE –>
<?php endif; ?>[/php]So what this does is call the option from the color selector, as Shannon suggested, and IF that colour is blue then the module with the name ‘snow’ is rendered. If the colour is NOT blue then it isn’t.You publish your snow module to the ‘snow’ position and it will only show when the blue option has been selected. Quiet a handy little hack actually. You could have a completely different layout for each colour.
@Whoo: What on earth has this topic got to do with core overrides?
Scotty Thanks for taking my brainstorming and putting it into code, I’m not as skilled in coding areas with php yet but have the general Ideas of what’s available and needed from my html/JS days experimenting
Cheers ShannonN
metamar Friendmetamar
- Join date:
- January 2009
- Posts:
- 117
- Downloads:
- 0
- Uploads:
- 0
- Thanks:
- 33
- Thanked:
- 9 times in 1 posts
March 1, 2009 at 2:41 pm #294060I want to express my sincere gratitude guys. As I understand it its quite a little conceptual breakthrough. I mean this means we can turn on different modules throught the specific color css’s like blue and violet for uvite and other colors for other templates. It opens the door to alot of amazing possibilities in my book.
It’s stuff like this that make me want to learn more php and I’ll use your posts as a base. Thanks again
-
AuthorPosts
This topic contains 15 replies, has 5 voices, and was last updated by metamar 15 years, 9 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum