• Hi, can you provide me the code for the subscribe button and unsubscribe link. I will try to place that button and link on another position on my page. thank you

    View post on imgur.com

    PS: is there maybe even a shortcode for such a subscribe/unsubscribe button?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author gVectors Team

    (@gvectors-team)

    Hi avals,
    This is not an easy task and you should find some developer to write it for you. I’m sorry but there is no such code and we don’t provide custom codding support.

    Thread Starter avals

    (@avals)

    Hi, i placed follow code snippet from your comment-form.php in my single.php and can now place the subscribe bar in a custom area (http://imgur.com/a/mHINw). If i click on the button “>” than i get a comfirmation message in my regular comments area that the subscription is done successfuly, but then the page reloads and i’m not subscribed to comments.

    Have you might a tip how the following code should be adjusted?

    <div class=”wpdiscuz-subscribe-bar”>
    <?php
    if ($subscriptionType != WpdiscuzCore::SUBSCRIPTION_POST) {
    ?>
    <form action=”<?php echo admin_url(‘admin-ajax.php’) . ‘?action=addSubscription’; ?>” method=”post” id=”wpdiscuz-subscribe-form”>
    <div class=”wpdiscuz-subscribe-form-intro”><?php echo $wpdiscuz->optionsSerialized->phrases[‘wc_notify_of’]; ?> </div>
    <div class=”wpdiscuz-subscribe-form-option” style=”width:<?php echo (!$current_user->ID) ? ‘40%’ : ‘65%’; ?>;”>
    <select class=”wpdiscuz_select” name=”wpdiscuzSubscriptionType” >
    <?php if ($wpdiscuz->optionsSerialized->subscriptionType != 3) { ?>
    <option value=”<?php echo WpdiscuzCore::SUBSCRIPTION_POST; ?>”><?php echo $wpdiscuz->optionsSerialized->phrases[‘wc_notify_on_new_comment’]; ?></option>
    <?php } ?>
    <?php if ($wpdiscuz->optionsSerialized->subscriptionType != 2) { ?>
    <option value=”<?php echo WpdiscuzCore::SUBSCRIPTION_ALL_COMMENT; ?>” <?php echo (isset($unsubscribeLink) || !$wpdiscuz->optionsSerialized->wordpressThreadComments) ? ‘disabled’ : ”; ?>><?php echo $wpdiscuz->optionsSerialized->phrases[‘wc_notify_on_all_new_reply’]; ?></option>
    <?php } ?>
    </select>
    </div>
    <?php if (!$current_user->ID) { ?>
    <div class=”wpdiscuz-item wpdiscuz-subscribe-form-email”>
    <input class=”email” type=”email” name=”wpdiscuzSubscriptionEmail” required=”required” value=”” placeholder=”<?php echo $wpdiscuz->optionsSerialized->phrases[‘wc_email_text’]; ?>”/>
    </div>
    <?php } ?>
    <div class=”wpdiscuz-subscribe-form-button”>
    <input id=”wpdiscuz_subscription_button” type=”submit” value=”›” name=”wpdiscuz_subscription_button” />
    </div>
    <?php wp_nonce_field(‘wpdiscuz_subscribe_form_nonce_action’, ‘wpdiscuz_subscribe_form_nonce’); ?>
    <input type=”hidden” value=”<?php echo $post->ID; ?>” name=”wpdiscuzSubscriptionPostId” />
    </form>
    <?php } ?>
    <div class=”wpdiscuz_clear”></div>
    <?php
    if (isset($unsubscribeLink)) {
    $subscribeMessage = $isConfirmed ? $wpdiscuz->optionsSerialized->phrases[‘wc_unsubscribe’] : $wpdiscuz->optionsSerialized->phrases[‘wc_ignore_subscription’];
    if ($subscriptionType == ‘all_comment’)
    $introText = $wpdiscuz->optionsSerialized->phrases[‘wc_subscribed_to’] . ‘ ‘ . $wpdiscuz->optionsSerialized->phrases[‘wc_notify_on_all_new_reply’];
    elseif ($subscriptionType == ‘post’)
    $introText = $wpdiscuz->optionsSerialized->phrases[‘wc_subscribed_to’] . ‘ ‘ . $wpdiscuz->optionsSerialized->phrases[‘wc_notify_on_new_comment’];
    echo ‘<div class=”wpdiscuz_subscribe_status”>’ . $introText . ” | ” . $subscribeMessage . “</div>”;
    }
    ?>
    </div>

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘subscribe / unsubscribe – one button solution?’ is closed to new replies.