pragmaMx Support Forum

pragmaMx => Zusatzmodule => Thema gestartet von: juergenE in 04 Februar 2005, 19:32:36

Titel: Rezeptdatenbank
Beitrag von: juergenE in 04 Februar 2005, 19:32:36
Welche Version der Rezeptdatenbank ist zur Zeit unter php-nuke 5.5 zu empfehlen.
Ich habe eine recipe_version="1.4.1" die modifiziert wurde von

/* PHP-NUKE Recipe Module                                               */
/* ===========================                                          */
/*                                                                      */
/* Copyright (c) 2003 by Sean Pluard                                    */
/* http://heartstorm.org                                                */
/*                                                                      */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation.                                        */
/*                                                                      */
/* rewritten and modified for correct function in VKPMxxx enviroment    */
/* by (c)jubilee 2003 http://www.marx-city.de                           */
/* Warning: This Version may NOT!! work properly under phpNuke 6.0/6.5  */
/* VKPMxxx (c) by maax-design http://www.maax-design.de                 */
/* modified by kochloeffel change serves to tipps and some optical      */
/* changes                                                          

installiert und folgendes Problem:

Eingeben geht nur die Suche nach

Anzeigen nach Kategorie ->geht gar nicht (findet nichts, obwohl Sie es eine darin gibt)

Suche nach Name -> (finget alle, obwohl es nur eine gibt)

Suche nach Zutat -> (finget alle, obwohl es nur eine geben sollte)

Suche nach Anfangsbuchstaben finedet auch alle.

Woran kann das liegen.

Gruss Jürgen

Titel: Re: Rezeptdatenbank
Beitrag von: jubilee in 05 Februar 2005, 15:26:49
Hallo !

ich habe die rezeptdatenbank damals modifiziert allerdings nicht für das phpNuke 5.5
Theoretisch sollte sie Laufen
Bin mir nicht ganz sicher, warum diese Version nicht funktioniert. Evt. ist die auf register_globals = On angewiesen
da ich (soweit ich mich erinnern kann) diese Version noch nicht so geproggt hatte, das sie
ohn das register_globals auskommt.

MfG
jubilee
Titel: Re: Rezeptdatenbank
Beitrag von: juergenE in 06 Februar 2005, 10:34:34
Vielen Dank mal für deine Antwort. Aber dies müsste auch so hinterlegt sein.

$PHP_SELF=$_SERVER['PHP_SELF']; steht in Mainfile.php.
und PHPINFO sagt register_globals = ON

Ich denke daran kann es nicht liegen.

Wenn du verleicht auf meine Seite http://www.prinz-soft.de gehst kann du verleicht mehr sehen.

Gruss Jürgen
Titel: Re: Rezeptdatenbank
Beitrag von: juergenE in 19 Februar 2005, 11:08:42
Es währe nett gewesen, wenn man mir eine Antwort zukommen liese.  :(

Gruss Jürgen
Titel: Re: Rezeptdatenbank
Beitrag von: jubilee in 20 Februar 2005, 10:16:12
Hallo !
Entschuldigung, aber ich kann anhand des Links auch nicht viel mehr erkennen, als das was schon bekannt ist.
Es werden einige Variablen nicht (oder falsch) ausgewertet.
Ich muss mal schauen, ob ich dies Version noch irgendwo liegen habe.
Dann muss ich das Teil einmal durchsehen, ob etwas zu erkennen ist.
MfG
jubilee
Titel: Re: Rezeptdatenbank
Beitrag von: juergenE in 20 Februar 2005, 10:43:46
Dank für deine Umstände.

Da gibt es die Datei: alphabrowse.php mit Inhalt:

<?
echo
"<a href=\"modules.php?name=$module_name&action=alphabrowse&query=A\">A</a>|".
"<a href=\"modules.php?name=$module_name&action=alphabrowse&query=B\">B</a>|".
"<a href=\"modules.php?name=$module_name&action=alphabrowse&query=C\">C</a>|".
"<a href=\"modules.php?name=$module_name&action=alphabrowse&query=D\">D</a>|".
"<a href=\"modules.php?name=$module_name&action=alphabrowse&query=E\">E</a>|".
"<a href=\"modules.php?name=$module_name&action=alphabrowse&query=F\">F</a>|".
"<a href=\"modules.php?name=$module_name&action=alphabrowse&query=G\">G</a>|".
"<a href=\"modules.php?name=$module_name&action=alphabrowse&query=H\">H</a>|".
"<a href=\"modules.php?name=$module_name&action=alphabrowse&query=I\">I</a>|".
"<a href=\"modules.php?name=$module_name&action=alphabrowse&query=J\">J</a>|".
"<a href=\"modules.php?name=$module_name&action=alphabrowse&query=K\">K</a>|".
"<a href=\"modules.php?name=$module_name&action=alphabrowse&query=L\">L</a>|".
"<a href=\"modules.php?name=$module_name&action=alphabrowse&query=M\">M</a>|".
"<a href=\"modules.php?name=$module_name&action=alphabrowse&query=N\">N</a>|".
"<a href=\"modules.php?name=$module_name&action=alphabrowse&query=O\">O</a>|".
"<a href=\"modules.php?name=$module_name&action=alphabrowse&query=P\">P</a>|".
"<a href=\"modules.php?name=$module_name&action=alphabrowse&query=Q\">Q</a>|".
"<a href=\"modules.php?name=$module_name&action=alphabrowse&query=R\">R</a>|".
"<a href=\"modules.php?name=$module_name&action=alphabrowse&query=S\">S</a>|".
"<a href=\"modules.php?name=$module_name&action=alphabrowse&query=T\">T</a>|".
"<a href=\"modules.php?name=$module_name&action=alphabrowse&query=U\">U</a>|".
"<a href=\"modules.php?name=$module_name&action=alphabrowse&query=V\">V</a>|".
"<a href=\"modules.php?name=$module_name&action=alphabrowse&query=W\">W</a>|".
"<a href=\"modules.php?name=$module_name&action=alphabrowse&query=X\">X</a>|".
"<a href=\"modules.php?name=$module_name&action=alphabrowse&query=Y\">Y</a>|".
"<a href=\"modules.php?name=$module_name&action=alphabrowse&query=Z\">Z</a>|".
"<a href=\"modules.php?name=$module_name&action=alphabrowse&query=0\">0</a>|".
"<a href=\"modules.php?name=$module_name&action=alphabrowse&query=1\">1</a>|".
"<a href=\"modules.php?name=$module_name&action=alphabrowse&query=2\">2</a>|".
"<a href=\"modules.php?name=$module_name&action=alphabrowse&query=3\">3</a>|".
"<a href=\"modules.php?name=$module_name&action=alphabrowse&query=4\">4</a>|".
"<a href=\"modules.php?name=$module_name&action=alphabrowse&query=5\">5</a>|".
"<a href=\"modules.php?name=$module_name&action=alphabrowse&query=6\">6</a>|".
"<a href=\"modules.php?name=$module_name&action=alphabrowse&query=7\">7</a>|".
"<a href=\"modules.php?name=$module_name&action=alphabrowse&query=8\">8</a>|".
"<a href=\"modules.php?name=$module_name&action=alphabrowse&query=9\">9</a>";
?>


und die Datei: index.php mit Inhalt:


<?php
/************************************************************************/
/* PHP-NUKE Recipe Module                                               */
/* ===========================                                          */
/*                                                                      */
/* Copyright (c) 2003 by Sean Pluard                                    */
/* http://heartstorm.org                                                */
/*                                                                      */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation.                                        */
/*                                                                      */
/* rewritten and modified for correct function in VKPMxxx enviroment    */
/* by (c)jubilee 2003 http://www.marx-city.de                           */
/* Warning: This Version may NOT!! work properly under phpNuke 6.0/6.5  */
/* VKPMxxx (c) by maax-design http://www.maax-design.de                 */
/* modified by kochloeffel change serves to tipps and some optical      */
/* changes                                                              */
/************************************************************************/
$module_name = basename(dirname(__FILE__));

if (!eregi("modules.php", $PHP_SELF)) {
   die ("You can't access this file directly...");
}

require_once("mainfile.php");
require_once("modules/$module_name/config.php");
$index=0;
get_lang($module_name);
$recipe_version="1.4.1";
if (is_writeable("modules/$module_name/photos") != 1) {$maxsizeforphotos=0;};# Dieser wert kann in der config.php des Moduls geändert werden.
global $admin;


function issetup() {
        global $dbi;
        $q = "SELECT * FROM recipes_recipes LIMIT 1";
        $result = sql_query($q, $dbi);
        return $result;
}


if ($action == "printrecipe") {
   echo "<style type=\"text/css\">
   .bigtitle       {COLOR: #000000; FONT-SIZE: 15px; font-weight: bold; FONT-FAMILY: Verdana, Helvetica}
   .mediumtitle       {FONT-SIZE: 14pt; font-weight: bold; FONT-FAMILY: Verdana, Helvetica}
   .reccontent       {FONT-SIZE: 11pt; FONT-FAMILY: Verdana, Helvetica}
   .rz1 { background: #FFFFFF; }
   .rz2 { background: #FFFFFF; border-style: solid, border-color: #000000; border-width: 1px; }
   </style>";
   $sql="select * from recipes_recipes where id=$recipeid";
   $result = sql_query($sql,$dbi);
   $row = sql_fetch_array($result,$dbi);
   $ingredients = urlencode($row[ingredients]);
   $ingredients = str_replace("%0A","<br>",$ingredients);
   $ingredients = urldecode($ingredients);
   $directions = urlencode($row[directions]);
   $directions = str_replace("%0A","<br>",$directions);
   $directions = urldecode($directions);
   $nutrition = urlencode($row[nutrition]);
   $nutrition = str_replace("%0A","<br>",$nutrition);
   $nutrition = urldecode($nutrition);
   $submittime = substr($row[submittime],2,2)."/".substr($row[submittime],4,2)."/".substr($row[submittime],0,2);

   echo "<center>
   <font class=\"bigtitle\">$row[recipename]</font><br><br>
   <table class=\"rz1\" border=0 width=100%>
   <tr><td class=\"rz2\"></cite>
   </td><td class=\"rz2\" align=right><font class=\"reccontent\">
   <b>"._CATEGORY.":</b> <cite>$row[category]</cite></font></td></tr>
   <tr><td class=\"rz2\"><font class=\"reccontent\"><b>"._PREPCOOKTIME.":</b> <cite>$row[preptime]/$row[cooktime]</cite>
   </td><td class=\"rz2\" align=right><font class=\"reccontent\">
   <b>"._DIFFICULTY.":</b> <cite>$row[difficulty]</cite></font></td></tr></table><br><br>";

   echo "<table class=\"rz1\" border=0 width=100%><tr><td class=\"rz2\">";
   echo "<font class=\"mediumtitle\">"._INGREDIENTS."</font><br><br><font class=\"reccontent\">$ingredients</font>";
   echo "</td></tr></table><br><br>";

   echo "<table class=\"rz1\" border=0 width=100%><tr><td class=\"rz2\">";
   echo "<font class=\"mediumtitle\">"._DIRECTIONS."</font><br><br><font class=\"reccontent\">$directions</font>";
   echo "</td><td class=\"rz2\"><font class=\"reccontent\">"._SERVESYIELDS.": $row[serves]
   </td></tr></table><br><br>";

   if ($row[nutrition] != "") {
      echo "<table class=\"rz1\" border=0 width=100%><tr><td class=\"rz2\">";
      echo "<font class=\"mediumtitle\">"._NUTRITIONINFORMATION."</font><br><br><font class=\"reccontent\">$nutrition</font>";
      echo "</td></tr></table><br><br>";
   };

   echo "
   <font class=\"boxcontent\">
   "._SOURCE.": $row[source]<br>
   "._CONTRIBUTEDBY.": $row[contributer] am $submittime<br></font>";
   exit;
};



include ('header.php');
echo "<style type=\"text/css\">
.bigtitle       {COLOR: #363636; FOn: form-data; name="post"

Eintrag