Posts: 9
Threads: 5
Joined: Jun 2020
23-Jun-2020, 02:42 PM
Hello everybody!
A have already searched for this information over internet, but unsuccessfully.
My idea insert/output any html block in comments feed. It can be advertising code which repeating, for example, after every 2, 3 or any comment post in feed on page.
It is posible realize in Commentics?
Posts: 2,895
Threads: 59
Joined: Jun 2010
Hi there,
It's an interesting idea. Although it'd take a while to do it properly with admin settings. Might be good to have an option for it to be random as well? For example after the 2nd, 5th, 7th comment etc. Also, would it be showing the same advertisement every time or would they vary? How would that side of things work?
Have
you completed
the interview?
Posts: 9
Threads: 5
Joined: Jun 2020
Hi, Steven.
I think there is no problem to know count comment (without replies or even with), because it is known always.
Insert the ads code like google or any else gives dynamic content or static if insert self.
Probably, no need create separate module only change structure of template file and add new function in model, though separate module is better idea for you and for sell.
Posts: 9
Threads: 5
Joined: Jun 2020
Hi.
I think it can be used Modulus operator % -
PHP - Modulus.
For example:
PHP Code:
<?php
if($total_records % 3 == 0)
$html .= '<div class="add">Content-Here</div>';
$total_records++;
}
It show
<div class="add"></div> after every third div-block on page.