Title: fredriksundstrom's Replies | WordPress.org

---

# fredriksundstrom

  [  ](https://wordpress.org/support/users/fredriksundstrom/)

 *   [Profile](https://wordpress.org/support/users/fredriksundstrom/)
 *   [Topics Started](https://wordpress.org/support/users/fredriksundstrom/topics/)
 *   [Replies Created](https://wordpress.org/support/users/fredriksundstrom/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/fredriksundstrom/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/fredriksundstrom/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/fredriksundstrom/engagements/)
 *   [Favorites](https://wordpress.org/support/users/fredriksundstrom/favorites/)

 Search replies:

## Forum Replies Created

Viewing 10 replies - 1 through 10 (of 10 total)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[SAM Pro (Free Edition)] Excerpt warning upon new install](https://wordpress.org/support/topic/excerpt-warning-upon-new-install/)
 *  Thread Starter [fredriksundstrom](https://wordpress.org/support/users/fredriksundstrom/)
 * (@fredriksundstrom)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/excerpt-warning-upon-new-install/#post-7158050)
 * I’ve installed the new version and can also conclude that it is indeed solved.
   Thanks!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[SAM Pro (Free Edition)] Can't select nor correlate ads to advertiser](https://wordpress.org/support/topic/cant-select-nor-correlate-ads-to-advertiser/)
 *  Thread Starter [fredriksundstrom](https://wordpress.org/support/users/fredriksundstrom/)
 * (@fredriksundstrom)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/cant-select-nor-correlate-ads-to-advertiser/#post-7162082)
 * All of a sudden, all the ads are now visible in correlation to the user that 
   created them (under the Advertisers page).
 * I still cannot use the select-feature in the individual ads to select a new user
   though. Nothing happens upon clicking “Select” in the modal window, after choosing
   a new user.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[SAM Pro (Free Edition)] Doesn't count impressions or clicks](https://wordpress.org/support/topic/doesnt-count-impressions-or-clicks/)
 *  Thread Starter [fredriksundstrom](https://wordpress.org/support/users/fredriksundstrom/)
 * (@fredriksundstrom)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/doesnt-count-impressions-or-clicks/#post-7162080)
 * Acknowledged. And it works just as you explained it, of course. Thank you!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[SAM Pro (Free Edition)] Doesn't count impressions or clicks](https://wordpress.org/support/topic/doesnt-count-impressions-or-clicks/)
 *  Thread Starter [fredriksundstrom](https://wordpress.org/support/users/fredriksundstrom/)
 * (@fredriksundstrom)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/doesnt-count-impressions-or-clicks/#post-7162008)
 * Here’s a few screenshots: [http://imgur.com/a/yT1yN](http://imgur.com/a/yT1yN)
 * And I’m currently on version 1.5.4.34.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[SAM Pro (Free Edition)] Doesn't count impressions or clicks](https://wordpress.org/support/topic/doesnt-count-impressions-or-clicks/)
 *  Thread Starter [fredriksundstrom](https://wordpress.org/support/users/fredriksundstrom/)
 * (@fredriksundstrom)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/doesnt-count-impressions-or-clicks/#post-7162007)
 * Actually, I’m not seeing any ads in the admin when going to “Advertisers” either,
   although my admin user “owns” the current ad, with ID 1. It says no records there
   as well.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[SAM Pro (Free Edition)] Turn off default ad placements?](https://wordpress.org/support/topic/turn-off-default-ad-placements/)
 *  Thread Starter [fredriksundstrom](https://wordpress.org/support/users/fredriksundstrom/)
 * (@fredriksundstrom)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/turn-off-default-ad-placements/#post-7157943)
 * Alright. If you are willing to let me in anyway, given we can establish some 
   sort of trust, I’ll be a contributor to a better plugin through pull-requests
   and I’ll not touch the paid version at all.
 * You know at what e-mail to find me. Otherwise, I’ll just keep posting here. 🙂
 * Thanks for the quick fixes, anyway!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[SAM Pro (Free Edition)] Turn off default ad placements?](https://wordpress.org/support/topic/turn-off-default-ad-placements/)
 *  Thread Starter [fredriksundstrom](https://wordpress.org/support/users/fredriksundstrom/)
 * (@fredriksundstrom)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/turn-off-default-ad-placements/#post-7157917)
 * This was my fault. Though, still interested in the git repo. I’m available here
   as well: [fredrik.sundstrom@gmail.com](https://wordpress.org/support/users/fredriksundstrom/replies/fredrik.sundstrom@gmail.com?output_format=md)
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[SAM Pro (Free Edition)] Excerpt warning upon new install](https://wordpress.org/support/topic/excerpt-warning-upon-new-install/)
 *  Thread Starter [fredriksundstrom](https://wordpress.org/support/users/fredriksundstrom/)
 * (@fredriksundstrom)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/excerpt-warning-upon-new-install/#post-7157910)
 * Or, depending on the intended functionality, to catch it even sooner, maybe rearrange
   the code a bit and get the check higher up:
 *     ```
       public function addExcerptAds( $excerpt ) {
       			$options = self::getSettings();
       			$bpTI = explode('_', $options['bpAdsId']);
   
       			if (count($bpTI) == 1) return $excerpt;
   
       			$bpAd = '';
       			$bpId = (int)$bpTI[1];
       			$bpType = (int)$bpTI[0];
       			if(!$this->isSingle) {
       				if(empty($this->clause)) $this->clause = self::buildWhereClause();
   
       				if(!empty($options['beforePost']) && !empty($options['bpExcerpt']) && !empty($options['bpAdsId'])) {
       					$bpAd = self::buildAdObject( $bpType, $bpId, null, $options['bpUseCodes'], $this->clause);
       				}
   
       				return $bpAd.$excerpt;
       			}
       			else return $excerpt;
       		}
       ```
   
 * Only in the case that any other real situation would have the array count higher
   than 1.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[SAM Pro (Free Edition)] Excerpt warning upon new install](https://wordpress.org/support/topic/excerpt-warning-upon-new-install/)
 *  Thread Starter [fredriksundstrom](https://wordpress.org/support/users/fredriksundstrom/)
 * (@fredriksundstrom)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/excerpt-warning-upon-new-install/#post-7157908)
 * P.S. I’m using the javascript way of showing ads, if it makes any difference.
   And PHP 7.
 * Anyway… I don’t know if it’s the prettiest of solutions in this case, but a simple
   check might get rid of it, and still leave working code. Like this:
 *     ```
       public function addExcerptAds( $excerpt ) {
       			$options = self::getSettings();
       			$bpAd = '';
       			$bpTI = explode('_', $options['bpAdsId']);
   
       			if (!isset($bpTI[1])) return $excerpt;
   
       			$bpId = (int)$bpTI[1];
       			$bpType = (int)$bpTI[0];
       			if(!$this->isSingle) {
       				if(empty($this->clause)) $this->clause = self::buildWhereClause();
   
       				if(!empty($options['beforePost']) && !empty($options['bpExcerpt']) && !empty($options['bpAdsId'])) {
       					$bpAd = self::buildAdObject( $bpType, $bpId, null, $options['bpUseCodes'], $this->clause);
       				}
   
       				return $bpAd.$excerpt;
       			}
       			else return $excerpt;
       		}
       ```
   
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[SAM Pro (Free Edition)] Problem in scheduling the post](https://wordpress.org/support/topic/problem-in-scheduling-the-post/)
 *  [fredriksundstrom](https://wordpress.org/support/users/fredriksundstrom/)
 * (@fredriksundstrom)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/problem-in-scheduling-the-post/page/2/#post-6835471)
 * Hi! Not sure if it’s related, but I noticed the plugin doesn’t go by the local
   time. I’m in Sweden, thus one hour ahead of UTC. When I schedule my ads, they
   go by the UTC time and not the local time I’ve set in the settings for WordPress,
   which is +1 hour.
 * Line 459 to 463 in sam-pro-front.php could be something like:
 *     ```
       // Schedule
       $schedule = '';
       if($rules['schedule']) {
           $schedule = " AND IF(sa.schedule, '" . current_time('mysql') . "' BETWEEN sa.sdate AND sa.fdate, TRUE)";
       }
       ```
   
 * Instead. Changing the MySQL function NOW() to WordPress equivalent which should
   respect the local time set, with the MySQL format. 🙂
 * Regards,
    Fredrik

Viewing 10 replies - 1 through 10 (of 10 total)