• Resolved humpty2

    (@humpty2)


    Hi, between versions 1.8.49. and 1.9 the form for collecting user info stopped being visible. Your shortcodes are embedded in Woody Ad Snippets so I can distinguish between people logged in or not. The redacted code is below. Any idea why Participants Database stopped working at version 1.9?

    Thanks

    if ( is_user_logged_in() ) {
    echo '<a href="https://www.domain.com/text/">Text</a><br>';
    echo 'Text';
    global $userdata;
    get_currentuserinfo();
    $record = Participants_Db::get_record_id_by_term( 'user_login', $userdata->user_login );
    if ( $record === false ) {
    echo do_shortcode( '[pdb_signup template=bootstrap]' );
    } else {
    echo do_shortcode( '[pdb_record template=bootstrap record_id=' . $record . ' action="update-thanks"]' );
    }
    echo 'Text';
    } else {
    echo "Text";
    echo '<a href="https://domain.com/ucp.php?mode=register">here</a><br><br>';
    }
Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author xnau webdesign

    (@xnau)

    The problem may be you’re using a deprecated function to get the user login, try using wp_get_current_user()

    Thread Starter humpty2

    (@humpty2)

    Hi, thanks for the advice but I changed it as you suggested and it still does not work in the latest two versions of PD.

    Do your shortcodes work inside Woody Ad Snippets?

    Thanks

    Plugin Author xnau webdesign

    (@xnau)

    That would be a question for that developer. It would be up to that plugin to process any shortcodes that were in the snippet.

    Thread Starter humpty2

    (@humpty2)

    Hi, I removed the “template=bootstrap” and it’s fine. Although iPhone users will now have to rotate their screens!

    Thread Starter humpty2

    (@humpty2)

    Update: I tried [pdb_signup] with and without “template=bootstrap” on an otherwise empty page, no Woody php Snippets involved. It worked without but not with “template=bootstrap,” …

    supernova42

    (@supernova42)

    I had a few problems with the new woody ad snippits and so I stopped using it.

    You can create your own plugin or child theme and put your php there. You then call it with a shortcode. The advantage is that all your php is in one place and you can lose the woody ad plugin. I always try to minimise the number of plugins I use.

    Thread Starter humpty2

    (@humpty2)

    Good philosophy!

    But I deactivated Woody and still [pdb_signup template=bootstrap] (clean, no php around it) didn’t work!

    supernova42

    (@supernova42)

    I’m having problems with templates too. I was using Safari then I tried my routine in Firefox and Chrome and it worked. So now I’m trying to work out what’s going on.

    Plugin Author xnau webdesign

    (@xnau)

    If you’re seeing problem with template like that, I’d suggest inspecting the HTML to see if what’s really happening is the form is getting hidden. This can happen if the classes used in the template are the same as classes the theme uses for a different purpose. The easiest course is to just use a different template, although it would be possible to override the CSS that is causing the form to be not visible.

    Thread Starter humpty2

    (@humpty2)

    It is working now.

    Thanks

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Form no longer visible’ is closed to new replies.