Putting an avatar in the theme header

  Post new topicReply to topicPrintable Version
<< View previous topic View next topic >>
Share: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
#1   Putting an avatar in the theme header
Dauthus
CZ Addict
 Codezwiz Site Donator
Dauthus has been a member for over 20 year's 20 Year Member
usa.gif illinois.gif
Age: 61
Gender: Male
Website:
Status: Offline
Joined: Mar 17, 2004
0.06 posts per day
Posts: 426
Points: 15,917
   
I am wanting to be able to add the user's avatar on the right side of the Charcoal2 theme's header. I have enclosed a photoshop rendered image of what the end result should look like. Can anyone steer me in the right direction?



An avatar should only show up when a user is logged in, otherwise there would be no image at all or maybe a default avatar.

I know the code to use for the avatar:

// Avatar Info for logged in users
    if ($userinfo[user_avatar]) {
      $content .= "<br><center><img src=\"$userinfo[user_avatar]\" alt=\"\"></center><br>\n";
   }


I just don't know where the heck to put it!

Any help is appreciated.



_________________
[ Register or login to view links on this board.]
Vivere disce, cogita mori
Back to top Reply with quote
#2   re: Putting an avatar in the theme header
Dauthus
CZ Addict
 Codezwiz Site Donator
Dauthus has been a member for over 20 year's 20 Year Member
usa.gif illinois.gif
Age: 61
Gender: Male
Website:
Status: Offline
Joined: Mar 17, 2004
0.06 posts per day
Posts: 426
Points: 15,917
   
Ok, I'm getting there, but I still have a formatting issue. I don't quite know where to go to correct this. I have tried to colspan="2" until I am blue in the face, but have had no luck.

Here is where I am:





_________________
[ Register or login to view links on this board.]
Vivere disce, cogita mori
Back to top Reply with quote
#3   re: Putting an avatar in the theme header
Kelly_Hero
PayPal Donation
CZ Revered Member
 Codezwiz Site Donator
usa.gif southcarolina.gif
Occupation: Web Developer
Age: 59
Gender: Female
Website:
Status: Offline
Joined: Aug 20, 2003
0.48 posts per day
Posts: 3765
Points: 351,412
   
Looks like more of a "rowspan" issue rather than a colspan. Kinda hard to tell without seeing what the table code looks like. I'd try to explain it but I'd only confuse us both. LOL

Post the code for that table and I'll help ya.

Cool Sig BTW. icon_razz.gif



Back to top Reply with quote
#4   re: Putting an avatar in the theme header
Dauthus
CZ Addict
 Codezwiz Site Donator
Dauthus has been a member for over 20 year's 20 Year Member
usa.gif illinois.gif
Age: 61
Gender: Male
Website:
Status: Offline
Joined: Mar 17, 2004
0.06 posts per day
Posts: 426
Points: 15,917
   
Thanks for looking into this for me. Here's the original code for the theme.php. I had to add a space in the s cript so it would post here:

<?php

/************************************************************/
/* Theme Name: Charcoal2                                    */
/* Theme Design: mikem (www.nukecops.com)                   */
/* version 3.0                                              */
/* Theme inspired by the phpbb2 style Charcoal2 by          */
/* zarron design (http://www.zarron.com)                    */
/*                                                          */
/* Copyright Notice(read and understand)                    */
/* - THIS PACKAGE IS NOT RELEASED AS GPL/GNU SCRIPTING.     */
/*                                                          */
/* - Author names and Credit links MUST REMAIN in the       */
/*   credit line footer of all Nuke generated pages.        */
/*                                                          */
/* - Translations are permitted, not renaming.              */
/*                                                          */
/* - ANY UNAUTHORIZED USE OF THESE MATERIALS                */
/*   MAY VIOLATE COPYRIGHTS and/or TRADEMARKS.              */
/*                                                          */
/* - This package CAN NOT be mirrored without written       */
/*   permission.                                            */
/*                                                          */
/* - ADDITIONAL COPYRIGHTS BY TEMPLATE AUTHORS APPLY        */
/*                                                          */
/* - FULL LICENSE - http://www.nukecops.com/postt8856.html  */
/*                                                          */
/************************************************************/

/************************************************************/
/* Theme Colors Definition                                  */
/*                                                          */
/* Define colors for your web site. $bgcolor2 is generaly   */
/* used for the tables border as you can see on OpenTable() */
/* function, $bgcolor1 is for the table background and the  */
/* other two bgcolor variables follows the same criteria.   */
/* $texcolor1 and 2 are for tables internal texts           */
/************************************************************/



/************************************************************/
/* OpenTable Functions                                      */
/*                                                          */
/* Define the tables look&feel for you whole site. For this */
/* we have two options: OpenTable and OpenTable2 functions. */
/* Then we have CloseTable and CloseTable2 function to      */
/* properly close our tables. The difference is that        */
/* OpenTable has a 100% width and OpenTable2 has a width    */
/* according with the table content                         */
/************************************************************/

function OpenTable() {
    global $bgcolor1, $bgcolor2;
    echo "<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"4\">
  <tr>
    <td><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"2\">
        <tr>
          <td bgcolor=\"#CCCCCC\"><table width=\"100%\" border=\"0\" cellpadding=\"2\" cellspacing=\"0\" bgcolor=\"#303032\">
              <tr>
                <td><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"1\">
                    <tr>
                      <td background=\"themes/Charcoal2/forums/images/bk-z.jpg\" bgcolor=\"#C0C0C0\"><table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"0\">
                          <tr>
                            <td><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"2\">
                                <tr>
                                  <td background=\"themes/Charcoal2/forums/images/bk-z.jpg\" bgcolor=\"#8A8C91\"><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"4\">
                                      <tr>
                                        <td>";
}

function CloseTable() {
    echo "</td>
                                      </tr>
                                    </table></td>
                                </tr>
                              </table></td>
                          </tr>
                         
                        </table></td>
                    </tr>
                  </table></td>
              </tr>
            </table></td>
        </tr>
      </table></td>
  </tr>
</table>";
}

function OpenTable2() {
    global $bgcolor1, $bgcolor2;
    echo "<table border=\"0\" cellspacing=\"1\" cellpadding=\"0\" bgcolor=\"$bgcolor2\" align=\"center\"><tr><td>\n";
    echo "<table border=\"0\" cellspacing=\"1\" cellpadding=\"8\" bgcolor=\"$bgcolor1\"><tr><td>\n";
}

function CloseTable2() {
    echo "</td></tr></table></td></tr></table>\n";
}

/************************************************************/
/* Function themeheader()                                   */
/*                                                          */
/* Control the header for your site. You need to define the */
/* BODY tag and in some part of the code call the blocks    */
/* function for left side with: blocks(left);               */
/************************************************************/

function themeheader() {
    global  $admin, $user, $banners, $sitename, $slogan, $cookie, $prefix, $db, $nukeurl, $anonymous;
    if ($banners == 1) {   
    $numrows = $db->sql_numrows($db->sql_query("SELECT * FROM ".$prefix."_banner WHERE type='0' AND active='1'"));
   /* Get a random banner if exist any. */
   /* More efficient random stuff, thanks to Cristian Arroyo from http://www.planetalinux.com.ar */

    if ($numrows>1) {
   $numrows = $numrows-1;
   mt_srand((double)microtime()*1000000);
   $bannum = mt_rand(0, $numrows);
    } else {
   $bannum = 0;
    }
    $sql = "SELECT bid, imageurl, clickurl, alttext FROM ".$prefix."_banner WHERE type='0' AND active='1' LIMIT $bannum,1";
    $result = $db->sql_query($sql);
    $row = $db->sql_fetchrow($result);
    $bid = $row[bid];
    $imageurl = $row[imageurl];
    $clickurl = $row[clickurl];
    $alttext = $row[alttext];
   
    if (!is_admin($admin)) {
       $db->sql_query("UPDATE ".$prefix."_banner SET impmade=impmade+1 WHERE bid='$bid'");
    }
    if($numrows>0) {
   $sql2 = "SELECT cid, imptotal, impmade, clicks, date FROM ".$prefix."_banner WHERE bid='$bid'";
   $result2 = $db->sql_query($sql2);
   $row2 = $db->sql_fetchrow($result2);
   $cid = $row2[cid];
   $imptotal = $row2[imptotal];
   $impmade = $row2[impmade];
   $clicks = $row2[clicks];
   $date = $row2[date];

/* Check if this impression is the last one and print the banner */

   if (($imptotal <= $impmade) AND ($imptotal != 0)) {
       $db->sql_query("UPDATE ".$prefix."_banner SET active='0' WHERE bid='$bid'");
       $sql3 = "SELECT name, contact, email FROM ".$prefix."_bannerclient WHERE cid='$cid'";
       $result3 = $db->sql_query($sql3);
       $row3 = $db->sql_fetchrow($result3);
       $c_name = $row3[name];
       $c_contact = $row3[contact];
       $c_email = $row3[email];
       if ($c_email != "") {
      $from = "$sitename <$adminmail>";
      $to = "$c_contact <$c_email>";
      $message = ""._HELLO." $c_contact:\n\n";
      $message .= ""._THISISAUTOMATED."\n\n";
      $message .= ""._THERESULTS."\n\n";
      $message .= ""._TOTALIMPRESSIONS." $imptotal\n";
      $message .= ""._CLICKSRECEIVED." $clicks\n";
      $message .= ""._IMAGEURL." $imageurl\n";
      $message .= ""._CLICKURL." $clickurl\n";
      $message .= ""._ALTERNATETEXT." $alttext\n\n";
      $message .= ""._HOPEYOULIKED."\n\n";
      $message .= ""._THANKSUPPORT."\n\n";
      $message .= "- $sitename "._TEAM."\n";
      $message .= "$nukeurl";
      $subject = "$sitename: "._BANNERSFINNISHED."";
      mail($to, $subject, $message, "From: $from\nX-Mailer: PHP/" . phpversion());
       }
   }
    $showbanners = "<a href=\"banners.php?op=click&bid=$bid\" target=\"_blank\"><img src=\"$imageurl\" border=\"0\" alt='$alttext' title='$alttext'></a><br><br>";
    }
}
        cookiedecode($user);
    $username = $cookie[1];
    if ($username == "") {
        $username = "Anonymous";
    }
    echo "<s cript type=\"text/javas cript\" language=\"JavaS cript1.2\" src=\"themes/Charcoal2/js cript/imageswap.js\"></s cript><center>\n\n\n";
    echo "<body bgcolor=\"#8A8C91\" text=\"#DCDCDC\" leftmargin=\"10\" topmargin=\"10\" marginwidth=\"10\" marginheight=\"10\">\n";
   
    if ($username == "Anonymous") {
   $theuser = " ;; ;;<a href=\"modules.php?name=Your_Account\">"._LOGIN."</a> or <a href=\"modules.php?name=Your_Account&op=new_user\">"._BREG."</a>\n";
    } else {
   $theuser = " ;; ;;"._BWEL." $username!";
    }
   $public_msg = public_message();
   
echo"$showbanners<table class=\"bodyline\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\"> "
  . "   <tr> "
  . "      <td align=\"center\" valign=\"top\">\n"
  . "<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n"
  . "<tr>\n"
  . "<td width=\"349\"><img src=\"themes/Charcoal2/forums/images/logo.jpg\" alt=\"\" height=\"58\" width=\"349\" border=\"0\"></td>\n"
  . "<td width=\"81\" background=\"themes/Charcoal2/forums/images/header_topback1.jpg\"> ;;</td>\n"
  . "<td align=\"right\" width=\"296\" background=\"themes/Charcoal2/forums/images/header_topback1.jpg\"><img src=\"themes/Charcoal2/forums/images/topcurve.jpg\" alt=\"\" height=\"58\" width=\"224\" border=\"0\"></td>\n"
  . "<td background=\"themes/Charcoal2/forums/images/rightcurve.jpg\"> ;;</td>\n"
  . "</tr>\n"
  . "<tr>\n"
  . "<td width=\"349\"><img src=\"themes/Charcoal2/forums/images/slogan.jpg\" alt=\"\" height=\"30\" width=\"349\" border=\"0\"></td>\n"
  . "<td width=\"81\" background=\"themes/Charcoal2/forums/images/header_topback2.jpg\"> ;;</td>\n";
      if ($username == "Anonymous") {
echo "<td width=\"296\"><img src=\"themes/Charcoal2/forums/images/profile_off.jpg\" alt=\"\" name=\"profile\" height=\"30\" width=\"191\" border=\"0\"></td>\n";
    } else {
echo "<td width=\"296\"><a href=\"forum-editprofile.html\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('profile','','themes/Charcoal2/forums/images/profile_on.jpg')\"><img src=\"themes/Charcoal2/forums/images/profile.jpg\" alt=\"\" name=\"profile\" height=\"30\" width=\"191\" border=\"0\"></a></td>\n";
}
echo "<td> ;;</td>\n"
  . "</tr>\n"
  . "</table>\n"
  . "<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n"
  . "<tr>\n"
  . "<td width=\"50\"><a href=\"index.php\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('faq','','themes/Charcoal2/forums/images/faq_on.jpg')\"><img src=\"themes/Charcoal2/forums/images/faq.jpg\" alt=\"\" name=\"faq\" height=\"37\" width=\"50\" border=\"0\"></a></td>\n"
  . "<td width=\"60\"><a href=\"modules.php?name=Your_Account\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('search','','themes/Charcoal2/forums/images/search_on.jpg')\"><img src=\"themes/Charcoal2/forums/images/search.jpg\" alt=\"\" name=\"search\" height=\"37\" width=\"60\" border=\"0\"></a></td>\n"
  . "<td width=\"75\"><a href=\"modules.php?name=Downloads\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('memberlist','','themes/Charcoal2/forums/images/memberlist_on.jpg')\"><img src=\"themes/Charcoal2/forums/images/memberlist.jpg\" alt=\"\" name=\"memberlist\" height=\"37\" width=\"75\" border=\"0\"></a></td>\n"
  . "<td width=\"54\"><a href=\"forums.html\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('usergroups','','themes/Charcoal2/forums/images/usergroups_on.jpg')\"><img src=\"themes/Charcoal2/forums/images/usergroups.jpg\" alt=\"\" name=\"usergroups\" height=\"37\" width=\"54\" border=\"0\"></a></td>\n"
  . "<td width=\"62\"><img src=\"themes/Charcoal2/forums/images/register.jpg\" alt=\"\" name=\"register\" height=\"37\" width=\"62\" border=\"0\"></td>\n"
  . "<td width=\"119\"><img src=\"themes/Charcoal2/forums/images/pms.jpg\" alt=\"\" name=\"pms\" height=\"37\" width=\"119\" border=\"0\"></td>\n";
if ($username == "Anonymous") {
echo "<td width=\"201\"><a href=\"modules.php?name=Your_Account\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('login','','themes/Charcoal2/forums/images/login_on.jpg')\"><img src=\"themes/Charcoal2/forums/images/login.jpg\" alt=\"\" name=\"login\" height=\"37\" width=\"201\" border=\"0\"></a></td>\n";
  } else {
echo "<td width=\"201\"><a href=\"modules.php?name=Your_Account&op=logout\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('login','','themes/Charcoal2/forums/images/login_on.jpg')\"><img src=\"themes/Charcoal2/forums/images/login.jpg\" alt=\"\" name=\"login\" height=\"37\" width=\"201\" border=\"0\"></a></td>\n";
}
echo "<td> ;;</td>\n"
  . "</tr>\n"
  . "</table>\n"
  . "<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" align=\"center\">\n"
  . "      <tr valign=\"top\">\n"
  . "        <td>$public_msg<img src=\"themes/Charcoal2/images/pixel.gif\" width=\"1\" height=\"1\" border=\"0\" alt=\"\"></td>\n"
  . "</tr></table>\n"
  . "<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" align=\"center\">\n"
  . "<tr valign=\"top\">\n"
  . "  <td valign=\"top\" width=\"1\" background=\"themes/Charcoal2/images/7px.gif\">\n"
  . "";
    blocks(left);
echo "</td><td valign=\"top\" width=\"100%\">\n";
}

