Customizing SMF > Modifications and Packages

Ad Management mod 3.2 Released SMF 2.0.x and SMF 1.1.x Support!

<< < (1361/1463) > >>

Kat9119:

--- Quote from: Kat9119 on June 30, 2012, 12:06:14 PM ---This installs fine other then the template files. I'm using "Core" with some mods installed and minor edits. The three template files fail mainly due to the "replace" codes. I don't have those in my files.

I've searched through this thread, and it looks like a lot of people have had issues with this with not much help other then told to compare files from the Core theme and Default theme. So I downloaded and installed WinMerge, I tried to add the code where I thought they'd be, which probably was "ok" but then the "replace" codes stumped me. When I tried to place them where I thought they went, it gave me an error.

I've attached the three template files in hopes that someone can help me. Doesn't seem like a huge edit and someone who knows what they are doing I would think could edit this very quickly. This is much much much appreciated. If I wasn't thousands of dollars in debut with medical bills I'd  pay you for your help  8)

I have a live event going on on my forum on the 13th and this forum needs to be updated and live about a week before that to install and tweak things I can't on my computer. So please help if you can, I'm ready to tear my hair out!  :-\

--- End quote ---

Trying to see if anyone still wants to help me on this sometime within the next couple weeks. My forum still is not live...keep missing the date due to being sick. But I'd appreciate help with it once it is live...as then I can give correct finalized files for the help.

mladja037:
Please help install error in two files:

Display.template
Board.Index.template

Please integrate the code... :(

BOARD.INDEX


--- Code: --- echo '<tbody><tr><td colspan="4">';
//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);
}
echo ' </td></tr></tbody>';
--- End code ---




DISPLAY.INDEX Replace


--- Code: ---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>';

--- End code ---

arcadecontrols:
I'm having an issue with this mod on my 2.02 forum. I'm attempting to use a Google ad. However, when I paste the contents of the Google ad into the ad text box (set to HTML mode), it goes awry. It pastes the entire ad block fine, and I set the various other parameters and hit save. However, when I go back to modify the ad, the ad text box is truncated towards the end. This of course messes up the forum as well as the ad not displaying.

I've attempted it with two different Google ads copy/pasted from the Google Adsense site. This happens whether I am using the default SMS 2.02 theme, or the Yabb_SE_Classic theme.

Here is the text I'm pasting into the box:


--- Code: ---<script type="text/javascript"><!--
google_ad_client = "ca-pub-xxxxxxxxxxxxxxxx";
/* Forum-Graphical */
google_ad_slot = "7740891865";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>

--- End code ---

(I have replaced my specific ad client # with x's here obviously, but I am pasting it unaltered in the ad box)

When I go back to look at it after it's saved, it truncates in the second to last line, so that it ends at: "src="http://pagead2.goog [nofollow]"

The exact spot of truncation varies somewhat depending on what ad I put in there, but it's always in the second to last line, and the last ending
--- Code: ---</script>
--- End code ---
line is always missing as well.

Without knowing what's happening behind the scenes, it's acting very much as if there is a limit to the # of characters that can be put in the ad box.

Any help? As I'm sure you often hear, if I can get this working I'm very likely to want to buy the pro version. I'm reluctant to jump up to the pro version however until I can test out the free one first.

Appreciate any help - thanks!

AMWebby:
I think this is a cool mod and am on the verge of upgrading to the pro version. However I've come across a bug. I've searched this topic but can find no mention of it.

I have certain groups on my forum (and admins) set not to see ads. However, for those groups the New Post and Go Up/Go Down buttons no longer work. I'm guessing because they are anchor links and the anchor is inside a display: none element if that group can't see ads.

The New Post and Go Up/Go Down buttons work fine for those who can see ads so I'm fairly sure my hypothesis is correct but wanted to see if anyone else had encountered this (and a fix) before I start digging.

Edit: Mark this as solved. I just found out it is unrelated to this mod. I run my forum inside a Joomla wrapper and I had altered it from fixed height to 100%. It seems that was enough to short-circuit the anchor links.

KRISHNA0007:
thanks for this awesome mod

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version