Forum Replies Created

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter tkhaj

    (@tkhaj)

    It works! It works!

    Thanks so much for your help! Thank you! *kissing your feet* *splutter*

    Thread Starter tkhaj

    (@tkhaj)

    Urgh! the warning’s have gone off the edge. I’ll clean it up the directory structure:

    Warning: main(C:\directory/header-.php) [function.main]: failed to open stream: No such file or directory in C:\directory\page.php on line 27

    Warning: main() [function.include]: Failed opening ‘C:\directory/header-.php’ for inclusion (include_path=’.;\xampp\php\pear\’) in C:\directory\page.php on line 27

    Thread Starter tkhaj

    (@tkhaj)

    Thanks for the help, but it’s still not happy.

    To be completely clear exactly what’s in my file right now, I’ll repeat it again:

    <?php
    global $pagecolor;
    $pagecolor=”;

    $pagecolors = array(
    ‘about-me’ => ‘green’,
    ‘About Me’ => ‘green’,
    ‘my-bio’ => ‘green’,
    ‘contact’ => ‘green’,
    ‘gb-view’ => ‘orange’,
    ‘gb-sign’ => ‘orange’,
    ‘gallery’ => ‘yellow’,
    ‘links’ => ‘blue’,
    ‘story-excerpts’ => ‘green’,
    );

    foreach ($pagecolors as $slug => $color) {
    if(is_page(‘$slug’)) {
    $pagecolor = $color;
    }
    }
    if ($pagecolor = ”) {
    $pagecolor = ‘purple’;
    echo ‘Warning: default color used’;
    }

    include (TEMPLATEPATH . “/header-” . $pagecolor . “.php”); ?>

    <body background=”<?php bloginfo(‘template_url’); ?>/images/background_<?php echo $pagecolor; ?>.png”>

    <div id=”textColumn”>

    <img class=”topBanner” src=”<?php bloginfo(‘template_url’); ?>/images/top_<?php echo $pagecolor; ?>.png”>

    and I’m getting the error:

    Warning: main(C:\xampp\htdocs\wp/wp-content/themes/my-personal-notebook/header-.php) [function.main]: failed to open stream: No such file or directory in C:\xampp\htdocs\wp\wp-content\themes\my-personal-notebook\page.php on line 27

    Warning: main() [function.include]: Failed opening ‘C:\xampp\htdocs\wp/wp-content/themes/my-personal-notebook/header-.php’ for inclusion (include_path=’.;\xampp\php\pear\’) in C:\xampp\htdocs\wp\wp-content\themes\my-personal-notebook\page.php on line 27

    Thread Starter tkhaj

    (@tkhaj)

    Thanks for catching that, that fixes the body background and topBanner images.

    But I don’t think that’s the problem with the header. It’s using the include function to get the header template file. Could it be a problem with using the right quotes? I get single & double quotes confused in php. Also, could it be something about declaring the $pagecolor variable? It doesn’t show in my example above, but I tried adding

    global $pagecolor;

    at the top, but it didn’t change anything. This is what I’m getting:

    Warning: main(C:\xampp\htdocs\wp/wp-content/themes/my-personal-notebook/header-$pagecolor.php) [function.main]: failed to open stream: No such file or directory in C:\xampp\htdocs\wp\wp-content\themes\my-personal-notebook\page.php on line 27

    Warning: main() [function.include]: Failed opening ‘C:\xampp\htdocs\wp/wp-content/themes/my-personal-notebook/header-$pagecolor.php’ for inclusion (include_path=’.;\xampp\php\pear\’) in C:\xampp\htdocs\wp\wp-content\themes\my-personal-notebook\page.php on line 27

    Thread Starter tkhaj

    (@tkhaj)

    Hmmm, I’m still working on this, and I think I found one problem and fixed it, but still the colors aren’t working.

    I fixed the $pagecolor in the background and topBanner images, so instead of something like:

    top_$pagecolor.png

    I’ve got:

    top_<?php $pagecolor; ?>.png

    So those two little oopsies are fixed, BUT the header file is still not getting the right color.

    Hi, I can’t help with your problem, fdaa, since I’m pretty new to WordPress stuff myself. But I have a related question for the WP gurus out there.
    I am using the <!–more–> tags in my entries and it works great on my main page. If a visitor wants to see more it takes them right to the single entry page. No prob.
    So… why use the_excerpt ?? Am I missing something here? Don’t these two methods really do the same thing, or is there some fine distinction between the two?

    Hey! I wanted to say thank you to ‘noname’, whoever you are. I read the post about installing xampp so easily, and hey it worked like a dream! wow.
    I’ve been fighting for a couple days now to get a simple testing server set up to try creating my own themes. First tried sambar and got php and mysql all together and talking to each other, I thought, and… wordpress couldn’t connect to the database. Then I did try xampp (without the instructions from ‘noname’) and must’ve done something wrong. Tried a couple other things, came back to sambar trying to make it work, but I’m no wizard.
    Then I saw the post making it sound so easy with xampp. Thank you! Now I can go sleep.

Viewing 7 replies - 1 through 7 (of 7 total)