/************************************************************/
/* Function themefooter()                                   */
/*                                                          */
/* Control the footer for your site. You don't need to      */
/* close BODY and HTML tags at the end. In some part call   */
/* the function for right blocks with: blocks(right);       */
/* Also, $index variable need to be global and is used to   */
/* determine if the page your're viewing is the Homepage or */
/* and internal one.                                        */
/************************************************************/

function themefooter() {
    global $index, $foot1, $foot2, $foot3, $foot4, $copyright, $totaltime, $footer_message;
    if ($index == 1) {
echo "</td><td valign=\"top\" width=\"165\">\n";
   blocks(right);
    }   
echo"</td>\n"
  . "</table>\n"
  . "<body>\n"
  . "<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"4\">\n"
  . "  <tr>\n"
  . "    <td><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"4\">\n"
  . "        <tr>\n"
  . "          <td><div align=\"center\"><font class=\"small\">$footer_message</font></div></td>\n"
  . "        </tr>\n"
  . "        <tr>\n"
  . "          <td><div align=\"center\"></div></td>\n"
  . "        </tr>\n"
  . "      </table></td>\n"
  . "  </tr>\n"
  . "</table>\n"
."";
                echo "<center>\n";
        $footer_message = footmsg();
// DO NOT TOUCH THE NEXT LINE(s). DOING SO VIOLATES THE COPYRIGHTS OF THIS THEME
// YOU CAN ONLY ADD TO IT IF YOU MODIFY THIS THEME :-)
            echo "</center>\n";
        echo "<center><br><font class=\"small\">:: Charcoal2 phpbb2 style by <a href=\"http://www.zarron.com/\">zarron designs</a> &copy; :: PHP-Nuke theme by <a href=\"http://www.nukemods.com\">www.nukemods.com</a> &copy; ::</font></center>\n"; 
   echo "<br>\n";
}

