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

pikeman

Hi, I switched to script 2.1.1 and since then the mode does not display banners at the bottom of the forum properly. Banners are not visible to guests from Firefox only when they are in one of the topics, when they log in, everything is fine. On the other pages the display is as it should be.
Other browsers display banners well without any problems.
What could be the problem?


vbgamer45

That would be strange. There is no browser checking code in the mod.
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

pikeman


hotrod007

Years ago you did some custom work for me...   Gave me a location...  Show Ads Instead of news..   I upgraded.. can you do this again...     https://njsaltwaterfisherman.com/forums/index.php

Matthias

I see google ads on your page. This is not as simple as it used to be.

If you have enabled automatic ads in your Adsense account and specified a fixed place for a Google ad on your website, ads will still be placed automatically.
Quality first

pikeman

Google ads are not related to mode (they were inserted manually and have an automatic display) and have nothing to do with this error.  With and without them, it appears described as I stated because of the drop-down menu in the right corner.

YouLechti

I installed on a test forum SMF 2.1.2 update upon SMF 2.0.18 and everything works well.

Now I tried to install Ad Management mod version 3.5d. But I get errors in installation. First six steps proceed fine, but then the installation stops.

If I install this mod, I'll get screen full of code (se below).

Where should I look a resolution?

Quotearray(14) {
  • => array(3) { ["file"]=> string(57) "/home/mlfoorumitest/public_html/Sources/Subs-Db-mysql.php" ["line"]=> int(590) ["function"]=> string(9) "log_error" } [1]=> array(3) { ["file"]=> string(57) "/home/mlfoorumitest/public_html/Sources/Subs-Db-mysql.php" ["line"]=> int(494) ["function"]=> string(12) "smf_db_error" } [2]=> array(3) { ["file"]=> string(50) "/home/mlfoorumitest/public_html/Sources/Errors.php" ["line"]=> int(138) ["function"]=> string(12) "smf_db_query" } [3]=> array(3) { ["file"]=> string(50) "/home/mlfoorumitest/public_html/Sources/Errors.php" ["line"]=> int(301) ["function"]=> string(9) "log_error" } [4]=> array(1) { ["function"]=> string(17) "smf_error_handler" } [5]=> array(3) { ["file"]=> string(57) "/home/mlfoorumitest/public_html/Sources/Subs-Db-mysql.php" ["line"]=> int(1027) ["function"]=> string(22) "mysqli_stmt_bind_param" } [6]=> array(3) { ["file"]=> string(50) "/home/mlfoorumitest/public_html/Sources/Errors.php" ["line"]=> int(129) ["function"]=> string(19) "smf_db_error_insert" } [7]=> array(3) { ["file"]=> string(57) "/home/mlfoorumitest/public_html/Sources/Subs-Db-mysql.php" ["line"]=> int(590) ["function"]=> string(9) "log_error" } [8]=> array(3) { ["file"]=> string(57) "/home/mlfoorumitest/public_html/Sources/Subs-Db-mysql.php" ["line"]=> int(494) ["function"]=> string(12) "smf_db_error" } [9]=> array(3) { ["file"]=> string(52) "/home/mlfoorumitest/public_html/Sources/Packages.php" ["line"]=> int(928) ["function"]=> string(12) "smf_db_query" } [10]=> array(3) { ["file"]=> string(48) "/home/mlfoorumitest/public_html/Sources/Subs.php" ["line"]=> int(6009) ["function"]=> string(14) "PackageInstall" } [11]=> array(3) { ["file"]=> string(52) "/home/mlfoorumitest/public_html/Sources/Packages.php" ["line"]=> int(91) ["function"]=> string(11) "call_helper" } [12]=> array(3) { ["file"]=> string(49) "/home/mlfoorumitest/public_html/Sources/Admin.php" ["line"]=> int(499) ["function"]=> string(8) "Packages" } [13]=> array(3) { ["file"]=> string(41) "/home/mlfoorumitest/public_html/index.php" ["line"]=> int(191) ["function"]=> string(9) "AdminMain" } } Error loop.array(5) {
  • => array(3) { ["file"]=> string(57) "/home/mlfoorumitest/public_html/Sources/Subs-Db-mysql.php" ["line"]=> int(590) ["function"]=> string(9) "log_error" } [1]=> array(3) { ["file"]=> string(57) "/home/mlfoorumitest/public_html/Sources/Subs-Db-mysql.php" ["line"]=> int(494) ["function"]=> string(12) "smf_db_error" } [2]=> array(3) { ["file"]=> string(57) "/home/mlfoorumitest/public_html/Sources/Subs-Db-mysql.php" ["line"]=> int(802) ["function"]=> string(12) "smf_db_query" } [3]=> array(3) { ["file"]=> string(51) "/home/mlfoorumitest/public_html/Sources/Session.php" ["line"]=> int(187) ["function"]=> string(13) "smf_db_insert" } [4]=> array(1) { ["function"]=> string(12) "sessionWrite" } } Error loop.

vbgamer45

Strange error does it say a line and file number I see the breakdown.
 ... SMF 2.1.x right? the index.template.php you can see which part it fails on a try to do a manual edit in that location.
This normally happens if another mod edits the same code.
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

gevv

Hello,

How do I show the "Display ads after the last post" banner at the top of the post

can it be like "Display ads before the last post"

ElkArte is a modern, powerful community building forum software. https://www.elkarte.net/

vbgamer45

Do you want to move that location or add a new one?
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

gevv

i want to move location before the last post
ElkArte is a modern, powerful community building forum software. https://www.elkarte.net/

gevv

@vbgamer45 In which php file are the ads display codes?

Can i make it show before the last post by adding a css class?
ElkArte is a modern, powerful community building forum software. https://www.elkarte.net/

vbgamer45

It's in the display.template.php for the theme it self.


Two ad function call options you can move or use
show_threadAds();
or
show_posts($adcounter)

Probably want to go with the last option if (function_exists("show_posts")) and readjust the code location
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

gevv

Thanks @vbgamer45

I moved the codes but it went inside the message content. It doesn't go higher, I tried many places

You cannot view this attachment.

global $adcounter;
if (function_exists("show_posts") && empty($message['adpost']))
{

if ($adpost = show_posts($adcounter))
{
if($modSettings['ads_lookLikePosts'])
{
$message['adpost'] = 1;
$message['body'] = $adpost['type'] == 0 ? $adpost['content'] : eval($adpost['content']);
template_single_post($message);

}
else
{
echo '
<div class="windowbg">


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


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

if(function_exists("show_lastpostAds") && function_exists("show_posts") && empty($message['adpost'])  && ($context['topic_last_message'] == $message['id']   || ($message['counter']+1) % $context['messages_per_page'] == 0))
{
if(($adpost = show_lastpostAds()) && !show_posts($adcounter))
{
if($modSettings['ads_lookLikePosts'])
{
$message['adpost'] = 1;
$message['body'] = $adpost['type'] == 0 ? $adpost['content'] : eval($adpost['content']);
template_single_post($message);


}
else
echo '
<div class="windowbg">

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


</div>
<hr class="post_separator" />
';
}
}
ElkArte is a modern, powerful community building forum software. https://www.elkarte.net/

vbgamer45

Attach your display.template.php
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

gevv

You cannot view this attachment.
ElkArte is a modern, powerful community building forum software. https://www.elkarte.net/

vbgamer45

Try this to add first post
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

gevv

Thanks @vbgamer45

I'm trying to move it to the top of the last post.

You cannot view this attachment.




Opposite of "Display ads after the last post" property

You cannot view this attachment.
ElkArte is a modern, powerful community building forum software. https://www.elkarte.net/

vbgamer45

So the top of the last post page? And not anywhere else?
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

gevv

ElkArte is a modern, powerful community building forum software. https://www.elkarte.net/

Advertisement: