fuxx0r
05-25-2006, 04:48 PM
hi there,
I just tried to develop my own little addon but I can't get it working.
Here is my code:
if(!isset($_GET['x']) /*$_GET['x'] == ""*/) {
$row = sql_array("SELECT * FROM ".$pixelpost_db_prefix."pixelpost WHERE (id='".$_GET['showimage']."')");
}
$image_title = pullout($row['headline']);
$image_datetime = $row['datetime'];
$previous_row = sql_array("SELECT id,headline,image,datetime FROM ".$pixelpost_db_prefix."pixelpost WHERE (datetime < '$image_datetime') ORDER BY datetime desc limit 0,1");
$image_previous_title = pullout($previous_row['headline']);
$next_row = sql_array("SELECT id,headline,image,datetime FROM ".$pixelpost_db_prefix."pixelpost WHERE (datetime > '$image_datetime') ORDER BY datetime asc limit 0,1");
$image_next_title = pullout($next_row['headline']);
$modrewrite_title = ereg_replace(" ","-",$image_title);
$modrewrite_previous_title = ereg_replace(" ","-",$image_previous_title);
$modrewrite_next_title = ereg_replace(" ","-",$image_next_title);
$tpl = str_replace("<MODREWRITE_TITLE>",$modrewrite_title,$tpl);
$tpl = str_replace("<MODREWRITE_PREVIOUS_TITLE>",$modrewrite_previous_title,$tpl);
$tpl = str_replace("<MODREWRITE_NEXT_TITLE>",$modrewrite_next_title,$tpl);
I just tried to develop my own little addon but I can't get it working.
Here is my code:
if(!isset($_GET['x']) /*$_GET['x'] == ""*/) {
$row = sql_array("SELECT * FROM ".$pixelpost_db_prefix."pixelpost WHERE (id='".$_GET['showimage']."')");
}
$image_title = pullout($row['headline']);
$image_datetime = $row['datetime'];
$previous_row = sql_array("SELECT id,headline,image,datetime FROM ".$pixelpost_db_prefix."pixelpost WHERE (datetime < '$image_datetime') ORDER BY datetime desc limit 0,1");
$image_previous_title = pullout($previous_row['headline']);
$next_row = sql_array("SELECT id,headline,image,datetime FROM ".$pixelpost_db_prefix."pixelpost WHERE (datetime > '$image_datetime') ORDER BY datetime asc limit 0,1");
$image_next_title = pullout($next_row['headline']);
$modrewrite_title = ereg_replace(" ","-",$image_title);
$modrewrite_previous_title = ereg_replace(" ","-",$image_previous_title);
$modrewrite_next_title = ereg_replace(" ","-",$image_next_title);
$tpl = str_replace("<MODREWRITE_TITLE>",$modrewrite_title,$tpl);
$tpl = str_replace("<MODREWRITE_PREVIOUS_TITLE>",$modrewrite_previous_title,$tpl);
$tpl = str_replace("<MODREWRITE_NEXT_TITLE>",$modrewrite_next_title,$tpl);