| Author |
Message |
sqzdog Involved


Joined: Sep 22, 2003 Posts: 252
|
Posted:
Wed Apr 28, 2004 8:59 pm |
|
I put the first banner on my site. It appears right above the header in the center. Is there a way to place it in another position, like left or right? |
|
|
|
 |
Raven Site Admin/Owner

Joined: Aug 27, 2002 Posts: 16987 Location: Kansas
|
Posted:
Mon May 03, 2004 11:36 am |
|
In banners.php you should have a line similar to this | Code: | | echo"<center><a href=\"banners.php?op=click&bid=$bid\" target=\"_blank\"><img src=\"$imageurl\" border=\"0\" alt='$alttext' title='$alttext'></a></center>"; | I would try removing the center tags and try aligning it right. This is just a guess so it may take some work. |
|
|
|
 |
sqzdog Involved


Joined: Sep 22, 2003 Posts: 252
|
Posted:
Mon May 03, 2004 12:09 pm |
|
Can I put more than one banner up at a time? If so, where do they go if there is already one in the middle? |
|
|
|
 |
sixonetonoffun Spouse Contemplates Divorce

Joined: Jan 02, 2003 Posts: 2499
|
Posted:
Mon May 03, 2004 5:29 pm |
|
Yeah put up all you want the more you have in the database the better the randomness works.
Example:
On my site I've (PostNuke but the principles the same) basically flooded the Downloads area with banners to none logged in users. Logged in users don't see any of the ones I added in between all the categories. But the randomness isn't perfect often there are duplicates shown. But I've only half a dozen or so unique ones right now.
How? To just add one into say the area below the navigation menu I'd just hack the theme paste the code into the theme in a <div or something. (Lot of people do this with googles adwords java script).
Some code hints:
This is the basic code to display a banner in the theme as in the function themeheader below.
function themeheader() {
global $banners, $sitename;
echo "<body bgcolor=\"#0E3259\" text=\"#000000\" link=\"0000ff\">"
."<br>";
if ($banners) {
include("banners.php");
echo "<br>";
}
Now if you change it to say:
if (!is_user($user)) {
if ($banners) {
include("banners.php");
echo "<br>";
}
}else{
}
This now says if is not a user show em a banner.
If it is a user don't show them this banner.
You don't need to only put the code into the theme that is just the most common placements. I just added it into my Downloads module or where ever I thought people might want to go without being logged on (Like surfing downloads). This gives them incentive to become members (If they aren't put off) and also drives up the "impressions" considerably. The only other thing there to remember is to add $banners to the globals in whatever function your hacking away at.
(Which reminds me I still haven't fixed the registrations on my site grr!)
Back to question how to move the alignment thats just editting the theme and basic html. <td align='left'> or how ever it is but usually its displayed in a table like that. Like Raven says it just takes a little work. You can see in the theme example above there is no conainer tags at all so I could just use a <DIV tage and align it right left or center as I see fit. Other banners are placed in accross from the logo these are in tables and are a little tougher but not a big deal to move a little. If you theme is above and you want it like others accross from the logo try comparing the 2 header functions in fact often you can just about copy and paste one from the other with only a few style tags to change.
If I didn't confuse you now I'll try harder next time  |
|
|
|
 |
sharlein Member Emeritus

Joined: Nov 19, 2002 Posts: 322 Location: On the Road
|
Posted:
Mon Jun 28, 2004 3:46 pm |
|
Well, I'm confused How can I show the Sentinel banner and Raven's webhosting banner at the same time? Thanks, Steve |
|
|
|
 |
Raven Site Admin/Owner

Joined: Aug 27, 2002 Posts: 16987 Location: Kansas
|
Posted:
Mon Jun 28, 2004 3:52 pm |
|
Well, if push comes to shove, get rid of the Sentinel banner
I put mine in my_header and either make a table with the images or something like that  |
|
|
|
 |
sharlein Member Emeritus

Joined: Nov 19, 2002 Posts: 322 Location: On the Road
|
Posted:
Mon Jun 28, 2004 4:00 pm |
|
Got the message. I will put yours back and work the other into the header. Thanks  |
|
|
|
 |
|
|
|
|