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.

Advert addon

2

Comments

  • oh ok cool, i think i know what to do to make it into an extension :P thanks. I can use the comment grid i think, as ive seen $rownumber before in that on some other extension.
  • ok by the looks of it we will have to wait for marks return so he may add something allowing us to do it. It would also help with the signatures mod as in that you have to edit comments.php
  • one slight problem, when another post is made after the first post the ads disappear as rowcount now equals 2 :P how could i fix that?
  • you're only allowed 3 ads per page with google and if you had the ad show up after each post then you could risk getting your account terminated. If you want it to show up after the first post and say the 5th post you could do something like this..

    if($RowNumber == 1 || $RowNumber == 5){

    If the ads disappearing completely then I'm not sure whats causing that because its working fine for me my test board
  • I just tried it on my forums too, they aren't giving me any problems.
  • mm thats wierd, yeah for me if there is more than 1 post then ads dont show up
  • You know what? I double tested it, and I'm having the same problem as you immersion. Trey has to be doing something differently in his themes/comments.php file that he didn't include here or that we don't know about. I set it up exactly as he has it. When there is more than 1 comment, the ad disappears.

    Trey, would you mind emailing your themes/comments.php file?
  • yes same, if you whisper the whole contents that would be great. Unless i am using an older comments.php file that works slightly differnetly?
  • What version of Vanilla you have installed? I'm using v1 and it was only slightly modified by myself, but I returned it to its original "install" state when adding Trey's coding.
  • i dont know its vs 1 but off the svn at some point, it cant have change at all really. Not in anyway stopping comments.php not working with that thing. Trey has done something different as currently his script will be outputting the comments and when the comments is 1 it will add the code the the end of it yet when rownumber = 2 from two posts it should post at all. mm let me think about it for a second and ill see if i can find a solution
  • Immersion,

    Do you know how to use an alternative comments.php file through PHP? Because what I was thinking was there could be an alternative comments.php file in the add-on directory and somehow the default.php would call open that file instead?
  • err no i dont think so.
  • lol silly us, i jsut found the reason. It is because of that } before we put the code. Thet ends the while near the top. If you place the code above that then it will work.
  • Comments.php file

    thats the exact thing I'm using for my board now, I do have the signatures extensions included in it. I dont know why it wasnt working right for ya'll =/
  • Immersion, yeah you have to have it before the } bracket so it stays within the while loop for the whole comments thread.
  • edited July 2006
    lol i found out why :P we are silly people who did not notice that } lurking. I hope to tidy it up by possibly making it into an extension of some sort so you can change the settings in the admin panel. Such as add after x posts. And a box to enter the code. Also if i do that to agree to the tos of google i will have to make it so it will get the number of comments per page and then divide by 3 and then round it down or something so you cannot have more than that in the box.

    Then to trick all you people changing it in settings config file i will make it so it checks everytime you load the page. (i do realise you will just take out the check)
  • that would be sweet if you can come up with a way to make it an extension!! good luck
  • well i was thinking i could take a look at the signature extension and work from their. It may still require some edits to the commments.php file like signatures does.
  • If you want, you can use that extension of mine where to inputs an ad above the discussion and categories grids. I think that will get people use to seeing ads, but in multiple places.
  • you peops are awesome! Great work! And the google 3 advert max thingie was a good spot.......I would never have known about that.
This discussion has been closed.