ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Fresh Variables

November 21, 2007 10:20am

Subscribe [24]
  • #31 / Nov 23, 2007 5:31am

    JohnD

    114 posts

    I use PHP variables a lot, and I use a lot of PHP variables. This is much better - thank you!

  • #32 / Nov 24, 2007 10:19pm

    Erskine

    46 posts

    Derek - this module is excellent, and exactly what we needed for several jobs both new and old. Yet again you folks are proving that you really care about us developers, and that you know exactly the kind of things we’re crying out for.

  • #33 / Nov 30, 2007 1:12am

    stinhambo

    1268 posts

    I’m sure I don’t understand how this can benefit me!

  • #34 / Nov 30, 2007 1:26am

    Derek Jones

    7561 posts

    I’m sure I don’t understand how this can benefit me!

    Well I’m not forcing it on you! :-D

  • #35 / Nov 30, 2007 1:27am

    stinhambo

    1268 posts

    Mmm no of course not but I’d like to understand better though.

  • #36 / Nov 30, 2007 1:34am

    Derek Jones

    7561 posts

    This is really one of those things that if you haven’t come across a need for it yet, it probably won’t make much sense.  The previous examples in this thread, such as that of custom date formatting “constants” is exemplary of why it was made.  Some day when you’re building a site, and you have need of a global variable that can be used as a tag parameter, revisit this module.  I wouldn’t go looking for problems that this can solve, or try to change how you use ExpressionEngine just so this would be useful to you.  It’s a particular tool, and when you are holding the fastener in your hand and looking around in the toolbox for the right instrument to apply it, this will come to mind.  Until your site requires said fastener, the tool isn’t necessary.

  • #37 / Nov 30, 2007 1:39am

    stinhambo

    1268 posts

    This is really one of those things that if you haven’t come across a need for it yet, it probably won’t make much sense.  The previous examples in this thread, such as that of custom date formatting “constants” is exemplary of why it was made.  Some day when you’re building a site, and you have need of a global variable that can be used as a tag parameter, revisit this module.  I wouldn’t go looking for problems that this can solve, or try to change how you use ExpressionEngine just so this would be useful to you.  It’s a particular tool, and when you are holding the fastener in your hand and looking around in the toolbox for the right instrument to apply it, this will come to mind.  Until your site requires said fastener, the tool isn’t necessary.

    Yes that’s a fair analogy. I guess I am eager to learn as much as possible rather than having to learn it when the time comes. I learnt the reverse related techniques in your series and guess what? I came across a need for it and was forearmed with the knowledge which saved me a heck of a lot of time!!

    This may be one of those times that I will know when I need it though.

  • #38 / Nov 30, 2007 2:11am

    JohnD

    114 posts

    Is it possible to use the same variable name with different values for different sites? For example:

    Variable name: Whatever   Value: “value1”  This Site Only: “Checked”  Site: SiteA
    Variable name: Whatever   Value: “value2”  This Site Only: “Checked”  Site: SiteB

  • #39 / Nov 30, 2007 2:13am

    Derek Jones

    7561 posts

    Yes, though they will need to be site specific (check the box while you’re creating / editing the variable on the desired site).  Variables that are not site specific will work globally, and any multiple occurrences would simply overwrite the previous.

  • #40 / Nov 30, 2007 10:51am

    Derek Jones

    7561 posts

    Did you check your SQL query output, Victor? 😉

  • #41 / Nov 30, 2007 8:34pm

    Bobby McGee

    132 posts

    Oh my God, I love Derek.

    I switched layouts…because I put the EE tags in fresh variables it sped it up 10 thousand times. I also really like that you can put PHP in it, too, I tried out CURL and it works. 😊

    Thanks for the great add-on that makes my life easier!

  • #42 / Nov 30, 2007 10:04pm

    Brian M.

    529 posts

    I need to go back through this and re-examine the examples people have given as to how they’re using it.  Also I’d love for people to keep posting examples of what they’re using this for - and being as specific as possible.

    I know I can use this, I’m still just not getting my head around it. Probably doesn’t help that I haven’t even downloaded it and looked at it… I feel like I’m just now comfortable in the EE environment (I think I’m on my 5th site?), I’ve probably already taught myself some bad habit, and know I am not using things to their full potential.

  • #43 / Dec 02, 2007 12:45pm

    Bruce2005

    536 posts

    I switched layouts…because I put the EE tags in fresh variables it sped it up 10 thousand times.

    Now that sounds interesting! Care to explain please? As I’m doing a lot of conditionals in my templates I’m looking for any performance options…

    The more I look at this module, the more interesting and useful it looks! Thanks derek!
    .

  • #44 / Dec 09, 2007 7:45pm

    Eric Snyder

    202 posts

    Derek:
    It has been said but I will add my voice. Fresh variables rock! Thanks a bunch!

  • #45 / Jan 18, 2008 3:18am

    dekalog6

    75 posts

    Yes, though they will need to be site specific (check the box while you’re creating / editing the variable on the desired site).  Variables that are not site specific will work globally, and any multiple occurrences would simply overwrite the previous.

    I’m trying to use the same variable on multiple sites too but I don’t see the check box you mention in the Module. Here are some common variables I currently have in my path.php file that I would like to use with Fresh Variables.

    “logo_alt” => “Fast How To Guides and Manuals”,
    “template_group_name” => “manual”,
    “field_group_name” => “guides”,
    “ads_channelid” => “6774933932”

    (The last one is a Google Adsense ads channel; useful when I want to run different Adsense channels on different sites.)

    Thank you.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases