You are missing our premiere tool bar navigation system! Register and use it for FREE!

NukeCops  
•  Home •  Downloads •  Gallery •  Your Account •  Forums • 
Readme First
- Readme First! -

Read and follow the rules, otherwise your posts will be closed
Modules
· Home
· FAQ
· Buy a Theme
· Advertising
· AvantGo
· Bookmarks
· Columbia
· Community
· Donations
· Downloads
· Feedback
· Forums
· PHP-Nuke HOWTO
· Private Messages
· Search
· Statistics
· Stories Archive
· Submit News
· Surveys
· Theme Gallery
· Top
· Topics
· Your Account
Who's Online
There are currently, 59 guest(s) and 0 member(s) that are online.

You are Anonymous user. You can register for free by clicking here
Nuke Cops :: View topic - how do I add a banner to INSIDE top table [ ]
 Forum FAQ  •  Search  •   •  Memberlist  •  Usergroups   •  Register  •  Profile •    •  Log in to check your private messages  •  Log in

 
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
Author Message
Namsul
Captain
Captain


Joined: Feb 13, 2003
Posts: 339

Location: Australia

PostPosted: Mon Nov 21, 2005 9:56 pm Reply with quoteBack to top

Code:
function themeheader() {
    global $user, $banners, $sitename, $slogan, $cookie, $prefix, $db;
    cookiedecode($user);
    $username = $cookie[1];
    if ($username == "") {
        $username = "Anonymous";
    }
    echo "<body bgcolor=\"#ffffff\" text=\"#000000\" link=\"#363636\" vlink=\"#363636\" alink=\"#d5ae83\" leftMargin=\"0\" topMargin=\"0\" marginheight=\"0\" marginwidth=\"0\">\n"
   ."<table cellpadding=\"0\" cellspacing=\"0\" width=\"750\" border=\"1\" align=\"center\" bgcolor=\"#ffffff\">\n"
   ."<tr>\n"
   ."<td bgcolor=\"#ffffff\" width=\"200\">\n"
   ."<a href=\"index.php\"><img src=\"themes/Junkmail/images/logo.gif\" align=\"left\" alt=\""._WELCOMETO." $sitename\" border=\"0\"></a></td>\n"
   ."<td bgcolor=\"#ffffff\" width=\"100%\">\n"
ADD BANNER HERE
   ."</td></tr>\n"
   ."</table><br>\n"


i've tried adding variations of this code to try make the banner inside the tabler along side the logo


Code:
    if ($banners) {
   include("banners.php");
    }



any help appreciated
Find all posts by NamsulView user's profileSend private messageSend e-mailVisit poster's website
shrek_rock
Captain
Captain


Joined: Nov 24, 2003
Posts: 709


PostPosted: Tue Nov 22, 2005 5:21 am Reply with quoteBack to top

hi, this post should help you.

http://www.nukecops.com/postlite46023-.html

_________________
Image

Image
Find all posts by shrek_rockView user's profileSend private messageSend e-mailVisit poster's website
Namsul
Captain
Captain


Joined: Feb 13, 2003
Posts: 339

Location: Australia

PostPosted: Wed Nov 23, 2005 4:41 pm Reply with quoteBack to top

nah it doesn't


i can show banners no problem outside top table
but when i add
Code:
    if ($banners) {
   include("banners.php");
    }



inside table like above in first post it doesn't work

i got it to work before inside table when code was
Code:
echo "<center><table border=1 width=100% cellpadding=0 cellspacing=0><tr><td>\n\n";
echo "<a href=\"index.php\"><img src=themes/ExtraLite/images/logo.gif Alt=\""._WELCOMETO." $sitename\" border=0></a>\n";
echo "</td>\n";
if ($banners) {
echo "<td>";
    include("banners.php");
echo "</td>";
}
echo "<td align=right>\n";


I can work out banners inside tables wrapped in
Code:
   echo "


i just can't work out how to make banners work inside tables wrapped inside php
Code:
   ."
Find all posts by NamsulView user's profileSend private messageSend e-mailVisit poster's website
Xyberian
Colonel
Colonel


Joined: Mar 14, 2004
Posts: 1921

Location: Behind you

PostPosted: Wed Nov 23, 2005 8:03 pm Reply with quoteBack to top

Namsul, wrap the code:
Code:

if ($banners) {
echo "<td>";
    include("banners.php");
echo "</td>";
}


to
Code:

if ($banners) {
echo "<td>";
    echo "<table width='100%' border='0'><tr><td width='100%'>";
    include("banners.php");
    echo "</td></tr></table>";
echo "</td>";
}

_________________
NukeKorea Dev. Network.
NukeKorea Laboratories
Find all posts by XyberianView user's profileSend private messageVisit poster's website
Namsul
Captain
Captain


Joined: Feb 13, 2003
Posts: 339

Location: Australia

PostPosted: Wed Nov 23, 2005 10:19 pm Reply with quoteBack to top

nope Xyberian
that doesn't work either

not sure but problem seems to be the theme.php has code wrapped in


Code:
   ."


and to make things even more painful i try to post the theme.php here and forums say code isn't allowed

pain in the a$$

i zipped the theme http://www.junkmail.com.au/software/theme.zip

if someone gets a chance to have a look it'de be appreciated

i tried finding a theme with the banner where i wanted it, the date in header and the "welcome user" in the header and this seems the only one out there
Find all posts by NamsulView user's profileSend private messageSend e-mailVisit poster's website
Evaders99
Site Admin
Site Admin


Joined: Aug 17, 2003
Posts: 12403


PostPosted: Wed Nov 23, 2005 10:24 pm Reply with quoteBack to top

If nothing else works, then try using output buffering

_________________
Helping those that help themselves
Read FIRST or DIE!

"Fighting is terrible, but not as terrible as losing the will to fight."
Star Wars Rebellion Network - Need Help? Evaders Squadron Coding
Find all posts by Evaders99View user's profileSend private messageVisit poster's websiteAIM Address
Namsul
Captain
Captain


Joined: Feb 13, 2003
Posts: 339

Location: Australia

PostPosted: Wed Nov 23, 2005 10:31 pm Reply with quoteBack to top

output buffering? Shocked
i don't know what that means sorry Embarassed
Find all posts by NamsulView user's profileSend private messageSend e-mailVisit poster's website
Xyberian
Colonel
Colonel


Joined: Mar 14, 2004
Posts: 1921

Location: Behind you

PostPosted: Wed Nov 23, 2005 10:38 pm Reply with quoteBack to top

I assumed you have a lot of experience in handling themes.

Ok.
my method and suggestion are correct, but I showed just a fraction of codes:

Follow my MODification format (let me assume you're using ExtraLite theme-pack)
Code:

#
# ---- [ OPEN ] ----
#
themes/ExtraLite/theme.php

#
# ----- [ FIND ] -----
#
function themeheader() {
    echo "body .......
           ."<br>";
    if ($banners) {
   include("banners.php");
    }
    echo "<br>"

#
# ------ [ INLINE, FIND ] ------
#
function themeheader() {

#
# ------ [ AFTER, ADD ] -------
#
global $banners;

#
# ------ [ INLINE, FIND & REMOVE] ------
#
    if ($banners) {
   include("banners.php");
    }

#
# ------ [ FIND ] ---------
#
    blocks("left");
    echo "<img src=\"images/pix.gif\" border=\"0\" width=\"150\" height=\"1\"></td><td>&nbsp;&nbsp;</td><td width=\"100%\" valign=\"top\">";
}

#
# ------- [ INLINE, FINE ] ---------
#
}

#
# ------- [ BEFORE, ADD ] -------
#
    if ($banners) {
   include("banners.php");
    }

#
# ------ [ SAVE ] -----------
#

EoM
The above code works with phpnuke 7.0 to 7.6. Add your banner and your banner picture will appear on the top-center and under your logo block.

_________________
NukeKorea Dev. Network.
NukeKorea Laboratories
Find all posts by XyberianView user's profileSend private messageVisit poster's website
Xyberian
Colonel
Colonel


Joined: Mar 14, 2004
Posts: 1921

Location: Behind you

PostPosted: Wed Nov 23, 2005 10:42 pm Reply with quoteBack to top

out buffering is another detouring method. That's a good alternative.

_________________
NukeKorea Dev. Network.
NukeKorea Laboratories
Find all posts by XyberianView user's profileSend private messageVisit poster's website
Display posts from previous:      
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Powered by phpBB © 2001, 2005 phpBB Group

Ported by Nuke Cops © 2003 www.nukecops.com
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::
Powered by · TOGETHER TEAM srl ITALY http://www.togetherteam.it · DONDELEO E-COMMERCE http://www.DonDeLeo.com
Web site engine's code is Copyright © 2002 by PHP-Nuke. All Rights Reserved. PHP-Nuke is Free Software released under the GNU/GPL license.
Page Generation: 0.273 Seconds - 246 pages served in past 5 minutes. Nuke Cops Founded by Paul Laudanski (Zhen-Xjell)
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::