Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Themes
Author Message
candy
Worker
Worker



Joined: Dec 21, 2004
Posts: 225
Location: Kansas City metro

PostPosted: Fri Jul 22, 2005 8:33 pm Reply with quote

how can i go in and change my width so that the site does not span 100% of the screen? I am using a weird theme that i can't get to work with the width changes.

i have a theme.php file but don't see where i can change the width...so i went to my header.html and changed it....it worked only for the header...the rest of the body stayed at 100%.

i also have tables.php and changed some of the code from 100% to 75% but it didn't work either. Here's my tables.php file contents:

Code:
<?php


/************************************************************/
/* 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=\"0\" bgcolor=\"#ffffff\">
<tr><td width=\"12\" height=\"6\"><img src=\"themes/3634/images/m_t1.jpg\" width=\"12\" height=\"6\" border=\"0\"></td>
    <td width=\"100%\" height=\"6\" background=\"themes/3634/images/m_t2.jpg\"></td>
   <td width=\"6\" height=\"6\"><img src=\"themes/3634/images/m_t3.jpg\" width=\"6\" height=\"6\" border=\"0\"></td>
</tr>
<tr>
<td width=\"12\" background=\"themes/3634/images/m_l.jpg\"><img src=\"themes/3634/images/spacer.gif\" width=\"12\" border=\"0\"></td>
<td>
<div style=\"padding:5px \">";
}

function CloseTable() {
    echo "
   </div>
</td>
<td width=\"6\" background=\"themes/3634/images/m_r.jpg\"><img src=\"themes/3634/images/spacer.gif\" width=\"6\" border=\"0\"></td>
</tr>
<tr><td width=\"12\" height=\"6\"><img src=\"themes/3634/images/m_f1.jpg\" width=\"12\" height=\"6\" border=\"0\"></td>
    <td width=\"100%\" height=\"6\" background=\"themes/3634/images/m_f2.jpg\"></td>
   <td width=\"6\" height=\"6\"><img src=\"themes/3634/images/m_f3.jpg\" width=\"6\" height=\"6\" border=\"0\"></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";
}

?>


thanks for any insight! Confused
 
View user's profile Send private message
hitwalker
Sells PC To Pay For Divorce



Joined:
Posts: 5661

PostPosted: Sat Jul 23, 2005 4:12 am Reply with quote

hi,

you have to look for these tables....

Code:


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

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

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";
}


As you see the width of your tables are not set.
just alter them and your done...
 
View user's profile Send private message
candy







PostPosted: Sat Jul 23, 2005 8:48 am Reply with quote

okay thanks. what do you mean the width is not set? isn't it set to 100%? Do i just change it because i think i tried that and it didn't work.
 
hitwalker







PostPosted: Sat Jul 23, 2005 8:54 am Reply with quote

Well your using a commercial theme.
they are not so well build,i know cause i have a few...
its not only the tables but there could be other things as well keeping the width at 100% or whatever..
if the theme uses just a theme.php then thats the one you should alter..
 
candy







PostPosted: Sat Jul 23, 2005 8:59 am Reply with quote

okay, here is mmy theme.php. where would i alter the width? what code would i need to use? Thanks!

Code:
<?php


/************************************************************/
/* IMPORTANT NOTE FOR THEMES DEVELOPERS!                    */
/*                                                          */
/* When you start coding your theme, if you want to         */
/* distribute it, please double check it to fit the HTML    */
/* 4.01 Transitional Standard. You can use the W3 validator */
/* located at http://validator.w3.org                       */
/* If you don't know where to start with your theme, just   */
/* start modifying this theme, it's validate and is cool ;) */
/************************************************************/

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

$bgcolor1 = "#efefef";
$bgcolor2 = "#cfcfbb";
$bgcolor3 = "#efefef";
$bgcolor4 = "#cfcfbb";
$textcolor1 = "#000000";
$textcolor2 = "#000000";

include("themes/3634/tables.php");

/************************************************************/
/* 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 $user, $banners, $sitename, $slogan, $cookie, $prefix, $dbi;
    cookiedecode($user);
    $username = $cookie[1];
    if ($username == "") {
        $username = "Anonymous";
    }
    echo "<body LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0 bgcolor=\"A3CCDE\" text=\"#000000\" link=\"#363636\" vlink=\"#363636\" alink=\"#d5ae83\">";
    if ($banners == 1) {
        include("banners.php");
    }
    $topics_list = "<select name=\"new_topic\" onChange='submit()'>\n";
    $topics_list .= "<option value=\"\">All Topics</option>\n";
    $toplist = sql_query("select topicid, topictext from ".$prefix."_topics order by topictext", $dbi);
    while(list($topicid, $topics) = sql_fetch_row($toplist, $dbi)) {
    if ($topicid==$topic) { $sel = "selected "; }
        $topics_list .= "<option $sel value=\"$topicid\">$topics</option>\n";
        $sel = "";
    }
    if ($username == "Anonymous") {
        $theuser = "&nbsp;&nbsp;<a href=\"account-new_user.html\">Create an account";
    } else {
        $theuser = "&nbsp;&nbsp;Welcome $username!";
    }
    $public_msg = public_message();
    $tmpl_file = "themes/3634/header.html";
    $thefile = implode("", file($tmpl_file));
    $thefile = addslashes($thefile);
    $thefile = "\$r_file=\"".$thefile."\";";
    eval($thefile);
    print $r_file;
    blocks(left);
    $tmpl_file = "themes/3634/left_center.html";
    $thefile = implode("", file($tmpl_file));
    $thefile = addslashes($thefile);
    $thefile = "\$r_file=\"".$thefile."\";";
    eval($thefile);
    print $r_file;
}

/************************************************************/
/* 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, $copyright, $totaltime;
    if ($index == 1) {
        $tmpl_file = "themes/3634/center_right.html";
        $thefile = implode("", file($tmpl_file));
        $thefile = addslashes($thefile);
        $thefile = "\$r_file=\"".$thefile."\";";
        eval($thefile);
        print $r_file;
        blocks(right);
    }
    $footer_message = "$foot1<br>$foot2<br>$foot3<br>$copyright<br>$totaltime";
    $tmpl_file = "themes/3634/footer.html";
    $thefile = implode("", file($tmpl_file));
    $thefile = addslashes($thefile);
    $thefile = "\$r_file=\"".$thefile."\";";
    eval($thefile);
    print $r_file;
}

/************************************************************/
/* 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;
    $ThemeSel = get_theme();
    if (file_exists("themes/$ThemeSel/images/topics/$topicimage")) {
        $t_image = "themes/$ThemeSel/images/topics/$topicimage";
    } else {
        $t_image = "$tipath$topicimage";
    }
    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.")";
    $tmpl_file = "themes/3634/story_home.html";
    $thefile = implode("", file($tmpl_file));
    $thefile = addslashes($thefile);
    $thefile = "\$r_file=\"".$thefile."\";";
    eval($thefile);
    print $r_file;
}

/************************************************************/
/* 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;
    $ThemeSel = get_theme();
    if (file_exists("themes/$ThemeSel/images/topics/$topicimage")) {
        $t_image = "themes/$ThemeSel/images/topics/$topicimage";
    } else {
        $t_image = "$tipath$topicimage";
    }
    $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";
    }
    $tmpl_file = "themes/3634/story_page.html";
    $thefile = implode("", file($tmpl_file));
    $thefile = addslashes($thefile);
    $thefile = "\$r_file=\"".$thefile."\";";
    eval($thefile);
    print $r_file;
}

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

function themesidebox($title, $content) {
    $tmpl_file = "themes/3634/blocks.html";
    $thefile = implode("", file($tmpl_file));
    $thefile = addslashes($thefile);
    $thefile = "\$r_file=\"".$thefile."\";";
    eval($thefile);
    print $r_file;
}

?>
 
hitwalker







PostPosted: Sat Jul 23, 2005 9:01 am Reply with quote

thats funny...
tables.php

thats the one to edit.
 
candy







PostPosted: Sat Jul 23, 2005 9:03 am Reply with quote

i posted my tables.php code in my first post....i already tried changing the width something other than 100% but it still didn't work. Am i missing something? Am i changing it in the wrong place?
 
hitwalker







PostPosted: Sat Jul 23, 2005 9:05 am Reply with quote

any link to the site ?
 
candy







PostPosted: Sat Jul 23, 2005 9:09 am Reply with quote

here's the link
[ Only registered users can see links on this board! Get registered or login! ]

thanks.
 
hitwalker







PostPosted: Sat Jul 23, 2005 9:20 am Reply with quote

Hi looking at the code i dont think you cannot go below the 100% cause your header wont allow that.
Your top navigation has its menu build in it and will get messed up as soon as you try to change the width.

I copied the index and tried to change it and it does but uncertain is to say how it will look live...
 
hitwalker







PostPosted: Sat Jul 23, 2005 9:21 am Reply with quote

For example these are the changes...
Code:


<td align="left" valign="top" background="themes/3634/images/tile_header.gif" width="845">
              <table width="845"  border="0" cellspacing="0" cellpadding="0">
                <tr align="left" valign="top">
                  <td width="474"><a href="index.php"><img src="themes/3634/images/logo.jpg"
width="329" height="97" border="0"></a></td>
                  <td width="93" height="97" align="right" background="themes/3634/images/journal.jpg"><div style=" padding-top:65px; padding-right:25px; color:#264A61"><a style="font-style: normal; font-variant: normal; font-weight: bold; font-size: 10px; font-family: tahoma; color: #264a61">&nbsp;&nbsp;&nbsp;&nbsp;
                      </a><a href="journal.html" style="font:bold 10px tahoma; color: #264a61;">Journal</a></div> </td>
                  <td width="66" align="right" background="themes/3634/images/statistics.jpg"><div style=" padding-top:65px; padding-right:17px"><a style="font-style: normal; font-variant: normal; font-weight: bold; font-size: 10px; font-family: tahoma; color: #264a61" href="modules.php?name=Prizes">Prizes</a></div></td>
                  <td width="67" align="right" background="themes/3634/images/top.jpg"><div style=" padding-top:65px; padding-right:15px"><a style="font-style: normal; font-variant: normal; font-weight: bold; font-size: 10px; font-family: tahoma; color: #264a61" href="modules.php?name=shopping">Shopping</a></div></td>

                  <td width="68" align="right" background="themes/3634/images/mail.jpg"><div style="width: 68; height: 76; padding-right: 15px; padding-top: 65px"><a href="modules.php?name=mommysourcemail" style="font:bold  10px tahoma; color: #264a61;">Web
                      Mail</a></div></td>
                  <td width="68" align="right" background="themes/3634/images/links.jpg"><div style=" padding-top:65px; padding-right:12px"><a style="font-style: normal; font-variant: normal; font-weight: bold; font-size: 10px; font-family: tahoma; color: #264a61" href="links.html">Events</a><a style="font-style: normal; font-variant: normal; font-weight: bold; font-size: 10px; font-family: tahoma; color: #264a61">&nbsp;&nbsp;</a></div></td>
                  <td width="89" align="right" background="themes/3634/images/contact.jpg"><div style="width: 89; height: 84; padding-right: 32px; padding-top: 65px"><a style="font-style: normal; font-variant: normal; font-weight: bold; font-size: 10px; font-family: tahoma; color: #264a61">&nbsp;
                      </a><a style="font-style: normal; font-variant: normal; font-weight: bold; font-size: 10px; font-family: tahoma; color: #264a61" href="http://www.mommysource.joystar.com/" target="_blank">Travel</a>&nbsp;&nbsp;&nbsp;</div></td>
                </tr>
              </table>
           <table width="780"  border="0" cellspacing="0" cellpadding="0">
 
hitwalker







PostPosted: Sat Jul 23, 2005 9:22 am Reply with quote

Not that clear but thats how php presents it...
Fact is you have to do some digging or get some help to do some online editing.
 
Nukeum66
Life Cycles Becoming CPU Cycles



Joined: Jul 30, 2003
Posts: 551
Location: Neurotic, State, USA

PostPosted: Sat Jul 23, 2005 9:27 am Reply with quote

One thing I see on your site that may be causing the theme not to conform to your needs, is the placement of a 468x60 banner as a center block. Try disabling the banner until you have your theme like you want it.

_________________
Scott Johnson MIS Ubuntu/Linux 11.10 
View user's profile Send private message Visit poster's website
hitwalker







PostPosted: Sat Jul 23, 2005 9:30 am Reply with quote

that wont do i think,she duplicated some things..
as im almost shure the header isnt original anymore.
some parts are already out of place.
 
Nukeum66







PostPosted: Sat Jul 23, 2005 10:10 am Reply with quote

Looks like she duplicated a table cell some how in header.html
 
hitwalker







PostPosted: Sat Jul 23, 2005 10:40 am Reply with quote

yeah,well back to basics ..
put original header back and start over...
 
Nukeum66







PostPosted: Sat Jul 23, 2005 10:53 am Reply with quote

Good Call!

Candy, if you like to send me the theme, I'd be willing to play around with it. I may be able to fix it for you and maybe not ...... Laughing

nukeum66 at bellsouth dot net
 
candy







PostPosted: Thu Jul 28, 2005 8:51 pm Reply with quote

scott-
i sent you my theme..let me know when you get it. Thanks! Smile
 
Nukeum66







PostPosted: Thu Jul 28, 2005 10:55 pm Reply with quote

Ok I'll look it over. ...... Laughing
 
VinDSL
Life Cycles Becoming CPU Cycles



Joined: Jul 11, 2004
Posts: 614
Location: Arizona (USA) Admin: NukeCops.com Admin: Disipal Designs Admin: Lenon.com

PostPosted: Fri Jul 29, 2005 10:41 am Reply with quote

While Nukeum66 is working on that...

The way I control the overall width of a theme is to simply 'trap' the whole thing inside a table cell, e.g. place an additional table at the very beginning of the theme, immediately after the 'body' tag. That way, not only do I control the overall width of the theme[s], but nothing can 'breakout', like having the header one size and the body another, et cetera...

This can be accomplished different ways in different themes, but in the theme I'm using right now (Disipal Design's FlowControl) - all I had to do was edit the 'themeheader' function in 'themes/FlowControl/themes.php'.

Example:

I changed
Code:


<snip>

function themeheader() {
    global  $admin, $user, $banners, $name, $sitename, $slogan, $cookie, $prefix, $db, $nukeurl, $anonymous, $time;
   
<snip>
       
  echo "<body topmargin=\"0\" leftmargin=\"0\" marginwidth=\"0\" marginheight=\"0\">"
  . "<!-- FlowControl Theme pack for PHP-Nuke 7.0 and above - Copyright 2004-2005 by Disipal Designs (http://www.disipal.net) -->"
  . "<!-- ImageReady Slices (FlowControl_Header.psd) -->"
  . "<table id=\"Table_02\" width=\"100%\" height=\"198\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">"
  . "    <tr>"
  . "        <td colspan=\"8\" rowspan=\"2\">"
  . "            <img src=\"themes/FlowControl/images/header/header_01.gif\" width=\"435\" height=\"55\" alt=\"\"></td>"
  . "        <td background=\"themes/FlowControl/images/header/bg.gif\" width=\"100%\" height=\"198\" rowspan=\"6\">"
  . "            </td>"
  . "        <td rowspan=\"6\">"

<snip>


To ('body' element is highlighted to show proximity to new 'table' cell)

Quote:

<snip>

function themeheader() {
global $admin, $user, $banners, $name, $sitename, $slogan, $cookie, $prefix, $db, $nukeurl, $anonymous, $time;

<snip>

echo "<body topmargin=\"0\" leftmargin=\"0\" marginwidth=\"0\" marginheight=\"0\">\n\n"
. "<!-- FlowControl Theme pack for PHP-Nuke 7.0 and above - Copyright 2004-2005 by Disipal Designs (http://www.disipal.net) -->\n"
. "<!-- ImageReady Slices (FlowControl_Header.psd) -->\n\n"


. "<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\"><tr><td>\n"


. "<table id=\"Table_02\" width=\"100%\" height=\"198\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n"
. " <tr>\n"
. " <td colspan=\"8\" rowspan=\"2\">\n"
. " <img src=\"themes/FlowControl/images/header/header_01.gif\" width=\"435\" height=\"55\" alt=\"\"></td>\n"
. " <td background=\"themes/FlowControl/images/header/bg.gif\" width=\"100%\" height=\"198\" rowspan=\"6\">\n"
. " </td>\n"
. " <td rowspan=\"6\">\n"

<snip>


And, of course, you need to place an additional set of closing tags at the end of the theme code...

In the example above, I simply wanted to 'trap' the elements on the page[s], for integrity and continuity. However, by specifying something other than '100%' for the width, I can make the entire site any size I want. In this case, though, I wanted to use the entire width of the screen, with no borders or spacing...

Simple pimple, huh? Wink

_________________
.:: "The further in you go, the bigger it gets!" ::.
.:: VinDSL's Lenon.com | The Disipal Site ::.

Last edited by VinDSL on Fri Jul 29, 2005 11:02 am; edited 1 time in total 
View user's profile Send private message Visit poster's website ICQ Number
CurtisH
Life Cycles Becoming CPU Cycles



Joined: Mar 15, 2004
Posts: 638
Location: West Branch, MI

PostPosted: Fri Jul 29, 2005 10:47 am Reply with quote

Very useful info. Thanks tons! Amazing how often the simplistic things can be so easily overlooked. I wish I had this info a long time ago. *LOL*

Thanks again.

_________________
Those who dream by day are cognizant of many things which escape those who dream only by night. ~Poe 
View user's profile Send private message Visit poster's website Yahoo Messenger
VinDSL







PostPosted: Fri Jul 29, 2005 11:27 am Reply with quote

CurtisH wrote:
Very useful info. Thanks tons! Amazing how often the simplistic things can be so easily overlooked. I wish I had this info a long time ago. *LOL*

Thanks again.

You're welcome! Yeah, I cut my Nuke teeth debugging themes...

Personally, I don't have the time or talent necessary to design themes from scratch - a blank canvas, so to speak. Really, it's an art form, as much as anything, and I'm NOT a graphic artist.

However, I've noticed that most theme designers don't seem to have the time or talent necessary to debug their themes. Developing themes often becomes a symbiosis of mutual parasitism between theme designers and debugger[s].

Having said that, the simple things are not only the most overlooked, but often have the greatest effect... Wink
 
candy







PostPosted: Fri Jul 29, 2005 9:41 pm Reply with quote

thanks for posting that...unfortunately, i don't know what to do next. my theme.php file doesn't look at all like yours so i can't make the changes you suggested. Here is my theme.php file. Do you have any ideas or suggestions? Thanks.

Code:
<?php


/************************************************************/
/* IMPORTANT NOTE FOR THEMES DEVELOPERS!                    */
/*                                                          */
/* When you start coding your theme, if you want to         */
/* distribute it, please double check it to fit the HTML    */
/* 4.01 Transitional Standard. You can use the W3 validator */
/* located at http://validator.w3.org                       */
/* If you don't know where to start with your theme, just   */
/* start modifying this theme, it's validate and is cool ;) */
/************************************************************/

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

$bgcolor1 = "#efefef";
$bgcolor2 = "#cfcfbb";
$bgcolor3 = "#efefef";
$bgcolor4 = "#cfcfbb";
$textcolor1 = "#000000";
$textcolor2 = "#000000";

include("themes/3634/tables.php");

/************************************************************/
/* 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 $user, $banners, $sitename, $slogan, $cookie, $prefix, $dbi;
    cookiedecode($user);
    $username = $cookie[1];
    if ($username == "") {
        $username = "Anonymous";
    }
    echo "<body LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0 bgcolor=\"A3CCDE\" text=\"#000000\" link=\"#363636\" vlink=\"#363636\" alink=\"#d5ae83\">";
    if ($banners == 1) {
        include("banners.php");
    }
    $topics_list = "<select name=\"new_topic\" onChange='submit()'>\n";
    $topics_list .= "<option value=\"\">All Topics</option>\n";
    $toplist = sql_query("select topicid, topictext from ".$prefix."_topics order by topictext", $dbi);
    while(list($topicid, $topics) = sql_fetch_row($toplist, $dbi)) {
    if ($topicid==$topic) { $sel = "selected "; }
        $topics_list .= "<option $sel value=\"$topicid\">$topics</option>\n";
        $sel = "";
    }
    if ($username == "Anonymous") {
        $theuser = "&nbsp;&nbsp;<a href=\"account-new_user.html\">Create an account";
    } else {
        $theuser = "&nbsp;&nbsp;Welcome $username!";
    }
    $public_msg = public_message();
    $tmpl_file = "themes/3634/header.html";
    $thefile = implode("", file($tmpl_file));
    $thefile = addslashes($thefile);
    $thefile = "\$r_file=\"".$thefile."\";";
    eval($thefile);
    print $r_file;
    blocks(left);
    $tmpl_file = "themes/3634/left_center.html";
    $thefile = implode("", file($tmpl_file));
    $thefile = addslashes($thefile);
    $thefile = "\$r_file=\"".$thefile."\";";
    eval($thefile);
    print $r_file;
}

/************************************************************/
/* 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, $copyright, $totaltime;
    if ($index == 1) {
        $tmpl_file = "themes/3634/center_right.html";
        $thefile = implode("", file($tmpl_file));
        $thefile = addslashes($thefile);
        $thefile = "\$r_file=\"".$thefile."\";";
        eval($thefile);
        print $r_file;
        blocks(right);
    }
    $footer_message = "$foot1<br>$foot2<br>$foot3<br>$copyright<br>$totaltime";
    $tmpl_file = "themes/3634/footer.html";
    $thefile = implode("", file($tmpl_file));
    $thefile = addslashes($thefile);
    $thefile = "\$r_file=\"".$thefile."\";";
    eval($thefile);
    print $r_file;
}

/************************************************************/
/* 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;
    $ThemeSel = get_theme();
    if (file_exists("themes/$ThemeSel/images/topics/$topicimage")) {
        $t_image = "themes/$ThemeSel/images/topics/$topicimage";
    } else {
        $t_image = "$tipath$topicimage";
    }
    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.")";
    $tmpl_file = "themes/3634/story_home.html";
    $thefile = implode("", file($tmpl_file));
    $thefile = addslashes($thefile);
    $thefile = "\$r_file=\"".$thefile."\";";
    eval($thefile);
    print $r_file;
}

/************************************************************/
/* 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;
    $ThemeSel = get_theme();
    if (file_exists("themes/$ThemeSel/images/topics/$topicimage")) {
        $t_image = "themes/$ThemeSel/images/topics/$topicimage";
    } else {
        $t_image = "$tipath$topicimage";
    }
    $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";
    }
    $tmpl_file = "themes/3634/story_page.html";
    $thefile = implode("", file($tmpl_file));
    $thefile = addslashes($thefile);
    $thefile = "\$r_file=\"".$thefile."\";";
    eval($thefile);
    print $r_file;
}

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

function themesidebox($title, $content) {
    $tmpl_file = "themes/3634/blocks.html";
    $thefile = implode("", file($tmpl_file));
    $thefile = addslashes($thefile);
    $thefile = "\$r_file=\"".$thefile."\";";
    eval($thefile);
    print $r_file;
}

?>
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Themes

View next topic
View previous 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
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©