Hi, small update here.
I was able to locate the code to filter out posts from the list of post/pages where to show the ad.
Changed line 541 in admin.class.php
From:
FIND_IN_SET($postTable.post_type, 'post, page"$custs"')
To:
FIND_IN_SET($postTable.post_type, 'page')
But this “Show ad only in certain posts/pages” option doesn’t seem to work. I’m getting ae load of error messages from the SAM log.
Type:
Output Error
Error Message:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ”, wp_sam_ads.view_authors), TRUE) AND IF(wp_sam_ads.view_type < 2 AND wp_sa’ at line 18
Error SQL:
SELECT
wp_sam_places.id,
wp_sam_places.name,
wp_sam_places.description,
wp_sam_places.code_before,
wp_sam_places.code_after,
wp_sam_places.place_size,
wp_sam_places.place_custom_width,
wp_sam_places.place_custom_height,
wp_sam_places.patch_img,
wp_sam_places.patch_link,
wp_sam_places.patch_code,
wp_sam_places.patch_adserver,
wp_sam_places.patch_dfp,
wp_sam_places.patch_source,
wp_sam_places.trash,
(SELECT COUNT(*) FROM wp_sam_ads WHERE wp_sam_ads.pid = wp_sam_places.id AND wp_sam_ads.trash IS FALSE) AS ad_count,
(SELECT COUNT(*) FROM wp_sam_ads WHERE wp_sam_ads.pid = wp_sam_places.id AND wp_sam_ads.trash IS FALSE AND (IF(wp_sam_ads.ad_users = 0, TRUE, (wp_sam_ads.ad_users_unreg = 1))) AND ((wp_sam_ads.view_type = 1) OR (wp_sam_ads.view_type = 0 AND (wp_sam_ads.view_pages+0 & 2176))) AND (wp_sam_ads.ad_cats = 0) AND IF(wp_sam_ads.view_type < 2 AND wp_sam_ads.ad_authors = 1 AND IF(wp_sam_ads.view_type = 0, wp_sam_ads.view_pages+0 & 2176, TRUE), FIND_IN_SET
All help is appreciated, I really need this feature to work.
Best regards,
Andri