This is the community forum. For a developer response use the Client Area.
Follow us on Facebook, Twitter and YouTube!

Insering any HTML/PHP/JS blocks
#1
Exclamation 

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?
Reply
#2

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?
Reply
#3

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.
Reply
#4

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.
Reply


Possibly Related Threads…
Thread / Author Replies Views Last Post
Last Post by Steven
28-Jun-2011, 01:49 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)