News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Ad Management mod

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

Previous topic - Next topic

Mivi

I have looked for a setting like that... but cannot find it. ;)

Where is it located  ???

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

Mivi

Ok... vnm... i just forun the setting  ::)

I must have been blind.  8)
- hxxp:fon-forum.com [nonactive] site Admin

geezmo

Anyone knows the answer to this question?

Quote from: geezmo on October 08, 2006, 01:47:49 PM
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 not how to put the ad after the last post.

Of course, I can't use "15" because if I did, the ad woulld appear only after post 15 so any post before that, there won't be any ad.

Bigguy

#803
No, currently there is no way to show ads after the last post of a thread. Maybe in the next version.

geezmo

Ok thanks. I'll just manually code it then.

Bigguy

You could ask at www.smfads.com Jerm might know a way to do this. It might make things simplier for you. :)

jerm

Quote from: geezmo on October 13, 2006, 01:34:49 AM
Anyone knows the answer to this question?

Quote from: geezmo on October 08, 2006, 01:47:49 PM
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 not how to put the ad after the last post.

Of course, I can't use "15" because if I did, the ad woulld appear only after post 15 so any post before that, there won't be any ad.

There isn't an option as of yet to do this.

geezmo

Ok thanks, hopefully that can be added in the new version. For now, I'll just manually add the code.

riverts

i tried to install this mod to my forum version 1.1 RC3 but there is a failed test as shown below (6. Execute Modification ./Themes/default/Display.template.php Test failed )

please help me to solve this, any idea? i really need this mod on my forum.

1. Execute Code install.php 
2. Execute Modification ./index.php Test successful
3. Execute Modification ./Sources/Subs.php Test successful
4. Execute Modification ./Themes/default/index.template.php Test successful
5. Execute Modification ./Themes/default/BoardIndex.template.php Test successful
6. Execute Modification ./Themes/default/Display.template.php Test failed
7. Execute Modification ./Themes/default/MessageIndex.template.php Test successful
8. Execute Modification ./Sources/ManagePermissions.php Test successful
9. Extract File ./Sources/Ads.php 
10. Extract File ./Sources/LoadAds.php 
11. Extract File ./Themes/default/Ads.template.php 
12. Extract File ./Themes/default/languages/Ads.english.php


Bigguy

Install the mod and then download your Display.template.php. In that file 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 it with:

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


Lastly 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>';
}

}


Then re-upload this file to the appropriate spot

riverts

thanks for the reply, i will try this one later. im in the office so i cant test it. hopefully it will solve the problem. again, thanks a lot.

Bigguy


chinclub

I just tried to install and got test failed for both index.template.php & Display.template.php.

I think I found the manual install for Display.template.php around page 53 of this thread so can someone tell me how to manually install on index.template.php.

Thanks!

jerm

Manually installs can be found here: www.smfads.com in the theme board.

MoreBloodWine

Looks really good and stable on the default theme... now I just need to "try" and get this to work on my cutom theme so I can start postin a few ads... also assuming you have the same permissions set for all the mods you have "like show top show bottom etc" will this circulate through the adds like the news does smf forums assumin you have more than one piece of news.. hope this makes sense...
Want a sig like mine for your BTCGuild stats ? Then check this out: Spend-ur-Bits


Bigguy

If you have 2 ads marked to show in the same spot on the forum yes it will cycle through them. Not on every page refresh but you will see them change.

MoreBloodWine

#816
Quote from: Bigguy on October 18, 2006, 08:59:09 PM
If you have 2 ads marked to show in the same spot on the forum yes it will cycle through them. Not on every page refresh but you will see them change.
Cool... bec assumin I can get this to work on my custom theme i was considerin to sell ad space to people who play the game my forum is geared towards for the price of ingame gold / items...

Edit : Whats the curent cycling time between ads and can it be changed..
Want a sig like mine for your BTCGuild stats ? Then check this out: Spend-ur-Bits


Bigguy

No it can't be changed and I really don't think there is a cycling time it just happens as you refresh the page or go from page to page if ya know what I mean.

ivanstech

#818
i have install ad management mod in my  /forum/  , but i cannot  found in the Administration panel under the heading "Configuration". There is a new link there called "Ad Management" ??? , some said if i'm using smf 1.0.8 i can find it in the edit feature and option ! but still i cannot find anything about add management as well!. i'm using  default  themes  (is this mod working with custome themes? ) ... i need help on this ! thanks in advances!

Loverboy

^ Your language that you use, must be English you know..

Advertisement: