Forum Replies Created

Viewing 15 replies - 136 through 150 (of 194 total)
  • Plugin Author reviewmylife

    (@reviewmylife)

    Hi seanster,

    Whenever you click save, Ad Injection will write the ad data to both the database and to those text files.

    However it will only read from the text files if the plugin is running in ‘mfunc’ mode.

    If the plugin is running in ‘direct’ mode the ads will be read from the database.

    I suspect (but have never tried) that if you install Ad Injection on each site and use ‘direct’ mode it will work. However if you use ‘mfunc’ mode each save will overwrite the previously setup ad files – therefore the correct ads will appear in the Ad Injection UI, but the wrong ones could be displayed on the site. This is just a guess – I’ve not tried it.

    Part of the fix to allow Ad Injection to work on multisite (when installed on each blog individually) would be to separate out the ad-injection-data directories so each blog has a separate store.

    I’ve no idea what would be needed to make it work as a network installed plugin.

    I’m pretty sure I won’t have time to look at making Ad Injection multisite compatible this year. I think it will be way into next year before I get round to this. I’ll let you know if I have something you can test! Thanks.

    Plugin Author reviewmylife

    (@reviewmylife)

    Hi Niels_Thimmer, glad you managed to solve the problem ??

    Plugin Author reviewmylife

    (@reviewmylife)

    Hi krackers87, thanks for the update. Do let me know what you find out. Cheers.

    Plugin Author reviewmylife

    (@reviewmylife)

    Hi krackers87, I have never tested Ad Injection on WordPress multi-site. I may get around to this next year. So for now multi-site isn’t supported by the plugin, but parts of the plugin may work if you’re lucky ??

    Have you installed Ad Injection as a network plugin, or as site specific plugins?

    If settings from one blog are affecting the other blog, then they must both be loading their widget settings from the same place. If this is a problem and you can’t find a work-around then all I can suggest is to stop using Ad Injection for widgets for now.

    If you do find out anything else please update this thread. The information could be useful for others, and I may be able to add it to the FAQ.

    Thanks.

    Plugin Author reviewmylife

    (@reviewmylife)

    Hi chintu74, I would guess it should work on WordPress 2.9.2, but I have only tested it on 3.2. Do let me know if it works for you!

    Plugin Author reviewmylife

    (@reviewmylife)

    Hi chintu74, I’ve extended my code to do what you want. If for example the category nicename is ‘liverpool’ the code will find all the text files in the ad directory with ‘liverpool’ in the file name, and will then randomly select one. It doesn’t matter what naming convention you use for the ad files – as long as the nicename is in there. You can find the example code on advancedhtml – it is the second example.

    Plugin Author reviewmylife

    (@reviewmylife)

    Hi chinty74, Just to summarise for other readers: you want to show a different advert above the post title, based on the post category. This isn’t supported by the Ad Injection UI, but Ad Injection allows PHP in its ad boxes. I have provided an example of loading ads based on categories, but you now want to extend it to randomly choose from a pool of ads for each category.

    Yes you would need to modify your template to do this – you can use an Ad Injection template ad tag above your post title to do this. Ad Injection will generate an example template ad tag for you (with the correct path) – look in the ‘test ads and template ad examples’ at the bottom of the main UI.

    The problem with one text file for each rotated ad in each category is that your PHP code has to know how many ads there are. Here’s some options:
    1. You could hard code the number of ads for each category into the PHP, but then the code would need updating if you changed the number of ads.
    2. The PHP code could count the number of ads with the name [category][number].txt assuming that all numbers are sequential and start from 1 – this would be more flexible.

    If you did store the ads in individual text files I’s suggest you put a number after *each* ad so travel1.txt, travel2.txt etc. If you called the first one travel.txt with no number then the names would be inconsistent.

    In your PHP code you could then generate a random number between 1 and the number of ads you have, and append this to the name of the ad file which the PHP is loading.

    If you know a bit of PHP this shouldn’t be too hard. If you come up with a solution do share it!

    I might have a go at this myself in the next week. If I come up with a solution I’ll post it here and in the FAQ.

    Plugin Author reviewmylife

    (@reviewmylife)

    Hi krackers87 – thanks for sharing your solution!

    Plugin Author reviewmylife

    (@reviewmylife)

    Hi krackers87,

    As well as doing extra rotation using JavaScript you can include PHP in the ad boxes – this will allow you to do extra rotation of dynamic adverts like AdSense.

    Until I make the change to allow an arbitrary number of adverts you have these 3 options:

    1. Use PHP / JavaScript in the ad boxes to handle the rotation of the extra ads.
    2. Use an ad service such as OpenX or Google Ad Manager in conjunction with Ad Injection. Ad Injection can handle the ad placement, and the ad service can manage your ad pool.
    3. Hack Ad Injection to increase the limit (but be aware that if you upgrade your changes will be overwritten).

    I’d recommend 1 or 2.

    I think that I’ll have to wait to 2012 until I get around to properly removing the 10 ad restriction.

    Hi wampdog29, Ad Injection does not insert any layout altering tags into the widget area (e.g. divs) – unless you set the alignment options. Any such tags are inserted by the WordPress widget code – and will be the same for all widgets.

    All Ad Injection does is to insert the code you have put into the box into the widget area that WordPress has set up for it.

    If an ad you’ve inserted using it affects the layout I believe this will just be because of the size of the item you are inserting into the widget area.

    I tried moving your footer into the content-wrapper div, and that fixed the layout of the page you linked (before I said page-wrapper – maybe I should have said content-wrapper).

    I guess the best fix would be to alter your theme to make it less fragile to content that goes in the sidebar.

    Plugin Author reviewmylife

    (@reviewmylife)

    Hi Steve, That is a really good idea – I like it.

    As you put the same question here and on my blog I’ve put the answer here – https://www.reviewmylife.co.uk/blog/2010/12/06/ad-injection-plugin-wordpress/#comment-5794

    If you have any further comments on this feature please let me know.

    Hi wampdog29, Firebug is a good debugging tool for cases like this. I don’t think this is anything to do with Ad Injection, it is your theme.

    On your front page the footer-widgets div is inside the page-wrapper div. On your linked page above it isn’t. Therefore on your linked page the footer floats to the very left, instead of to the left of the page-wrapper.

    Hope this helps.

    Plugin Author reviewmylife

    (@reviewmylife)

    Hi thismoment, yes you can do this.

    You can add the post ids to the ‘filters’ section near the bottom of the main UI.

    Or if you prefer you can use tags, categories, in page tags, or custom fields to block individual posts or groups of posts.

    You have lots of options for doing this!

    Plugin Author reviewmylife

    (@reviewmylife)

    Hi chintu74,

    If you need 2-3 different ads rotated per category then you don’t need more then 10 categories, what you need is more than 10 widgets.

    If you want to restrict the ads to a specific category then you’ll need a separate widget for each restriction you want to set up.

    You can create as many widgets as you like.

    Example Problem: you have 12 categories, and you want each category to have 3 different ads specific to that category.

    Example Solution: create 12 widgets, and put your 3 ads in each widget. Set the category restriction for each widget to only show on the correct category.

    Hope this helps.

    p.s. I do have it as a long term goal to remove the 10 ads restriction, and allow any number of ads, but in your case it sounds to me like this wouldn’t help you as you want a small number of different ads for each category.

    Plugin Author reviewmylife

    (@reviewmylife)

    Hi A2JC4life, do the errors go away when you disable Ad Injection?

    If so I don’t believe it is anything specifically related to Ad Injection, just that this is the one extra plugin that pushed your blog’s memory requirements beyond what you have.

    You could try disabling / uninstalling some other plugins to reduce memory usage and see if that helps.

Viewing 15 replies - 136 through 150 (of 194 total)