Hello!
I was corrected by Vano not to post once more in troubleshooting forum.
So i hope finally could someone help me what to do in my case.
Posting LATEST NEWS works
BUT
My prob is:
the NEWS ARCHIVE Link does not work for me as you can see on
www.industrie-gravuren.de/galerie I followed the suggest in the instruction to copy the home.html and to rename it as archive.html
But I cannot see the archive. Whats my mistake?
Here is the code of my Data files:
HOME-HTML:{header}
<tr>
<td>
<?php
$tu = "{template_url}";
$us = "{url_search}";
$ls = "{lang_search}";
$las = "{lang_advanced_search}";
require "{template_url}/incl/searchbox.php";
?>
</td>
</tr>
<tr>
<td class="bordercolor">
<table width="100%" border="0" cellspacing="1" cellpadding="0">
<tr>
<td class="tablebgcolor">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="150" class="row2" valign="top">
<?php
$ub = '{user_box}';
$lru = "{lang_registered_user}";
require "{template_url}/incl/user_incl.php";
?>
{if random_image}
<table width="150" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="head2" height="20" background="{template_url}/images/top_bg.gif"> <img src="{template_url}/images/spacer.gif" alt="" width="4" height="4" />{lang_random_image}</td>
</tr>
<tr>
<td class="tablebgcolor"><img src="{template_url}/images/spacer.gif" alt="" width="1" height="1" /></td>
</tr>
<tr>
<td align="center" class="row1">
<br />
{random_image}
<br />
<br />
</td>
</tr>
<tr>
<td class="tablebgcolor"><img src="{template_url}/images/spacer.gif" alt="" width="1" height="1" /></td>
</tr>
</table>
{endif random_image}
<img src="{template_url}/images/spacer.gif" alt="" width="150" height="1" />
<?php
require "{template_url}/incl/menu.php";
?>
</td>
<td width="1" class="bordercolor" valign="top"><img src="{template_url}/images/spacer.gif" width="1" height="1" alt="" /></td>
<td width="18" valign="top"><img src="{template_url}/images/spacer.gif" width="18" height="18" alt="" /></td>
<td width="100%" valign="top">
<?php
$uti = "{url_top_images}";
$lti = "{lang_top_images}";
$uni = "{url_new_images}";
$lni = "{lang_new_images}";
require "{template_url}/incl/click_incl.php";
?>
<br />
<span class="title">{site_name}</span>
<hr size="1" />
{if categories}
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="head1">
<table width="100%" border="0" cellspacing="0" cellpadding="3">
<tr>
<td class="head1" valign="top" background="{template_url}/images/top_bg.gif">{lang_categories}</td>
</tr>
<tr>
<td class="row2" valign="top">{categories}</td>
</tr>
</table>
</td>
</tr>
</table>
<br />
{endif categories}
{lang_site_stats}<br />
{if msg}<b>{msg}</b><br /><br />{endif msg}
<br />
<?php
$ni='{new_images}';
require "{template_url}/incl/new_incl.php";
?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>{category_dropdown_form}</td>
<td align="right">{setperpage_dropdown_form}</td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="left" class="head1" valign="top" background="{template_url}/images/top_bg.gif" height="20" width="100%"> <img src="{template_url}/images/spacer.gif" alt="" width="4" height="4" /><a href="./index.php">Latest News</a></td>
</tr>
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
{news_comments}
</table>
</td>
<tr>
<tr>
<td align="right" class="head1" height="20" width="100%"> <img src="{template_url}/images/spacer.gif" alt="" width="4" height="4" /><a href="./index.php?newstype=latestnewsall">News Archive</a> </td>
</tr>
</table>
<br />
{whos_online}
<br />
<?php
require "{template_url}/incl/t_close.php";
?>
</td>
</tr>
<tr>
<td>
<?php
require "{template_url}/incl/bott_incl.php";
?>
</td>
</tr>
</table>
{footer}
news_comment_Bit.html :<tr>
<td class="head1" ><div align="right"><small>{news_comment_date}</small></div><b>{news_comment_headline}</b></td>
</tr>
<tr>
<td class="imagerow2" align="left">{news_comment_text}</td>
</tr>
index.php :<?php
$templates_used = 'home,category_bit,whos_online,thumbnail_bit';
$main_template = 'home';
define('GET_CACHES', 1);
define('ROOT_PATH', './');
define('GET_USER_ONLINE', 1);
include(ROOT_PATH.'global.php');
require(ROOT_PATH.'includes/sessions.php');
$user_access = get_permission();
if (isset($HTTP_GET_VARS['template']) || isset($HTTP_POST_VARS['template'])) {
$template = (isset($HTTP_GET_VARS['template'])) ? stripslashes(trim($HTTP_GET_VARS['template'])) : stripslashes(trim($HTTP_POST_VARS['template']));
if (!file_exists(TEMPLATE_PATH."/".$template.".".$site_template->template_extension)) {
$template = "";
}
else {
$main_template = $template;
}
}
else {
$template = "";
}
include(ROOT_PATH.'includes/page_header.php');
if (!empty($template)) {
$clickstream = "<a href=\"".$site_sess->url(ROOT_PATH."index.php")."\">".$lang['home']."</a>".$config['category_separator'].str_replace("_", " ", ucfirst($template));
$site_template->register_vars("clickstream", $clickstream);
if ($news_type == "latestnewsall") {
$site_template->print_template($site_template->parse_template(archive));
}
else {
$site_template->print_template($site_template->parse_template($main_template));
}
include(ROOT_PATH.'includes/page_footer.php');
}
$cache_id = create_cache_id(
'cat.page.index',
array(
$user_info[$user_table_fields['user_id']],
isset($user_info['lightbox_image_ids']) ? substr(md5($user_info['lightbox_image_ids']), 0,
: 0,
$config['template_dir'],
$config['language_dir']
)
);
if (!$cache_page_index || !$content = get_cache_file($cache_id)) {
// Always append session id if cache is enabled
if ($cache_page_index) {
$old_session_mode = $site_sess->mode;
$site_sess->mode = 'get';
}
ob_start();
//-----------------------------------------------------
//--- Show Categories ---------------------------------
//-----------------------------------------------------
$categories = get_categories(0);
if (!$categories) {
$categories = $lang['no_categories'];
}
$site_template->register_vars("categories", $categories);
unset($categories);
//-----------------------------------------------------
//--- Show New Images ---------------------------------
//-----------------------------------------------------
$imgtable_width = ceil(intval($config['image_table_width']) / $config['image_cells']);
if ((substr($config['image_table_width'], -1)) == "%") {
$imgtable_width .= "%";
}
$additional_sql = "";
if (!empty($additional_image_fields)) {
foreach ($additional_image_fields as $key => $val) {
$additional_sql .= ", i.".$key;
}
}
$num_new_images = $config['image_cells'];
$sql = "SELECT i.image_id, i.cat_id, i.user_id, i.image_name, i.image_description, i.image_keywords, i.image_date, i.image_active, i.image_media_file, i.image_thumb_file, i.image_download_url, i.image_allow_comments, i.image_comments, i.image_downloads, i.image_votes, i.image_rating, i.image_hits".$additional_sql.", c.cat_name".get_user_table_field(", u.", "user_name")."
FROM ".IMAGES_TABLE." i, ".CATEGORIES_TABLE." c
LEFT JOIN ".USERS_TABLE." u ON (".get_user_table_field("u.", "user_id")." = i.user_id)
WHERE i.image_active = 1 AND c.cat_id = i.cat_id AND i.cat_id NOT IN (".get_auth_cat_sql("auth_viewcat", "NOTIN").")
ORDER BY i.image_date DESC
LIMIT $num_new_images";
$result = $site_db->query($sql);
$num_rows = $site_db->get_numrows($result);
if (!$num_rows) {
$new_images = "<table width=\"".$config['image_table_width']."\" border=\"0\" cellpadding=\"".$config['image_table_cellpadding']."\" cellspacing=\"".$config['image_table_cellspacing']."\"><tr class=\"imagerow1\"><td>";
$new_images .= $lang['no_new_images'];
$new_images .= "</td></tr></table>";
}
else {
$new_images = "<table width=\"".$config['image_table_width']."\" border=\"0\" cellpadding=\"".$config['image_table_cellpadding']."\" cellspacing=\"".$config['image_table_cellspacing']."\">";
$count = 0;
$bgcounter = 0;
while ($image_row = $site_db->fetch_array($result)){
if ($count == 0) {
$row_bg_number = ($bgcounter++ % 2 == 0) ? 1 : 2;
$new_images .= "<tr class=\"imagerow".$row_bg_number."\">\n";
}
$new_images .= "<td width=\"".$imgtable_width."\" valign=\"top\">\n";
show_image($image_row);
$new_images .= $site_template->parse_template("thumbnail_bit");
$new_images .= "\n</td>\n";
$count++;
if ($count == $config['image_cells']) {
$new_images .= "</tr>\n";
$count = 0;
}
} // end while
if ($count > 0) {
$leftover = ($config['image_cells'] - $count);
if ($leftover >= 1) {
for ($f = 0; $f < $leftover; $f++) {
$new_images .= "<td width=\"".$imgtable_width."\">\n \n</td>\n";
}
$new_images .= "</tr>\n";
}
}
$new_images .= "</table>\n";
} // end else
$site_template->register_vars("new_images", $new_images);
unset($new_images);
//--------------------------------------------------------
// Latest and Archive News Mod --
// --
// User configurable variables --
// You must change the first 4 variables to meet --
// your requirements: (see notes below) --
// $display_by_count --
// $latest_news_day --
// $show_news_articles --
// $news_image --
//--------------------------------------------------------
$display_by_count = "1"; // values 0 or 1 ....
// .... change this to 0 if display by days posted
// .... or 1 to display fixed number of news articles as Latest
$latest_news_days = "31"; // Number of days news displays at Latest ....
// .... change This to the number of days news shows as Latest
$show_news_articles = "3"; // Number of news articles to show ....
// .... change This to fixed number of articles to display for latest news
$news_image = "240"; // Change This to your Latest news image id
//----------------------------------------------------
$new_news = (time() - 60 * 60 * 24 * $latest_news_days);
if ($newstype == "latestnewsall"){
$news_type = "latestnewsall";
}
else {
$news_type = "latestnews";
}
$additional_sql = "";
if ($news_type == "latestnews") {
if ($display_by_count) {
$additional_sql .= " c.image_id = '".$news_image."'";
$additional_sql_2 .= " LIMIT ".$show_news_articles;
}
else {
$additional_sql .= " c.comment_date > '".$new_news."' AND c.image_id = '".$news_image."'";
$additional_sql_2 .= "";
}
}
else {
$additional_sql .= " c.image_id = '".$news_image."'";
$clickstream = "<a href=\"".$site_sess->url(ROOT_PATH."index.php")."\">".$lang['home']."</a> / Archived News";
}
$sql = "SELECT c.comment_headline, c.comment_text, c.comment_date, c.image_id
FROM ".COMMENTS_TABLE." c
WHERE ".$additional_sql."
ORDER BY c.comment_date DESC" .$additional_sql_2 ;
$result = $site_db->query($sql);
$num_rows = $site_db->get_numrows($result);
$news_comment_row = array();
while ($row = $site_db->fetch_array($result)) {
$news_comment_row[] = $row;
}
$site_db->free_result($result);
// This is the Paging stuff
if ($newstype == "latestnewsall") {
include(ROOT_PATH.'includes/paging.php');
$perpage = $show_news_articles;
$link_arg = $site_sess->url(ROOT_PATH."index.php?newstype=latestnewsall");
$getpaging = new Paging($page, $perpage, $num_rows, $link_arg);
$offset = $getpaging->get_offset();
$site_template->register_vars(array(
"paging" => $getpaging->get_paging(),
"paging_stats" => $getpaging->get_paging_stats()
));
$sql = "SELECT c.comment_headline, c.comment_text, c.comment_date, c.image_id
FROM ".COMMENTS_TABLE." c
WHERE ".$additional_sql."
ORDER BY c.comment_date DESC" .$additional_sql_2."
LIMIT $offset, $perpage";
$result = $site_db->query($sql);
$num_rows = $site_db->get_numrows($result);
$news_comment_row = array();
while ($row = $site_db->fetch_array($result)) {
$news_comment_row[] = $row;
}
}
if (!$num_rows) {
$news_comments = " <b>No New News to report within the last ".$latest_news_days." days.</b>";
}
else {
$news_comments = "";
$bgcounter = 0;
for ($i = 0; $i < $num_rows; $i++) {
$row_bg_number = ($bgcounter++ % 2 == 0) ? 1 : 2;
$site_template->register_vars(array(
"news_comment_headline" => format_text($news_comment_row[$i]['comment_headline'], 0, $config['wordwrap_comments'], 0, 0),
"news_comment_text" => format_text($news_comment_row[$i]['comment_text'], $config['html_comments'], $config['wordwrap_comments'], $config['bb_comments'], $config['bb_img_comments']),
"news_comment_date" => format_date($config['date_format']." ".$config['time_format'], $news_comment_row[$i]['comment_date']),
"row_bg_number" => $row_bg_number));
$news_comments .= $site_template->parse_template("news_comment_bit");
}
}
$site_template->register_vars("news_comments", $news_comments);
unset($news_comments);
//-----------------------------------------------------
//---End of Show Latest News -------------------------------
//-----------------------------------------------------
//-----------------------------------------------------
//--- Print Out ---------------------------------------
//-----------------------------------------------------
$site_template->register_vars(array(
"msg" => $msg,
"clickstream" => $clickstream
));
if ($news_type == "latestnewsall") {
$site_template->print_template($site_template->parse_template(archive));
}
else {
$site_template->print_template($site_template->parse_template($main_template));
}
$content = ob_get_contents();
ob_end_clean();
if ($cache_page_index) {
// Reset session mode
$site_sess->mode = $old_session_mode;
save_cache_file($cache_id, $content);
}
} // end if get_cache_file()
echo $content;
include(ROOT_PATH.'includes/page_footer.php');
?>
archive.html :{header}
<tr>
<td>
<?php
$tu = "{template_url}";
$us = "{url_search}";
$ls = "{lang_search}";
$las = "{lang_advanced_search}";
require "{template_url}/incl/searchbox.php";
?>
</td>
</tr>
<tr>
<td class="bordercolor">
<table width="100%" border="0" cellspacing="1" cellpadding="0">
<tr>
<td class="tablebgcolor">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="150" class="row2" valign="top">
<?php
$ub = '{user_box}';
$lru = "{lang_registered_user}";
require "{template_url}/incl/user_incl.php";
?>
{if random_image}
<table width="150" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="head2" height="20" background="{template_url}/images/top_bg.gif"> <img src="{template_url}/images/spacer.gif" alt="" width="4" height="4" />{lang_random_image}</td>
</tr>
<tr>
<td class="tablebgcolor"><img src="{template_url}/images/spacer.gif" alt="" width="1" height="1" /></td>
</tr>
<tr>
<td align="center" class="row1">
<br />
{random_image}
<br />
<br />
</td>
</tr>
<tr>
<td class="tablebgcolor"><img src="{template_url}/images/spacer.gif" alt="" width="1" height="1" /></td>
</tr>
</table>
{endif random_image}
<img src="{template_url}/images/spacer.gif" alt="" width="150" height="1" />
<?php
require "{template_url}/incl/menu.php";
?>
</td>
<td width="1" class="bordercolor" valign="top"><img src="{template_url}/images/spacer.gif" width="1" height="1" alt="" /></td>
<td width="18" valign="top"><img src="{template_url}/images/spacer.gif" width="18" height="18" alt="" /></td>
<td width="100%" valign="top">
<?php
$uti = "{url_top_images}";
$lti = "{lang_top_images}";
$uni = "{url_new_images}";
$lni = "{lang_new_images}";
require "{template_url}/incl/click_incl.php";
?>
<br />
<span class="title">{site_name}</span>
<hr size="1" />
{if categories}
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="head1">
<table width="100%" border="0" cellspacing="0" cellpadding="3">
<tr>
<td class="head1" valign="top" background="{template_url}/images/top_bg.gif">{lang_categories}</td>
</tr>
<tr>
<td class="row2" valign="top">{categories}</td>
</tr>
</table>
</td>
</tr>
</table>
<br />
{endif categories}
{lang_site_stats}<br />
{if msg}<b>{msg}</b><br /><br />{endif msg}
<br />
<?php
$ni='{new_images}';
require "{template_url}/incl/new_incl.php";
?>
<br />
{whos_online}
<br />
<table width="100%" border="1" cellspacing="1" cellpadding="1">
<tr>
<td align="left" class="head1" height="20">Archived News</td>
<td align="right" class="head1" height="20">{paging}></td>
</tr>
<tr>
<td colspan="2">
<table width="100%" border="1" cellspacing="1" cellpadding="4">
{news_comments}
</table>
</td>
</tr>
<tr>
<td align="left" class="head1" height="20"> <a href="./index.php">Latest News</a></td>
<td align="right" class="head1" height="20">{paging} </td>
</tr>
</table>
<?php
require "{template_url}/incl/t_close.php";
?>
</td>
</tr>
<tr>
<td>
<?php
require "{template_url}/incl/bott_incl.php";
?>
</td>
</tr>
</table>
{footer}
So i hope someone has a solution for me.
Many thanks for helping me