/************************************************************/
/* Function themeindex()                                    */
/*                                                          */
/* This function format the stories on the Homepage         */
/************************************************************/

function themeindex ($aid, $informant, $time, $title, $counter, $topic, $thetext, $notes, $morelink, $topicname, $topicimage, $topictext) {
    global $anonymous, $tipath;
    if ($notes != "") {
   $notes = "<br><br><b>"._NOTE."</b> <i>$notes</i>\n";
    } else {
   $notes = "";
    }
    if ("$aid" == "$informant") {
   $content = "$thetext$notes\n";
    } else {
   if($informant != "") {
       $content = "<a href=\"modules.php?name=Your_Account&amp;op=userinfo&amp;username=$informant\">$informant</a> ";
   } else {
       $content = "$anonymous ";
   }
   $content .= ""._WRITES." <i>\"$thetext\"</i>$notes\n";
    }
    $posted = ""._POSTEDBY." ";
    $posted .= get_author($aid);
    $posted .= " "._ON." $time $timezone ($counter "._READS.")";
echo"<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"4\">\n"
  . "  <tr>\n"
  . "    <td><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"2\">\n"
  . "        <tr>\n"
  . "          <td bgcolor=\"#CCCCCC\"><table width=\"100%\" border=\"0\" cellpadding=\"2\" cellspacing=\"0\" bgcolor=\"#303032\">\n"
  . "              <tr>\n"
  . "                <td><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"1\">\n"
  . "                    <tr>\n"
  . "                      <td background=\"themes/Charcoal2/forums/images/bk-z.jpg\" bgcolor=\"#C0C0C0\"><table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"0\">\n"
  . "                          <tr>\n"
  . "                            <td height=\"28\" background=\"themes/Charcoal2/forums/images/sidebox_background2.gif\"><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"3\">\n"
  . "                                <tr>\n"
  . "                                  <td><font class=\"block-title\"><strong>$title</strong></font></td>\n"
  . "                                </tr>\n"
  . "                              </table></td>\n"
  . "                          </tr>\n"
  . "                          <tr>\n"
  . "                            <td><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"2\">\n"
  . "                                <tr>\n"
  . "                                  <td background=\"themes/Charcoal2/forums/images/bk-z.jpg\" bgcolor=\"#8A8C91\"><a href=\"modules.php?name=News&amp;new_topic=$topic\"><img src=\"$tipath$topicimage\" border=\"0\" alt=\"$topictext\" title=\"$topictext\" align=\"right\" hspace=\"10\" vspace=\"10\"></a><font class=\"storycontent\">$content</font></td>\n"
  . "                                </tr>\n"
  . "                              </table></td>\n"
  . "                          </tr>\n"
  . "                          <tr>\n"
  . "                            <td><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"2\">\n"
  . "                                <tr>\n"
  . "                                  <td background=\"themes/Charcoal2/forums/images/bk-w.jpg\" bgcolor=\"#8A8C91\"><div align=\"center\"><font class=\"content\">$posted</font><br><font class=\"content\">$morelink</font></div></td>\n"
  . "                                </tr>\n"
  . "                              </table></td>\n"
  . "                          </tr>\n"
  . "                        </table></td>\n"
  . "                    </tr>\n"
  . "                  </table></td>\n"
  . "              </tr>\n"
  . "            </table></td>\n"
  . "        </tr>\n"
  . "      </table></td>\n"
  . "  </tr>\n"
  . "</table>\n"
."";
}

