Purchase OIOpublisher now for just $47.

Take control of your ad space.

Click here to purchase

    • CommentAuthorFour20
    • CommentTimeOct 31st 2008
     

    I have the ability to run php code in my installation of wordpress. When visitors go to purchase an ad the purchase page doesn't match the wordpress theme and makes them think they clicked the wrong link.

    I tried using the php 'include' command to insert the purchase file in a custom wordpress page. . .but that gave me an error. I then tried to copy the code from the purchase.php page, and paste it into a custom wordpress page, but again I got the same error.

    If anyone could help me I would greatly appreciate it.

    Thanks,
    Doug

    • CommentAuthorSimon
    • CommentTimeOct 31st 2008
     
    Project Admin

    Have you tried the opposite approach - editing the OIO header / footer template files with the WP theme html?

    • CommentAuthorFour20
    • CommentTimeNov 1st 2008
     

    Hey Simon,
    No I have not. . .I am not that familiar with Wordpress to know exactly how to do this.

    • CommentAuthorFour20
    • CommentTimeNov 1st 2008
     

    Do you have a documentation on how this can be done?

    • CommentAuthorSimon
    • CommentTimeNov 1st 2008 edited
     
    Project Admin

    It's not something I can provide any meaningful documentation for, as it only really involves inserting html into the OIO template files.

    The OIO template structure is split into header and footer files, a stylesheet, and the core output. You shouldn't need to edit any of the core files, just the header and footer.

    In many cases the Wordpress theme being used will be a close enough match that you can put the code from the WP header.php file into the OIO header.tpl file, and the same for the footer file.

    However, every WP theme is different, so it may require more adaptation.

    -----

    An alternative (to avoid having to change things) is to show the purchase page as a popup on the existing page. That way, people should still realise it is part of the site:

    <a rel="nofollow" href="http://mysite.com/path/to/oiopub/purchase.php" onclick="window.open('http://mysite.com/path/to/oiopub/purchase.php','oiopublisher', 'location=0,status=0,scrollbars=1,width=800,height=500'); return false;">Advertise</a>

    • CommentAuthorFour20
    • CommentTimeNov 2nd 2008
     

    Hey Simon,
    I looked at the code of purchase.php and can't find an spot where I can replace a header/footer. Not that I even know how. . .but I thought I would at least look.

    Am I crazy for expecting(or at least wanting) the purchase page to look the same as my other custom Wordpress Pages?

    I don't get why this is so difficult. . .

    • CommentAuthorSimon
    • CommentTimeNov 2nd 2008 edited
     
    Project Admin

    Ah, I think you're looking in the wrong place. Templates can be edited in the admin area (demo here):

    Settings -> Templates

    All the header and footer template code is contained there (selectable from the sidebar on the right).

    You have to remember that OIO isn't a custom Wordpress page at all, it's a completely separate script. Giving OIO a templating system seemed like the best way to enable users to customise the look of the purchase page, whilst retaining compatibilty with which ever script the user may want to integrate OIO with.

    You could also create a custom Wordpress page, and link to the different purchases (eg. individual zones) from that page, which would offer a more integrated look.

    ------

    However, that doesn't mean that in the future we can't offer better integration options (I was thinking of an iframe solution for example, which could be placed on a custom Wordpress page). That would have to be a future development, and so the best alternatives I can offer you right now are above.

    • CommentAuthorFour20
    • CommentTimeNov 2nd 2008