Changeset 486
- Timestamp:
- 02/28/08 20:00:25 (10 months ago)
- Location:
- trunk
- Files:
-
- 3 modified
-
modules/base/classes/settings.php (modified) (1 diff)
-
modules/base/templates/options_general.tpl (modified) (1 diff)
-
owa_wp.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/modules/base/classes/settings.php
r469 r486 410 410 'cache_objects' => true, 411 411 'do_not_log_admins' => true, 412 'do_not_log_ips' => '' 412 'do_not_log_ips' => '', 413 'track_feed_links' => true 413 414 414 415 )); -
trunk/modules/base/templates/options_general.tpl
r446 r486 135 135 <BR> 136 136 137 <fieldset name="owa-feed-options" class="options"> 138 <legend>Feed Tracking</legend> 139 140 <div class="setting" id="feeds"> 141 <div class="title">Feed Link Tracking</div> 142 <div class="description">Adds tracking parameters to RSS or Atom feeds links. This provides a way to track how many visitors come from your feeds.</div> 143 <div class="field"> 144 <select name="<?=$this->getNs();?>config[track_feed_links]"> 145 146 <option value="0" <? if ($config['track_feed_links'] == false):?>SELECTED<?endif;?>>Off</OPTION> 147 <option value="1" <? if ($config['track_feed_links'] == true):?>SELECTED<?endif;?>>On</OPTION> 148 </select> 149 </div> 150 </div> 151 152 </fieldset> 153 154 <BR> 155 137 156 <fieldset name="owa-event-options" class="options"> 138 157 <legend>Event Handling</legend> -
trunk/owa_wp.php
r481 r486 59 59 // check for presence of '?' which is not present under URL rewrite conditions 60 60 61 if (strpos($link, "?") === false): 62 // add the '?' if not found 63 $link .= '?'; 61 if ($this->config['track_feed_links'] == true): 62 63 if (strpos($link, "?") === false): 64 // add the '?' if not found 65 $link .= '?'; 66 endif; 67 68 // setup link template 69 $link_template = "%s&%s=%s&%s=%s"; 70 71 return sprintf($link_template, 72 $link, 73 $this->config['ns'].$this->config['source_param'], 74 'feed', 75 $this->config['ns'].$this->config['feed_subscription_param'], 76 $_GET[$this->config['ns'].$this->config['feed_subscription_param']]); 77 else: 78 return; 64 79 endif; 65 66 // setup link template67 $link_template = "%s&%s=%s&%s=%s";68 69 return sprintf($link_template,70 $link,71 $this->config['ns'].$this->config['source_param'],72 'feed',73 $this->config['ns'].$this->config['feed_subscription_param'],74 $_GET[$this->config['ns'].$this->config['feed_subscription_param']]);75 76 80 } 77 81 … … 84 88 function add_feed_tracking($binfo) { 85 89 86 $guid = crc32(getmypid().microtime()); 90 if ($this->config['track_feed_links'] == true): 91 $guid = crc32(getmypid().microtime()); 87 92 88 return $binfo."&".$this->config['ns'].$this->config['feed_subscription_param']."=".$guid; 93 return $binfo."&".$this->config['ns'].$this->config['feed_subscription_param']."=".$guid; 94 else: 95 return; 96 endif; 89 97 } 90 98
