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

abidejaz4u

on there that options where i can go


TheListener

Go to where it says modify for each membergroup.


Maxtor

after installing this mod in smf1.1.10 i see these errors:
8: Undefined offset: 21
/home/lmaxche1/public_html/maxcheaters.com/forum/Themes/default/BoardIndex.template.php (main sub template - eval?)
187

8: Undefined index: parent_boards
/home/lmaxche1/public_html/maxcheaters.com/forum/Themes/default/BoardIndex.template.php (main sub template - eval?)
194

8: Undefined offset: 333
/home/lmaxche1/public_html/maxcheaters.com/forum/Themes/default/BoardIndex.template.php (main sub template - eval?)
135

8: Undefined offset: 22
/home/lmaxche1/public_html/maxcheaters.com/forum/Themes/default/BoardIndex.template.php (main sub template - eval?)
171

8: Undefined offset: 525
/home/lmaxche1/public_html/maxcheaters.com/forum/Themes/default/BoardIndex.template.php (main sub template - eval?)
171

8: Undefined index: smf88
/home/lmaxche1/public_html/maxcheaters.com/forum/Themes/default/BoardIndex.template.php (main sub template - eval?)
172

8: Undefined index: smf10
/home/lmaxche1/public_html/maxcheaters.com/forum/Sources/Subs.php
856

8: Undefined index: lang_locale
/home/lmaxche1/public_html/maxcheaters.com/forum/Sources/Subs.php
865

8: Undefined offset: 92
/home/lmaxche1/public_html/maxcheaters.com/forum/Sources/Load.php
1296

8: Undefined offset: 92
/home/lmaxche1/public_html/maxcheaters.com/forum/Sources/Load.php
1296

these are some of errors.

abidejaz4u

Quote from: TheListener on September 26, 2009, 09:05:06 AM
Go to where it says modify for each membergroup.

sorry i did not find any option link this in it...plz tell me breifly

Muldoon

Hi guys,

I'm currently running SMF 1.1.10.  Which file am I supposed to download on the custom mod page?  I see four different zip files?

ad_mod_1-1-x_v2-3.zip (17KB) [54949] 
ad_mod_v2-3-4_SMF_vbeta4.zip (22KB) [37076] 
ad_mod_v2-3-1_SMF_v1-1-x.zip (21KB) [2188] 
ad_mod_v2-3-5_SMF_v2-0RC1-1.zip (22KB) [3340]

Thank you,
Muldoon

GreySkull-1

Seems to conflict with Global Headers and Footers mod.

I have a test site with no mods and it installed on SMF 2.0 RC1.2 with no problems.

My active site only has one mod and thats Global Headers and Footers...got errors when attempting to install the Ad Management mod package.


abidejaz4u

where is that option buddy

Maxtor

Quote from: Muldoon on September 26, 2009, 06:52:05 PM
Hi guys,

I'm currently running SMF 1.1.10.  Which file am I supposed to download on the custom mod page?  I see four different zip files?

ad_mod_1-1-x_v2-3.zip (17KB) [54949] 
ad_mod_v2-3-4_SMF_vbeta4.zip (22KB) [37076] 
ad_mod_v2-3-1_SMF_v1-1-x.zip (21KB) [2188] 
ad_mod_v2-3-5_SMF_v2-0RC1-1.zip (22KB) [3340]

Thank you,
Muldoon
this one:
ad_mod_v2-3-1_SMF_v1-1-x.zip (21KB) [2188] is 2.3.1 for SMF 1.1.x

Maxtor

Quote from: GreySkull-1 on September 26, 2009, 07:55:08 PM
Seems to conflict with Global Headers and Footers mod.

I have a test site with no mods and it installed on SMF 2.0 RC1.2 with no problems.

My active site only has one mod and thats Global Headers and Footers...got errors when attempting to install the Ad Management mod package.



me too. i get errors with both mods installed.


killer.nanowhiz


ad management n EOTS DZINE - COD MODERN WARFARE 2 theme


