Liddll
19.09.2006, 19:56
hab mal einen Vorschlag für das WIW:
es wurde hier ja schon viel "experimentiert", jedoch die Lösung mit den Sprachvariablen ist doch etwas umständlich, da man für jede Seite und Box einen Eintrag erstellen muss.
Warum nicht so:
Anzeige der Seiten bzw. Boxen als Link im WIW anhand des Seiten bzw. Boxentitels:
suche:
elseif ($script == "editpost.php") {
$a_querystring = explode("&", $querystring);
for ($i = 0; $i < count($a_querystring); $i++) {
list($varname, $value, ) = explode("=", $a_querystring[$i]);
if ($varname == "postid") {
$value = intval($value);
if ($value != 0) {
$this->postids .= ",".$value;
$data['postid'] = $value;
}
}
}
}
darunter:
//JGS-Portal Start
elseif (($script == "portal.php") or ($script == "jgs_portal.php") or ($script == "jgs_portal_box.php")){
$portal_string = explode("&", $querystring);
for ($i = 0; $i < count($portal_string); $i++) {
list($varname, $value,) = explode("=", $portal_string[$i]);
if ($varname == "id") {
if ($value != "") {
$this->action .= ",".$value;
$data['id'] = $value;
}
}
}
}
//JGS-Portal Ende
falls für das Portal schon ein "case" existiert, diesen ersetzen mit:
/// JPG PORTAL und Boxen WIW Start
case "jgs_portal.php":
case "portal.php":
case "jgs_portal_box.php":
global $n, $db;
if($this->useronlinecache[$this->counter]['script'] == 'jgs_portal_box.php') $portal = 'Portalbox: ';
else $portal = 'Portal: ';
if(isset($this->useronlinecache[$this->counter]['id']))
{
$psid = $this->useronlinecache[$this->counter]['id'];
$result_seite = $db->query_first("SELECT seiten_name,seiten_id FROM bb".$n."_sponsoren_seiten WHERE seiten_id='$psid'");
$location = $portal . "<a href=\"jgs_portal.php?id=" .$result_seite['seiten_id'] . "\">" . $result_seite['seiten_name'] . "</a>";
}
else $location = $lang->get("LANG_WIW_FILE_JGS_PORTAL", array('$SID_ARG_1ST' => $SID_ARG_1ST));
break;
/// JPG PORTAL und Boxen WIW Ende
es wurde hier ja schon viel "experimentiert", jedoch die Lösung mit den Sprachvariablen ist doch etwas umständlich, da man für jede Seite und Box einen Eintrag erstellen muss.
Warum nicht so:
Anzeige der Seiten bzw. Boxen als Link im WIW anhand des Seiten bzw. Boxentitels:
suche:
elseif ($script == "editpost.php") {
$a_querystring = explode("&", $querystring);
for ($i = 0; $i < count($a_querystring); $i++) {
list($varname, $value, ) = explode("=", $a_querystring[$i]);
if ($varname == "postid") {
$value = intval($value);
if ($value != 0) {
$this->postids .= ",".$value;
$data['postid'] = $value;
}
}
}
}
darunter:
//JGS-Portal Start
elseif (($script == "portal.php") or ($script == "jgs_portal.php") or ($script == "jgs_portal_box.php")){
$portal_string = explode("&", $querystring);
for ($i = 0; $i < count($portal_string); $i++) {
list($varname, $value,) = explode("=", $portal_string[$i]);
if ($varname == "id") {
if ($value != "") {
$this->action .= ",".$value;
$data['id'] = $value;
}
}
}
}
//JGS-Portal Ende
falls für das Portal schon ein "case" existiert, diesen ersetzen mit:
/// JPG PORTAL und Boxen WIW Start
case "jgs_portal.php":
case "portal.php":
case "jgs_portal_box.php":
global $n, $db;
if($this->useronlinecache[$this->counter]['script'] == 'jgs_portal_box.php') $portal = 'Portalbox: ';
else $portal = 'Portal: ';
if(isset($this->useronlinecache[$this->counter]['id']))
{
$psid = $this->useronlinecache[$this->counter]['id'];
$result_seite = $db->query_first("SELECT seiten_name,seiten_id FROM bb".$n."_sponsoren_seiten WHERE seiten_id='$psid'");
$location = $portal . "<a href=\"jgs_portal.php?id=" .$result_seite['seiten_id'] . "\">" . $result_seite['seiten_name'] . "</a>";
}
else $location = $lang->get("LANG_WIW_FILE_JGS_PORTAL", array('$SID_ARG_1ST' => $SID_ARG_1ST));
break;
/// JPG PORTAL und Boxen WIW Ende