- Posts: 1663
- Thank you received: 201
Kunena 6.3.6 Released - Security release
The Kunena team has announce the arrival of Kunena 6.3.6 [K 6.3.6] in stable which is now available for download as a native Joomla extension for J! 4.4.x/5.0.x/5.1.x. This version addresses most of the issues that were discovered in K 6.2 / K 6.3 and issues discovered during the last development stages of K 6.3
Note: Please go to the Kunena Dashboard after an upgrade so that the Kunena database tables are also updated.
Question Add adbrite ads inside kunena forum
- cinemagrounds
- Topic Author
- Visitor
I am trying to add adbrite ads in between the post and its replies. Earlier i was successful in getting the google ads displayed, however whenever google ad doesnt get displayed i want the adbrite ad to be displayed.
My website is:
www.cinemagrounds.com
How can i achieve this.
Earlier, i achieved this by adding the following code in view.php file of the template.
// Google AdSense ---> start
if ( $mmm == 1 ) {
echo '<div align="center">'."\n";
echo '<script type="text/javascript"><!--' . "\n";
echo 'google_ad_client = "pub-5023421363133063";' . "\n";
echo "/* my second ad link unit 120x90, created 4/22/10 */\n";
echo 'google_ad_slot = "0632638656";' . "\n";
echo "google_ad_width = 468;\n";
echo "google_ad_height = 60;\n";
echo "//-->\n";
echo "</script>\n";
echo '<script type="text/javascript"' . "\n";
echo 'src=" pagead2.googlesyndication.com/pagead/show_ads.js ">' . "\n";
echo "</script>\n";
echo "</div>\n";
}
// Google AdSense ---> end
Now i want to add adbrite code to the kunena forum, how can i do this:
Here is the ad code that i got from Adbrite:
<!-- Begin: AdBrite, Generated: 2010-07-20 20:20:24 -->
<script type="text/javascript">
var AdBrite_Title_Color = '0000FF';
var AdBrite_Text_Color = '000000';
var AdBrite_Background_Color = 'FFFFFF';
var AdBrite_Border_Color = 'CCCCCC';
var AdBrite_URL_Color = '008000';
try{var AdBrite_Iframe=window.top!=window.self?2:1;var AdBrite_Referrer=document.referrer==''?document.location:document.referrer;AdBrite_Referrer=encodeURIComponent(AdBrite_Referrer);}catch(e){var AdBrite_Iframe='';var AdBrite_Referrer='';}
</script>
<script type="text/javascript">document.write(String.fromCharCode(60,83,67,82,73,80,84));document.write(' src=" ads.adbrite.com/mb/text_group.php?sid=17...='+AdBrite_Referrer+ '" type="text/javascript">');document.write(String.fromCharCode(60,47,83,67,82,73,80,84,62));
<div><a target="_top" href=" www.adbrite.com/mb/commerce/purchase_for...opid=1702810&afsid=1 " style="font-weight:bold;font-family:Arial;font-size:13px;">Your Ad Here
<!-- End: AdBrite -->
Please Log in or Create an account to join the conversation.
have you read our documentation about this docs.kunena.com/index.php/Module_Positions
you can do that without modifing core Kunena file. You need to create new modules in Joomla backend and publish them in the positions you see in our doc. kunena_msg_1, kunena_msg_2 ...
Regards
Please Log in or Create an account to join the conversation.
- cinemagrounds
- Topic Author
- Visitor
Yes i Did see that document. If you see my website, i have used the same concept to place google ads to the left side of the template. (Goggle ads to left of the template). Also the template i have used is a free template that has positions only at the left.
however What i am trying now, is to get the adbrite ads inside Kunena forum article itself.
What I mean here , once I post of article, I want adbrite ad to appear within the article itself.
Is that possible.
for example: Look at this article in the following link, where they have done this:
www.dentalforum.com/forum/showthread.php?t=5565
here in this article, they have article and to the right side it also shows the google ads. Instad of google ads i want adbrite ads to appear. What would be the syntax for that and where would i place such a code.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
- cinemagrounds
- Topic Author
- Visitor
would like to see them all over the page. this way my page will still look good and will be accroding to the standards of google adsense.
i thought google adsense allowas 3 ad units and 3 link units on each page...
adbrite allows 3 ad units per page..
Basically, i am fresher. I am just exploring on this things. This is what i have understood reading online about adsense and abrite ads...
Please Log in or Create an account to join the conversation.
- cinemagrounds
- Topic Author
- Visitor
Please Log in or Create an account to join the conversation.
Insert RED code above to message.php from default_ex template.(should be line 99)<td colspan = "2" valign = "top">
<div class = "msgtext"><?php echo $msg_text; ?>
<div style="float:right; width:300px; margin-left:10px;">
<!-- Begin: Message Module Positions -->
<?php
if (JDocumentHTML::countModules('kunena_adbrite_'.$mmm))
{
?>
<div class = "kunena_adbrite_<?php echo $mmm; ?>">
<?php
$document = &JFactory::getDocument();
$renderer = $document->loadRenderer('modules');
$options = array('style' => 'xhtml');
$position = 'kunena_adbrite_'.$mmm;
echo $renderer->render($position, $options, null);
?>
</div>
<?php
}
?>
<!-- Finish: Message Module Positions -->
</div>
</div>
<?php
if (!isset($msg_closed))
{
?>
Then create new module in joomla backend, in text area insert your code from Adbrite and publish that module in position "kunena_adbrite_1" and adbrite ads will appear in all topics first messages.
Regards
Please Log in or Create an account to join the conversation.
- cinemagrounds
- Topic Author
- Visitor
I added the code in red,to messgae.php file.
Created a new position in templatedetails.xml, with title kunena_adbrite1
so far so good.
I also created new module, of type Custom HTML, but seems like HTML editor is removing all the code of adbrite. only the code shown in red is visible.
I also tired to enter this text as plain text, but it didnt work.
<!-- Begin: AdBrite, Generated: 2010-07-23 23:27:02 --><div><a target="_top" href=" www.adbrite.com/mb/commerce/purchase_for...=1702810&afsid=1 " style="font-weight: bold; font-family: Arial; font-size: 13px;">Your Ad Here
this is original adbrite code:
<!-- Begin: AdBrite, Generated: 2010-07-23 23:27:02 -->
<script type="text/javascript">
var AdBrite_Title_Color = '0000FF';
var AdBrite_Text_Color = '000000';
var AdBrite_Background_Color = 'FFFFFF';
var AdBrite_Border_Color = 'CCCCCC';
var AdBrite_URL_Color = '008000';
try{var AdBrite_Iframe=window.top!=window.self?2:1;var AdBrite_Referrer=document.referrer==''?document.location:document.referrer;AdBrite_Referrer=encodeURIComponent(AdBrite_Referrer);}catch(e){var AdBrite_Iframe='';var AdBrite_Referrer='';}
</script>
<script type="text/javascript">document.write(String.fromCharCode(60,83,67,82,73,80,84));document.write(' src=" ads.adbrite.com/mb/text_group.php?sid=17...='+AdBrite_Referrer+ '" type="text/javascript">');document.write(String.fromCharCode(60,47,83,67,82,73,80,84,62));
<div><a target="_top" href=" www.adbrite.com/mb/commerce/purchase_for...opid=1702810&afsid=1 " style="font-weight:bold;font-family:Arial;font-size:13px;">Your Ad Here
<!-- End: AdBrite -->
the screen now appers like this:
cinemagrounds.com/index.php/forum/News/2...n-attacks-a-Man.html
Is there any specific type module that i need to create for this.
Please Log in or Create an account to join the conversation.
After saving you module you can enable editor in joomla config.
Regards
Please Log in or Create an account to join the conversation.
- cinemagrounds
- Topic Author
- Visitor
Your solution worked like a charm !!!!
I now get ads on first post on of any thread..that serves the purpose....
Thankyou every much !!!!
Please Log in or Create an account to join the conversation.