News:

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

Main Menu

Banner Mod

Started by Midgard, January 08, 2005, 12:32:16 PM

Previous topic - Next topic

[Unknown]

[  ] Don't show banners to administrators.

if (!empty($modSettings['banners_no_admins']))

-[Unknown]

Midgard

Quote from: [Unknown] on February 06, 2005, 05:27:05 AM
[  ] Don't show banners to administrators.

if (!empty($modSettings['banners_no_admins']))

-[Unknown]

if we make suchlike then Admins can't see banners in no case

Jerry

you can make a checkbox on the banner page for settings that says "admins view banners" then you can check / uncheck the box and use the proper variable...sounds like it would work, but just theory.


- Jerry
Find me on:
Facebook
Twitter
PlanetSMF

"If all you look for is the negative in things, you will never see the positive."

Midgard

Quote from: Jerry on February 06, 2005, 06:12:23 AM
you can make a checkbox on the banner page for settings that says "admins view banners" then you can check / uncheck the box and use the proper variable...sounds like it would work, but just theory.

Hmm.. Good idea. I'll try...

[Unknown]

That's what I said ::).

-[Unknown]

Jerry

I think Midgard took it as adding it to change permissions for admins on the permissions page...


- Jerry
Find me on:
Facebook
Twitter
PlanetSMF

"If all you look for is the negative in things, you will never see the positive."

Midgard

no, no...

I've be try. But, I can't. Don't work. This impossible.

Little Wolf

Well, I really wanted that feature so if it can't be done in the admin I guess we'll just have to hard code it. here's what I did...


Edit: index.template.php

Find:
showBanner($zone = 'bottom');

Change to:
if (!$context['allow_admin']) {
showBanner($zone = 'bottom');
}


That's if your banner is at the bottom like mine..  ;)
look for:

showBanner($zone = 'top');

if yours is at the top.  :)

no more ads for admins now!  8)

Jerry

Quote from: Midgard on February 07, 2005, 09:22:25 AM
no, no...

I've be try. But, I can't. Don't work. This impossible.
it is possible :), I will try and tell you what I get ;)


- Jerry
Find me on:
Facebook
Twitter
PlanetSMF

"If all you look for is the negative in things, you will never see the positive."

JayBachatero

Quote from: LiL_J on January 28, 2005, 03:19:07 AM
Quote from: Aravot on January 10, 2005, 03:53:05 AM
Thank you, but I just found out something weired

At my work computer there were options under New Banner>Add New but at my home PC there is nothing (see pic) tried IE, FireFox and Opera haven't changed anything, any suggestions?

maybe that's why 'Advertisement Banner' was missing from permission panel.



Link to Full Size Pic

i am havin the exact same problem. how can i fix this i reuploaded the files. and nothing
i dont know what to do.  i cant seem to see the add banner page correctly and i reuploaded the files any idea why?  i have been adding the banners manually through the database and modifying them in the forum.
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

dcantwell

guys this is a great mod and worked a dream with the default theme.
But I want to put it in the xtEnhanced theme but I have no idea what I need to change.  The line <td id="bodyarea" style="padding: 1ex 20px 2ex 20px;">';
does not exist in the theme.

I want to put the banners in place of "style="background-image: url(', $settings['images_url'], '/xtHEAD.gif);" bgcolor="#83B3E0"><span style="font-family: Georgia, sans-serif; font-size: xx-large;">', $context['forum_name'], '</span></td>" on line 219 of the index.template.php.

Any help would be much appreciated.

Tip

Jerry

Quote from: dcantwell on February 09, 2005, 08:53:49 AM
guys this is a great mod and worked a dream with the default theme.
But I want to put it in the xtEnhanced theme but I have no idea what I need to change. The line <td id="bodyarea" style="padding: 1ex 20px 2ex 20px;">';
does not exist in the theme.

I want to put the banners in place of "style="background-image: url(', $settings['images_url'], '/xtHEAD.gif);" bgcolor="#83B3E0"><span style="font-family: Georgia, sans-serif; font-size: xx-large;">', $context['forum_name'], '</span></td>" on line 219 of the index.template.php.

Any help would be much appreciated.