ad management mod is not working ......while it gets installed successfully .... i installed EOTS DZINE - COD MODERN WARFARE 2 theme and i m using SMF 2.0 RC1.2 , i went through many topic and found that it works for only smf default theme and i have to edit it manually ..... i dont have knowledge about programming n all.... somebody plz help me to edit it ...plzz tell me what to edit n where to edit

if you need any file to make changes over there .... i will post it here ....tell me which file is needed

lindseylakeshore

I have the ad mod in place and ads are running I have one at the top of the page and want to place more at the top of the page but they place in the same spot I want to run 4 ads across the top of the page next to eachother. how can i do this? thanks!

shadowcrews

i have a question:

1. i placed the ad to display on every page below the menu, when i refresh sometimes the ad dosent appear and sometime it does appear

2. i placed another add to display on post page, how do i specify it to appear on every post? assume the thread as 30 replies, how can i have the add appear below all the post?

appereciate if anyone could help

alangnw

Would just like to thank Smitten for the following answer earlier which worked.... to a degree.

Ad in the footer works on every page - great!

Ad under menu works great on the home page - but only the home page

Can't display withing posts or anywhere else (and towers not working)

Anyone have any suggestions?

Thanks


Quote from: Smitten on September 04, 2009, 05:47:01 PM
Quote from: John Kitchens on September 03, 2009, 10:57:22 PM
Hey Smitten,

I am glad you solved your problem. Please post the solution for the others here that will need it.

John Kitchens

For Kani119 Theme: INDEX.TEMPLATE.PHP

FIND:

<body>
  <div id="wrapper"/>
  <div id="head-l">
<div id="head-r">
  <div id="header">
  <div id="userarea">';
if ($context['user']['is_logged'])
{
echo '<b>', $txt['hello_member_ndt'], ' ', $context['user']['name'], '</b><br />';


ADD AFTER:

//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);
}

//Welcome Ads
if (function_exists("show_welcomeAds"))
{
$ads = show_welcomeAds();
if(!empty($ads))
{
echo '<td class="windowbg2">';
if($ads['type']==0)
echo $ads['content'];
else
eval($ads['content']);
echo '</td>';
}
unset($ads);
}


FIND:

<div id="mainarea">
<div id="sag">
<div id="sol">
  <div id="alt">
<div id="altsag">
<div id="altsol">
  <div id="ust">
<div id="ustsag">
<div id="ustsol">';
                                                  }


ADD AFTER:

//Below the menu ads
if (function_exists("show_indexAds") && function_exists("show_towerleftAds") && function_exists("show_towerrightAds"))
{
$ads = show_indexAds();
if(!empty($ads))
if($ads['type']==0)
echo $ads['content'];
else
eval($ads['content']);
unset($ads);

//Tower left Ads
$ads = show_towerleftAds();
if(!empty($ads))
echo '<table><tr><td valign="top">', $ads['type']==0 ? $ads['content'] : eval($ads['content']) ,'</td><td width="100%" valign="top">';

unset($ads);
//Tower Right Ads
$ads = show_towerrightAds();
if(!empty($ads))
echo '<table><tr><td width="100%" valign="top">';
unset($ads);
}


FIND:

// Show the "Powered by" and "Valid" logos, as well as the copyright. Remember, the copyright must be somewhere!

ADD BEFORE:

//Close table for towerright ads
if (function_exists("show_towerrightAds") && function_exists("show_towerleftAds") && function_exists("show_bottomAds"))
{
$ads = show_towerrightAds();
if(!empty($ads))
echo '</td><td valign="top">', $ads['type']==0 ? $ads['content'] : eval($ads['content']) ,'</td></tr></table>';

unset($ads);
//Close table for towerleft ads
$ads = show_towerleftAds();
if(!empty($ads))
echo '</td></tr></table>';
unset($ads);

//Show ads on the bottom of the page
$ads = show_bottomAds();
if(!empty($ads))
if($ads['type']==0)
echo $ads['content'];
else
eval($ads['content']);
unset($ads);
}


DISPLAY.TEMPLATE.PHP

FIND:

function template_main()
{
global $context, $settings, $options, $txt, $scripturl, $modSettings;


ADD AFTER:


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


FIND:

// Get all the messages...
while ($message = $context['get_message']())
{


REPLACE WITH

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


FIND:

// Show the member's signature?
if (!empty($message['member']['signature']) && empty($options['show_no_signatures']))
echo '
<hr width="100%" size="1" class="hrcolor" />
<div class="signature"><center>', $message['member']['signature'], '</center></div>';

echo '
</td>
</tr>
</table>
</td></tr>
<tr>
<td class="windowbg3"><br />
</td>
</tr>
</table>


ADD AFTER:

</td></tr>';
if (function_exists("show_posts"))
{
if ($adpost = show_posts($adcounter))
{
if($modSettings['ads_lookLikePosts'])
{
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">&#171; <b>', !empty($message['counter']) ? $txt[146] . ' #' . $message['counter'] : '', ' ', $txt[30], ':</b> ', $message['time'], ' &#187;</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>';
}
else
echo '
<tr><td style="padding: 1px 1px 0 1px;">
<table width="100%" cellpadding="3" cellspacing="0" border="0">
<tr>
<td class="windowbg3">', $adpost['type'] == 0 ? $adpost['content'] : eval($adpost['content']) , '</td>
</tr>
</table>
</td></tr>';
}

}

}

if(function_exists("show_lastpostAds") && function_exists("show_posts"))
{
if(($ads = show_lastpostAds()) && !show_posts($adcounter))
{
if($modSettings['ads_lookLikePosts'])
{
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">&nbsp;</td>
<td valign="middle">
&nbsp;</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, '';


echo '
</td>
</tr></table>
<hr width="100%" size="1" class="hrcolor" />
<div class="post">', $ads['type'] == 0 ? $ads['content'] : eval($ads['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>';
}
else
echo '
<tr><td style="padding: 1px 1px 0 1px;">
<table width="100%" cellpadding="3" cellspacing="0" border="0">
<tr>
<td class="windowbg3">', $ads['type'] == 0 ? $ads['content'] : eval($ads['content']) , '</td>
</tr>
</table>
</td></tr>';

}

}


BOARDINDEX.TEMPLATE.PHP

FIND:

// Show some statistics next to the link tree if SP1 info is off.

ADD BEFORE:


//Display ads on the board index
if (function_exists("show_boardAds"))
{
$ads = show_boardAds();
if(!empty($ads))
if($ads['type']==0)
echo $ads['content'];
else
eval($ads['content']);
unset($ads);
}


FIND:

// Sort the links into an array with new boards bold so it can be imploded.
$children = array();
/* Each child in each board's children has:
id, name, description, new (is it new?), topics (#), posts (#), href, link, and last_post. */
foreach ($board['children'] as $child)
{
$child['link'] = '<a href="' . $child['href'] . '" title="' . ($child['new'] ? $txt[333] : $txt[334]) . ' (' . $txt[330] . ': ' . $child['topics'] . ', ' . $txt[21] . ': ' . $child['posts'] . ')">' . $child['name'] . '</a>';
$children[] = $child['new'] ? '<b>' . $child['link'] . '</b>' : $child['link'];
}

echo '
<tr>
<td colspan="3" class="windowbg', !empty($settings['seperate_sticky_lock']) ? '3' : '', '">
<span class="smalltext"><b>', $txt['parent_boards'], '</b>: ', implode(', ', $children), '</span>
</td>
</tr>';
}
}
echo '
</table>';
}
echo '
</div>';


ADD AFTER:


//Display ads Between cats
if (function_exists("show_category"))
{
$ads = show_category($category['id']);
if(!empty($ads))
if($ads['type']==0)
echo $ads['content'];
else
eval($ads['content']);
unset($ads);
}


plusev

The MOD works fine on my custom theme with one exception - on any page with a poll I get the following error:

8: Undefined variable: adcounter
File: //Themes/default/Display.template.php
Line: 125 

105: </div>
106: </div>
107: <div id="pollmoderation">';
108: 
109: // Build the poll moderation button array.
110: $poll_buttons = array(
111: 'vote' => array('test' => 'allow_return_vote', 'text' => 'poll_return_vote', 'image' => 'poll_options.gif', 'lang' => true, 'url' => $scripturl . '?topic=' . $context['current_topic'] . '.' . $context['start']),
112: 'results' => array('test' => 'allow_poll_view', 'text' => 'poll_results', 'image' => 'poll_results.gif', 'lang' => true, 'url' => $scripturl . '?topic=' . $context['current_topic'] . '.' . $context['start'] . ';viewResults'),
113: 'change_vote' => array('test' => 'allow_change_vote', 'text' => 'poll_change_vote', 'image' => 'poll_change_vote.gif', 'lang' => true, 'url' => $scripturl . '?action=vote;topic=' . $context['current_topic'] . '.' . $context['start'] . ';poll=' . $context['poll']['id'] . ';' . $context['session_var'] . '=' . $context['session_id']),
114: 'lock' => array('test' => 'allow_lock_poll', 'text' => (!$context['poll']['is_locked'] ? 'poll_lock' : 'poll_unlock'), 'image' => 'poll_lock.gif', 'lang' => true, 'url' => $scripturl . '?action=lockvoting;topic=' . $context['current_topic'] . '.' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id']),
115: 'edit' => array('test' => 'allow_edit_poll', 'text' => 'poll_edit', 'image' => 'poll_edit.gif', 'lang' => true, 'url' => $scripturl . '?action=editpoll;topic=' . $context['current_topic'] . '.' . $context['start']),
116: 'remove_poll' => array('test' => 'can_remove_poll', 'text' => 'poll_remove', 'image' => 'admin_remove_poll.gif', 'lang' => true, 'custom' => 'onclick="return confirm(\'' . $txt['poll_remove_warn'] . '\');"', 'url' => $scripturl . '?action=removepoll;topic=' . $context['current_topic'] . '.' . $context['start']),
117: );
118: 
119: template_button_strip($poll_buttons);
120: 
121: echo '
122: </div>';
123: if (function_exists("show_posts"))
124: {
==>125: if ($adpost = show_posts($adcounter))
126: {
127: if($modSettings['ads_lookLikePosts'])
128: {
129: echo '
130: <div class="bordercolor">
131: <div class="clearfix windowbg3 largepadding">';
132:
133: // Show information about the poster of this message.
134: echo '
135: <div class="floatleft poster">
136: <h4>', $context['forum_name'], '</h4>';
137:
138: // Done with the information about the poster... on to the post itself.
139: echo '
140: </div>
141: <div class="postarea">
142: <div class="keyinfo">
143: <h5 id="subject_', $message['id'], '">
144: <a href="', $message['href'], '" rel="nofollow">', $message['subject'], '</a>
145: </h5>


If anyone would give me a hand with this issue I'd appreciate it. Thx

Chasingu

Is there anyway I can get this to show these ads to guests? I currently don't see a options for it.

Please help me fulfill my dream of owning a iPod Touch. Swagbucks is a search engine powered by Google and ask that allows you to gain swagbucks by searching. You can redeem these for even a PS3. Click and join today.

Yahmez

Quote from: Chasingu on September 29, 2009, 04:38:47 PM
Is there anyway I can get this to show these ads to guests? I currently don't see a options for it.
Yes, check the guest permissions. Are you using SMF 2.0RC2 or 1.1.x?

replay

I am now running SMF 2.0 RC1.2 and would like to add Ad Management mod again, i did run this once on 1.1.10 but due to the upgrade the mod stopped working,...so which ad management mod do i need to be compatable on this version.

Cheers All

Yahmez

Quote from: replay on September 29, 2009, 08:52:01 PM
I am now running SMF 2.0 RC1.2 and would like to add Ad Management mod again, i did run this once on 1.1.10 but due to the upgrade the mod stopped working,...so which ad management mod do i need to be compatable on this version.

Cheers All
Here:
http://custom.simplemachines.org/mods/index.php?action=download;mod=255;id=101786

Are you using the default theme?

replay


Advertisement: