Pixelpost

Authentic Photoblog Flavour


Go Back   Pixelpost Forum > SUPPORT / INFORMATION > Pixelpost Help

Post Reply
 
Thread Tools
  #1  
Old 11-26-2004, 09:50 AM
mezhopking Offline
forum loafer
 
Join Date: Nov 2004
Posts: 1
Create own template

I'm probably being pig-headed but I'm having trouble creating my own teplate.

The thing is I've already got a site running with a template I'm happy with (http://www.mezhopking.com). What I want to do is put the relevant code into this template.

I've tried this, by simply copying and pasting the code from the original pixelpost template into a div on my template. I've created the relevant file, uploaded it and selected it from the options in pixelpost admin. But when I come to view www.mezhopking.com/photoblog/index.php - all i get is a blank screen.

Below is the code i'm using for my index.php maybe someone could shed some light on my problem. All the other php stuff is wordpress stuff and my includes. Is there a comprehensive guide out there which I can follow?

The CODE:

<?php
/* Don't remove this line. */
require('../../../wp-blog-header.php');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Mez Hopking - Photography :: Travel :: Praha</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link href="../../../styles/screen.css" rel="stylesheet" type="text/css" media="screen" />
<link href="../../../styles/print.css" rel="stylesheet" type="text/css" media="print" />
<link href="../../../styles/handheld.css" rel="stylesheet" type="text/css" media="handheld" />
<link rel="Shortcut Icon" type="image/ico" href="../../../images/favicon.gif" /></head>
<body id="photo">

<link rel="pingback" href="<?php bloginfo('../../pingback_url'); ?>">
<?php wp_get_archives('type=daily&format=link'); ?>
<?php //comments_popup_script(); // off by default ?>
<?php wp_head(); ?>

<script language='javascript' type='text/javascript'>
<!-- BEGIN
function flip(rid)
{
current=(document.getElementById(rid).style.displa y == 'none') ? 'block' : 'none';
document.getElementById(rid).style.display = current;
}
// End -->
</script>
</head>
<body>
<?php include('http://www.mezhopking.com/nav.php');?>
<div id="page-b">
<div id="page-cols">
<div id="col-d-4th">
<div class="column-content">
<img src="../../../images/headers-travel.gif" />
<h1>Pixelpost</h1>
<div id="photos">
<div id="wrapper">
<div id="calendar">
<SITE_CALENDAR>
</div>
<div id="logo">
<SITE_TITLE>
</div>
<a href="index.php?showimage=<IMAGE_PREVIOUS_ID>"> <img id="image" src="images/<IMAGE_NAME>" alt="<IMAGE_TITLE>" title="<IMAGE_PREVIOUS_TITLE>" /></a>

<div id="image_info">
<span class='headline'><IMAGE_TITLE></span>
<IMAGE_NOTES>

<IMAGE_DATETIME> - <IMAGE_COMMENTS_NUMBER> comments. Category: <IMAGE_CATEGORY><p />

<IMAGE_THUMBNAIL_ROW>

</div>

<div id="image_navigation">
<IMAGE_PREVIOUS_LINK>
<a href="index.php">Current</a>
<IMAGE_NEXT_LINK>
   
<SITE_PHOTONUMBER> photos | <SITE_VISITORNUMBER> visitors
   
<a href="<SITE_REFLINK>">Referers</a>
   
<a href="?showimage=<IMAGE_ID>">Permalink</a>
   
<a href="<SITE_BROWSELINK>">Browse Archive</a>
</div>
<div id="comments">
<a href='#' onclick="flip('add_comment'); return false;">Add Comment</a><p />
<IMAGE_COMMENTS>
</div>
<div id="add_comment">
<script language='javascript' type='text/javascript'>flip('add_comment');</script>
<form method='post' action='index.php?x=save_comment' name='commentform' >
Message:<br />
<textarea name='message' rows='2' cols='4'></textarea><p />
Name:<br />
<input type='text' name='name' class='input' value='<VINFO_NAME>' /><p />
Website URL, if any: <br />
<input type='text' name='url' class='input' value='<VINFO_URL>' /><p />

<input type='checkbox' value='set' name='vcookie' /> Save User Info<p />

<input type='submit' value='Add' />
<input type='hidden' name='parent_id' value='<IMAGE_ID>' />
</form>

</div>
</div>
</div>
</div>
</div>
<div id="col-e">
<div class="column-content">
<?php include('http://www.mezhopking.com/cat-photo.php');?>
</div>
</div>
<div id="footer">
<?php include('http://www.mezhopking.com/footer.php');?>
</div>
</div>
</div>
</body>
</html>
Reply With Quote
  #2  
Old 11-26-2004, 11:42 AM
Connie
Guest
 
Posts: n/a
I am really astonished, what are you doing?

the system works like that:

in the template-folder you have directories with the respective templates
these templates are shown in the "template-select-box" in the "GENERAL OPTIONS"

when you choose one of these templates (you must), the formatting part of this template is merged by the index.php and the output is generated when the browser calls this index.php to deliver output

you should never touch the index.php unless you know PHP

I assume somehow you took the browser-output of the index.php and formatted that and uploaded it back to your server?????

by this you are cutting off all the logic, the program at all!

no wonder, it doesn't work


please read
http://www.pixelpunk.se/software/for...wtopic.php?t=3 and follow this instructions, otherwise you will get more and more lost

:twisted:
Reply With Quote
  #3  
Old 11-26-2004, 11:48 AM
pixelpunk's Avatar
pixelpunk Offline
pixelpost guru
 
Join Date: Oct 2004
Location: Sweden
Posts: 504
Send a message via ICQ to pixelpunk
Make sure your template has the corrent name, ie image_template.html for the main page.

Pixelpost do not evaluate and run php inside a template, this might be the problem since you have much of that stuff inside.

I believe this can be fixed by just changing the
echo $tpl;
to eval($tpl);

But don't take my word for it, but try that. You find the line close to the bottom of the index.php file.

Let me know how it goes.

// punk
__________________
icq: 66760929
Reply With Quote
Post Reply


Thread Tools




All times are GMT. The time now is 04:39 PM.

Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd. | Style Design: d3 designs