hello,
I have this snippet code:
<?php
//var's
$filename = "assets/files/news.txt";
$split_rule = ":;";
$split_part = "::";
$mode = (isset($n_int_mode));
if ($mode == null){
$mode = `0`;
}
//read
$file = file_get_contents($filename);
//split the articles
$rule = explode($split_rule, $file);
//debug
echo $mode;
//debug
echo "<dl class=\"\">";
//check mode
if ($mode == 0){
//loop for each article
for ($i=0 ;$i < (count($rule)-1);$i++){
//split the parts from te articles
$part = explode($split_part, $rule[$i]);
echo "<dt class=\"dt\"><span id=\"\" class=\"title\">";
echo $part[0];
echo "</span></dt>";
echo "<dd class=\"dd\"><span class=\"date\">";
echo $part[1];
echo "</span><span class=\"separator\">-</span><span class=\"autor\">";
echo $part[2];
echo "</span><span class=\"separator\">-</span><span class=\"content_1\">";
echo substr($part[3], 0, 150);
echo "</span><span class=\"content_2\">";
echo substr($part[3], 150, strlen($part[3]));
echo "</span></dd>";
}
echo "</dl>";
}else{
for ($i=0 ;$i < $mode;$i++){
//split the parts from te articles
$part = explode($split_part, $rule[$i]);
echo "<dt class=\"dt\"><span id=\"\" class=\"title\">";
echo $part[0];
echo "</span></dt>";
echo "<dd class=\"dd\"><!--<span class=\"date\">";
echo $part[1];
echo "</span><span class=\"separator\">-</span><span class=\"autor\">";
echo $part[2];
echo "</span><span class=\"separator\">-</span>--><span class=\"content_1\">";
echo substr($part[3], 0, 150);
echo "</span><!--<span class=\"content_2\">";
echo substr($part[3], 150, strlen($part[3]));
echo "</span>--></dd>";
}
echo "</dl>";
}
?>
when I call it like this -->
[[nieuws? &n_int_mode=0]] and like this -->
[[nieuws? &n_int_mode=1]] on 1 page both the times it are parsed like -->
[[nieuws? &n_int_mode=1]]
What can I do to make this work?
Ivar