Not signed in (Sign In)

Categories

Vanilla 1.1.5 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.
  1.  # 1
    I am a noob at coding and am trying to edit the Guestsense extension so that it will only tell ppl that they arent logged in and the link to sign up... and not display the adsense because the website I would like to put it on is non profit...

    <?php
    /*
    Extension Name: Guestsense
    Extension Url: www.lussumo.com/Add-ons/
    Description: Adds Google Adsense at the top of the discussions
    Version: 0.3
    Author: WallPhone, based on existing code by Alexis Bellido
    Author Url: http://wallphone.com
    */

    function InjectAdsense() {
    echo '<div align="center">
    <script type="text/javascript"><!--
    google_ad_client = &quot;pub-5163550033929978&quot;;
    google_ad_width = 728;
    google_ad_height = 90;
    google_ad_format = &quot;728x90_as&quot;;
    google_ad_type = &quot;text_image&quot;;
    google_ad_channel =&quot;3348340772&quot;;
    google_color_border = &quot;FFFFFF&quot;;
    google_color_bg = &quot;EEEEEE&quot;;
    google_color_link = &quot;008000&quot;;
    google_color_text = &quot;000000&quot;;
    google_color_url = &quot;336600&quot;;
    //--></script>
    <script type="text/javascript"
    src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
    </script></div>';
    }

    if ( ($Context->Session->UserID == 0) && (in_array($Context->SelfUrl,
    array("index.php", "categories.php", "comments.php", "post.php", "account.php", "settings.php"))) ){

    $NoticeCollector->AddNotice('Please <a href="'.GetUrl($Configuration, 'people.php').
    '">sign in</a> or <a href="'.
    GetUrl($Configuration, 'people.php', '', '', '', '', 'PostBackAction=ApplyForm').
    '">apply for membership</a> to remove the ads');

    $Context->AddToDelegate('NoticeCollector', 'PostRender', 'InjectAdsense');
    }
    ?>
    •  
      CommentAuthorjimw
    • CommentTimeNov 12th 2006
     # 2
    Maybe you should use the welcome guest extension instead.
  2.  # 3
    that would work, but i want it to be a banner across the top
    •  
      CommentAuthorjimw
    • CommentTimeNov 12th 2006
     # 4
    I think what you can do is delete all the code within the function injectadsense leaving only { }.
  3.  # 5
    works great, thanks
Add your comments
    Username Password
  • Format comments as