/************************************************************/
/* Function themearticle()                                  */
/*                                                          */
/* This function format the stories on the story page, when */
/* you click on that "Read More..." link in the home        */
/************************************************************/

function themearticle ($aid, $informant, $datetime, $title, $thetext, $topic, $topicname, $topicimage, $topictext) {
    global $admin, $sid, $tipath;
    $posted = ""._POSTEDON." $datetime "._BY." ";
    $posted .= get_author($aid);
    if ($notes != "") {
   $notes = "<br><br><b>"._NOTE."</b> <i>$notes</i>\n";
    } else {
   $notes = "";
    }
    if ("$aid" == "$informant") {
   $content = "$thetext$notes\n";
    } else {
   if($informant != "") {
       $content = "<a href=\"modules.php?name=Your_Account&amp;op=userinfo&amp;username=$informant\">$informant</a> ";
   } else {
       $content = "$anonymous ";
   }
   $content .= ""._WRITES." <i>\"$thetext\"</i>$notes\n";
    }
echo"<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"4\">\n"
  . "  <tr>\n"
  . "    <td><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"2\">\n"
  . "        <tr>\n"
  . "          <td bgcolor=\"#CCCCCC\"><table width=\"100%\" border=\"0\" cellpadding=\"2\" cellspacing=\"0\" bgcolor=\"#303032\">\n"
  . "              <tr>\n"
  . "                <td><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"1\">\n"
  . "                    <tr>\n"
  . "                      <td background=\"themes/Charcoal2/forums/images/bk-z.jpg\" bgcolor=\"#C0C0C0\"><table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"0\">\n"
  . "                          <tr>\n"
  . "                            <td height=\"28\" background=\"themes/Charcoal2/forums/images/sidebox_background2.gif\"><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"3\">\n"
  . "                                <tr>\n"
  . "                                  <td><font class=\"block-title\"><strong>$title</strong></font></td>\n"
  . "                                </tr>\n"
  . "                              </table></td>\n"
  . "                          </tr>\n"
  . "                          <tr>\n"
  . "                            <td><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"2\">\n"
  . "                                <tr>\n"
  . "                                  <td background=\"themes/Charcoal2/forums/images/bk-z.jpg\" bgcolor=\"#8A8C91\"><a href=\"modules.php?name=News&amp;new_topic=$topic\"><img src=\"$tipath$topicimage\" border=\"0\" alt=\"$topictext\" title=\"$topictext\" align=\"right\" hspace=\"10\" vspace=\"10\"></a><font class=\"storycontent\">$content</font></td>\n"
  . "                                </tr>\n"
  . "                              </table></td>\n"
  . "                          </tr>\n"
  . "                          <tr>\n"
  . "                            <td><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"2\">\n"
  . "                                <tr>\n"
  . "                                  <td background=\"themes/Charcoal2/forums/images/bk-w.jpg\" bgcolor=\"#8A8C91\"><div align=\"center\"><font class=\"content\">$posted</font><br><font class=\"content\"></font></div></td>\n"
  . "                                </tr>\n"
  . "                              </table></td>\n"
  . "                          </tr>\n"
  . "                        </table></td>\n"
  . "                    </tr>\n"
  . "                  </table></td>\n"
  . "              </tr>\n"
  . "            </table></td>\n"
  . "        </tr>\n"
  . "      </table></td>\n"
  . "  </tr>\n"
  . "</table>\n"
."";
}

