Purchase OIOpublisher now for just $47.

Take control of your ad space.

Click here to purchase

    • CommentAuthormartinkoss
    • CommentTimeSep 13th 2010
     

    Hi. I just started learning this plugin on a test domain and one thing that immediately jumped out at me is the lack of titles appearing in the browser bar for the purchase page (etc).

    Is there a way to get the browser window to show a page title, like "Ads Purchase Page" for example?

    Cheers.
    Martin

    Need help?  Quick start guide | Troubleshooting | All help topics
    • CommentAuthorSimon
    • CommentTimeSep 13th 2010
     
    Project Admin

    There should be a title set, for example the purchase link below:

    >> http://test.oiopublisher.com/advertise/purchase.php

    Need help?  Quick start guide | Troubleshooting | All help topics
    • CommentAuthormartinkoss
    • CommentTimeSep 13th 2010
     

    I expected there should be, but, as you can see from this (my WP play area so excuse the mess) http://martinkoss.co.uk/wp-content/plugins/oiopub-direct/purchase.php

    I'm not getting a title.

    Need help?  Quick start guide | Troubleshooting | All help topics
    • CommentAuthormartinkoss
    • CommentTimeSep 13th 2010
     

    I just checked the source of the page and here's the title tag:
    <title></title>

    Need help?  Quick start guide | Troubleshooting | All help topics
    • CommentAuthorSimon
    • CommentTimeSep 13th 2010
     
    Project Admin

    It's strange that not even the name of the blog is showing in the title tag - that should be controlled by Wordpress.

    How's the title tag setup in your Wordpress header template?

    Need help?  Quick start guide | Troubleshooting | All help topics
    • CommentAuthormartinkoss
    • CommentTimeSep 13th 2010
     

    The title tag works fine on other pages/posts.

    Need help?  Quick start guide | Troubleshooting | All help topics
    • CommentAuthorSimon
    • CommentTimeSep 13th 2010
     
    Project Admin

    Sorry, I meant what does the html title tag look like within Wordpress (ie. can you copy and paste it here).

    Need help?  Quick start guide | Troubleshooting | All help topics
    • CommentAuthormartinkoss
    • CommentTimeSep 14th 2010
     

    Is this the bit you mean, Simon?

    <?php global $wp_theme_options;
    frugal_gzip();
    $main_options = get_option('frugal_main_options');
    $header_design = get_option('frugal_header_design'); ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
    <head profile="http://gmpg.org/xfn/11">

    <title><?php frugal_site_title(); ?></title>

    Need help?  Quick start guide | Troubleshooting | All help topics
    • CommentAuthormartinkoss
    • CommentTimeSep 14th 2010
     

    I'm guessing this is a theme issue. I'm playing around with Frugal on this domain too. If it is an incompatibility issue with Frugal, I wonder if I could just drop the purchase forms into a Page or Post so this 'title' issue would be worked around.

    Need help?  Quick start guide | Troubleshooting | All help topics
    • CommentAuthorSimon
    • CommentTimeSep 14th 2010 edited
     
    Project Admin

    This is a little bit of a hack, but it might do the trick for you. If you open your Wordpress header.php template file.

    FIND

    <title><?php frugal_site_title(); ?></title>

    REPLACE WITH

    <?php
    global $templates, $oiopub_set;
    echo '<title>';
    if(isset($templates['title']) && $templates['title']) {
    echo $templates['title'] . " | " . $oiopub_set->site_name;
    } else {
    frugal_site_title();
    }
    echo '</title>' . "\n";
    ?>

    It should hopefully detect when an OIO title is present and use that instead of the default title.

    Need help?  Quick start guide | Troubleshooting | All help topics
    • CommentAuthormartinkoss
    • CommentTimeSep 14th 2010
     

    Absolutely perfect. It worked a treat.
    I'll certainly save that little snippet.

    Thanks for your help Simon.

    Need help?  Quick start guide | Troubleshooting | All help topics
    • CommentAuthorcloughit
    • CommentTimeFeb 5th 2015
     

    Hey there, I have just had the same issue, but I didn't want to implement the solution above as it would be overwritten on WP updates.

    Again, this is a bit of a hack, but it works. Ideally the solution I am about to present would have been better placed in the main.tpl file (which would then cover all template files), but again if the plugin is updated this would be overwritten.

    As my site is using Banner Ads only, I have made the changes to the purchase_banners.tpl file, but it could be implemented in any of the purchase_xxxx.tpl files as follows:

    1. Make a copy of purchase_banners.tpl in the core_custom directory
    2. Edit the copied file and place the following code at the very top of the file:


    <script>
    var theTitleTag = document.getElementsByTagName('title');
    theTitleTag[0].innerHTML = '<?php echo isset($templates['title_head']) ? $templates['title_head'] : $templates['title']; ?> | <?php echo $oiopub_set->site_name; ?>';
    </script>

    Hope this helps!

    Need help?  Quick start guide | Troubleshooting | All help topics
    • CommentAuthorSimon
    • CommentTimeFeb 7th 2015
     
    Project Admin

    Thanks for putting forward your solution!

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