algo está mal y no puedo averiguar lo que es...
- Cae
- Expert


- Registrado: Feb 25, 2004
- Mensajes: 734
- Status: Offline
así, mejorar el uso de estas dinámicas noticias php scripts en el sitio para mi gremio en EVE, y que no están funcionando derecho...
el sitio se encuentra en http://www.lunarossacorp.com/index.php necesita usar el index.php parte porque ahora mismo lo tengo dirigido a algún otro sitio...
de todos modos, la página tiene una etiqueta en php, <? include ( "znews / view.php")> y como se puede ver si usted fue a la página, que arroja un error...
Sin embargo, si ir a la vista. PHP propia página en: http://www.lunarossacorp.com/znews/view.php no hay error...no hay otra cosa en php la página de índice ahora...
alguna idea?
el sitio se encuentra en http://www.lunarossacorp.com/index.php necesita usar el index.php parte porque ahora mismo lo tengo dirigido a algún otro sitio...
de todos modos, la página tiene una etiqueta en php, <? include ( "znews / view.php")> y como se puede ver si usted fue a la página, que arroja un error...
Sin embargo, si ir a la vista. PHP propia página en: http://www.lunarossacorp.com/znews/view.php no hay error...no hay otra cosa en php la página de índice ahora...
alguna idea?
- Anonymous
- Bot


- Registrado: 25 Feb 2008
- Mensajes: ?
- Loc: Ozzuland
- Status: Online
Abril 11th, 2004, 8:23 pm
- GrimShadow
- Newbie


- Registrado: Abr 12, 2004
- Mensajes: 6
- Loc: Chandler, Oklahoma
- Status: Offline
- Scorpius
- Proficient


- Registrado: Mar 20, 2004
- Mensajes: 401
- Loc: Scorpion Hole
- Status: Offline
Ok, ¿qué Im apuestas que es, es que view.php tiene que exigir a un fichero de configuración, algo así como mysql.inc.php o algo así. Y no es configurado para utilizar ese directorio, sólo mysql.inc.php, puede cambiar manualmente o que conseguir un script diferente. Uno que he utilizado y es un muy buen guión es la utopía Noticias Pro. http://www.utopiasoftware.net/newspro/index.php
Pero si se quiere que las noticias script, basta con enviar el archivo view.php Malos y ver lo que puedo hacer.
Pero si se quiere que las noticias script, basta con enviar el archivo view.php Malos y ver lo que puedo hacer.
- VentsyV
- Student


- Registrado: Abr 09, 2004
- Mensajes: 65
- Status: Offline
- Cae
- Expert


- Registrado: Feb 25, 2004
- Mensajes: 734
- Status: Offline
perdón, olvidé i publicados esta aquí...
y no, todavía no he llegado a trabajar todavía...
Sí
sí lo hace, y se ha configurado...
no i no, pero que no es mi código, y he utilizado el mismo código en otro sitio, y funciona bien...usted puede conseguirlo <a href = "http://www.zubaz.net/znews/download. php "> AQUI </ a> si youd como para verlo...
i podría cambiar a este...este znews crap corre fuera de mí...dejar que los malos todos ustedes saben...
Quote:
, ¿tienes "znews / view.php" como una ruta válida de la carpeta de inicio?
Sí
Quote:
view.php tiene que exigir a un fichero de configuración
sí lo hace, y se ha configurado...
Quote:
mente lanzando el código que utilizan en su opinión. php página de modo que puedo ver si me puede ayudar?
no i no, pero que no es mi código, y he utilizado el mismo código en otro sitio, y funciona bien...usted puede conseguirlo <a href = "http://www.zubaz.net/znews/download. php "> AQUI </ a> si youd como para verlo...
Quote:
He utilizado y es un muy buen guión es la utopía Noticias Pro
i podría cambiar a este...este znews crap corre fuera de mí...dejar que los malos todos ustedes saben...
- Cae
- Expert


- Registrado: Feb 25, 2004
- Mensajes: 734
- Status: Offline
- rjstephens
- Professor


- Registrado: Jul 28, 2003
- Mensajes: 774
- Loc: Brisbane, Australia
- Status: Offline
- Cae
- Expert


- Registrado: Feb 25, 2004
- Mensajes: 734
- Status: Offline
- Scorpius
- Proficient


- Registrado: Mar 20, 2004
- Mensajes: 401
- Loc: Scorpion Hole
- Status: Offline
Ok, así que pienso que puede conocer el problema. Miré el archivo de noticias de news.php utopía, y la línea 10 es cuando se trata de exigir functions.inc.php, pero no lo encuentro. Trate de cambiar
para
Hope thatll trabajo para usted.
Código: [ Select ]
require('functions.inc.php');
para
Código: [ Select ]
require('news/functions.inc.php');
Hope thatll trabajo para usted.
- Cae
- Expert


- Registrado: Feb 25, 2004
- Mensajes: 734
- Status: Offline
- Scorpius
- Proficient


- Registrado: Mar 20, 2004
- Mensajes: 401
- Loc: Scorpion Hole
- Status: Offline
- Cae
- Expert


- Registrado: Feb 25, 2004
- Mensajes: 734
- Status: Offline
Lo siento, estaba escribiendo rápido...su view.php
el incluir el código es
<? include (znews / view.php);?>
Aquí está el código de view.php:
allí el ya va....
el incluir el código es
<? include (znews / view.php);?>
Aquí está el código de view.php:
Código: [ Select ]
<?php
@include_once("db_include.php");
?>
<? //DISPLAY NEWS
$glob = $tableprefix."_globalvars";
$gquery = mysql_query("SELECT * FROM `$glob` ");
while ($var = mysql_fetch_array($gquery)) {
$variable = $var[variable];
$value = $var[value];
$gvars[$variable] = $value;
}
$gvars[supervars][htmlnews] = true;
$months= array( '1' => 'January',
'2' => 'February',
'3' => 'March',
'4' => 'April',
'5' => 'May',
'6' => 'June',
'7' => 'July',
'8' => 'August',
'9' => 'September',
'10' => 'October',
'11' => 'November',
'12' => 'December');
$monthnumdays = array( '1' => '31',
'2' => '28',
'3' => '31',
'4' => '30',
'5' => '31',
'6' => '30',
'7' => '31',
'8' => '31',
'9' => '30',
'10' => '31',
'11' => '30',
'12' => '31');
if ($gvars[newsaging] == "3") {
$backlim = $gvars[maxnewsnum];
$lim = "LIMIT 0,$backlim ";
$where = "WHERE 1";
}
if ($gvars[newsaging] == "2") {
$maxage = explode(":", $gvars[maxnewsage]);
$timestamp = time();
$timestamp -= (($maxage[0] * 86400) + (($maxage[1] + $gvars[timeshift]) * 3600));
$dquery = mysql_query("SELECT FROM_UNIXTIME($timestamp)");
$servert = mysql_result($dquery, 0);
$threshdate = $servert;
$where = "WHERE `date`>'$threshdate'";
}
if ($gvars[newsaging] == "1") {
$where = "WHERE `current`='yes'";
}
if (!empty($date)) {
$where .= " AND date BETWEEN '$date 00:00:00' AND '$date 23:59:59'";
}
if (!empty($cat)) {
$where .= " AND category='$cat'";
$notDefaultTemp = true;
}
if (!empty($id)) {
$where = "WHERE `id`='$id'";
}
if ($mode == "showall") {
$where = "WHERE 1";
$lim = '';
}
//SIG
echo "<!-- News Generated by ZNews 3.0 (http://zubaz.net/znews) -->\n";
//IS THERE NEWS?
$newscount = mysql_query("SELECT COUNT(*) FROM `$gvars[tablename]_posts` $where ");
$ncount = mysql_result($newscount,0,0);
if($ncount != 0) {
//NEWS
$nquery = mysql_query("SELECT * FROM `$gvars[tablename]_posts` $where ORDER BY `date` DESC $lim");
while ($post = mysql_fetch_array($nquery)) {
// HANDLE DATE
$data=explode(" ", "$post[date]");
$actualdatearray=explode("-", "$data[0]");
$actualtimearray=explode(":", "$data[1]");
$hour=$actualtimearray[0] + $gvars[timeshift]; //the minus 0 is the time offset, change that according to your difference from your server
$tod="am";
$month=$actualdatearray[1];
$month++;
$month--;
$actualdatearray[2]++;
$actualdatearray[2]--;
if ($hour==12) {
$tod="pm";
}
if ($hour<=0) {
$hour = $hour + 12;
$tod="pm";
if ($hour==12) {
$tod="am";
}
$actualdatearray[2] = $actualdatearray[2] - 1;
if ($actualdatearray[2] == 0) { // this should fix the month and year from the time difference
$month = $month - 1;
if ($actualdatearray[0] % 4 == 0) { $monthnumdays[2] = '29'; } // leap year check
$actualdatearray[2] = $monthnumdays[$month];
if ($month == 0) {
$actualdatearray[0] = $actualdatearray[0] - 1;
$month = 12;
}
}
} elseif ($hour>12) {
$hour = $hour - 12;
$tod="pm";
}
// GET CATEGORY
if ($gvars[categories]=="1") {
$catquery = mysql_query("SELECT * FROM `$gvars[tablename]_categories` WHERE `name`='$post[category]' ");
$cat = mysql_fetch_array($catquery);
}
// GET TEMPLATE
if(!empty($cat[template])) {
$tempname = $cat[template];
} else {
$tempname = "default";
}
$tempquery = mysql_query("SELECT * FROM `$gvars[tablename]_templates` WHERE `name`='$tempname' ");
$templateArray = mysql_fetch_array($tempquery);
$template = $templateArray[template];
// GET AUTHOR DATA
$aquery=mysql_query("SELECT * FROM `$gvars[tablename]_users` WHERE `username`='$post[author]' ");
$autharray=mysql_fetch_array($aquery);
// REPLACE COMPONENTS
$template=str_replace("[MONTH]", $months[$month], $template);
$template=str_replace("[M#]", $month, $template);
$template=str_replace("[DAY]", $actualdatearray[2], $template);
$template=str_replace("[YEAR]", $actualdatearray[0], $template);
$template=str_replace("[TIME]", "$hour:$actualtimearray[1]", $template);
$template=str_replace("[TOD]", $tod, $template);
$template=str_replace("[TITLE]", $post[title], $template);
$template=str_replace("[AUTHOR]", $autharray[username], $template);
if ($gvars[abstracting]=="1") {
$template=str_replace("[ABSTRACT]", $post[abstract], $template);
}
$news = $post[post];
//REPLACERS
if ($gvars[replacers] == "1") {
$replacerquery=mysql_query("SELECT * FROM `$gvars[tablename]_replacers` ");
while($r=mysql_fetch_array($replacerquery)) { //this is the replacer function
$news=str_replace($r[before], $r[after], $news);
}
}
//ZFormatting
if (!$gvars[supervars][htmlnews]) {
$news = str_replace ("<", "<", $news);
$news = str_replace (">", ">", $news);
}
$news = preg_replace ("/\[B\](.*)\[\/B\]/siU", "<B>\1</B>", $news);
$news = preg_replace ("/\[U\](.*)\[\/U\]/siU", "<U>\1</U>", $news);
$news = preg_replace ("/\[I\](.*)\[\/I\]/siU", "<I>\1</I>", $news);
$news = preg_replace ("/\[IMG\](http:\/\/[a-z0-9\/\._\-\?\&= ]+)\[\/IMG\]/siU", "<IMG SRC=\"\1\" ALT=\"\">", $news);
$news = preg_replace ("/\[URL\](http:\/\/[a-z0-9\/\._\-\?\&= ]+)\[\/URL\]/siU", "<A HREF=\"\1\" TARGET=\"_BLANK\">\1</A>", $news);
$news = preg_replace ("/\[URL=(http:\/\/[a-z0-9\/\._\-\?\&= ]+)\](.*)\[\/URL\]/siU", "<A HREF=\"\1\" TARGET=\"_BLANK\">\2</A>", $news);
$news = preg_replace ("/\[COLOR=(.*)\](.*)\[\/COLOR\]/siU", "<FONT COLOR=\"\1\">\2</FONT>", $news);
$template = str_replace("[POST]", nl2br($news), $template);
$template=str_replace("[AUTHEMAIL]", $autharray[email], $template);
$template=str_replace("[IDPICTUREURL]", $autharray[idpic], $template);
$template=str_replace("[SIGPICTUREURL]", $autharray[sigpic], $template);
$template=str_replace("[CATSHORT]", $cat[name], $template);
$template=str_replace("[CATEGORY]", $cat[fullname], $template);
if ($gvars[commenting]!="off") { $template=str_replace("[COMMENTSURL]", "comments.php?commentto=$post[id]", $template); }
//Count the comments
$comcount = mysql_query("SELECT COUNT(*) FROM `$gvars[tablename]_comments` WHERE `commentto`='$post[id]' ");
$comcount_result = mysql_result($comcount,0,0);
$template=str_replace("[COMMENTNUM]", $comcount_result, $template);
//NEWS OUTPUT
echo $template;
//SIG
echo "<!-- News Generated by ZNews 3.0 (http://zubaz.net/znews) -->\n";
}
} else {
echo "No news found.";
}
?>
@include_once("db_include.php");
?>
<? //DISPLAY NEWS
$glob = $tableprefix."_globalvars";
$gquery = mysql_query("SELECT * FROM `$glob` ");
while ($var = mysql_fetch_array($gquery)) {
$variable = $var[variable];
$value = $var[value];
$gvars[$variable] = $value;
}
$gvars[supervars][htmlnews] = true;
$months= array( '1' => 'January',
'2' => 'February',
'3' => 'March',
'4' => 'April',
'5' => 'May',
'6' => 'June',
'7' => 'July',
'8' => 'August',
'9' => 'September',
'10' => 'October',
'11' => 'November',
'12' => 'December');
$monthnumdays = array( '1' => '31',
'2' => '28',
'3' => '31',
'4' => '30',
'5' => '31',
'6' => '30',
'7' => '31',
'8' => '31',
'9' => '30',
'10' => '31',
'11' => '30',
'12' => '31');
if ($gvars[newsaging] == "3") {
$backlim = $gvars[maxnewsnum];
$lim = "LIMIT 0,$backlim ";
$where = "WHERE 1";
}
if ($gvars[newsaging] == "2") {
$maxage = explode(":", $gvars[maxnewsage]);
$timestamp = time();
$timestamp -= (($maxage[0] * 86400) + (($maxage[1] + $gvars[timeshift]) * 3600));
$dquery = mysql_query("SELECT FROM_UNIXTIME($timestamp)");
$servert = mysql_result($dquery, 0);
$threshdate = $servert;
$where = "WHERE `date`>'$threshdate'";
}
if ($gvars[newsaging] == "1") {
$where = "WHERE `current`='yes'";
}
if (!empty($date)) {
$where .= " AND date BETWEEN '$date 00:00:00' AND '$date 23:59:59'";
}
if (!empty($cat)) {
$where .= " AND category='$cat'";
$notDefaultTemp = true;
}
if (!empty($id)) {
$where = "WHERE `id`='$id'";
}
if ($mode == "showall") {
$where = "WHERE 1";
$lim = '';
}
//SIG
echo "<!-- News Generated by ZNews 3.0 (http://zubaz.net/znews) -->\n";
//IS THERE NEWS?
$newscount = mysql_query("SELECT COUNT(*) FROM `$gvars[tablename]_posts` $where ");
$ncount = mysql_result($newscount,0,0);
if($ncount != 0) {
//NEWS
$nquery = mysql_query("SELECT * FROM `$gvars[tablename]_posts` $where ORDER BY `date` DESC $lim");
while ($post = mysql_fetch_array($nquery)) {
// HANDLE DATE
$data=explode(" ", "$post[date]");
$actualdatearray=explode("-", "$data[0]");
$actualtimearray=explode(":", "$data[1]");
$hour=$actualtimearray[0] + $gvars[timeshift]; //the minus 0 is the time offset, change that according to your difference from your server
$tod="am";
$month=$actualdatearray[1];
$month++;
$month--;
$actualdatearray[2]++;
$actualdatearray[2]--;
if ($hour==12) {
$tod="pm";
}
if ($hour<=0) {
$hour = $hour + 12;
$tod="pm";
if ($hour==12) {
$tod="am";
}
$actualdatearray[2] = $actualdatearray[2] - 1;
if ($actualdatearray[2] == 0) { // this should fix the month and year from the time difference
$month = $month - 1;
if ($actualdatearray[0] % 4 == 0) { $monthnumdays[2] = '29'; } // leap year check
$actualdatearray[2] = $monthnumdays[$month];
if ($month == 0) {
$actualdatearray[0] = $actualdatearray[0] - 1;
$month = 12;
}
}
} elseif ($hour>12) {
$hour = $hour - 12;
$tod="pm";
}
// GET CATEGORY
if ($gvars[categories]=="1") {
$catquery = mysql_query("SELECT * FROM `$gvars[tablename]_categories` WHERE `name`='$post[category]' ");
$cat = mysql_fetch_array($catquery);
}
// GET TEMPLATE
if(!empty($cat[template])) {
$tempname = $cat[template];
} else {
$tempname = "default";
}
$tempquery = mysql_query("SELECT * FROM `$gvars[tablename]_templates` WHERE `name`='$tempname' ");
$templateArray = mysql_fetch_array($tempquery);
$template = $templateArray[template];
// GET AUTHOR DATA
$aquery=mysql_query("SELECT * FROM `$gvars[tablename]_users` WHERE `username`='$post[author]' ");
$autharray=mysql_fetch_array($aquery);
// REPLACE COMPONENTS
$template=str_replace("[MONTH]", $months[$month], $template);
$template=str_replace("[M#]", $month, $template);
$template=str_replace("[DAY]", $actualdatearray[2], $template);
$template=str_replace("[YEAR]", $actualdatearray[0], $template);
$template=str_replace("[TIME]", "$hour:$actualtimearray[1]", $template);
$template=str_replace("[TOD]", $tod, $template);
$template=str_replace("[TITLE]", $post[title], $template);
$template=str_replace("[AUTHOR]", $autharray[username], $template);
if ($gvars[abstracting]=="1") {
$template=str_replace("[ABSTRACT]", $post[abstract], $template);
}
$news = $post[post];
//REPLACERS
if ($gvars[replacers] == "1") {
$replacerquery=mysql_query("SELECT * FROM `$gvars[tablename]_replacers` ");
while($r=mysql_fetch_array($replacerquery)) { //this is the replacer function
$news=str_replace($r[before], $r[after], $news);
}
}
//ZFormatting
if (!$gvars[supervars][htmlnews]) {
$news = str_replace ("<", "<", $news);
$news = str_replace (">", ">", $news);
}
$news = preg_replace ("/\[B\](.*)\[\/B\]/siU", "<B>\1</B>", $news);
$news = preg_replace ("/\[U\](.*)\[\/U\]/siU", "<U>\1</U>", $news);
$news = preg_replace ("/\[I\](.*)\[\/I\]/siU", "<I>\1</I>", $news);
$news = preg_replace ("/\[IMG\](http:\/\/[a-z0-9\/\._\-\?\&= ]+)\[\/IMG\]/siU", "<IMG SRC=\"\1\" ALT=\"\">", $news);
$news = preg_replace ("/\[URL\](http:\/\/[a-z0-9\/\._\-\?\&= ]+)\[\/URL\]/siU", "<A HREF=\"\1\" TARGET=\"_BLANK\">\1</A>", $news);
$news = preg_replace ("/\[URL=(http:\/\/[a-z0-9\/\._\-\?\&= ]+)\](.*)\[\/URL\]/siU", "<A HREF=\"\1\" TARGET=\"_BLANK\">\2</A>", $news);
$news = preg_replace ("/\[COLOR=(.*)\](.*)\[\/COLOR\]/siU", "<FONT COLOR=\"\1\">\2</FONT>", $news);
$template = str_replace("[POST]", nl2br($news), $template);
$template=str_replace("[AUTHEMAIL]", $autharray[email], $template);
$template=str_replace("[IDPICTUREURL]", $autharray[idpic], $template);
$template=str_replace("[SIGPICTUREURL]", $autharray[sigpic], $template);
$template=str_replace("[CATSHORT]", $cat[name], $template);
$template=str_replace("[CATEGORY]", $cat[fullname], $template);
if ($gvars[commenting]!="off") { $template=str_replace("[COMMENTSURL]", "comments.php?commentto=$post[id]", $template); }
//Count the comments
$comcount = mysql_query("SELECT COUNT(*) FROM `$gvars[tablename]_comments` WHERE `commentto`='$post[id]' ");
$comcount_result = mysql_result($comcount,0,0);
$template=str_replace("[COMMENTNUM]", $comcount_result, $template);
//NEWS OUTPUT
echo $template;
//SIG
echo "<!-- News Generated by ZNews 3.0 (http://zubaz.net/znews) -->\n";
}
} else {
echo "No news found.";
}
?>
- <?php
- @include_once("db_include.php");
- ?>
- <? //DISPLAY NEWS
- $glob = $tableprefix."_globalvars";
- $gquery = mysql_query("SELECT * FROM `$glob` ");
- while ($var = mysql_fetch_array($gquery)) {
- $variable = $var[variable];
- $value = $var[value];
- $gvars[$variable] = $value;
- }
- $gvars[supervars][htmlnews] = true;
- $months= array( '1' => 'January',
- '2' => 'February',
- '3' => 'March',
- '4' => 'April',
- '5' => 'May',
- '6' => 'June',
- '7' => 'July',
- '8' => 'August',
- '9' => 'September',
- '10' => 'October',
- '11' => 'November',
- '12' => 'December');
- $monthnumdays = array( '1' => '31',
- '2' => '28',
- '3' => '31',
- '4' => '30',
- '5' => '31',
- '6' => '30',
- '7' => '31',
- '8' => '31',
- '9' => '30',
- '10' => '31',
- '11' => '30',
- '12' => '31');
- if ($gvars[newsaging] == "3") {
- $backlim = $gvars[maxnewsnum];
- $lim = "LIMIT 0,$backlim ";
- $where = "WHERE 1";
- }
- if ($gvars[newsaging] == "2") {
- $maxage = explode(":", $gvars[maxnewsage]);
- $timestamp = time();
- $timestamp -= (($maxage[0] * 86400) + (($maxage[1] + $gvars[timeshift]) * 3600));
- $dquery = mysql_query("SELECT FROM_UNIXTIME($timestamp)");
- $servert = mysql_result($dquery, 0);
- $threshdate = $servert;
- $where = "WHERE `date`>'$threshdate'";
- }
- if ($gvars[newsaging] == "1") {
- $where = "WHERE `current`='yes'";
- }
- if (!empty($date)) {
- $where .= " AND date BETWEEN '$date 00:00:00' AND '$date 23:59:59'";
- }
- if (!empty($cat)) {
- $where .= " AND category='$cat'";
- $notDefaultTemp = true;
- }
- if (!empty($id)) {
- $where = "WHERE `id`='$id'";
- }
- if ($mode == "showall") {
- $where = "WHERE 1";
- $lim = '';
- }
- //SIG
- echo "<!-- News Generated by ZNews 3.0 (http://zubaz.net/znews) -->\n";
- //IS THERE NEWS?
- $newscount = mysql_query("SELECT COUNT(*) FROM `$gvars[tablename]_posts` $where ");
- $ncount = mysql_result($newscount,0,0);
- if($ncount != 0) {
- //NEWS
- $nquery = mysql_query("SELECT * FROM `$gvars[tablename]_posts` $where ORDER BY `date` DESC $lim");
- while ($post = mysql_fetch_array($nquery)) {
- // HANDLE DATE
- $data=explode(" ", "$post[date]");
- $actualdatearray=explode("-", "$data[0]");
- $actualtimearray=explode(":", "$data[1]");
- $hour=$actualtimearray[0] + $gvars[timeshift]; //the minus 0 is the time offset, change that according to your difference from your server
- $tod="am";
- $month=$actualdatearray[1];
- $month++;
- $month--;
- $actualdatearray[2]++;
- $actualdatearray[2]--;
- if ($hour==12) {
- $tod="pm";
- }
- if ($hour<=0) {
- $hour = $hour + 12;
- $tod="pm";
- if ($hour==12) {
- $tod="am";
- }
- $actualdatearray[2] = $actualdatearray[2] - 1;
- if ($actualdatearray[2] == 0) { // this should fix the month and year from the time difference
- $month = $month - 1;
- if ($actualdatearray[0] % 4 == 0) { $monthnumdays[2] = '29'; } // leap year check
- $actualdatearray[2] = $monthnumdays[$month];
- if ($month == 0) {
- $actualdatearray[0] = $actualdatearray[0] - 1;
- $month = 12;
- }
- }
- } elseif ($hour>12) {
- $hour = $hour - 12;
- $tod="pm";
- }
- // GET CATEGORY
- if ($gvars[categories]=="1") {
- $catquery = mysql_query("SELECT * FROM `$gvars[tablename]_categories` WHERE `name`='$post[category]' ");
- $cat = mysql_fetch_array($catquery);
- }
- // GET TEMPLATE
- if(!empty($cat[template])) {
- $tempname = $cat[template];
- } else {
- $tempname = "default";
- }
- $tempquery = mysql_query("SELECT * FROM `$gvars[tablename]_templates` WHERE `name`='$tempname' ");
- $templateArray = mysql_fetch_array($tempquery);
- $template = $templateArray[template];
- // GET AUTHOR DATA
- $aquery=mysql_query("SELECT * FROM `$gvars[tablename]_users` WHERE `username`='$post[author]' ");
- $autharray=mysql_fetch_array($aquery);
- // REPLACE COMPONENTS
- $template=str_replace("[MONTH]", $months[$month], $template);
- $template=str_replace("[M#]", $month, $template);
- $template=str_replace("[DAY]", $actualdatearray[2], $template);
- $template=str_replace("[YEAR]", $actualdatearray[0], $template);
- $template=str_replace("[TIME]", "$hour:$actualtimearray[1]", $template);
- $template=str_replace("[TOD]", $tod, $template);
- $template=str_replace("[TITLE]", $post[title], $template);
- $template=str_replace("[AUTHOR]", $autharray[username], $template);
- if ($gvars[abstracting]=="1") {
- $template=str_replace("[ABSTRACT]", $post[abstract], $template);
- }
- $news = $post[post];
- //REPLACERS
- if ($gvars[replacers] == "1") {
- $replacerquery=mysql_query("SELECT * FROM `$gvars[tablename]_replacers` ");
- while($r=mysql_fetch_array($replacerquery)) { //this is the replacer function
- $news=str_replace($r[before], $r[after], $news);
- }
- }
- //ZFormatting
- if (!$gvars[supervars][htmlnews]) {
- $news = str_replace ("<", "<", $news);
- $news = str_replace (">", ">", $news);
- }
- $news = preg_replace ("/\[B\](.*)\[\/B\]/siU", "<B>\1</B>", $news);
- $news = preg_replace ("/\[U\](.*)\[\/U\]/siU", "<U>\1</U>", $news);
- $news = preg_replace ("/\[I\](.*)\[\/I\]/siU", "<I>\1</I>", $news);
- $news = preg_replace ("/\[IMG\](http:\/\/[a-z0-9\/\._\-\?\&= ]+)\[\/IMG\]/siU", "<IMG SRC=\"\1\" ALT=\"\">", $news);
- $news = preg_replace ("/\[URL\](http:\/\/[a-z0-9\/\._\-\?\&= ]+)\[\/URL\]/siU", "<A HREF=\"\1\" TARGET=\"_BLANK\">\1</A>", $news);
- $news = preg_replace ("/\[URL=(http:\/\/[a-z0-9\/\._\-\?\&= ]+)\](.*)\[\/URL\]/siU", "<A HREF=\"\1\" TARGET=\"_BLANK\">\2</A>", $news);
- $news = preg_replace ("/\[COLOR=(.*)\](.*)\[\/COLOR\]/siU", "<FONT COLOR=\"\1\">\2</FONT>", $news);
- $template = str_replace("[POST]", nl2br($news), $template);
- $template=str_replace("[AUTHEMAIL]", $autharray[email], $template);
- $template=str_replace("[IDPICTUREURL]", $autharray[idpic], $template);
- $template=str_replace("[SIGPICTUREURL]", $autharray[sigpic], $template);
- $template=str_replace("[CATSHORT]", $cat[name], $template);
- $template=str_replace("[CATEGORY]", $cat[fullname], $template);
- if ($gvars[commenting]!="off") { $template=str_replace("[COMMENTSURL]", "comments.php?commentto=$post[id]", $template); }
- //Count the comments
- $comcount = mysql_query("SELECT COUNT(*) FROM `$gvars[tablename]_comments` WHERE `commentto`='$post[id]' ");
- $comcount_result = mysql_result($comcount,0,0);
- $template=str_replace("[COMMENTNUM]", $comcount_result, $template);
- //NEWS OUTPUT
- echo $template;
- //SIG
- echo "<!-- News Generated by ZNews 3.0 (http://zubaz.net/znews) -->\n";
- }
- } else {
- echo "No news found.";
- }
- ?>
allí el ya va....
- Scorpius
- Proficient


- Registrado: Mar 20, 2004
- Mensajes: 401
- Loc: Scorpion Hole
- Status: Offline
Bueno, en su página dice que su uso de noticias / news.php, y youve dice ahora que su uso de znews / view.php. No puedo ver el error a menos que usted puede cambiar su página para incluir znews / view.php.
Edit: Ok veo lo que hiciste. Antes de que se nos dice a ver a http://www.lunarossacorp.com/index.php . Pero eso no está utilizando znews más sino su página principal enlace ( http://www.animenobaka.com/main.php ) Ver como si se tratara de utilizar el znews. He estado buscando en el otro sitio, no el Anime.
Edit: Ok veo lo que hiciste. Antes de que se nos dice a ver a http://www.lunarossacorp.com/index.php . Pero eso no está utilizando znews más sino su página principal enlace ( http://www.animenobaka.com/main.php ) Ver como si se tratara de utilizar el znews. He estado buscando en el otro sitio, no el Anime.
- Scorpius
- Proficient


- Registrado: Mar 20, 2004
- Mensajes: 401
- Loc: Scorpion Hole
- Status: Offline
OK, así que he instalado znews en mi servidor, y parece estar funcionando perfectamente bien. Usted puede ver, me acaba de poner en una página algo que sólo incluyen el archivo view.php.
http://sc0rp.ath.cx/testindex.php .
El código para que la página es:
Un par de cosas que podría ser es la versión de su servidor MySQL se está ejecutando. No sé a ciencia cierta, pero eso sería algo para check-out. Desde que mi propio servidor de acogida, siempre tengo las versiones más recientes de las cosas. Mi servidor tiene MySQL 5.0.0-alpha-estándar. Así que si podía hablar a su anfitrión en la mejora, o tal vez usted podría tener que pagar por ello, también podría hacerlo si este es un gran problema para usted.
Espero haber sido de alguna ayuda para usted.
http://sc0rp.ath.cx/testindex.php .
El código para que la página es:
Código: [ Select ]
<?
echo "<strong>NEWS</strong>";
include("znews/view.php");
?>
echo "<strong>NEWS</strong>";
include("znews/view.php");
?>
- <?
- echo "<strong>NEWS</strong>";
- include("znews/view.php");
- ?>
Un par de cosas que podría ser es la versión de su servidor MySQL se está ejecutando. No sé a ciencia cierta, pero eso sería algo para check-out. Desde que mi propio servidor de acogida, siempre tengo las versiones más recientes de las cosas. Mi servidor tiene MySQL 5.0.0-alpha-estándar. Así que si podía hablar a su anfitrión en la mejora, o tal vez usted podría tener que pagar por ello, también podría hacerlo si este es un gran problema para usted.
Espero haber sido de alguna ayuda para usted.
- Cae
- Expert


- Registrado: Feb 25, 2004
- Mensajes: 734
- Status: Offline
ok, disculpas por la confusión, quiero aclarar...
znews se utiliza en ambos http://www.animenobaka.com y http://www.lunarossacorp.com
que son a la vez teniendo problemas con znews
znews utilizados para trabajar en ANB. com, sin embargo, nuestro anfitrión se trasladó al sitio y atornillada que un montón de cosas, sin embargo, se está fija...
el sitio que estoy tratando de resolver el problema en znews es, en efecto, LRC.com, y nunca ha trabajado en ella...se instala en / noticias a pesar de que se había instalado con anterioridad a / znews sentimos ive estado tratando de hacerlo funcionar, y se han reinstalado serveral veces...
Espero que ayude...disculpas por la confusión
znews se utiliza en ambos http://www.animenobaka.com y http://www.lunarossacorp.com
que son a la vez teniendo problemas con znews
znews utilizados para trabajar en ANB. com, sin embargo, nuestro anfitrión se trasladó al sitio y atornillada que un montón de cosas, sin embargo, se está fija...
el sitio que estoy tratando de resolver el problema en znews es, en efecto, LRC.com, y nunca ha trabajado en ella...se instala en / noticias a pesar de que se había instalado con anterioridad a / znews sentimos ive estado tratando de hacerlo funcionar, y se han reinstalado serveral veces...
Espero que ayude...disculpas por la confusión
- Anonymous
- Bot


- Registrado: 25 Feb 2008
- Mensajes: ?
- Loc: Ozzuland
- Status: Online
Abril 19th, 2004, 11:54 am
1, 2
Para responder a este tema que necesita para ingresar o registrarse. Es gratis.
Publicar Información
- Total de mensajes en este tema: 16 mensajes
- Usuarios navegando por este Foro: No hay usuarios registrados visitando el Foro y 215 invitados
- No puede abrir nuevos temas en este Foro
- No puede responder a temas en este Foro
- No puede editar sus mensajes en este Foro
- No puede borrar sus mensajes en este Foro
- No puede enviar adjuntos en este Foro

