Ad Management mod

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

Previous topic - Next topic

oOTrentOo

It says an error occurred when I tried to install it.
Something about a missing database or something. Anyone know what this is about?

oOTrentOo

Quote from: Brutto on November 21, 2010, 02:48:40 PM
Database error:

SQL logic error or missing database
near "NOT": syntax error
File: /home/saldusfo/public_html/smf/Packages/temp/install.php
Line: 51

P.S. RC4 + SQLite

YES! This is exactly the same problem I have. Any ideas how to fix this?

vbgamer45

Does not support SQLite only MySQL.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

SoSad

Can I add two(2) right skycraper ads? I tried by only 1 will show.   :(

SMFHacks.com Team

How about doing a custom code and place in html table to get the same affect.
Disclaimer: SMFHacks.com Team is not 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

iain sherriff

#6765
I added this yesterday (2.0.2 with Crip's Anecdota) and it installed perfectly without fault  :)

However When I added my banner script (from a commercail ad provider who I dont want to name as yet! ) my users started getting bombarded with spam links (not sure if you'd call them pop ups.......when you closed a page there was another left behind it) for gambling sites etc.
Now I assume these were left by the people placing Ads with my Ad provider..................is that right ?
In which case they are not checking on who they use.

Does anyone else get this problem ?

I have removed the Ad script (leaving Ad Management in place) and they have stopped.

thanks  :o

(just had more feedback. some users on Chrome without java switched on didnt see the banners bu STILL got the gambling popups. I am right thinking that this must be from the Ad provider's script NOT from the people placing that Ads ?)
SMF 2.0.12

vbgamer45

It looks like it would be a probably with the ad provider or your forum is infected with a virus.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

iain sherriff

thanks for the reply.
as they have stopped now I have removed the Ad script but left everything else as is does that show that it IS the provider ?
SMF 2.0.12

Kat9119

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!  :-\

iain sherriff

I have to do this too. Im surprised no one has posted the relevant bits yet....
SMF 2.0.12

Kat9119

Quote from: iain sherriff on June 30, 2012, 10:12:53 PM
I have to do this too. Im surprised no one has posted the relevant bits yet....

It makes sense that they couldn't do it for every theme, but doesn't Core come with SMF? therefore I think it would be an all around edit that everyone using Core could use. I really really need this mod installed :(

Matthew K.

Eventually I'll get around to updating this modification and allow global theme support without having to touch any template files. However, until then, you'll need to complete the manual edits on the theme.

Not sure that I have time within the next week to manually tweak it in for you.

Kat9119

Quote from: Labradoodle-360 on June 30, 2012, 11:57:50 PM
Eventually I'll get around to updating this modification and allow global theme support without having to touch any template files. However, until then, you'll need to complete the manual edits on the theme.

Not sure that I have time within the next week to manually tweak it in for you.

Ok, well, its not a rush rush for me, I'd "like" it up by the 13th, but obviously if it can't be done it can't be, and I have no idea what I'm doing with it lmao. So, if you can help me out in the near future that would be awesome :) My site can still go up without it for now. But those files attached above might change in that time if I install other things.

iain sherriff

#6773
I cant guarantee this will work but it's what I am going to try  8)
I found the Parser and got this


Logo
Package Parser
[I'm ready for IPv6, are you?]
email twitter GooglePlus GitHub

    Forum
    GIT
    Password Generator
    PackageParser
    Pastebin
    SMF PacMan

General Package Information
This is general information about the package, such as the package ID and name.
Package ID: jeremy:ads
Package name: Ad Managment
Package version: 3.0.1
Package type: modification

Installation instructions for SMF versions: 2.0-2.99.99, 2.0 RC4,2.0 RC5
Note: If a file does not exist in your theme, it doesn't matter (as the file from the Default theme will be used).
In file Themes/[your theme]/BoardIndex.template.php
Find:

// Show some statistics if stat 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:

<tbody class="divider">
<tr>
<td colspan="4"></td>
</tr>
</tbody>';



Add after:


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





In file Themes/[your theme]/Display.template.php
Find:

// Show the anchor for the top and for the first message. If the first message is new, say so.



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

$messageStorage = '';
}





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:

}

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




Replace with:


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






In file Themes/[your theme]/MessageIndex.template.php
Find:

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



Add after:


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





Find:

echo '
</tbody>
</table>
</div>
</div>';



Replace with:

echo '
</tbody>
</table>
</div>
</div>';
//Display Ads on the Message index
if (function_exists("show_underchildren"))
{
$ads = show_underchildren();
if(!empty($ads))
if($ads['type']==0)
echo $ads['content'];
else
eval($ads['content']);
unset($ads);
}





SMF Package Parser, by Daniel15.
Wordpress Theme by ThemeZee

SleePyCode uses WordPress and Simple Machines | Page created in 1.774 seconds with 12 queries.
SleePyCode.com is hosted on Linode
Loading...


SMF 2.0.12

Kindred

iain sherriff,

those instructions are on the mod download page as well, under "Manual Install Instructions for SMF " [CHOOSE YOUR VERSION]


the problem that others are complaining about is that the mod installs only into the curve (default) theme (which is typical of most mods)
but because "core" has significantly different coding from curve, the install instructions are not just "cut and paste" between themes.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

iain sherriff

right, thanks
So with mine (Anecdota) I may not find the exact lines quoted.
Becomes a trial and error thing then I guess. Well if I find the right places I will post it.
Maybe part of the "problem" is that the mod is so popular thus creating a HUGE thread that people (myself included  O:) ) dont spend the time checking through other than with search.

All part of the fun  8) 8)
SMF 2.0.12

was1f

I Want Know THere Is Any Option TO Add Banner Add On The Center Of The Header. .

Here Is Screen Short I Want This Banner in Center Please help. .


Thanks.


NanoSector

Quote from: was1f on July 01, 2012, 01:25:41 PM
I Want Know THere Is Any Option TO Add Banner Add On The Center Of The Header. .

Here Is Screen Short I Want This Banner in Center Please help. .


Thanks.


If you are using BBCode, try using the [center] tag.

If you are using HTML (which I think you are), wrap the other HTML like this:
<div align="center">
Other HTML here
</div>


Could be invalid but it works.
My Mods / Mod Builder - A tool to easily create mods / Blog
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

Matthew K.

The align attribute isn't valid XHTML, you should know that. Rather use text-align or margins. Assuming it's inside of SMF (which it is, in this case) you can use the centertext class.

<div class="centertext">
Other HTML Here.
</div>

centertext is defined as:
.centertext
{
text-align: center;
margin-left: auto;
margin-right: auto;
}

Which covers all the browsers.

iain sherriff

Quote from: Labradoodle-360 on July 02, 2012, 02:04:36 AM
The align attribute isn't valid XHTML, you should know that. Rather use text-align or margins. Assuming it's inside of SMF (which it is, in this case) you can use the centertext class.

<div class="centertext">
Other HTML Here.
</div>

centertext is defined as:
.centertext
{
text-align: center;
margin-left: auto;
margin-right: auto;
}

Which covers all the browsers.

does the .centertext bit go in index.css ?
in curve or in the custom template ?
and where in the file does it go ?


thanks  :)
SMF 2.0.12

Advertisement: