• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Windows Help fix tiny errors on znote website

Felipe93

Ghost Member
Joined
Mar 21, 2015
Messages
2,035
Solutions
9
Reaction score
361
Location
Chile
Here is the website if you want to check: 200.83.250.159
first error
Notice: Undefined index: date in C:\xampp\htdocs\layout\sub\index.php on line 39


script :
<div class="BorderTitleText" style="background-image:url(layout/images/global/content/newsheadline_background.gif)">
<img src="layout/images/global/content/newsicon_community_big.gif" class="news">
<div class="date">
>>>>line 39>> <?php echo date($config['date'], $n['date']) .' -' ?>
</div>
<div class="name">
<?php echo TransformToBBCode($n['title']); ?>
</div>
</div>
<p><?php echo TransformToBBCode(nl2br($n['text'])); ?></p>
<?php
}
echo '</div>';

thanks and regards
 
Post the whole php script/file.
Do you use ZnoteAAC 1.4 or 1.5?
What template do you use?

The line 39 should look something like this if you use ZnoteAAC 1.5:
Code:
getClock($n['date'], true)
 
<?php
$cache = new Cache('engine/cache/news');
if ($cache->hasExpired()) {
$news = fetchAllNews();

$cache->setContent($news);
$cache->save();
} else {
$news = $cache->load();
}

// Design and present the list
if ($news) {
function TransformToBBCode($string) {
$tags = array(
'
{$1}​
' => '<center>$1</center>',
'{$1}' => '<b>$1</b>',
'[size={$1}]{$2}[/size]' => '<font size="$1">$2</font>',
'
' => '<a href="$1" target="_BLANK"><img src="$1" alt="image" style="width: 100%"></a>',
'[link]{$1}[/link]' => '<a href="$1">$1</a>',
'[link={$1}]{$2}[/link]' => '<a href="$1" target="_BLANK">$2</a>',
'[color={$1}]{$2}[/color]' => '<font color="$1">$2</font>',
'[*]{$1}[/*]' => '<li>$1</li>',
);

foreach ($tags as $tag => $value) {
$code = preg_replace('/placeholder([0-9]+)/', '(.*?)', preg_quote(preg_replace('/\{\$([0-9]+)\}/', 'placeholder$1', $tag), '/'));
$string = preg_replace('/'.$code.'/i', $value, $string);
}

return $string;
}
echo '<div id="newz">';
foreach ($news as $n) {
?>
<div class="BorderTitleText" style="background-image:url(layout/images/global/content/newsheadline_background.gif)">
<img src="layout/images/global/content/newsicon_community_big.gif" class="news">
<div class="date">
line39>> <?php echo date($config['date'], $n['date']).'true' ?>
</div>
<div class="name">
<?php echo TransformToBBCode($n['title']); ?>
</div>
</div>
<p><?php echo TransformToBBCode(nl2br($n['text'])); ?></p>
<?php

}
echo '</div>';
}
?>













the whole scrpit i change that part and the tiny error persist
i dont remember wich znote im using simce i've downlaod too many
 
Back
Top