Smart Ads WordPress Plugin

Author: John Kolbert
Version: 1.2
Last Update: May 11, 2008
Compatibility: 2.3+, 2.5+, 2.6+
Description: Automatically add advertisements to the beginning and end of posts based on the post length, age of post, category, or blog member status.
WP-Extend: Official Listing at WordPress.org

Download Smart Ads Version 1.2

Downloaded 1133 times from this page

Features at a Glance
  • Show ads above and below post content automatically
  • Only show ads on single.php or page.php, not homepage
  • Limit ad visibility by post word count
  • Limit ad visibility by post age
  • Limit ad visibility by category
  • Selectively disable ads on a post-by-post basis
  • Disable top ad if post begins with an image NEW!
  • Disable all ads for registered blog members
  • Add custom ads to posts or pages by selecting to type <!-smartads-> or {smartads} (for those who use visual editors) NEW!
  • Limit custom ads to be shown on only single post view or enable them on the homepage
  • Built for WordPress 2.5!
Extended Description

Smart Ads automatically, yet intelligently inserts advertisements like Google’s Adsense above and below your post content. These advertisements are only visible when viewing a single post (single.php). Since it doesn’t make sense to fill small posts with ads, users can set a “Wordcount” minimum for their advertisements. Smart Ads will only insert advertisements into posts that meet or exceed the desired Wordcount. Do you start your posts with an image? You can chose to disable the top ad if your post has an image tag (<img...) in the first number of characters (you set the limit)! Also, to ensure that new content remains fresh, users can chose to only place ads on posts that are over a certain amount of days old. Advertisements can be manually disabled on a post-by-post basis while writing a post, for entire categories, or for registered blog members.

Users can also insert custom ads into their posts by chosing to inserting <!-smartads-> or {smartads} into their post text. You chose which method you’ll use in the “Options” area of the plugin. This allows bloggers who use their visual editors complete functinoality (some were having trouble with the HTML comment). Custom ads are not affected by the Wordcount or date minimum requirements and can toggled to be shown on the index page or only shown when in single post view.

Installation
1. Download smartads.zip and unzip it.
2. Before uploading the folder, change yourads.php.txt to yourads.php. This prevents automatic upgrades from overwriting your file in the future.
3. Next, open "yourads.php" and paste your desired advertising code into the three indicated areas. yourads.php contains three variables which house your code data: $topad, $bottomad, and $customad. Sample data is provided as an example of how to paste your code. Replace the sample data by simply highlighting it and pasting your advertising code over it. Enter your ad code into the the other two variables to match.
4. Because we’re working with PHP data, you may have to “escape” your advertising code if it contains any single quotes ( ‘ ). Escaping means simply placing a forward slash before the single quote. So if the original sentence was: “Hello, I’m “hungry” didn’t you know?” You would escape it to look like the following: “Hello, I\’m “hungry” didn\’t you know?”. If your code doesn’t contain single quotes then this isn’t necessary.
5. Upload the plugin folder containing both files to wp-content/plugins/ and activate from the Plugin administrative menu.
Upgrading

Smart Ads is now fully compatible with the WordPress 2.5 automatic upgrade feature. Your advertising code will not be overwritten. If you chose not to use the automatic upgrade feature, disable the Smart Ads plugin, upload your newly downloadedsmartads.php file to your current smartads folder, and reactivate the plugin.

Options Explained In-Depth


Smart Ads Option Page

General Options Menu

Show Custom ads on Homepage The custom ads are called by placing <!-smartads-> in your post where you want the ad to appear. This setting allows you to show these custom ads on the homepage or only on the single post view.
Custom ads notation You can chose to use one of two notations to display custom ads in your posts and pages. <!-smartads-> is recommended because if you deactivate the plugin the snippet hides itself becaue its an HTML comment (and thus not visualized by your browser). However, bloggers who use the visual editor may have some problems with WordPress removing this code. Thus you can use {smartads}, which will do the same thing but won’t degrade as nicely if you deactivate the plugin.
Minimum Post Word Count Top and Bottom and will only appear on posts that meet or exceed the number of words listed here. This is to avoid short posts being overwhelmed with advertisements. A setting of 0 disables this feature.
Only show ads on posts older then the amount of days you chose. This keeps fresh content ad free while monetizing older articles. A setting of 0 disables this feature.
Top, Bottom, and Custom Ad The code that you pasted into “yourads.php” is dispalyed here for informative purposes only.
Category Exclusions List the ID of categories that that you don’t want ads to be displayed in. Category IDs must be listed with a comma and a space inbetween them, such as: 12, 3, 15, 1, etc. This does not affect custom ad visibility.
Disable Ads For Registered Members If selected, all ads will be disabled for readers who are logged into your blog. This includes the admin and all subscribers.
Hide per post options box Ads can be disabled on a per-post basis. However, some users have said they would like to hide this options box in the write-post screen entirely. This does just that without affecting any of your posts options (posts with ads disabled will still have them disabled).


FAQs

Why don’t some of my Adsense ads showup?

Google Adsense plolicy states that a maximum of three ad units may be placed on a single page. Make sure you don’t exceed this. If this isn’t your problem, make sure you have correctly pasted your adsense code into “yourads.php”.

How can I format the CSS around my ads (such as padding, margin, etc)?

Formatting the space above and below your ads is very simple. Open yourads.php and simply surround your advertising code with the html you want. You can add <div> tags and format them with CSS. The styling will apply to all ads of that type.

I want to place a large square ad at the beginning of every post, but the post content doesn’t wrap around the ad. How can I fix this?

This problem can be fixed with a little CSS tweaking. As in the question above, open yourads.php and surround your $topad code with the following CSS styling:

Code:

1
2
3
<div style="display: block; float: left; margin: 0px 10px 0px 0px;"> 
Your Ad Code Here
</div>

How do I insert my own ad code?

To insert your own ad code open yourads.php in a text editor, such as notepad, or code editor. In this file are three variable names “$topad”, “$bottomad”, and “$customad”. Each represents the top, bottom, and custom ads that will be inserted into your posts. Your code should be copied so it looks like the code below:

Code:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//This advertisement will appear above your post content. You can surround it by any HTML you like (as shown).
$topad = '
<div style="display:block;float:left;margin: 0px 10px 0px 0px;">   
<script type="text/javascript"><!--
google_ad_client = "pub-xxxxxx";
/* 250x250, created 4/9/08 */
google_ad_slot = "xxxxxx";
google_ad_width = 250;
google_ad_height = 250;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>
'; //leave this line

How do I disable the advertisements just for the post I’m writing?

When writing or editing your post an options box will be visible below the post editing box with a checkbox that, if checked, will disable ads for that post only. This option only affects the automatic insertion of top and bottom ads. Custom ads will still appear if you include their tag.

Version History
  • Version 1.2: released on May 11, 2008
  • added ability to hide top ad if post begins with an image, added an aditional custom ad notation, revamped the “write post” options box and provided a way of hiding it
  • Version 1.1.2: released on April 16, 2008
  • fixed critical error with Smart Ads interfering with RSS content
  • Version 1.1.1: released on April 15, 2008
  • added ability to disable ads for all registered users
  • added ability to exclude ads for entire categories
  • Version 1.0.1: primary release on April 10, 2008
Copyright & Disclaimer

Copyright © 2008 by John Kolbert (aka Simply-Basic.com)

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the “Software”), to deal in
the Software without restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Acknowledgements

Thank you to all those who have submitted feedback and helped improve the Smart Ads Plugin. A special thanks goes out to Michael for sending many of the feature requests that helped make Smart Ads..well, smart!


102 Responses to “Smart Ads WordPress Plugin”

  1. Love this simple, yet highly useful plugin! And I already have a wishlist for future development. Here is my list:

    * Disable Ads entirely when registered users view this website.
    * List of categories on which not to show ads (eg. Asides)

    That’s it. Otherwise everything is fine for me ;-)

    Michael’s last blog post..Marsedit, Markdown und Wordpress


  2. Me again: If you do not enter code for one of the plugins, WP adds a BR-tag instead… Another thing to future development.

    Michael’s last blog post..Marsedit, Markdown und Wordpress


  3. Oh, there is something more: I am using a plugin that surrounds the written text with the google_adsection_start and -end tags. This is ignored by the smartads-plugin.

    To my first comment: I just checked whether there is a br-tag inserted, IF there is an ad shown and… yes, there is! Can you somehow make this BR-tag disappear?

    Michael’s last blog post..Marsedit, Markdown und Wordpress


  4. @Michael I’m glad you like the plugin! As far as your wish list those sound like excellent things to add. Let me just clarify a few things.

    You want a <br /> tag added if you don’t add code data to one of the variables? May I ask why? If no data is entered the plugin is set to display the content as you originally entered it.

    You say the plugin ignores the google_adsection_start or _end tags. If I’m not mistaken aren’t those tags used to target the adds to be more relevant, not for actual placement of the ads? I could easily add placement control tags so you could determine where the opening and closing ads would be placed if you wanted them somewhere other then before and after the content.

    As for disabling for registered users and category exclusions, those are great ideas! I’ll look into implementing those into the next release.

    That br tag you are talking about is actually hard-coded into the plugin. I’m planning on removing it from the next release since you can control the CSS of the ads yourself. If you want to manually edit it out yourself, open smartads.php and edit line 214 (approx.) by removing the "<br />" .

    Thanks for the suggestions!


  5. Woops, and there goes the answers:

    (First thing: Can’t you put the comment preview below the actual comment-textbox? This is somehow annoying: If you paste a bunch of text, it jumps around all the time and I have to scroll up and down to see your comment…)

    > You want a tag added if you don’t add code data to one of the variables? May I ask why? If no data is entered the plugin is set to display the content as you originally entered it.

    No, no, no. It’s the br-tag that I don’t want! (With “another thing to future development I mean to remove this br!)

    > You say the plugin ignores the google_adsection_start or _end tags. If I’m not mistaken aren’t those tags used to target the adds to be more relevant, not for actual placement of the ads? I could easily add placement control tags so you could determine where the opening and closing ads would be placed if you wanted them somewhere other then before and after the content.

    Sure, my mistake!

    > As for disabling for registered users and category exclusions, those are great ideas! I’ll look into implementing those into the next release.

    Great!

    > That br tag you are talking about is actually hard-coded into the plugin. I’m planning on removing it from the next release since you can control the CSS of the ads yourself. If you want to manually edit it out yourself, open smartads.php and edit line 214 (approx.) by removing the “”

    It was exactly 214. And it is gone now! (Why did you actually put it inside?)

    Michael’s last blog post..Marsedit, Markdown und Wordpress


  6. Version 1.1.1 was just released adding a few new features.


  7. How does this plugin compare to the Adman plugin that sounds exactly the same?

    Ken Savage’s last blog post..Good Times at Tonights Celtics Game


  8. @Ken Savage Great question! I’ve actually never heard of Adman before, so thanks for pointing it out. It looks like a good plugin. The basis for the two plugins, like many Adsense-enhancing plugins, is just to make ad placement automated. These two plugins both ad ads to the beginning and end of a post and let you insert your custom ad wherever you want.

    So what’s the difference? The difference here is in the bells and whistles. Aside from simply disabling ads on a per post basis, Adman doesn’t have any configurations while Smart Ads comes loaded with quite a few. Just check the “Features at a Glance” section at the top of the page. With Smart Ads you can precicely control which posts actually get ads on them rather then blind placement on every post (such as Wordcount, post date, category, logged in users, etc).

    AdMan also uses some deprecated WordPress code that could use some updating. I wrote Smart Ads on and for WordPress 2.5. This plugin was actually written for my own use because I didn’t see any plugins that gave me the control I needed. After a while I decided to release it to the public. Thanks for pointing out the similarity!


  9. thx John for replaying so quick. I’m downloading now and I’ll check it out. If it lives up to what I’ve heard so far I’ll do a review on my site.

    thx again

    Ken Savage’s last blog post..An Easy Way To Improve Your Online Reputation


  10. @Ken Savage I hope you enjoy the plugin! Let me know if you have any improvement suggestions (bug fixes, feature wish-list, whatever).


  11. Just so everyone knows, if you have any feature requests feel free to leave them in the comments here. I’ve added several features as a direct result of user comments and emails.

    In the next version of smart ads look for the ability to disable the top ad automatically if the post has an image in the first xx characters (you an set the limit). Also the per-post options box has been redesigned to take up less real estate and can be shown/hidden based on user preference. I’m going to hold off releasing it for three or four weeks so I don’t keep flooding everyone with new versions. So if you’ve got a feature you’d like to see, now’s the time to let me know!


  12. Great plugins. Good developments. Many thanks to John Kolbert. My wishlist is how about ad from others ads, like adbrite, text-link-ads.

    I think you very smart for answer and building others ads plugin.

    Great Jobs John Kolbert. Thanks for all


  13. Hey syarifudin, I don’t see your problem: Since you insert whatever code you want to have in “yourads.php”, you can use adsense, adbrite, tla, whatever…

    Michael’s last blog post..Cut the crap!


  14. Hey Michael. thanks. I would report bug for you later.


  15. @ari syarifudin Michael is correct, you can use this plugin with any ad system you want. You just need to paste your code into “yourads.php”. I just use Adsense as an example because it’s one of the most popular. Just make sure you “escape” your ad code with forward slashes as explained above in “Installation”.


  16. thanks for this plug-in… i couldn’t figure it out first… it wouldn’t post any ad… i thought i tried everything until i filled in all the boxes on the options page :)


  17. This is fantastic. Have you ever considered looking at more WPMU compatability? It would require creating the ability for the blog admin to edit his ads from the dashboard rather than editing the source code of a file.

    For now though, I can still use this under MU for the main admin blog, this is great!


  18. @Radio: I’m glad you enjoy the plugin! I’ve not worked with WPMU much, but I’ll look into it and see what I can come up with for the next release.


  19. Hi…

    Before I implement this plugin, I just had one question…

    Can one put ads just at the bottom of the post with this plugin or is it hard-coded to be below AND above the single posts - period? Thanx…

    The GTLs last blog post..Washington Post: Pentagon Has Successfully, Intentionally, De-Emphasized The Passing Of Our War Heros


  20. Hey, GTL! You can define everything. It is not hard-coded.


  21. @The GTL: Right, if you don’t want ads to show up before your post ever, just don’t enter your advertising code in yourads.php for $topad.


  22. Awesome, guys… thanks. I’ll give it a whirl because I tried that other one and I’m not completely impressed with it. Thanx again :-)


  23. I would like the ads to show at a specific location, is there a php code that I can manually embed, or a place where I can specify exactly where “bottom” is?

    Thank you! :D


  24. @noobcook: Currently there isn’t a way to manually define where the “top” or “bottom” of a post is, though this would be an interesting feature. I’ve thought about making it so Smart Ads will place ads at the top and bottom of an article unless for that post you manually tell it to place them else where, in which case it would place the ads in you post where you tell it to. Would that be what you are looking for?


  25. Hi i have tried it in my blog, it works fine with google adsense, but with custom ads some problem; in the editor (html mode, not visual) when i write:

    <!-smartads->

    when i save it, it automatically reformat it as:

    so it put a space between < and !
    so when i browse the article it doesnt show my code specified in yourads.php but just the

    Where im wrong?
    thanks,
    Simone Italy

    Simones last blog post..Un esempio pratico di uso applicazioni web opensource


  26. Do you have the visual editor enabled at all (you switch back and forth between visual and HTML views) or is it disabled entirely? I disable mine entirely. What happens is WordPress reformats any HTML it doesn’t like when the Visual editor is enabled as you switch between the two views. The HTML used to trigger the custom ad code is technically an HTML comment: it’s not interpreted by the browser nor displayed on the screen, only in the source of the file. It is designed this way so that if you disable the plugin you don’t have to go back through old posts and remove the code.

    In the next release of the plugin (in the next week) it will see about possibly introducing another way to include the custom code, for instance I could make it so [smartads] calls the custom code as does <!-smartads->. That means people who need the visual editor could use it, but if they ever got rid of the plugin you would have to go through every post and delete it.


  27. Is it possible to have the text wrap around the ad at the top of the posting?


  28. Yes, it can be done via CSS styling. Just place the style code around your ad in yourads.php. Such as:

    <div style="display: block; float: left; margin: 0px 10px 0px 0px;"> 
    Your Ad Code Here
    </div>
    


  29. Thanks John. That is the css code that I am using but the text only flows down the right side and along the bottom as you can see if you visit http://www.ricward.com..

    I was trying to get the code flowing from above as well.

    Richards last blog post..The Brain That Changes Itself


  30. Oh, I forgot to say that your code is very sweet…so easy to implement! Thank you so much!

    Richards last blog post..The Brain That Changes Itself


  31. @Richard: Sorry, looks like I mis-read your question. Off the top of my head I don’t think that you can get the text to wrap around the top of the ad (for the top ad, at least). The plugin appends your advertising code so that it appears before your post text. So I don’t know that you could get text to flow on top of the ad. If you want less space between your ad and the post title you could try giving it a negative top margin, such as margin-top: -10px;

    If you are talking about the custom ad you just need to mess with the CSS styling (margin and padding) until you get it to look the way you want. Sorry, hope that helps!


  32. Hello John,

    it works like a charm!

    Thanks so much ;-)

    all the best

    Gianni

    gidibaos last blog post..Exec-PHP in italiano


  33. Hi John, some features for the next release if i could suggest:

    yourads.php directly directed on admin interface
    automatic advertising after x posts in the loop (so not only advertising on single pages)

    Thanks, Simone Italy

    Simones last blog post..Trackmania Nations Forever: gioco di auto free!


  34. well if i could suggest another good next feature, to have multiple custom ads indentified by an ID, so then when wrinting it on posts, it will be: {smartads=1} {smartads=2} etc…

    Simones last blog post..Nasce StreamingCountry


  35. @Simone: Those are all excellent ideas. I’ll see what I can do for a future release. Thanks for taking time to comment!


  36. Is it possible to insert and have ads show up in footer.php. Thus far I’ve not been able to get this to work. Do the have to be in a post box?


  37. @John: No, sorry. Smart Ads is only for inserting ads into post or page content (via the post box). Sorry!


  38. Nice plugin. had it working fine - but it somehow stoped showing the ads in my posts? Rather strangely the still show in pagess with the custom tag - I tested that in the posts but just see the tag.Any ideas John? Thanks.


  39. Hmm, so only custom ads are showing in your posts? Does the bottom ad still show? Check the word count, category exclude, and age of post settings in the options menu and make sure you dont’ have those set to exclude ads from where you want it. If that doesn’t work let me know and I’ll dig into it more.


  40. Hello John,

    I have a question. With PHP v4.4.4 the plugin works fine. I’ve upgraded to PHP v5.2.2 and it stopped to display any ads!!!
    Anyway, I’ve downgraded the PHP to 4.4.4 (for testing) and Smart Ads works again.

    Any tip?

    Thanks in advance

    Gianni Diurno

    gidibaos last blog post..Gravatar for You: Zodiac Package


  41. @gidibao: Hmm, that’s very interesting. I’m nearly postitive I’m using 5.2.2 on my development server. Let me look into it further and I’ll get back to you.

    John Kolberts last blog post..Email Protect RC1 WordPress Plugin


  42. not showing at all :(

    egis last blog post..Zeke & the popo


  43. @gidibao: On my development server I use PHP 5.2.5 and Apache version 2.2.8. I downloaded PHP 5.2.2 and used it without any problems. Looking over the code there shouldn’t be any reason why there should be compatability issues between PHP 4 and 5 (though I didn’t want to downgrade my Apache version to test 4.4.4). Are you sure all your settings are enetered correctly in the Options menu? Is Smart Ads the only issue you noticed when switching PHP versions?

    @egi: Nothing worked? Did you fill out any settings in the options menu? Did you convert yourads.php.txt into yourads.php and fill it with your advertising code?


  44. it showed up now..
    i think i’ve madde a mistake on the option page…
    Thank you for your great plugin John

    egis last blog post..Zeke & the popo


  45. John - thanks for your kind reply. The Smart Ads settings are correct. I think it could be a problem of mine. I will check my server settings and any other issue through the weekend.

    Thanks again

    All the best

    Gianni

    gidibaos last blog post..Gravatar for You: Zodiac Package


  46. where’s options page?

    I tried everyting, but I still failed to find it!


  47. @hyperlook: in WP 2.5 it’s under “Settings”->”Smart Ads”. In WP 2.3 it’s under “Options”->”Smart Ads”.

    What version are you using?


  48. the version is wordpress 2.51


  49. under “Settings”, there are lot’s of other plugin’s options but none is for Smart Ads!


  50. Thanks a lot for ur email!

    It help me find the reason - maybe “smart ads” is conflict with another plugin “SEO Smart Links “,and after i disabled the latter ,it’s options come out!


  51. Thank you for great job. it is nice plug-in.


  52. Классно, штука полезная!


  53. Hi John, i have encountered the same problem of Gidibao with the hosting of my wp blog, with php v4.4.4-8+etch6 the ads are showing, with php v5.2.0-8+etch11 they dont appear… the settings of smart-ads i see are ok on wp admin


  54. Simone:
    Hmm, I’m afraid I’m at a loss as to why this would be. The two of you are the only one’s who have had an issue. I’ve test all my plugins on PHP 5.2.6 and legacy PHP 4 versions without any problems. I’ve not been able to reproduce the issue you’re having here. Any other servers or local servers you could try it on and see if you get it to work there?


  55. I’m having the same problem — ads are simply not showing. PHP v5.2.2 and Apache 2.2.(newest). SmartAds is activated and shows options correctly. Strange.


  56. Correction: the ads ARE showing but for Firefox and not Safari!


  57. does it work with wordpress MU?


  58. Morgan:

    I’ve not tested it with MU. Since it requires manual editing of a plugin file, most likely not.


  59. I have a problem with placing ad in the center of the post. It is always on the left. So if there is a solution can someone please help me.


  60. Hi john,

    I installed this plug in,but I have problem.
    I put in post(html) when I write,but don’t appear any adsense.
    and i see post again ,automatically changed tag like why?
    I dont know what wrong -__-


  61. I put in post(html) when I write,but don’t appear any adsense.

    and i see post again ,automatically changed tag like why?


  62. Yae

    Contact me through my contact form and lets see if we can get your problem straightend out. I don’t understand the issue from your comment text.


  63. hi

    first 7 post ads shown but after that no ads in post ?


  64. I too have problems with ads not showing, with or without custom ad inserted in post. I believe my option settings are correct so I don’t know why it doesn’t work.

    I’m using WP 2.6.2, on PHP v5.2.6 and Apache 2.2.9.


  65. John Kolbert : 1st i want to thank you for this amazing plugin ! .
    i want to second recquest a feature that have been asked by comment number 23 ! and u replayed in number 24 exactly as it would be ! an alternative to that feature would be the multiple custom adds .

    Thanks in advance


  66. Is it possible to display the ads not directly below the post but below the comments of a post?


  67. @amapur:
    Without hacking the plugin it’s not possible. It’s currently set to append the bottom ad directly below the post content.


  68. @fadi saaaida:
    Thanks for the suggestion! I’ll look into getting it into a future version, though no promises on when that will be.


  69. Hello John,

    This is an incredible Plugin and thanks for sharing with us. I am wondering if it is possible to rotate Ads?

    I use Ad Rotator plugin which changes Ads after every page refresh. I think it works great since regular vistiors get immune to same Ads, rotating them regularly keeps the page looking fresh as well.

    I understand that may be fair bit of work to include such functionality. So I wonder if we somehow incorporate the two plugins together. The Ad Rotator plugin requires a php function to be called where you want to place ads “”. adr480×60 is simply a text file where each line is a different Ad image and link. getad() randomly pulls one line from the text file and display it where you have “php echo getad()” line inserted. I am wondering if somehow when we insert “”, it pulls getad() function which in turn pulls the random Ad. I am not good at programming so please don’t laugh if it all sounds completely stupid.

    Looking forward to your comments.

    Regards
    FP
    P.S. Think about placing a “Donate” link somewhere, I am sure lot of people would like to donate after they use your plugin to make money. In the meantime I’ve already clicked on your Google Ads few times :)


  70. @FP: Thanks for the comments. Looks like some of the code you tried to enter got truncated. I’ll send you an email and see if we can get things worked out.


  71. Hi John,

    Seems like WP has truncated the PHP code in my previous comment. The code looks like this
    “php echo getad(’adr468×60′)”.

    Cheers
    FP


  72. FP: Let’s try this. Open ‘yourads.php’. Normally you would paste your advertising code for $topad, $bottomad, and $custad here, which would be, for instance, your Adsense code. Instead, try pasting the function for the Ad rotator plugin for either of those. Remember to remove the quotes that are already there (no quotes surrounding the function name, it should look just like below).

    So it would end up looking like this:

     $topad = getad('adr468×60'); 

    See if that does anything for you.


  73. Hi John,

    Thanks for your quick reply. I tried adding the suggested code for CustomAd the following way but it stopped displaying any Ads.

    
    //This is the custom advertisement that you can add anywhere you like by placing <!-smartads-> into your post. Surround it by any HTML you like.
    $customad = getad('adr468×60');
    ?>
    

    Please let me know if I did any mistake in following your instructions.

    Regards
    FP


  74. @FP: I’ll look into it more, but I won’t have time for a day or two. I’ll let you know what I an find. Be sure to comment if I don’t get back to you.


  75. Hi John,

    I decided to go for this very nice plugin on my latest WP blog and all was fine until I made post number 4 - for some reason no ads will display. I had initially made the post through Live Writer so I deleted it and posted through my WP admin editor but still no dice.

    I am using the latest WP Version, PHP 5.2 and Apache 2.2.10 (Unix). Any suggestions would be greatly appreciated.

    Maurice


  76. @Maurice: Let’s try a few things. Try creating a new post. When you preview it, do the ads show up? Double check that your not posting to a category that you’ve excluded from receiving ads in the options menu. Also, by latest version of WP, is that 2.6 or 2.7 beta 3? I’m hoping to have time over the holiday weekend to get the plugin fully tested in 2.7


  77. Hi John,

    Thanks for very quick response.

    Wrote a quick post and previewed - ads do not show up. I have no category, word count, image placement exclusions in place. I am using only top and bottom ads - no custom ads. (Box is not checked to exclude ads from the post in my editor) . If you view my latest post you’ll see no ads - but view the first three and you will.

    Apologies - latest version of WP 2.6

    Maurice


  78. SmartAds has recently stopped working for me. Several plugins have been upgraded recently but I haven’t been able to narrow it down to which one is affecting smartads.

    I also recently upgraded to php5. could this be the problem?


  79. @rick powell: I was using PHP 5 when writing Smart Ads, so that shouldn’t be the problem. What version of WordPress are you using? I’ve got an upgrade to Smart Ads coming down the pipeline (when ever I can catch a break in my busy schedule) to make it fully compatible with WP 2.7 (though my preliminary testing showed no major problems).


  80. I’m still using 2.6.3. Saw no reason to upgrade until 2.7


  81. Ads have stopped showing on version 2.6.5
    I’ve tried everything but there’s some problem with the plugin.


  82. @Prateek Thapar: Looking into it, hopefully I’ll find the problem by this evening


  1. 20 Trackback(s)

  2. The Best Blogging Software (WordPress) + The Top 60 WordPress Plugins | Midas Oracle .ORG
  3. SmartAds: Adsense ads WordPress Plugin » D' Technology Weblog: Technology, Blogging, Tips, Tricks, Computer, Hardware, Software, Tutorials, Internet, Web, Gadgets, Fashion, LifeStyle, Entertainment, News and more by Deepak Gupta.
  4. Smart Ads: Publicidad Inteligente | Frank Pereiro
  5. Wordpress Son Çıkan Eklentiler |
  6. Smart Ads WordPress Plugin
  7. Neues Design | The Blog that never sleeps
  8. Eingesetzte Wordpress Plugins | FortyTwo
  9. 40+ Wordpress广告插件 | 帕兰映像
  10. 洛克的彩色天空 » Blog Archive » Wordpress广告插件
  11. Wordpress广告插件合集 | 笑傲人生
  12. 8 Google AdSense Plugins for WordPress 2.5 and Above
  13. Adsense Plugins for Wordpress 2.5 and Above | Technology World
  14. 8 plugins de Google Adsense para Wordpress | frogx.three
  15. Jason’s Blog » Blog Archive » Wordpress广告插件合集
  16. Smart Ads WordPress Plugin - WP Plugin Archive
  17. Trendalizer Blog » Smart Ads WordPress Plugin
  18. 5 melhores plugins de Wordpress Adsense - Plugin de Blogs para ganhar dinheiro com Adsense
  19. Plugin til WP som setter inn tekst/kode - Webforumet.no - Webmaster forum
  20. Poste TD Bannere inn i WP innlegg - Webforumet.no - Webmaster forum
  21. Top Google Adsense Wordpress Plugins(Pt. 2) : Make Money Online

Post a Comment

Please read the comment policy before commenting.