Tip
Open index.template.php
Find
// The main content should go here.  A table is used because IE 6 just can't handle a div.
echo '
<table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td align="left">';
}

Replace
// The main content should go here.  A table is used because IE 6 just can't handle a div.
echo '
<table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td align="left">';
        showBanner($zone = 'top');
}
for the part that didn't exist


Part #2
Find
<img src="', $settings['images_url'], '/xtLOGO.gif"  alt=""/>
Replace With
';
      showBanner($zone = 'top');
echo '


- Jerry
Find me on:
Facebook
Twitter
PlanetSMF

"If all you look for is the negative in things, you will never see the positive."

mennou

i have lil problem with my banner.....  it won't show up on the top of my forum and  another thing  it shows the banners twice on the bottom of my forum..  what should i do to fix  that?

Gandalf

Quote from: LiL_J on February 07, 2005, 09:14:33 PM
Quote from: LiL_J on January 28, 2005, 03:19:07 AM
Quote from: Aravot on January 10, 2005, 03:53:05 AM
Thank you, but I just found out something weired

At my work computer there were options under New Banner>Add New but at my home PC there is nothing (see pic) tried IE, FireFox and Opera haven't changed anything, any suggestions?

maybe that's why 'Advertisement Banner' was missing from permission panel.



Link to Full Size Pic

i am havin the exact same problem. how can i fix this i reuploaded the files. and nothing
i dont know what to do. i cant seem to see the add banner page correctly and i reuploaded the files any idea why? i have been adding the banners manually through the database and modifying them in the forum.
it's really confusing me i tried on my test forum and on my REAL forum and i have on BOTH forum the same problem (i see nothing) so what could be the prob???
P.S: i didn't edit any file i just uploaded/applied the mod just like it is
thanks in advance
Siemens-mobiles.org Visit it and you won't regret it :D

RDFT

#94
Quote from: Gandalf on February 14, 2005, 01:17:39 AM
Quote from: LiL_J on February 07, 2005, 09:14:33 PM
Quote from: LiL_J on January 28, 2005, 03:19:07 AM
Quote from: Aravot on January 10, 2005, 03:53:05 AM
Thank you, but I just found out something weired

At my work computer there were options under New Banner>Add New but at my home PC there is nothing (see pic) tried IE, FireFox and Opera haven't changed anything, any suggestions?

maybe that's why 'Advertisement Banner' was missing from permission panel.



hxxp:webpages.charter.net/osipof/smf/baner.png [nonactive]

i am havin the exact same problem. how can i fix this i reuploaded the files. and nothing
i dont know what to do. i cant seem to see the add banner page correctly and i reuploaded the files any idea why? i have been adding the banners manually through the database and modifying them in the forum.
it's really confusing me i tried on my test forum and on my REAL forum and i have on BOTH forum the same problem (i see nothing) so what could be the prob???
P.S: i didn't edit any file i just uploaded/applied the mod just like it is
thanks in advance

I'm having the same problem.

hxxp:www.arkansasprepsports.com/Graphics/screenshot.GIF [nonactive]

Midgard

It's not a problem. Because, you've don't be create an banner? Please look after create a banner.

Gandalf

well there's nothing like this, it just tell us that here we add a banner, nothing else...
Siemens-mobiles.org Visit it and you won't regret it :D

siggy

Having trouble with the database. I am assuming for this mod I am supposed to create another table in the existing database used for smf, but the code in the bannerpdb.php file keeps giving me errors. Can you give me the code for this table please? I am on mysql version 4.0.22-standard. thanks

RDFT

Quote from: Midgard on February 14, 2005, 03:04:32 AM
It's not a problem. Because, you've don't be create an banner? Please look after create a banner.

That's the problem! There's no "create a banner" option. The only thing on the page is "You can create an banner on these page."

RDFT

Quote from: RDFT on February 14, 2005, 07:45:28 PM
Quote from: Midgard on February 14, 2005, 03:04:32 AM
It's not a problem. Because, you've don't be create an banner? Please look after create a banner.

That's the problem! There's no "create a banner" option. The only thing on the page is "You can create an banner on these page."

The problem for me was my Firewall. Norton Internet Security was screwing it up.

Advertisement: