Advertisement:

Author Topic: Ad Management mod 3.1 Released SMF 2.0.x and SMF 1.1.x Support!  (Read 1141804 times)

Offline Labradoodle-360

  • Developer
  • SMF Super Hero
  • *
  • Posts: 11,442
  • Gender: Male
    • matthew.kerle on Facebook
    • @matthew_kerle on Twitter
Re: Ad Management mod 3.0 Released SMF 2.0 Support!
« Reply #6780 on: July 03, 2012, 03:59:04 AM »
No...I was saying it's already a part of SMF. And just showing you what it's defined as.

The quality of the responses received is directly proportional to the quality of the question asked. | My Modifications

Offline iain sherriff

  • Jr. Member
  • **
  • Posts: 200
Re: Ad Management mod 3.0 Released SMF 2.0 Support!
« Reply #6781 on: July 03, 2012, 05:10:47 AM »

thanks

Offline iain sherriff

  • Jr. Member
  • **
  • Posts: 200
Re: Ad Management mod 2.6.3.1 Released SMF RC3 Support!
« Reply #6782 on: July 06, 2012, 06:04:58 AM »
Just for info........
I have smf 2.0.2 with mods
Users online today
Activity bar
Ohara Youtb embed
Tapatalk
and use Crip's Anecdota theme.

Ad Management works perfectly as installed with the excetion of the code (below) for the welcome area. I made no other code alterations to the custom theme to make Ad Management work.  :)



I was looking right before the news I just got the code, doing that you would have to remove that last echo however

Its that or before search, If I'm correct, which I think I am, that ad would be floated right, so it could be placed in a few places to work correctly.


Try the news one 1st here is what it should look like.

Code: [Select]
                     //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);
                     }
                          // Show a random news item? (or you could pick one from news_lines...)

Try that, I believe its parse error free

HOLD up on this, let me look at the code you got their, ok, I guess give it a shot then

Offline WasdMan

  • Jr. Member
  • **
  • Posts: 176
  • Gender: Male
  • SMF opposition
Re: Ad Management mod 3.0 Released SMF 2.0 Support!
« Reply #6783 on: July 08, 2012, 05:02:01 AM »
Slight modification, the following results were achieved:

Before:


Then:


Resolve to open the Themes / default / Display.template.php and find the file:

Look for:
Code: [Select]
if (function_exists("show_posts"))
{
$messageStorage = $message;
if ($adpost = show_posts($adcounter))
{
if($modSettings['ads_lookLikePosts'])
{
echo '
<div class="windowbg">
<span class="topslice"><span></span></span>
<div class="poster">
<h4>', $context['forum_name'], '</h4>
</div>
<div class="postarea">
<div class="flow_hidden">
<div class="keyinfo">
<div class="messageicon">
<img src="', $message['icon_url'] . '" alt="" border="0" />
</div>
<h5 id="subject_', $message['id'], '">
<a href="', $message['href'], '" rel="nofollow">', $message['subject'], '</a>
</h5>
<div class="smalltext">&#171; <strong>', !empty($message['counter']) ? $txt['reply_noun'] . ' #' . $message['counter'] : '', ' ', $txt['on'], ':</strong> ', $message['time'], ' &#187;</div>
<div id="msg_', $message['id'], '_quick_mod"></div>
</div>';

// If this is the first post, (#0) just say when it was posted - otherwise give the reply #.
if ($message['can_approve'] || $context['can_reply'] || $message['can_modify'] || $message['can_remove'] || $context['can_split'] || $context['can_restore_msg'])
echo '
<ul class="reset smalltext quickbuttons">';

// Can they reply? Have they turned on quick reply?
if ($context['can_reply'] && !empty($options['display_quick_reply']))
echo '
<li class="quote_button"><a>', $txt['quote'], '</a></li>';

// So... quick reply is off, but they *can* reply?
elseif ($context['can_reply'])
echo '
<li class="quote_button"><a>', $txt['quote'], '</a></li>';

// Can the user modify the contents of this post?
if ($message['can_modify'])
echo '
<li class="modify_button"><a>', $txt['modify'], '</a></li>';

// How about... even... remove it entirely?!
if ($message['can_remove'])
echo '
<li class="remove_button"><a>', $txt['remove'], '</a></li>';

// What about splitting it off the rest of the topic?
if ($context['can_split'] && !empty($context['num_replies']))
echo '
<li class="split_button"><a>', $txt['split'], '</a></li>';

// Can we restore topics?
if ($context['can_restore_msg'])
echo '
<li class="restore_button"><a>', $txt['restore_message'], '</a></li>';

if ($message['can_approve'] || $context['can_reply'] || $message['can_modify'] || $message['can_remove'] || $context['can_split'] || $context['can_restore_msg'])
echo '
</ul>';

echo '
</div>';


// Show the post itself, finally!
echo '
<div class="post">';

echo '
<div class="inner" id="msg_', $message['id'], '"', '>', $adpost['type'] == 0 ? $adpost['content'] : eval($adpost['content']) ,'</div>
</div>';


echo '
</div>


<span class="botslice"><span></span></span>
</div>
<hr class="post_separator" />
';
}
else
echo '
<div class="windowbg">
<span class="topslice"><span></span></span>

<div align="center">', $adpost['type'] == 0 ? $adpost['content'] : eval($adpost['content']) ,'</div>

<span class="botslice"><span></span></span>
</div>
<hr class="post_separator" />
';
}
}
}

if(function_exists("show_lastpostAds") && function_exists("show_posts"))
{
$message = $messageStorage;
if(($adpost = show_lastpostAds()) && !show_posts($adcounter))
{
if($modSettings['ads_lookLikePosts'])
{
echo '
<div class="windowbg">
<span class="topslice"><span></span></span>
<div class="poster">
<h4>', $context['forum_name'], '</h4>
</div>
<div class="postarea">
<div class="flow_hidden">
<div class="keyinfo">
<div class="messageicon">
<img src="', $message['icon_url'] . '" alt="" border="0" />
</div>
<h5 id="subject_', $message['id'], '">
<a href="', $message['href'], '" rel="nofollow">', $message['subject'], '</a>
</h5>
<div class="smalltext">&#171; <strong>', !empty($message['counter']) ? $txt['reply_noun'] . ' #' . $message['counter'] : '', ' ', $txt['on'], ':</strong> ', $message['time'], ' &#187;</div>
<div id="msg_', $message['id'], '_quick_mod"></div>
</div>';

// If this is the first post, (#0) just say when it was posted - otherwise give the reply #.
if ($message['can_approve'] || $context['can_reply'] || $message['can_modify'] || $message['can_remove'] || $context['can_split'] || $context['can_restore_msg'])
echo '
<ul class="reset smalltext quickbuttons">';

// Can they reply? Have they turned on quick reply?
if ($context['can_reply'] && !empty($options['display_quick_reply']))
echo '
<li class="quote_button"><a>', $txt['quote'], '</a></li>';

// So... quick reply is off, but they *can* reply?
elseif ($context['can_reply'])
echo '
<li class="quote_button"><a>', $txt['quote'], '</a></li>';

// Can the user modify the contents of this post?
if ($message['can_modify'])
echo '
<li class="modify_button"><a>', $txt['modify'], '</a></li>';

// How about... even... remove it entirely?!
if ($message['can_remove'])
echo '
<li class="remove_button"><a>', $txt['remove'], '</a></li>';

// What about splitting it off the rest of the topic?
if ($context['can_split'] && !empty($context['num_replies']))
echo '
<li class="split_button"><a>', $txt['split'], '</a></li>';

// Can we restore topics?
if ($context['can_restore_msg'])
echo '
<li class="restore_button"><a>', $txt['restore_message'], '</a></li>';

if ($message['can_approve'] || $context['can_reply'] || $message['can_modify'] || $message['can_remove'] || $context['can_split'] || $context['can_restore_msg'])
echo '
</ul>';

echo '
</div>';


// Show the post itself, finally!
echo '
<div class="post">';

echo '
<div class="inner" id="msg_', $message['id'], '"', '>', $adpost['type'] == 0 ? $adpost['content'] : eval($adpost['content']) ,'</div>
</div>';


echo '
</div>


<span class="botslice"><span></span></span>
</div>
<hr class="post_separator" />
';
}
else
echo '
<div class="windowbg">
<span class="topslice"><span></span></span>

<div align="center">', $adpost['type'] == 0 ? $adpost['content'] : eval($adpost['content']) ,'</div>

<span class="botslice"><span></span></span>
</div>
<hr class="post_separator" />
';
}
}

echo '
</form>
</div>
<a id="lastPost"></a>';

Replace this:
Code: [Select]
if (function_exists("show_posts"))
{
$messageStorage = $message;
if ($adpost = show_posts($adcounter))
{
if($modSettings['ads_lookLikePosts'])
{
echo '
<div class="windowbg">
<span class="topslice"><span></span></span>

<div class="postarea2">
<div class="flow_hidden2">
<div class="keyinfo">

</div>';



echo '
</div>';


// Show the post itself, finally!
echo '
<div class="post">';

echo '
<div class="inner2" id="msg_', $message['id'], '"', '>', $adpost['type'] == 0 ? $adpost['content'] : eval($adpost['content']) ,'</div>
</div>';


echo '
</div>


<span class="botslice"><span></span></span>
</div>
<hr class="post_separator" />
';
}
else
echo '
<div class="windowbg">
<span class="topslice"><span></span></span>

<div align="center">', $adpost['type'] == 0 ? $adpost['content'] : eval($adpost['content']) ,'</div>

<span class="botslice"><span></span></span>
</div>
<hr class="post_separator" />
';
}
}
}

if(function_exists("show_lastpostAds") && function_exists("show_posts"))
{
$message = $messageStorage;
if(($adpost = show_lastpostAds()) && !show_posts($adcounter))
{
if($modSettings['ads_lookLikePosts'])
{
echo '
<div class="windowbg">
<span class="topslice"><span></span></span>
<div class="poster">
<h4>', $context['forum_reklam'], '</h4>
</div>
<div class="postarea">
<div class="flow_hidden">
<div class="keyinfo">
<div class="messageicon">
<img src="', $message['icon_url'] . '" alt="" border="0" />
</div>
<h5 id="subject_', $message['id'], '">
<a href="', $message['href'], '" rel="nofollow">', $message['subject'], '</a>
</h5>
<div class="smalltext">&#171; <strong>', !empty($message['counter']) ? $txt['reply_noun'] . ' #' . $message['counter'] : '', ' ', $txt['on'], ':</strong> ', $message['time'], ' &#187;</div>
<div id="msg_', $message['id'], '_quick_mod"></div>
</div>';

// If this is the first post, (#0) just say when it was posted - otherwise give the reply #.
if ($message['can_approve'] || $context['can_reply'] || $message['can_modify'] || $message['can_remove'] || $context['can_split'] || $context['can_restore_msg'])
echo '
<ul class="reset smalltext quickbuttons">';

// Can they reply? Have they turned on quick reply?
if ($context['can_reply'] && !empty($options['display_quick_reply']))
echo '
<li class="quote_button"><a>', $txt['quote'], '</a></li>';

// So... quick reply is off, but they *can* reply?
elseif ($context['can_reply'])
echo '
<li class="quote_button"><a>', $txt['quote'], '</a></li>';

// Can the user modify the contents of this post?
if ($message['can_modify'])
echo '
<li class="modify_button"><a>', $txt['modify'], '</a></li>';

// How about... even... remove it entirely?!
if ($message['can_remove'])
echo '
<li class="remove_button"><a>', $txt['remove'], '</a></li>';

// What about splitting it off the rest of the topic?
if ($context['can_split'] && !empty($context['num_replies']))
echo '
<li class="split_button"><a>', $txt['split'], '</a></li>';

// Can we restore topics?
if ($context['can_restore_msg'])
echo '
<li class="restore_button"><a>', $txt['restore_message'], '</a></li>';

if ($message['can_approve'] || $context['can_reply'] || $message['can_modify'] || $message['can_remove'] || $context['can_split'] || $context['can_restore_msg'])
echo '
</ul>';

echo '
</div>';


// Show the post itself, finally!
echo '
<div class="post">';

echo '
<div class="inner" id="msg_', $message['id'], '"', '>', $adpost['type'] == 0 ? $adpost['content'] : eval($adpost['content']) ,'</div>
</div>';


echo '
</div>


<span class="botslice"><span></span></span>
</div>
<hr class="post_separator" />
';
}
else
echo '
<div class="windowbg">
<span class="topslice"><span></span></span>

<div align="center">', $adpost['type'] == 0 ? $adpost['content'] : eval($adpost['content']) ,'</div>

<span class="botslice"><span></span></span>
</div>
<hr class="post_separator" />
';
}
}

echo '
</form>
</div>
<a id="lastPost"></a>';

That's not disturbing in the messages and links to many key icon. Remains the only advertising.

Offline vbgamer45

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 15,391
    • smfhacks on Facebook
    • @createaforum on Twitter
    • SMF For Free
Re: Ad Management mod 3.0 Released SMF 2.0 Support!
« Reply #6784 on: July 08, 2012, 10:22:08 AM »
Looks good WasdMan thanks for the tip!
SMF For Free -Free SMF Forum hosting.
SMFHacks.com -  Paid Modifications for SMF

Latest Mod:
EzPortal - A Portal System for SMF
Community Suite
Newsletter Pro SMF Gallery Pro SMF Classifieds SMF Store

Offline TeresaMiller

  • Semi-Newbie
  • *
  • Posts: 19
Re: Ad Management mod 3.0 Released SMF 2.0 Support!
« Reply #6785 on: July 19, 2012, 10:12:20 AM »
For some reason, the Ad Management mod is now showing my ads doubled.

I had a left tower, and a right tower to be shown on each page. It's showing the left tower twice, side by side and the same on the left.

What is the cause, and how can I fix it?

Offline Labradoodle-360

  • Developer
  • SMF Super Hero
  • *
  • Posts: 11,442
  • Gender: Male
    • matthew.kerle on Facebook
    • @matthew_kerle on Twitter
Re: Ad Management mod 3.0 Released SMF 2.0 Support!
« Reply #6786 on: July 19, 2012, 10:18:06 AM »
It's most likely that the template function is being called twice in index.template.php probably.

The quality of the responses received is directly proportional to the quality of the question asked. | My Modifications

Offline TeresaMiller

  • Semi-Newbie
  • *
  • Posts: 19
Re: Ad Management mod 3.0 Released SMF 2.0 Support!
« Reply #6787 on: July 19, 2012, 10:25:10 AM »
It's most likely that the template function is being called twice in index.template.php probably.

So how do I find and fix that?

Offline Labradoodle-360

  • Developer
  • SMF Super Hero
  • *
  • Posts: 11,442
  • Gender: Male
    • matthew.kerle on Facebook
    • @matthew_kerle on Twitter
Re: Ad Management mod 3.0 Released SMF 2.0 Support!
« Reply #6788 on: July 19, 2012, 11:15:20 AM »
Remove one call to the template function ;)

The quality of the responses received is directly proportional to the quality of the question asked. | My Modifications

Online Kindred

  • Support Specialist
  • SMF Master
  • *
  • Posts: 31,344
  • Gender: Male
    • wagner999 on Facebook
    • @Kindred_999 on Twitter
Re: Ad Management mod 3.0 Released SMF 2.0 Support!
« Reply #6789 on: July 19, 2012, 11:38:17 AM »
more specifically, you will have to use the mod parser, find the duplicated code (and I suspect more code was duplciated than the bit showing the error) and then manually remove it.
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support forums.  Thank you.

Offline TeresaMiller

  • Semi-Newbie
  • *
  • Posts: 19
Re: Ad Management mod 3.0 Released SMF 2.0 Support!
« Reply #6790 on: July 19, 2012, 11:42:55 AM »
You're both talking above my head.  :-[

I need more specific instructions, because I have no idea what a mod parser is.

Offline Labradoodle-360

  • Developer
  • SMF Super Hero
  • *
  • Posts: 11,442
  • Gender: Male
    • matthew.kerle on Facebook
    • @matthew_kerle on Twitter
Re: Ad Management mod 3.0 Released SMF 2.0 Support!
« Reply #6791 on: July 19, 2012, 11:49:39 AM »
Go ahead and attach your themes index.template.php and I'll help you.

The quality of the responses received is directly proportional to the quality of the question asked. | My Modifications

Offline TeresaMiller

  • Semi-Newbie
  • *
  • Posts: 19
Re: Ad Management mod 3.0 Released SMF 2.0 Support!
« Reply #6792 on: July 19, 2012, 07:19:19 PM »
Here it is, and thank you!

Teresa

Offline TeresaMiller

  • Semi-Newbie
  • *
  • Posts: 19
Re: Ad Management mod 3.0 Released SMF 2.0 Support!
« Reply #6793 on: July 19, 2012, 07:22:57 PM »
Oh, wait, I think I attached the wrong one. You said the themes template, not the ads template.

Here is the themes one.

Offline NiceCarvings

  • Semi-Newbie
  • *
  • Posts: 96
    • nicecarvings on Facebook
    • @nicecarvings on Twitter
    • Nice Carvings Custom Wood Signs
Re: Ad Management mod 3.0 Released SMF 2.0 Support!
« Reply #6794 on: July 21, 2012, 02:07:13 AM »
Hi there.

I really like this mod. There is a great chance I will get the pro version down th eline. For now, is there a way to change the position of after last post slightly?

I have attached a screenshot of where  I would like to put it.   :)

Offline Labradoodle-360

  • Developer
  • SMF Super Hero
  • *
  • Posts: 11,442
  • Gender: Male
    • matthew.kerle on Facebook
    • @matthew_kerle on Twitter
Re: Ad Management mod 3.0 Released SMF 2.0 Support!
« Reply #6795 on: July 21, 2012, 03:21:28 AM »
It's definitely possible.

The quality of the responses received is directly proportional to the quality of the question asked. | My Modifications

Offline NiceCarvings

  • Semi-Newbie
  • *
  • Posts: 96
    • nicecarvings on Facebook
    • @nicecarvings on Twitter
    • Nice Carvings Custom Wood Signs
Re: Ad Management mod 3.0 Released SMF 2.0 Support!
« Reply #6796 on: July 21, 2012, 02:15:52 PM »
It's definitely possible.

Wow you have a lot of cool mods! I will have to get snow for sure come holiday season.  :)


Ok so now is anyone willing to help me relocate that ad position?

Offline zuul123123

  • Newbie
  • *
  • Posts: 8
Re: Ad Management mod 3.0 Released SMF 2.0 Support!
« Reply #6797 on: July 27, 2012, 06:17:09 PM »
I'm having serious problems with this mod. When I go to install it, I run into some "test failed" results, like so

Then when I do install it, I use this as the settings , am I doing something wrong, because then I get this error on the posts,

Then I try and uninstall it and I get this, which blocks off the entire board!

Offline SMFHacks.com Team

  • Jr. Member
  • **
  • Posts: 165
    • smfhacks on Facebook
    • @smfhacks on Twitter
    • SMFHacks.com
Re: Ad Management mod 3.0 Released SMF 2.0 Support!
« Reply #6798 on: July 27, 2012, 07:12:49 PM »
The install looks ok no errors only errors on the extra theme called core.
Disclaimer: SMFHacks.com Team is in no way directly affiliated with the SMF Team or the SimpleMachines NPO.
SMFHacks.com -  Paid Modifications for SMF

Latest Mods:
Community Suite
Newsletter Pro SMF Gallery Pro SMF Classifieds SMF Store

Offline zuul123123

  • Newbie
  • *
  • Posts: 8
Re: Ad Management mod 3.0 Released SMF 2.0 Support!
« Reply #6799 on: July 27, 2012, 08:05:47 PM »
Okay, I am using the default theme, so why is it giving me that error?