Exemplo n.º 1
0
    public function replaceVariables(Pap_Common_BannerReplaceVariablesContext $context) {
        $seo_targeturl = Pap_Tracking_ClickTracker::getInstance()->getModRewriteClickUrl(
            $context->getBanner(), $context->getUser(), '',
            $context->getBanner()->getChannel(), $context->getBanner()->getDestinationUrl());

        $context->setText(Pap_Common_UserFields::replaceCustomConstantInText('seo_targeturl', $seo_targeturl, $context->getText()));
    }
Exemplo n.º 2
0
 public function getGeneralAffiliateLinkNoRpc($affiliateId = null) {
     if ($affiliateId == null) {
         $affiliateId = Gpf_Session::getAuthUser()->getUserId();
     }
     $affiliate = new Pap_Common_User();
     $affiliate->setId($affiliateId);
     $affiliate->load();
     $mainSiteUrl = Gpf_Settings::get(Pap_Settings::MAIN_SITE_URL);
     return Pap_Tracking_ClickTracker::getInstance()->getClickUrl(null, $affiliate, $mainSiteUrl);
 }
Exemplo n.º 3
0
    public static function getAffiliateLink($refid) {
        $mainSiteUrl = Gpf_Settings::get(Pap_Settings::MAIN_SITE_URL);

        $user = new Pap_Affiliates_User();
        $user->setRefId($refid);

        if(Pap_Tracking_ClickTracker::getInstance()->getLinkingMethod() == Pap_Tracking_ClickTracker::LINKMETHOD_ANCHOR
        && Gpf_Settings::get(Pap_Settings::SUPPORT_SHORT_ANCHOR_LINKING) == GPF::YES) {
            $affiliateLink = $mainSiteUrl . "#" . $user->getRefId();
        } else {
            $affiliateLink = Pap_Tracking_ClickTracker::getInstance()->getClickUrl(null, $user, $mainSiteUrl);
        }
        return $affiliateLink;
    }
Exemplo n.º 4
0
 /**
  * @param Pap_Common_User $user
  * @param string $specialDesturl
  * @return String click URL
  */
 public function getClickUrl(Pap_Common_User $user, $specialDesturl = '', $flags = '', $data1 = '', $data2 = '')
 {
     if ($flags & Pap_Common_Banner::FLAG_MERCHANT_PREVIEW) {
         if ($specialDesturl == '') {
             return $this->getDestinationUrl($user);
         }
         return $specialDesturl;
     }
     return Pap_Tracking_ClickTracker::getInstance()->getClickUrl($this, $user, $specialDesturl, $flags, $this->channel, $data1, $data2);
 }
Exemplo n.º 5
0
 /**
  * @return Pap_Tracking_ClickTracker
  */
 public static function getInstance() {
     if (self::$instance == NULL) {
         self::$instance = new Pap_Tracking_ClickTracker();
     }
     return self::$instance;
 }