News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Ad Management mod

Started by SMFHacks.com Team, January 30, 2006, 08:41:19 PM

Previous topic - Next topic

Bigguy


Stretsh

I dont know if this has been discussed earlier (kinda difficult finding it in 53 pages) but if I use the mod and select "Display ads on every page as a tower on the right side" for Google ads, the default template gets messed up when visitors try to view sticky topics.

If it already ha been discussed, please refer me to the right place. Else please help!

Bigguy

I have not heard of this at all. Try posting at www.smfads.com or wait for Jerm to see your post.

WarBirD

I have the latest version of the banner ads and SMF 1.1rc3 ! Now I have one banner on top, thats shown all the time, and i want to put a 2nd one, smaller banner, in just a specific forum to display, like I could theoretically do in the administration. So I set the right number of the board in there, but it doesn´t show up. I use the default template so there is no custom theme involved.

Why doesn´t it show up ?

Bigguy

Do you have any errors in your error log in the Admincp. ???

cwzplas

#785
This was my fault.. :( Sorry I had forgot I did something to the index pages..... All is good now...

Bigguy

Glad to hear it's working for you.

Vinspire

Any tutorial on how to get this mod to work on Helios Theme ?

The code is kinda different  >:(

Bigguy

#788
I have tried to do the but it hasn't been tested yet. You can try it if you like. I haven't tackled the other files yet.

EDIT: I have just edited the files for Helios multi RC3 you can find them on www.smfads.com under the board "Edited theme files"

Bigguy

I have just done the edits for helios multi-TP check your post at smfads.com

Vinspire

Quote from: Bigguy on October 04, 2006, 05:26:23 PM
I have just done the edits for helios multi-TP check your post at smfads.com

Okie. Thanks Bigguy and sorry for the trouble :)

Bigguy

Its no trouble at all. I hope they work for you.

pcigre

I get 6.     Execute Modification     ./Themes/default/Display.template.php     Test failed on RC3 with ad_mod_rc3_v2.zip any solution?

Vinspire

Quote from: pcigre on October 07, 2006, 10:41:25 AM
I get 6.     Execute Modification     ./Themes/default/Display.template.php     Test failed on RC3 with ad_mod_rc3_v2.zip any solution?

Open ./Themes/default/Display.template.php file and make a manual editing on the file ( remember to make a backup file )

In "Display.template.php" FIND:

global $context, $settings, $options, $txt, $scripturl, $modSettings;

BEFORE that add:

//Display ads on the thread page
$ads = show_threadAds();
if(!empty($ads))
if($ads['type']==0)
echo $ads['content'];
else
eval($ads['content']);
unset($ads);


In the same file FIND:

// Get all the messages...

And REPLACE with:

//Ad Counter
$adcounter =0;
// Get all the messages...
while ($message = $context['get_message']())
{
$adcounter++;


In the same file find:

</td></tr>';
}


And REPLACE with:

</td></tr>';
if ($adpost = show_posts($adcounter))
{
echo '

<tr><td style="padding: 1px 1px 0 1px;">
<table width="100%" cellpadding="3" cellspacing="0" border="0">
<tr><td class="windowbg3">
<table width="100%" cellpadding="5" cellspacing="0" style="table-layout: fixed;">
<tr>
<td valign="top" width="16%" rowspan="2" style="overflow: hidden;">
<b>', $context['forum_name'], '</b>
<div class="smalltext">
</div>
</td>
<td valign="top" width="85%" height="100%">
<table width="100%" border="0"><tr>
<td valign="middle"><img src="', $message['icon_url'] . '" alt="" border="0" /></td>
<td valign="middle">
<div style="font-weight: bold;" id="subject_', $message['id'], '">
<a href="', $message['href'], '">', $message['subject'], '</a>
</div>
<div class="smalltext">? <b>', !empty($message['counter']) ? $txt[146] . ' #' . $message['counter'] : '', ' ', $txt[30], ':</b> ', $message['time'], ' ?</div></td>
<td align="', !$context['right_to_left'] ? 'right' : 'left', '" valign="bottom" height="20" style="font-size: smaller;">';
if ($context['can_reply'] && !empty($options['display_quick_reply']))
echo '
', $reply_button, '';

// So... quick reply is off, but they *can* reply?
elseif ($context['can_reply'])
echo '
', $reply_button, '';

// Can the user modify the contents of this post?
if ($message['can_modify'])
echo '
', $modify_button, '';

// How about... even... remove it entirely?!
if ($message['can_remove'])
echo '
', $remove_button, '';

// What about splitting it off the rest of the topic?
if ($context['can_split'])
echo '
', $split_button, '';
echo '
</td>
</tr></table>
<hr width="100%" size="1" class="hrcolor" />
<div class="post">', $adpost['type'] == 0 ? $adpost['content'] : eval($adpost['content']) , '</div>
</td>
</tr>
<tr>
<td valign="bottom" class="smalltext" width="85%">
<table width="100%" border="0" style="table-layout: fixed;"><tr>
<td colspan="2" class="smalltext" width="100%">
</tr><tr>
<td valign="bottom" class="smalltext" id="modified_', $message['id'], '">
</td>
<td align="', !$context['right_to_left'] ? 'right' : 'left', '" valign="bottom" class="smalltext">
<img src="', $settings['images_url'], '/ip.gif" alt="" border="0" />&nbsp;', $txt[511], '
</td>
</tr></table>
</tr>
</table>
</td></tr>
</table>
</td></tr>';
}

}


Original post taken from smfads.com. Written by bigguy.

Link : http://www.smfads.com/forums/index.php?topic=22.0

yellow1912

Is it possible to have this option: display the ads after the last post (each page) in the next version?
1. if my topic has 3 posts then the ads will be displayed as the 4th post.
2. If it has 19 posts, and I set my forum to display 15 posts/page then the ads will be displayed as the 16th post on the 1st page, the 20th post on the 2nd page.
My SMF forum ^^
An Ecommerce site I help to build

geezmo

#795
Not sure if this has been asked but I want to know how i can activate the ad after the last post of the thread. All I can see in the option is place the ad within posts but I don't know how to put the ad after the last post. Of course, I can't use "14,15" because the ad won't appear if there's only one post in the thread right?

Mivi

 :( i just realized i have a problem... my ads only shows when I am browsing the forum.

This means that ONLY the Admin can see the inline advertisements...  ::)
At first i thought it was my skin, but even when i am back to standard, it still wont show.

Where should i look for an error?

-Mivi
- hxxp:fon-forum.com [nonactive] site Admin

Bigguy

Have you set permissions for the users to see the ads. ???

ArkServer

is it possible to include the ads on the memberlist +search?

Bigguy

They should show up there, either in the welcome user area or at the top/bottom of the page.

 
Advertisement: