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

Joined: Jun 09, 2007
Posts: 172

PostPosted: Thu Oct 23, 2008 2:08 pm Reply with quote

I am not sure if that is best subject, so i will try to explain what i am wanting to work on.

I am looking at different free themes and see that i would like to try and put part of one theme with part of another.
I have been trying to read some of the post and see some things about editing this or that, but I am either tired or lost Sad

one theme i have looked at has really good setup but the colors (in my opinion) are horrible, or bland... yet another theme looks really good for colors but has not "body to it" or even a "header"

I have tried to open them up and do a compare, and i do see some common code, but I see alot of extra that one may have and the other will not.

One may have a header.php file and the other dont, but in the theme file they both have code for the header. One theme would have 2 pages of code and the other may have like 30 lines.

One theme folder may have 2 sub folders and 8 files (not exactally) and the other may have 2 sub folders and 2 files.

I know I have said before in some of my other post, I am a trial and error person, and with help here i have been able to get alot done.
Any advice on what steps i should do short of going and getting a book ..hehe.. would be great

if you want to know the themes i am looking at so you have a better idea of what I am working with, i belive they are called

fisubice (bet you seen this one) hehe

thanks for any advice
View user's profile Send private message
Site Admin

Joined: Aug 28, 2003
Posts: 6793
Location: Ha Noi, Viet Nam

PostPosted: Fri Oct 24, 2008 2:02 am Reply with quote

Themes usually come in two flavours and with one option so lets explore them..
Flavour 1

Flavour 2
blocks.html (some have seperate files for left and right blocks)
a couple more I cannot remember.

The only difference with these two flavours is that the first one has all the code in theme.php whereas the other one has split the code up into seperate files and theme.php handles getting the 'other' files.

Your option is a theme with, or without a forum template.
View user's profile Send private message Send e-mail
PostPosted: Fri Oct 24, 2008 8:00 am Reply with quote


well the aom theme seems to have everything in the one theme.php file It seems to be easy to change certian things within this theme but what I would like to do is add a header to this one as it is not really designed with one, or the code is so different that I wouldnt know where to start. I will try to show some of the code without taking up to much space in one post. These will be from the downloaded free themes. AOM:

/* Function themeheader()                                   */


function themeheader() {
global $thename, $bgcolor1, $bgcolor2, $bgcolor3, $bgcolor4, $bgcolor5, $textcolor1, $textcolor2, $textcolor3, $textcolor4, $textcolor5, $textcolor6;
global $welcomeMessage, $theme_image_path;
global $ul_corner_big, $ur_corner_big, $ll_corner_big, $lr_corner_big, $lframe_big, $rframe_big, $uframe_big, $dframe_big, $midframe_big, $hframe_big, $wframe_big;
global $ul_corner_sm, $ur_corner_sm, $ll_corner_sm, $lr_corner_sm, $lframe_sm, $rframe_sm, $uframe_sm, $dframe_sm, $midframe_sm, $hframe_sm, $wframe_sm;
global $user, $sitename;
global $bg_overall, $bg_sideblocks, $bg_center;

    $username = $cookie[1];
    if ($username == "") {
        $username = "Anonymous";
    echo "<body bgcolor=\"$bgcolor1\" text=\"#FFFFFF\" link=\"#A2834C\" vlink=\"#A2834C\" alink=\"#A2834C\">\n"
    if ($banners) {
   echo "<table cellpadding=\"0\" cellspacing=\"0\" width=\"99%\" border=\"0\" align=\"center\" bgcolor=\"$bgcolor3\">\n";
   echo "<tr><td valign=\"top\">\n";
    echo "</td><td><img src=\"$theme_image_path$pixel\" width=\"15\" height=\"1\" border=\"0\" alt=\"\"></td><td width=\"100%\"";
   echo "valign=top>\n";

this is under a "should not edit warning"....it shows header code but it seems to be more for maby a banner then a header.

Looking at another theme the things i see for loaded in the header information is alot since it has login stuff and links to the site, but the bottom of the header info in alot of others seems to be more common.
$showbanners = "<a href=\"banners.php?op=click&bid=$bid\" target=\"_blank\"><img src=\"$imageurl\" border=\"0\" alt='$alttext' title='$alttext'></a>"; 

    }    cookiedecode($user);
    $username = $cookie[1];
    if ($username == "") {
        $username = "Anonymous";
    echo "<body background=\"themes/Aeolus/images/bg_main.gif\" bgcolor=\"#000000\" text=\"#FFFFCC\" leftmargin=\"10\" topmargin=\"10\" marginwidth=\"10\" marginheight=\"10\">";

    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/Aeolus/header.html";
    $thefile = implode("", file($tmpl_file));
    $thefile = addslashes($thefile);
    $thefile = "\$r_file=\"".$thefile."\";";
    print $r_file;
    $tmpl_file = "themes/Aeolus/left_center.html";
    $thefile = implode("", file($tmpl_file));
    $thefile = addslashes($thefile);
    $thefile = "\$r_file=\"".$thefile."\";";
    print $r_file;

this is not all the code for the header, but this part of it seems to show for a login, and to load the header.html file

Now again..."trial and error person" so i tried taking parts of the code from one and pasting it to the other, then i would change the paths and any background color to match and hoping that it would still work with the style sheet in the theme. As of this time i have had no luck...but i have been trying to work hard on this and so far i have hit a brick wall.

so in short i am trying to use part of Flavour 2 and put it into Flavour 1 and make it work Smile
PostPosted: Fri Oct 24, 2008 8:38 am Reply with quote

There are a lot of variables in the first lot of code you posted. That isn't normal.
You'll need to find out what those variables mean and swop the variable for the actual code to make any sense of what it is trying to do - not an easy job for someone who has not delved into themes before.

You would probably be better using something like fisubice and changing the images/colors to the spec you need.
PostPosted: Fri Oct 24, 2008 9:44 am Reply with quote

I was thinking that too, since it was the colors and background with borders that I liked.
I can try, and see if i can get it to work that way....for a trial and error person what steps would you recomend in replacing info?
I am doing this with xampp so I can create another test install.

I would need to make edits to the css and the theme at the same time?

In the theme.php would i only need to concentrate on the theme color definition?

then if i can get that to work i can look more into the borders and stuff.

to make sure I am in the ballpark...i would be looking to import this

$thename = "AOM";                        # The name of your theme

$bg_overall ="main_bg.gif";               # The overall background
$bg_sideblocks = "main_bg.gif";            # The left and right block background
$bg_center = "main_bg.gif";               # The center block background

$bgcolor1 = "#000000";                  # primary background color
$bgcolor2 = "#000000";                  # header and footer background color
$bgcolor3 = "#000000";                  # block area background color
$bgcolor4 = "#000000";                  # center block background color
$bgcolor5 = "#000000";                  # left and right block background color
$textcolor1 = "#C27B48";               # center block default title text color
$textcolor2 = "#C27B48";               # left and right block default title text color
$textcolor3 = "#A2834C";               # upper center block default text color
$textcolor4 = "#FFFFFF";               # lower center block default text color
$textcolor5 = "#A2834C";               # right and left block default text color
$textcolor6 = "#A2834C";               # header and footer default text color

into this


$bgcolor1 = '#F4F6FB';
$bgcolor2 = '#BBCCDC';
$bgcolor3 = '#F4F6FB';
$bgcolor4 = '#BBCCDC';
$textcolor1 = '#516A88';
$textcolor2 = '#516A88';


and then match up info in css...

am i on the right track?

and then I can work on borders and stuff...

I thank you for the help...i am learning Smile
PostPosted: Fri Oct 24, 2008 11:16 am Reply with quote

Seems like a good way to start to me Smile
PostPosted: Fri Oct 24, 2008 12:50 pm Reply with quote

well what i thought could be somewhat simple has been quite troublesome.

so maby if i can get a little push in the right direction it may help me get started.

the background i want for all the pages and all the blocks is called main_bg.gif. Now i copied this to the themes/image folder.

now in the theme.php file there just seems to be bgcolor and textcolor.

$bgcolor1 = '#F4F6FB';

and in any of those if I tried to load the gif as the background i didnt see any changes.

I even went into the header.php file and seen where it was loading a .jpg file and change it to the .gif file i was trying and still didnt see any difference.
I went into the css and was really confused Sad

If you could direct me to a post that may of been like this, or let me know where i am going wrong, and if possible show me where to add the gif and it would give me a guildline of doing the other edits....

sorry i am getting so frustrated, and my eyes are starting to cross....thank you for any help
PostPosted: Fri Oct 24, 2008 6:29 pm Reply with quote

I have done more reading and here are some of the things i found so far...

for refrence:
Only registered users can see links on this board! Get registered or login!
Only registered users can see links on this board! Get registered or login!

now the second post seems to show this example to replace the background

body {background: #EFEFEF url(images/cellpic4.gif)

and or

.bodyline {background:#E5E8EE url(images/cellpic4.gif);border:4px ridge #CCCCCC}

now these two lines in the style.css with fisubicle are this:

.bodyline{background: #f7f8fc;color:#000000;border:1px solid #98aab1}


would making one or both of these changes replace the background? I am looking to change the background with a image used as a background on another theme.

I am greatfull for any help...i have been reading for the last 4 hours and my brain hurts Sad
PostPosted: Sat Oct 25, 2008 5:18 am Reply with quote

body {background: url(images/yourimage.gif);}

would probably be good but keep in mind the image will only show where the html body tag is used.
PostPosted: Sat Oct 25, 2008 8:08 am Reply with quote

i must be having a typo or something or I am just lost again.... I went back and looked inside of themes for the use of the body tag, and there was just a couple of places where it was used and then it didnt look like it was for a background.

Would it be easier to try and create a global for the entire background? and then place it in the css and everyplace else?

I just cannot find for the life of me what to change for the entire background....
The closest thing i see to background is the bgcolor and i keep reading that i should make the changes in the css.
I am sorry I seem to be loosing prespective of this, i could use a nudge in another direction please.
PostPosted: Sat Oct 25, 2008 3:43 pm Reply with quote

If you have Firefox web browser install the Developer plug-in, you can use it track down which parts of the page relate to the CSS very easily Wink
Site Admin

Joined: Feb 06, 2006
Posts: 3048
Location: United Kingdom

PostPosted: Sat Oct 25, 2008 3:47 pm Reply with quote

Firebug is great!
View user's profile Send private message
PostPosted: Sat Oct 25, 2008 7:12 pm Reply with quote

well this is what i get when using firebug

.mymodulesselectbox {

background:#F7F8FC none repeat scroll 0 0;

that is what is shown in the css box when using the fisubice.

when i go into the css file i dont see anything with this info....the closest i came was this line.

.bodyline{background: #f7f8fc;color:#000000;border:1px solid #98aab1}

this was the only line in all the css that had #f7f8fc...so i tried to change it to this

.bodyline{background: url(themes/fisubice/images/main_bg.gif);color:#000000;border:1px solid #98aab1}

no on the right side of firebug there was style tab which had shown line 18 in css which is this


so i change this line to


again i didnt see anything different, except in firebug it would show that line18 of the css showed the change that was made.

now while expermenting i was able to make some changes with to blocks to

<td height="27" style="background-image: url(themes/fisubice/images/main_bg.gif)"><table width="100%" border="0" cellspacing="0" cellpadding="4">

now this loaded the gif file and i seen that it was for like the top border, but not the entire box.

Now i have made sure that i have cleared my cache to make sure i could see the changes, i believe that in windows holding "cntrl f5" forced a reload of the page too.

I am still at a loss to change the entire background...i am starting to think that i would have to create another global and try to add it that way.

any other ideas that may help me figure this out would be great..thanks for motivating my studies Smile
Life Cycles Becoming CPU Cycles

Joined: Jan 02, 2003
Posts: 714
Location: Vancouver Island

PostPosted: Sat Oct 25, 2008 8:53 pm Reply with quote

I would define a background image in the theme style.css file:

"We want to see if life is ubiquitous." D.Goldin 
View user's profile Send private message
PostPosted: Sat Oct 25, 2008 10:12 pm Reply with quote

the file i am trying to use for the background is main_bg.gif...it is in the images folder, so i have tried this a few different ways just to make sure


body{background-image:url(full path./images/main_bg.gif);}

nothing worked....i have this installed on 2 computers running xampp, other changes are instant and this has not made any changes for some reason.

as a reminder this is main_bg.gif from the theme AOM /theme/ folder that has been copied over to the fisubice /theme/ folder in case someone gets it to see if they can make it work.....
again thanks for any help....i have found some good info in trying to get this done.
PostPosted: Sat Oct 25, 2008 10:37 pm Reply with quote

Just to let anyone know that I had left the changes in and after playing a game and doing some other stuff to take my mind off things for a min, i went and reloaded the page again (4th time ) amd the background is working great now.....

dunno, guess the cache didnt clear all out but its working and thats what counts...

now i will look to change color to the backrgound of the open boxes.......
PostPosted: Sun Oct 26, 2008 1:52 pm Reply with quote

I find that 99% of problems are usually path related. I should have explained that my background image is in the themes/mytheme/images/ folder, not /images/

Anyways, glad you found it and happy tweeking!
PostPosted: Sun Oct 26, 2008 2:36 pm Reply with quote

as i go back an look at some of what i was working with, where i posted the change i made in the blocks file it kinda had the right info but i didnt do that with the other info and you seen it where I didnt...

i was doing background:url instead of background-theme:url....and in the example i did with the blocks it was there but everything i tried before yours i didnt place that there.

thats the bad part when i dont know anything about php, but i have been pretty good at patching things together and alot of trial and error.

I am learning, and getting better...

thanks to everyone for all the help....
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 ©