• Welcome to Simple Machines Community Forum. Please login or sign up.
October 24, 2021, 11:11:49 PM

News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord


Ad Management mod

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

Previous topic - Next topic

perfec2

Quote from: vbgamer45 on June 20, 2020, 11:04:56 AM
TRY

alter table smf_ads change HITS HITS BIGINT NOT NULL default '0';

This solved it.
Thank you very much.

gorbi


vbgamer45

You would have to write a conditional statement in php and check the ad area to show or not show the ad. That is by modifying the SMF files.
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

gorbi

How much will it cost to upgrade the mod?

gorbi

Make at least a blacklist of boards. Please

vbgamer45

I would have to see what changes would be needed to make that happen. It might cheaper to upgrade to Ad Seller Pro https://www.smfhacks.com/ad-seller-pro.php. It does have options to display ads on certain boards only.  And it is newer coded/more updated
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

gorbi

I need to prohibit display on one board, not list all boards to display.

vbgamer45

Can you use the "Which boards should this ad display in" setting?
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

gorbi

I can, but I need to list about a hundred boards

vbgamer45

I would suggest upgrading to adseller pro. If you want I can setup a demo for you adminside.
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

Douglas

Goodness... when's the last time I've asked for help?! ;)

Running some ads on the posts page (between 2 and 3). On Curve, it's displaying fine, however, we're using Core as the default (fresh install of 2.0.17. Only Akismet and the Ad Management mods are installed.

I'm attaching the original Display.template.php file (Display.template.ORIG.php) and the post-modification file (Display.template.NEW.php) to this post.

BTW, the Ads Management mod installer fails the Core theme for these files:
index.template.php
BoardIndex.template.php
Display.template.php
MessageIndex.template.php

when trying to install this through the package manager. I wanted to pass that along (usually on the "AFTER" or "REPLACE" items).

Thanks, vbgamer, for any assistance you can smack me around with (HA)!
Doug Hazard
* Full Stack (Web) Developer for The Catholic Diocese of Richmond
(20+ Diocesan sites, 130+ Church sites & 24 School sites)
* Sports Photographer and Media Personality
* CFB Historian
* Tech Admin for one 1M+ post, one 2M+ post and one 10M+ post sites (last two are powered by multiple servers)
* WordPress Developer (Junkie)

vbgamer45

Updated file attached was missing a couple code additions to the file



Core theme is a little different so a lot of the autoapplied code may not work well with it.
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

Douglas

October 09, 2020, 06:00:44 PM #7932 Last Edit: October 09, 2020, 06:13:01 PM by Douglas
Heya, vbgamer, thank you!

DISREGARD the message below. My connection was interrupted when I tried to upload the corrected file. It's working!

Thank you, thank you!

I dropped the updated file into place (yep, renamed it, haha!) and cleared the built in cache. No ads between the 2nd and 3rd, and the 5th and 6th posts.

https://lastwordonsports.com/boards/index.php?topic=770.0

I dropped in a "DougTest" with each ad spot, so I could find that line within the source code (it's not coming through).
Doug Hazard
* Full Stack (Web) Developer for The Catholic Diocese of Richmond
(20+ Diocesan sites, 130+ Church sites & 24 School sites)
* Sports Photographer and Media Personality
* CFB Historian
* Tech Admin for one 1M+ post, one 2M+ post and one 10M+ post sites (last two are powered by multiple servers)
* WordPress Developer (Junkie)

vbgamer45

Ah, Glad you have it working! I was confused myself since that was the only part that was missing.
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

Douglas

Got a suggestion... this is actually mission critical for three sites I manage.

Need an ad spot (has to be responsive, but should support banner or box ads) in the header, which can replace the SMF logo. See attached image. :)
Doug Hazard
* Full Stack (Web) Developer for The Catholic Diocese of Richmond
(20+ Diocesan sites, 130+ Church sites & 24 School sites)
* Sports Photographer and Media Personality
* CFB Historian
* Tech Admin for one 1M+ post, one 2M+ post and one 10M+ post sites (last two are powered by multiple servers)
* WordPress Developer (Junkie)

vbgamer45

What I would suggest is to move this block of code from index.template.php to main logo area instaed

// Begin Ad  management Location - Welcome Area/User Information Box

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

// End Ad  management Location - Welcome Area/User Information Box





Responsive I guess depends more on the theme/code entered in the area.
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

Douglas

Not quite working...

https://bearlydoug.com/forums/

The big blue 728x90 box should've showed up at the top.  The code above is not in any of the separate (copied) theme's index.template.php files. Attaching one of the "modified" index.template.php files. Installer reported no issues.

Also equally interesting: Sidebar (160x600) is not showing up.

https://bearlydoug.com/forums/index.php?topic=2.0

I only have this set for between posts "2,3", and it's doubled up.

Running 2.1 RC3, if that makes a difference.
Doug Hazard
* Full Stack (Web) Developer for The Catholic Diocese of Richmond
(20+ Diocesan sites, 130+ Church sites & 24 School sites)
* Sports Photographer and Media Personality
* CFB Historian
* Tech Admin for one 1M+ post, one 2M+ post and one 10M+ post sites (last two are powered by multiple servers)
* WordPress Developer (Junkie)

vbgamer45

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

Douglas

I did. After the fact, and after I did more updates. :)
Doug Hazard
* Full Stack (Web) Developer for The Catholic Diocese of Richmond
(20+ Diocesan sites, 130+ Church sites & 24 School sites)
* Sports Photographer and Media Personality
* CFB Historian
* Tech Admin for one 1M+ post, one 2M+ post and one 10M+ post sites (last two are powered by multiple servers)
* WordPress Developer (Junkie)

Douglas

Just hit me that your (awesome, btw!) mod needs two additional items (probably under "Settings"):

"Before the closing </head> tag" (textarea)

"Before the closing </body> tag" (textarea)

Some ad companies (Google Ads and Google DFP are a couple) need to have things situated before the closing head and/or body tags. Yes, it could be manually added in, however, I'm trying to get away from having to manually add anything in, if possible, with the updates I'm doing.

Between the three suggestions, this should round out your Ad Management mod quite nicely (it would be nice to have a separate entry for the top banner ad, because that gives yet another spot for ads to go up on sites who are ad-revenue dependent).

FYI, I know that the three sites where I'll be using your plugin will be paying to remove the "SMFAds for Free Forums" wording at the bottom... both because it needs to be on these sites, and to also support you. (Yes, one of them is HV, btw.) :D
Doug Hazard
* Full Stack (Web) Developer for The Catholic Diocese of Richmond
(20+ Diocesan sites, 130+ Church sites & 24 School sites)
* Sports Photographer and Media Personality
* CFB Historian
* Tech Admin for one 1M+ post, one 2M+ post and one 10M+ post sites (last two are powered by multiple servers)
* WordPress Developer (Junkie)

Advertisement: