Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Options

Google Adsense add-on for Vanilla 1

2

Comments

  • Options
    This question might have been covered already but ... *Google Analytics* could reside on the sidepanel But what if I want to remove sidepanel totally by a theme (to cut page load) Where I could put it
  • Options
    Any feedback regarding the colour scheme I used please? I'm not sure if it's a 'bit too much' so to speak, thanks. http://www.glosunit.co.uk/
  • Options
    ... it's vanilla default, blizeh?
  • Options
    Colour scheme for the Google adverts :-)
  • Options
    ... it matches vanilla default, blizeh? :) I would change both.
  • Options
    Hehe, I'm playing around with it now, but not having much luck! :( Is there anyway to make it's width 100%?
  • Options
    blizeHblizeH ✭✭
    edited August 2006
    Sorry (again) to be a pain, but how do I edit that code so it displays to everyone and removes the announcement at the top? I've tried mixing your code with the original, as well as stripping out the if statements and the announcement just from yours, but whatever I try doesn't seem to be working :(

    Removing the if statement works for anyone who's signed in, but as soon as they sign out it brings up an error :(

    Fatal error: Call to a member function on a non-object in /home/glosunit/public_html/extensions/Adsense2/default.php on line 32
  • Options
    Anyone, please?
  • Options
    OK, whats I think is happening is its attaching to the NoticeCollector delegate, so it only appears when that does.

    Try these lines in place of the IF statement: $Context->AddToDelegate('DiscussionGrid', 'PreRender', 'InjectAdsense'); $Context->AddToDelegate('CommentGrid', 'PreRender', 'InjectAdsense');
  • Options
    blizeHblizeH ✭✭
    edited August 2006
    Not sure if it's that, I used a different notice for logged in members anyway, but I'll give that a try, thanks. (can't decide if I want a notice or not, hmm!)
  • Options
    blizeHblizeH ✭✭
    edited August 2006
    Fantastic, many thanks!

    I've realised where I'm getting the error btw, it's when I sign out:

    image
  • Options
    OK, then you need to add a check to make sure that your not in people.

    if ( $Context->SelfUrl <> 'people.php' ) { // code goes here }
  • Options
    Huge thanks again WallPhone! My hero! <3
  • Options
    May i ask what the difference between <> and != are? And why you'd use one rather than the other?
  • Options
    edited August 2006
    same question
  • Options
    May i ask what the difference between <> and != are? And why you'd use one rather than the other?
    — Minisweeper
    In PHP, there isn't a difference. However, you might be used to using one over the other, depending on what other languages you're familiar with.
  • Options
    edited August 2006
    I use <> because that is how inequality is checked in Visual Basic. I sometimes use = to check for equality also, which always mucks up the values of my variables. It is a really annoying bug to debug. Old habits die hard. EDIT: http://us3.php.net/operators.comparison != is probably better because you can expand on the idea with !== (not identical) and keep an consistent appearance.
  • Options
    edited September 2006
    It is a confirmed bug in Vanilla. I've already submitted a fix at http://lussumo.com/vanilladev/discussion/152/search-page-glitch-when-combined-with-a-notice/#Item_0 The green theme is probably very similar to fix. Another alternative is to remove "search.php" from the in-array check, and that will remove the ads from the search page. EDIT: un-whispered comment as this may help others.
  • Options
    That's great. Thank you for the response!

    I'll try adding that tonight and check it out. But I can also take the banner off of the search page, like you suggested. I don't know why I hadn't thought of that :D

    Thanks again!

    Scott
  • Options
    Wallphone - Is there a way to have Adsense display on a custom page that I've made through the Page Manager Extension by SirNot? In the default.php, I did try to add, "http://www.papertrade.us/?Page=vote" to the list of pages to display on, but that seems to have not changed anything. Thanks -
This discussion has been closed.