Purchase OIOpublisher now for just $47.

Take control of your ad space.

Click here to purchase

    • CommentAuthorclive
    • CommentTimeJul 25th 2009
     

    Hi all, I am just wondering where exactly the line of code needs to be placed. I am trying to get ads showing on an SMF forum... Has anyone done this with OIO yet?

    Thanks for any advice

    Clive

    (1) PHP Integration Code:
    If you want to integrate OIOpublisher into an existing website, you'll need to add a line of php code to your site. You'll then be able to use the php output functions to show ads (otherwise, you'll need to use javascript)

    Need help?  Quick start guide | Troubleshooting | All help topics
    • CommentAuthorclive
    • CommentTimeJul 25th 2009
     

    Hi,

    I realised that I had to take the php tags out in order to place the third party site code into the index.template.php of my smf install... So the code looks like this and I put it right at the bottom of the index,template.php
    include_once('/home/XXXXXX/public_html/adverts/index.php');

    This gives me the error message below when going to main domain even though all the needed Setup requirements are correct

    * Open the OIOpublisher 'config.php' file in the '' directory, and fill in the database connection info where indicated
    * Open the OIOpublisher 'config.php' file in the '' directory, and fill in the plugin_url variable where indicated

    So I changed the php code to..
    //OIO publisher
    include_once('http://www.mysite.com/theioidirectory');

    And that took away the errors but i still have an error message where the banners should be displayed which I think could be something to do with the smfads extension

    Any ideas?

    Need help?  Quick start guide | Troubleshooting | All help topics
    • CommentAuthorSimon
    • CommentTimeJul 25th 2009 edited
     
    Project Admin

    Just to be sure, you've got OIO installed correctly in standalone mode and are now on the integration part of things?

    Before getting into the problems with adding the php code itself, the first question I have is does SMFads accept php code? When you asked the initial question about SMF, I assumed you might go for the javascript option (since it doesn't need any integration, other than putting the line of javascript code into SMFads, just as you would with google ads etc).

    If SMFads can accept php code, and you'd like to continue with php integration, then I can help you work through that process. The first thing I would have thought (without installing SMF myself) is that you shouldn't add the OIO php code to a template file.

    Instead, you could try putting it at the bottom of the Settings.php file, or even adding it to the SMFads mod somewhere (at the top of the main file that's loaded when SMF loads, for example).

    Need help?  Quick start guide | Troubleshooting | All help topics
    • CommentAuthorclive
    • CommentTimeJul 26th 2009
     

    Hi, thanks for your answer... (I have mailed you seperately via the contact form..)

    SMFads works with html and php... These are the only available selections and it doesn't use javascript...

    I have put the oio php code into the index.php file and at first got the error mentioned above but got rid of that when I removed the php tags... As far as i can see the issue I have now is with the smfads and not oio... Maybe I should try to see if the ads will show by pasting the code into the template area as a test...

    Of course I am new to oio so i may have configered things wrongly at this end too :)

    Need help?  Quick start guide | Troubleshooting | All help topics
    • CommentAuthorSimon
    • CommentTimeJul 26th 2009 edited
     
    Project Admin

    If SMFads accepts html, it will run the javascript output (since it's delivered via the <script> html tag). I'd recommend pasting the javascript output for an OIO ad zone into SMFads and seeing if the zone shows up as expected. That will at least tell you whether OIO is setup correctly and is executing correctly via SMFads.

    As you also mentioned, you could (and probably should) try pasting the php output directly into the forum templates to see if that works (I'd be surprised if it didn't). It may even be an easier way to do it than going through SMFads (although SMFads may do things that make life easier that I'm not aware of).

    Once it's working correctly, we can look at whether any other (SMF specific) integration would be useful.

    Need help?  Quick start guide | Troubleshooting | All help topics