/************************************************************/
/* Function themesidebox()                                  */
/*                                                          */
/* Control look of your blocks. Just simple.                */
/************************************************************/

function themesidebox($title, $content) {
echo"<table width=\"165\" border=\"0\" cellspacing=\"0\" cellpadding=\"4\">\n"
  . "  <tr>\n"
  . "    <td><table width=\"165\" border=\"0\" cellspacing=\"0\" cellpadding=\"1\">\n"
  . "        <tr>\n"
  . "          <td bgcolor=\"#696969\"><table width=\"100%\" border=\"0\" cellpadding=\"1\" cellspacing=\"0\">\n"
  . "              <tr>\n"
  . "                <td><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n"
  . "                    <tr>\n"
  . "                      <td bgcolor=\"#C0C0C0\"><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n"
  . "                          <tr>\n"
  . "                            <td height=\"28\" background=\"themes/Charcoal2/forums/images/sidebox_background.gif\"><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"3\">\n"
  . "                                <tr>\n"
  . "                                  <td><font class=\"block-title\"><strong>$title</strong></font></td>\n"
  . "                                </tr>\n"
  . "                              </table></td>\n"
  . "                          </tr>\n"
  . "                          <tr>\n"
  . "                            <td><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"2\">\n"
  . "                                <tr>\n"
  . "                                  <td background=\"themes/Charcoal2/forums/images/dkback.gif\" bgcolor=\"#8A8C91\"><font class=\"content\">$content</font></td>\n"
  . "                                </tr>\n"
  . "                              </table></td>\n"
  . "                          </tr>\n"
  . "                          <tr>\n"
  . "                            <td height=\"15\" background=\"themes/Charcoal2/forums/images/slogan_blank.jpg\"> ;;</td>\n"
  . "                          </tr>\n"
  . "                        </table></td>\n"
  . "                    </tr>\n"
  . "                  </table></td>\n"
  . "              </tr>\n"
  . "            </table></td>\n"
  . "        </tr>\n"
  . "      </table></td>\n"
  . "  </tr>\n"
  . "</table>\n"
."";
}

?>




_________________
[ Register or login to view links on this board.]
Vivere disce, cogita mori
Back to top Reply with quote
#5   re: Putting an avatar in the theme header
Kelly_Hero
PayPal Donation
CZ Revered Member
 Codezwiz Site Donator
usa.gif southcarolina.gif
Occupation: Web Developer
Age: 59
Gender: Female
Website:
Status: Offline
Joined: Aug 20, 2003
0.48 posts per day
Posts: 3765
Points: 351,412
   
