can some one help me ?
where i should put this code to my index.template.php
<!--/* OpenX Javascript Tag v2.6.2 */-->
<!--/*
* The backup image section of this tag has been generated for use on a
* non-SSL page. If this tag is to be placed on an SSL page, change the
* 'http://forum.smak1cirebon.com/adv/www/delivery/...'
* to
* 'https://forum.smak1cirebon.com/adv/www/delivery/...'
*
* This noscript section of this tag only shows image banners. There
* is no width or height in these banners, so if you want these tags to
* allocate space for the ad before it shows, you will need to add this
* information to the <img> tag.
*
* If you do not want to deal with the intricities of the noscript
* section, delete the tag (from <noscript>... to </noscript>). On
* average, the noscript tag is called from less than 1% of internet
* users.
*/-->
<script type='text/javascript'><!--//<![CDATA[
var m3_u = (location.protocol=='https:'?'https://forum.smak1cirebon.com/adv/www/delivery/ajs.php':'http://forum.smak1cirebon.com/adv/www/delivery/ajs.php');
var m3_r = Math.floor(Math.random()*99999999999);
if (!document.MAX_used) document.MAX_used = ',';
document.write ("<scr"+"ipt type='text/javascript' src='"+m3_u);
document.write ('&cb=' + m3_r);
if (document.MAX_used != ',') document.write ("&exclude=" + document.MAX_used);
document.write (document.charset ? '&charset='+document.charset : (document.characterSet ? '&charset='+document.characterSet : ''));
document.write ("&loc=" + escape(window.location));
if (document.referrer) document.write ("&referer=" + escape(document.referrer));
if (document.context) document.write ("&context=" + escape(document.context));
if (document.mmm_fo) document.write ("&mmm_fo=1");
document.write ("'><\/scr"+"ipt>");
//]]>--></script><noscript><a href='http://forum.smak1cirebon.com/adv/www/delivery/ck.php?n=a7c91216&cb=INSERT_RANDOM_NUMBER_HERE' target='_blank'><img src='http://forum.smak1cirebon.com/adv/www/delivery/avw.php?cb=INSERT_RANDOM_NUMBER_HERE&n=a7c91216' border='0' alt='' /></a></noscript>
and how to show in the center of page ???
Welcome to SimpleMachines.org adeishere,
I have split this topic from the other one, so that we can keep the support requests separate.
I can help you to add your ads code into your forums, although I will need to know exactly what you mean by 'center' of page. Could you please describe where you want it? Or even better, post an image/screenshot?
i have attach my picture ...
just usually in the center and top of page ...
thx
I probably need to know which theme you are using (preferably with a link) to do it properly, but I have made an attempt with the attached file.
i use theme from dzinerstudio
http://demo.dzinerstudio.com/smf/index.php?theme=8
thx for ur help
i have use file from you..
but why i still can't see where the banner is ...
Have you thought about installing the Ads Management mod, that will allow you to better manage Ad placement in your theme/s?
It's best to consult the authors of custom themes for possible support. I know that theme is quite tricky due to it's use of divs for some to find the correct positions.
http://www.thenepalgallery.com/forum/index.php
this is what u want
(if i remove the text "We have added some videos about Nepal
Click Here To see those vidoes", the add will be shown like u wanted)
let me know
Quote from: LHVWB on November 05, 2008, 12:49:59 AM
I probably need to know which theme you are using (preferably with a link) to do it properly, but I have made an attempt with the attached file.
Good afternoon,
I'm having terrible difficulties in setting the codes from the installation of AD MANAGEMENT MOD in the right places of index.template.php
I've tried over and over and I just get Errors and Errors..uff
LHVWB can you give me a help on this? Please!
Regards,
Helio
What is the exact difficulties you're having?
What part can't you find/install from the parser of the mod showing you all the required edits for that template file?
Hi Rumbaar,
So, starting from the beginning:
I'm using a custom theme.
Inside the custom theme I have the following:
.....................................................................................................
Images (folder)
Languages (folder)
BoardIndex.template.php (file)
index.php (file)
index.template.php (file)
style .css (file)
theme_info.xml (file)
................................................................................................................
Between all of that stuff and as far I understood I only would have to edit the codes on :
BoardIndex.template.php (file) – here I've install the codes and I suppose that everything went well coz I refreshed the forum page and there was no error
index.template.php (file) – HERE IS THE ISSSUE
index.php (file) – here I haven't done anything because the file was almost empty
FIRST DIFFICULTY
after setting BoardIndex.template.php I went to set index.template.php and I searched for <body>'; but there's just <body> without '; anyway I went trough the installation and I place the code after body (with and without ';) :
//Display ads on the top of the page
if (function_exists("show_topofpageAds"))
{
$ads = show_topofpageAds();
if(!empty($ads))
if($ads['type']==0)
echo $ads['content'];
else
eval($ads['content']);
unset($ads);
}
I refresh the forum page and with our without placing '; after <body> I always get a error.
SECOND DIFFICULTY:
I search for the second code to be applied </td> and the only part I have this thing is here:
if (empty($button_strip))
return '<td> </td>';
echo '
<td class="', $direction == 'top' ? 'main' : 'mirror', 'tab_' , $context['right_to_left'] ? 'last' : 'first' , '"> </td>
<td class="', $direction == 'top' ? 'main' : 'mirror', 'tab_back">', implode(' | ', $button_strip) , '</td>
<td class="', $direction == 'top' ? 'main' : 'mirror', 'tab_' , $context['right_to_left'] ? 'first' : 'last' , '"> </td>';
}
?>
SO I get totally confused where should I place the code.
THIRD DIFFICULTY:
When I search for template_menu();
I see 2 possible choices, this one seems the right one but is not completely equal ',template_menu(),'
Is it this one?
From all the 4 codes that must be placed in the index.template.php, the only that seems easy to place is the one above this:
// Show the "Powered by" and "Valid" logos, as well as the copyright. Remember, the copyright must be somewhere!
this is the only from the 4 easy to find!!!!!
Can you explain me a bit more detailed how to do it correctly?
Thanks!
Regards,
Helio
Well the best way to find the most appropriate location for the code is to look at the changes it's made to your default CORE index.template.php file or look where it is in that file. As it will give a good baring of where it suppose to be in any custom index.template.php file.
You'll need to close the <body>'; tag, insert the code and then start the echo ' for the code it was added in between.
Now it should be very specific what code to look for where to insert the code for the display of ads around the buttons.
i have attach my picture ...
just usually in the center and top of page ...
thx
@doctorx, no picture attached and what are you talking about?
Hi Rumbaar,
I was able to set almost all codes. The exception went to the one that should have been placed after </td> - I couldn't figure out were to place it.
Besides that one, everything went well.
Thanks a lot for the tips,
Regards,
Helio
I know it can be hard finding locations, specially with limited code like the <td> one. But you need to search for all of the code, there are 7 tabs before that code in the whole piece of code.
So if you searched for the whole lot in the default theme it should have found the one place it only appears.
That being said look around the following, it should be just after it.:
<form action="', $scripturl, '?action=login2" method="post" accept-charset="', $context['character_set'], '" class="middletext" style="margin: 3px 1ex 1px 0;"', empty($context['disable_login_hashing']) ? ' onsubmit="hashLoginPassword(this, \'' . $context['session_id'] . '\');"' : '', '>
<input type="text" name="user" size="10" /> <input type="password" name="passwrd" size="10" />
<select name="cookielength">
<option value="60">', $txt['smf53'], '</option>
<option value="1440">', $txt['smf47'], '</option>
<option value="10080">', $txt['smf48'], '</option>
<option value="43200">', $txt['smf49'], '</option>
<option value="-1" selected="selected">', $txt['smf50'], '</option>
</select>
<input type="submit" value="', $txt[34], '" /><br />
<span class="middletext">', $txt['smf52'], '</span>
<input type="hidden" name="hash_passwrd" value="" />
</form>';
Hi Rumbaar
I was almost giving up on that specific part of the code but finally It seems that I was able to place the code correctly.
so, thanks a lot for the tips and see you around!
Best wishes,
Helio