Not signed in (Sign In)

Vanilla 1.1.10 is a product of Lussumo. More Information: Documentation, Community Support.

    • CommentAuthormacciti
    • CommentTimeDec 18th 2008
     
    Hy guys, i have created plogger.php and uploaded it into my themes folder in WordPress. I cannot make it work though, please take a look at this, this is my page... P.S. My plogger installation located @: /MacCiti/gallery... any suggestions?

    <?php
    /*
    Template Name: Plogger
    */
    ?>
    <?php require_once("MacCiti/gallery/gallery.php"); ?>
    <?php
    function plogger_page_header(){
    global $config;
    the_gallery_head();
    }
    add_action('wp_head', 'plogger_page_header');
    ?>
    <?php get_header(); ?>

    <div id="content">

    <?php
    $ad_468 = get_option('matatag_ad_468');
    if (!empty($ad_468)) {
    ?>
    <div class="singlegoogle">
    <?php echo stripslashes($ad_468); ?>
    </div>
    <?php
    }
    ?>

    <div class="postgroup">
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    <div class="post singlepost" id="post-<?php the_ID(); ?>">
    <div class="title">
    <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
    <p>
    <span class="date"><?php the_time('F j, Y'); ?></span>
    </p>
    </div>
    <div class="entry">
    <?php the_gallery(); ?>
    <?php wp_link_pages(array('before' => '<p><strong>Pages:</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?>
    </div>
    </div>
    <?php endwhile; else: ?>
    <div class="post">
    <div class="title">
    <h2>No Page Found</h2>
    </div>
    <div class="entry">
    <p>Sorry, but you are looking for a page that isn't here.</p>
    </div>
    </div>
    <?php endif; ?>
    </div>
    </div>

    <?php get_sidebar(); ?>
    <?php get_footer(); ?>
    • CommentAuthormacciti
    • CommentTimeDec 18th 2008
     
    this is the error i get:

    Warning: require_once(..//gallery/gallery.php) [function.require-once]: failed to open stream: No such file or directory in /home1/wordgene/public_html/MacCiti/wp-content/themes/matatag/plogger.php on line 6

    Fatal error: require_once() [function.require]: Failed opening required '..//gallery/gallery.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home1/wordgene/public_html/MacCiti/wp-content/themes/matatag/plogger.php on line
    •  
      CommentAuthorsidtheduck
    • CommentTimeDec 18th 2008 edited
     
    If your Plogger installation is located in the subfolder "gallery" within the same theme folder as your Plogger template file, you can use this:
    <?php require_once(dirname(__FILE__)."/gallery/gallery.php"); ?>

    Basically your error is that it cannot find the Plogger installation along the path you provided because the include_path variable in your php.ini is not set up for relative paths, so you need to provide the full path.
    • CommentAuthormacciti
    • CommentTimeDec 18th 2008
     
    thank you for the reply... my plogger folder located inside of the wordpress installation... and is inside gallery folder... for some reason i cannot get my head around this, i dont understand how it will work, do i create a php page to put inside my current theme, or do i change the index.php from plogger to get the content from my theme to look like my theme?

    Also, that path didnt work eather :(