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
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
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?
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
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?
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.
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 =/
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)
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.
Comments
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
Trey, would you mind emailing your themes/comments.php file?
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?
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 =/
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)