News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Ad Management mod

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

Previous topic - Next topic

samborabora

How do I hook a new ad position in? I want to put an ad in my forum header, not just the top of the topic but above the menu. Is this done in a hooks file or something? If so, how?

vbgamer45

Arranged in the templates I believe.
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

samborabora

Quote from: vbgamer45 on August 02, 2015, 03:24:29 PM
Arranged in the templates I believe.

The theme templates or the ad mod templates?

vbgamer45

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

samborabora

Well it doesn't seem to edit much in the theme templates, I assume the ad code hooks in afterwards, I just can't figure out where I could define a new placement of the ads. Literally, I just want a duplicate of the footer ads to be displayed in the SMF header for the forum.

EDIT: Okay, I just want to move the "display at top of page" ad so it isn't actually just stark at the top of the page but contained within a div so I can move it to the right position.

Edit 2: Looks like that is loaded just before or just after template_body_above?

vbgamer45

Yeah that hook is uses the template above and below to work on all themes out of box
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

samborabora

Quote from: vbgamer45 on August 05, 2015, 07:00:34 PM
Yeah that hook is uses the template above and below to work on all themes out of box

Yeah, so how to do I put the ad code for that inside, say:

<div id="upper_section" class="middletext">
<div class="user">
<div id="banner"> BANNER CODE HERE</DIV>


Is there a code I can use within this div that will bring it in, or is there a way of modifying the topofpage codes whereabouts?

samborabora

Is there some kind of hook placeholder that will load the banner if I place it in my theme?

vbgamer45

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

samborabora

Quote from: vbgamer45 on August 07, 2015, 04:46:14 PM
Not that i know of

Okay, where and how is the banner code loaded into the theme template?

samborabora

I mean, there must be some simple way of adjusting where the banners are placed or being able to insert a new one? I've looked through all the mod files and I can't figure it out at all.

vbgamer45

Not for the above and below ones those are tied with the template layers
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

samborabora

Quote from: vbgamer45 on August 08, 2015, 11:32:20 AM
Not for the above and below ones those are tied with the template layers

Yes, but if I knew how to put my own in, I could just not use the above/below code, and just make my own position for in the header. I just have no idea where the templates are or anything, or the hook or however the code is inserted into the page, it just isn't present in anywhere I can find it.

samborabora

Quote from: vbgamer45 on August 08, 2015, 11:32:20 AM
Not for the above and below ones those are tied with the template layers

vbgamer45 , can you tell me exactly how a banner ad is inserted into the template and what code I would need to look at to be able to put the banner ad code in a new part of my theme template?

vbgamer45

I don't know off hand. It would be added to the template 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

samborabora

Quote from: vbgamer45 on August 10, 2015, 01:35:58 PM
I don't know off hand. It would be added to the template files.

The theme template files have nothing in them to do with ad management except for this:

// 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


That is all that is installed into the theme templatee, everything else must be hooks but I just cannot find anything that inserts the banner into the page?

Simple Machinist

I would like to remove this mod from my forum, but I get this error message seen in the attached screenshot. So I am not thinking it is a good idea to take a chance and remove it as I am worried it could crash my forum if I do. Any suggestions please?

Cheers..

margarett

You need to check this
Manual Installation of Mods

And check if you can manually reverse the missing edit to index.template.php ;)
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Kindred

Сл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."

Simple Machinist

#7519
Thank you. I am running 1.1.21 so the first link doesn't apply: http://wiki.simplemachines.org/smf/Manual_installation_of_mods

On the second link: http://wiki.simplemachines.org/smf/Error_in_mod_installation it says to first try editing the code manually in the subject file where the failure is taking place. In my case it is the ./Themes/default/index.template.php file, but I don't know which of the code to edit. It doesn't tell me in what part of the code the failure is taking place. Am I perhaps misunderstanding something here please?

Also, the reason I want to uninstall this mod is it doesn't work right. I have Ad Managment 3.0.1 installed right now (notice how the name of the mod "Managment" is also misspelled as I copied and pasted that from my list of installed packages).

There are two problems with the mod. First, it shows each of my ads that I created listed twice when I go to the Ad Management configuration tab.

Secondly, when I got to modify an ad, only two of the display options for the ads actually work on my forum. Display ads on every page right below the menu and Display ads on the bottom of the page both work, but if I enable any of the other ad display options they have no effect on my forum at all.

Then I tried to install the newer version, "ad_mod_v3.1_SMF_v1-1-x" and I get even more failures if I want to try and install the newer version. See attached screenshot.

So upgrading isn't an option either.

Advertisement: