ChristianAlfred
07-04-2010, 02:33 PM
I have made the following hook to show memberaquariums. In vb 3.8 it worked.
Is $userinfo[userid] changed in version 4.x
PHP-kod f?r plugin
require '../akvarium/include/connection.php';
$query = mysql_query("SELECT * FROM ca_akvarium WHERE MEMBER_ID = $userinfo[userid]") or exit(mysql_error());
$akvarium = "";
while($visa = mysql_fetch_array($query)) {
$akvariumrubrik = $visa["RUBRIK"];
$akvariumnr = $visa["NR"];
$akvariumbild = $visa["BILD1"];
$akvarium .= "<table><tr><td valign='top'>";
$akvarium .= "<a href='/akvarium/akvarium.php?NR=" . $akvariumnr . "'><img src='/akvarium/akvariebilder/liten/" . $akvariumbild . "'></a>";
$akvarium .= "</td><td valign='top'>";
if ( $akvariumrubrik != "" ) {
$akvarium .= "<a href='/akvarium/akvarium.php?NR=" . $akvariumnr . "'><strong>" . $akvariumrubrik . "</strong></a><br>";
};
if ( $visa["BESKRIVNING"] != "" ) {
$akvarium .= $visa["BESKRIVNING"];
};
$akvarium .= "</td></tr></table>";
};
Is $userinfo[userid] changed in version 4.x
PHP-kod f?r plugin
require '../akvarium/include/connection.php';
$query = mysql_query("SELECT * FROM ca_akvarium WHERE MEMBER_ID = $userinfo[userid]") or exit(mysql_error());
$akvarium = "";
while($visa = mysql_fetch_array($query)) {
$akvariumrubrik = $visa["RUBRIK"];
$akvariumnr = $visa["NR"];
$akvariumbild = $visa["BILD1"];
$akvarium .= "<table><tr><td valign='top'>";
$akvarium .= "<a href='/akvarium/akvarium.php?NR=" . $akvariumnr . "'><img src='/akvarium/akvariebilder/liten/" . $akvariumbild . "'></a>";
$akvarium .= "</td><td valign='top'>";
if ( $akvariumrubrik != "" ) {
$akvarium .= "<a href='/akvarium/akvarium.php?NR=" . $akvariumnr . "'><strong>" . $akvariumrubrik . "</strong></a><br>";
};
if ( $visa["BESKRIVNING"] != "" ) {
$akvarium .= $visa["BESKRIVNING"];
};
$akvarium .= "</td></tr></table>";
};