Elxis CMS Forum

Extensions => Components => Topic started by: stepsdesigns on December 16, 2011, 19:24:33

Title: eforum need some help
Post by: stepsdesigns on December 16, 2011, 19:24:33
i just tried eforum on elxis website

every thing goes so good till now
but what i need to do

i need to add google adsense code to each of the topics which users post

some thing like bot auto ads but for the eforum posts

can any one till me where to go and start please ? ?

this is the forum link
www.tuhut.com/eforum/
Title: Re: eforum need some help
Post by: stepsdesigns on December 16, 2011, 19:47:35
and i need to make it post at the first post only not into the replies
Title: Re: eforum need some help
Post by: stepsdesigns on December 16, 2011, 20:00:24
i just need the same bot ( auto ads ) but for eforum can some one till me how to do it
i searched the code of eforum but iam completely new for that component and i can use ur help
Title: Re: eforum need some help
Post by: rentasite on December 17, 2011, 16:59:30
can any one till me where to go and start please ? ?

Eforum Hooks
http://wiki.elxis.org/wiki/Eforum_Hooks
Title: Re: eforum need some help
Post by: stepsdesigns on December 17, 2011, 17:39:32
can any one till me where to go and start please ? ?

Eforum Hooks
http://wiki.elxis.org/wiki/Eforum_Hooks

i check it out but i need to put the ads on the posts which folder of the hooks i should put it in ?

i mean the main post article at the top left
Title: Re: eforum need some help
Post by: stepsdesigns on December 17, 2011, 19:19:19
I found a solution for it :D


I edited the file ( daemon/html.daemon.php )

and changed the place of hook "post" to be at the top of the topic instead of the bottom

and i created a hook for adsense code
Code: [Select]
<div style="float:left; margin:10px; padding:0px;">

Here where to put the adsense code

</div>


and now for each topic that is posted google ads will appear at the top left of each article



but the problem now is that each time any one post a reply the google adsense code appear in his reply
and this is not good coz iam supported to put only 3 google adsense codes inside each page and if there is alot of replays this will make me problems with google

how i make the code appear only 1 or 2 times for each page ?
Title: Re: eforum need some help
Post by: stepsdesigns on December 18, 2011, 19:16:39
final hook code is
Code: [Select]
<?php
//assign adsense code to a variable
$googleadsensecode = &#39;
<div style="float:left; margin:10px; padding:0px;">
your google adsense code goes here
try a 336*280 add unite for best results
</div>
&
#39;;
//now outputting this to HTML
   
if (!defined(&#39;EFORUM_GADS&#39;)) {
   
echo $googleadsensecode;
   
define(&#39;EFORUM_GADS&#39;, 1);
}
?>

http://www.tuhut.com/eforum/know-each-others/3.html (http://www.tuhut.com/eforum/know-each-others/3.html)

Thanks for your help datahell for his help