I took a look at the code above and I'm afraid I don't have good news for you. Without some major rework on the header, you can't add the avatar to the header. I tried just rewriting the tables to make room for the avatar, but the problem lies in the way the images for the header are cut. I've attached an image to show you what I mean.

That's not to say that it can't be done. You could piece the header images back together in Photoshop, reslice them and then rewrite the tables. Unless you have the PSD for the theme, then you'd just reslice them the way you want them.




charcoal2.jpg
 Description:
N/A
 Filesize:  31.86 KB
 Viewed:  11740 Time(s)

charcoal2.jpg




Back to top Reply with quote
#6   re: Putting an avatar in the theme header
Dauthus
CZ Addict
 Codezwiz Site Donator
Dauthus has been a member for over 20 year's 20 Year Member
usa.gif illinois.gif
Age: 61
Gender: Male
Website:
Status: Offline
Joined: Mar 17, 2004
0.06 posts per day
Posts: 426
Points: 15,917
   
Kelly_Hero,

I really appreciate you taking the time to check into this for me. It looks like I am going to have to sit back and look at this again. I am not sure I want to go through the hassle of trying to reslice this thing. (I don't know for sure if I have the knowledge to do that anyway).

I still like the idea, but it may not be worth the effort.

Again, thank you very much.




_________________
[ Register or login to view links on this board.]
Vivere disce, cogita mori
Back to top Reply with quote
#7   re: Putting an avatar in the theme header
Kelly_Hero
PayPal Donation
CZ Revered Member
 Codezwiz Site Donator
usa.gif southcarolina.gif
Occupation: Web Developer
Age: 59
Gender: Female
Website:
Status: Offline
Joined: Aug 20, 2003
0.48 posts per day
Posts: 3765
Points: 351,412
   
Well, it sounds a lot harder than it is really. I could knock it up for you pretty quick. If you're interested, pm me and I'll give you a quote on reworking the header. icon_razz.gif



Back to top Reply with quote
#8   re: Putting an avatar in the theme header
Dauthus
CZ Addict
 Codezwiz Site Donator
Dauthus has been a member for over 20 year's 20 Year Member
usa.gif illinois.gif
Age: 61
Gender: Male
Website:
Status: Offline
Joined: Mar 17, 2004
0.06 posts per day
Posts: 426
Points: 15,917
   
Sent ya a PM.




_________________
[ Register or login to view links on this board.]
Vivere disce, cogita mori
Back to top Reply with quote
#9   re: Putting an avatar in the theme header
Dauthus
CZ Addict
 Codezwiz Site Donator
Dauthus has been a member for over 20 year's 20 Year Member
usa.gif illinois.gif
Age: 61
Gender: Male
Website:
Status: Offline
Joined: Mar 17, 2004
0.06 posts per day
Posts: 426
Points: 15,917
   
Just in case anyone was following this thread, thanks to Kelly_Hero and a little creative (and borrowed) code, I got this thing working. The code I posted at the beginning of this thread doesn't work all the time. You can view the results by clicking on my sig or visiting:
[ Register or login to view links on this board. ]

Thanks again Kelly_Hero!




_________________
[ Register or login to view links on this board.]
Vivere disce, cogita mori
Back to top Reply with quote
#10   re: Putting an avatar in the theme header
Kelly_Hero
PayPal Donation
CZ Revered Member
 Codezwiz Site Donator
usa.gif southcarolina.gif
Occupation: Web Developer
Age: 59
Gender: Female
Website:
Status: Offline
Joined: Aug 20, 2003
0.48 posts per day
Posts: 3765
Points: 351,412
   
Looks good. Nice job! icon_razz.gif



Back to top Reply with quote
Display posts from previous:      
Add To: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
<< View previous topic View next topic >>
Post new topicReply to topic

Jump to 
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
You cannot attach files in this forum
You cannot download files in this forum