Not signed in (Sign In)

Categories

Vanilla 1.1.4 is a product of Lussumo. More Information: Documentation, Community Support.

Help keep Vanilla free:
Welcome Guest!
Want to take part in these discussions? If you have an account, sign in now.
If you don't have an account, apply for one now.
    • CommentAuthorjaseone
    • CommentTimeAug 29th 2005
     # 1
    Is it possible within the extensions framework to add a new tag in HEAD section of the HTML and to do so only on the main All Discussions page? If it is then I should be able to whip what I want together, which is to define a meta Description for the main page that Google will pick up instead of:

    Loading... Not signed in (Sign In). Hip in Houston - If you're hip and in Houston
    then you belong here! Discussions · Categories · Search. Welcome, Guest ...
    •  
      CommentAuthorMark
    • CommentTimeAug 30th 2005 edited
     # 2
    hehehe - yes, you can add a string to your header pretty easily. An extension like this would do the trick:

    <?php
    /*
    Extension Name: My Custom Meta Info
    Extension Url: http://www.yourdomain.com/
    Description: Adds my custom meta information to the header of my forum
    Version: 1.0
    Author: Your Name
    Author Url: N/A
    */

    if (@$Head) {
    $Head->Addstring("<meta name=\"description\" content=\"Stuff about my forum\" />");
    }
    ?>
    • CommentAuthorjaseone
    • CommentTimeAug 30th 2005
     # 3
    Sweet! Thanks for that, now I may just have to dig deeper and see how to make the description editable from the settings. :)

    Although unless I'm missing something that will add it to every page including individual discussions, where you would only really want it on All Discussions so is there a way to differentiate that?
    •  
      CommentAuthorMark
    • CommentTimeAug 30th 2005
     # 4
    unless I'm missing something that will add it to every page including individual discussions

    That is correct, you can specify which pages you want it on by doing something like this:

    <?php
    /*
    Extension Name: My Custom Meta Info
    Extension Url: http://www.yourdomain.com/
    Description: Adds my custom meta information to the header of my forum
    Version: 1.0
    Author: Your Name
    Author Url: N/A
    */

    if (in_array($Context->SelfUrl, array("index.php","signin.php","apply.php","passwordreset.php","passwordrequest.php","account.php","search.php"))) {
    if (@$Head) {
    $Head->Addstring("<meta name=\"description\" content=\"Stuff about my forum\" />");
    }
    }
    ?>
    • CommentAuthorjaseone
    • CommentTimeAug 30th 2005
     # 5
    Everyday I love Vanilla a little more. :)
Add your comments
    Username Password
  • Format comments as