Hey programmers, I need some help. I have phpbb3 subsilver2 and i want to add adsesnse to post BUT i only want to show in the first two. Right now when i added the code it does show 2 (because i have one in the header) but on the 3rd i see a big space where the add should be. I tried to limit the ads with this code <?php if ($i <2) { ?> (ad in here) <?php } ?> but it didnt work. (It does work on my blog tho) So can someone help me? Thanks
instead of this in your first line of new code: if($i == 1) Code (markup): use: if($i == 1 && $user->data['user_id'] == ANONYMOUS) Code (markup):
well, php code in phpBB templates works only on a few styles. regular styles do not have that feature .. it is better to use suggested methods here : advertisements in phpbb3
if your using mybb , go to the admin panel then go to templates , then global i think , then find header , places a banner there , then create a new banner then go to footer and put a there banner in there. If you need help personally ill do it for $10
^ hmm., even if it is MyBB, no such banner feature exists there !! And the required work, if it can be done, is worth of 5$ ; OP is offering 2$
What are you guys talking about ? I have no problem myself placing an ad in a header or anywhere else for that matter. I have a feeling that you dont undertand what i want. I have my ad in subsilver2 vietopic_body.html but i want my ad to show only in first 2 post BUT it keeps showing in every post. (Yes, after the first 3 its not visible but the code is still there and some browsers and bots can see it). Can someone help me with this or is this really too complicated ?
^ it is really complicated .. there is no easy method to limit the advt code to first two posts on phpBB forum
So what will it take for this to happen ? Whats the complicated way ? I do not want to give any access to my cpanel like most people have ask i want to do it myself. There is no problem for increasing the price, i just need a person who knows whats he doing and could navigate me correctly. P.S. Look at Digitalforum, they have an ad after first post and it doesnt repeat itself all the time. They did it somehow! I am sure its possible.
^ you can have advt after the first post only on the phpBB forum. that is, we can not limit it to the first two posts . find <!-- END postrow --> on viewtopic_body.html (subsilver2 style) place your advt code just above <!-- END postrow --> like below ; remember refreshing the cache !! <!-- IF postrow.S_FIRST_ROW --> your advertisement code here <!-- ENDIF --> Code (markup):
I am starting to believe that its impossible to do what i want. I cant find an answer online nor people on this forum that would know how to limit those ads. Mnmani, thanks for that but i do not want to place after the post. I believe that staying inside a post there is a way bigger chance that someone will click it (maybe even accidentally). I am not sure how search engines bots will react to the fact that my ad code is showing inside every post. This could be a problem. My forum is so new that i am not too worried about that yet but time will show. Thanks guys for trying.
well, advertisement can be a part of first post only. that is, it can be placed within the first post. find below code on viewtopic_body.html <!-- END attachment --> </table> <!-- ENDIF --> Code (markup): add your advertisement code just after above code <!-- IF postrow.S_FIRST_ROW --> your advertisement code <!-- ENDIF --> Code (markup): however we cannot have it easily on the second post. but we can have another advt at the end of page.