Support » Plugin: Evergreen Countdown Timer » Ability to Ignore Re-Direct for Admin

  • Hi there!

    I love your plugin but I do have one request. I use Thrive Architect to manage my landing/lead/opt-in pages and when I am editing a page with a timer on it that re-directs when the countdown reaches 0 (or when it’s a date-based re-direct) I can’t edit it if the cookie has been set or the date-based re-direct is effective. Because it re-directs me within the live editor to the new page.

    It would be nice to be able to have a setting (or on by default) to ignore the admin for the re-directs. I’m sure this is a problem with any drag-and-drop editor.

    For the evergreen ones I can just remove the cookie, but I can’t do that for the ones that re-direct on a certain date.

    Thanks for your help!
    Sarah

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author IntellyWP

    (@intellywp)

    Hi Sarah,
    Thanks for choosing IntellyWP products.

    We really apologize for the delay.

    We are working to integrate this feature in a next plugin update.

    Meantime, after a plugin backup, could you please edit the following file:

    /intelly-countdown/includes/classes/ui/CountdownUI.php

    and replace from line 50 to line 99 with

        public function draw($countdown) {
            global $icp;
            if($countdown===FALSE) {
                return;
            }
    
            /* user details */
            $current_user = wp_get_current_user();
            $roles = $current_user->roles;
            $role = array_shift($roles);
    
            /* @var $countdown ICP_Countdown */
            $expireIn='';
            switch ($countdown->type) {
                case ICP_CountdownConstants::TYPE_DATE:
                    $expireIn=$countdown->expireDateIn;
                    break;
            }
    
            $restart=0;
            $expiration=$icp->Utils->parseDateToTime($countdown->expirationDate);
            if($countdown->evergreen) {
                $detect=$icp->Manager->getDetectStrategy($countdown->detect);
                $firstSeen=$detect->getFirstSeen($countdown);
                if($firstSeen!==FALSE) {
                    $expire=$icp->Utils->parseTimer($expireIn);
                    $reset=0;
                    if($reset>0 && $expire>0) {
                        $now=time();
                        $target=$firstSeen+$expire+$reset;
                        if($now>$target) {
                            $restart=1;
                        }
                    }
                }
                if($restart==0 && $firstSeen!==FALSE) {
                    $this->firstSeenValues[$countdown->id]=$firstSeen;
                }
            }
    
    		($role !== 'administrator' ) ? $redirectUri = $countdown->redirectUri : $redirectUri = '';
    
            $this->generateClasses();
            echo '<div class="'.$this->classCountdown.'" style="display:none; color:'.$countdown->color.';" icp-expire="'.$expireIn.'" icp-type="'.$countdown->type.'" icp-redirect="'.$redirectUri.'" icp-id="'.$countdown->id.'" icp-restart="'.$restart.'"  icp-eg="'.($icp->Utils->isTrue($countdown->evergreen) ? 1 : 0).'" icp-expiration="'.$expiration.'">';
            switch ($countdown->type) {
                case ICP_CountdownConstants::TYPE_DATE:
                    $this->drawDigit($countdown, $countdown->labelsDays);
                    $this->drawSeparator($countdown);
                    $this->drawDigit($countdown, $countdown->labelsHours);
                    $this->drawSeparator($countdown);
                    $this->drawDigit($countdown, $countdown->labelsMinutes);
                    $this->drawSeparator($countdown);
                    $this->drawDigit($countdown, $countdown->labelsSeconds);
                    break;
            }
            echo '</div>';
        }
    

    Let me know if you have any additional questions and will be a pleasure to help you.

    Cheers

    IntellyWP

    tgensler

    (@tgensler)

    I would prefer to not mess with the backend code if I don’t have to. Any ETA on this feature? I think it is absolutely necessary.

    Plugin Author IntellyWP

    (@intellywp)

    Hi @tgensler,
    Thanks for choosing IntellyWP products.

    We really apologize for the delay, i’ll forward this topic to our dev team to include this feature in a next plugin update

    Cheers

    IntellyWP

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Ability to Ignore Re-Direct for Admin’ is closed to new replies.