WordPress.org

Ready to get started?Download WordPress

Forums

The Welcomizer
[resolved] Fire only on first visit (14 posts)

  1. Bozz
    Member
    Posted 2 years ago #

    I'd like to initiate a series of animations but only once, on the very first visit to the front page. Any thoughts on how to implement this with Welcomizer? Thanks!

    http://wordpress.org/extend/plugins/the-welcomizer/

  2. Sebastien Laframboise
    Member
    Plugin Author

    Posted 2 years ago #

    After installation, the plugin is currently in the context of adding an animation to the Home page. If you are not in this context anymore, you can choose Home again from the >> menu.

    There are 2 ways:

    1. Add an animation with a small delay, or no delay at all, and set the duration, and configure the first and second move.

    2. Add 2 animations, one that contains the animation, set the event to 'Manually'. After, inside the second animation, call the first animation by adding it into the top JavaScript textbox, under it you will find the animation list. Set this JavaScript textbox to 'After the delay'.

    The second way is useful when the delay needs to be triggered only once. When $(document).twizRepeat(x); is added.

  3. Bozz
    Member
    Posted 2 years ago #

    Thank you for the prompt reply!

    So if I understand correctly, 'After the Delay' is not processed on a repeat visit when used manually, only the first time?

    Essentially I am working on fading in the body while an image slowly falls from the sky. So 2 animations with opacity changes. I've got the animations working pretty well, but the issue is when a user clicks back to the home page, the animation begins again.

    I will attempt it the manual trigger. Thanks!

  4. Sebastien Laframboise
    Member
    Plugin Author

    Posted 2 years ago #

    They are many possibilities.

    Let's say, we have a repeated fading effect animation that does not require any delay. But we would like to trigger this animation 2 seconds after the page is ready. In that case, we need to set this animation to 'Manually', and then create another animation that has delay of 2000. Inside this one, we add the call to the first animation by choosing it from under the top JavaScript textbox found under the 'more configuration' link.

    Over this JavaScript textbox there are 3 options, OnReady, Before the delay, and after the delay.

    - OnReady will output the JavaScript textbox outside the function, literally OnReady.
    - Before the delay will output the JavaScript textbox inside the function, before the delay condition.
    - After the delay will output the JavaScript textbox inside the function, and after the delay condition.

    About your issue, I don't have any solution, but you have the freedom to create any variable that can be used as switches. By example: declare a variable, var myvar = ''; inside a JavaScript textbox that is set onReady. And wrap the call of the function, with a condition.

    if( myvar != 1 ){
        [REPLACE_THIS_WITH_YOUR_FUNCTION]
        myvar = 1;
    }

    You probably can do your one time animation with a JavaScript cookie, and use it as your switch.

  5. Bozz
    Member
    Posted 2 years ago #

    I have experimented with both $(document).twizRepeat(x); and $(document).twizReplay(); but both seem to fire each time I return to the page.

    Is there a function to manually start the animations only once? Do you need cookies to do this? Thanks!

  6. Bozz
    Member
    Posted 2 years ago #

    Sorry, hadn't seen your other reply before I sent that. Thanks for the point in the right direction.

  7. Sebastien Laframboise
    Member
    Plugin Author

    Posted 2 years ago #

    :-)

  8. Bozz
    Member
    Posted 2 years ago #

    Just wanted to note I'm still working on this, the trick is best time to fire the javascript or php cookie so that it loads at the appropriate time. If anyone has pointers on WordPress + cookies, glad to check them out. I'll post here if/when I get it squared away so others may take advantage.

  9. Bozz
    Member
    Posted 1 year ago #

    Hi Sebastien -- have you been able to setup a welcomizer animation with cookies that only fires on the first load? Was considering welcomizer for another project but couldn't sort out this type of functionality within wordpress. Any pointers would be appreciated

  10. Sebastien Laframboise
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Steve,

    Here's a JavaScript example that may help you to do so, but I didn't tested it. I hope this helps. http://www.w3schools.com/js/js_cookies.asp

  11. Bozz
    Member
    Posted 1 year ago #

    Hi Sebastien- Thanks for the link. That's what I was using before to help put it together, I think what I especially need is some direction on how to make this work within the WordPress environment. I spent hours trying to make it works, futzing in functions.php, header.php etc. but to no avail. There might also be a way to do it with PHP session cookies, but I admit it may be over my head.

    At any rate, if you ever sort out this functionality it would totally awesome. Maybe others in the community may have a more precise solution. Thanks!

  12. Sebastien Laframboise
    Member
    Plugin Author

    Posted 1 year ago #

    This plugin uses a cookie, maybe it can help you. http://wordpress.org/extend/plugins/what-would-seth-godin-do/

  13. Sebastien Laframboise
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Steve, I have a few ideas now, I'll cook something for the next release.

  14. Bozz
    Member
    Posted 1 year ago #

    That's really exciting news Sebastien! Can't wait to try it out, thank you.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic