anpera.net
https://anpera.dyndns.org/phpbb3/

Frage zum Addon von Eliwood
https://anpera.dyndns.org/phpbb3/viewtopic.php?f=25&t=3913
Seite 1 von 1

Autor:  Shris [ Fr 17 Aug, 2007 22:50 ]
Betreff des Beitrags:  Frage zum Addon von Eliwood

Hallo,

bei dem Addon steht ja, man hat 3000 Zeichen frei.

So weit so gut nur: die Schreibbegrenzung liegt irgendwie immer noch bei 255...

Hab ich da was falsch gemacht?


Edit:

Sorry für den Post.. Warum sagt auch niemand, dass man das einfach in der DB ändern muss :).

Und:

Danke Rikkarda :)

Autor:  Rikkarda [ Fr 17 Aug, 2007 23:06 ]
Betreff des Beitrags: 

gern doch :P

Autor:  Shris [ Mo 20 Aug, 2007 15:16 ]
Betreff des Beitrags: 

Neues Problem :( :


Seitdem ich das eingebaut habe, kommt im Schlafzimmer dauernt, wenn ein Paar miteinander Schlafen will:

Name 1 sagt: "/me hat mit Name 2 geschlafen."


Früher kam ja immer:

Name 1 hat mit Name 2 geschlafen.

Weis wer, woran das liegen kann?


Das aber nur ein Beispiel... Wie sich herausgestellt hat, läuft gar nichts mehr so richtig.. Also auch nicht in der Küche z.b....

Überall wo /me eben sein müsste. :???:

Danke im Vorraus

Autor:  Eliwood [ Mo 20 Aug, 2007 15:36 ]
Betreff des Beitrags: 

Shris hat geschrieben:
Neues Problem :( :


Seitdem ich das eingebaut habe, kommt im Schlafzimmer dauernt, wenn ein Paar miteinander Schlafen will:

Name 1 sagt: "/me hat mit Name 2 geschlafen."


Früher kam ja immer:

Name 1 hat mit Name 2 geschlafen.

Weis wer, woran das liegen kann?


Das aber nur ein Beispiel... Wie sich herausgestellt hat, läuft gar nichts mehr so richtig.. Also auch nicht in der Küche z.b....

Überall wo /me eben sein müsste. :???:

Danke im Vorraus


Steht im Thread, Seite 3.

Autor:  Shris [ Mo 20 Aug, 2007 17:13 ]
Betreff des Beitrags: 

Habens so probiert, klappt nicht :(

Autor:  Eliwood [ Mo 20 Aug, 2007 17:15 ]
Betreff des Beitrags: 

Shris hat geschrieben:
Habens so probiert, klappt nicht :(


Funktioniert sehr wohl (Ich denke, OSI-Layer-8-Error).

Ganz unten, Verfasst am Di 16 Jan, 2007 19:36. Wenn man alles so ändert, funktionierts.

Autor:  Sylver [ Do 23 Aug, 2007 14:33 ]
Betreff des Beitrags: 

Das Addon ist zwar sehr gut, doch leider werden bei Dashers Gilden nun keine Clan kürzel mehr angezeigt. Nach mehrmaligen fehlversuchen dieses in der /lib/commentary.php anzugleichen bin ich mit meinem Latein am Ende. Ich stell hier mal meine alte function viewcommentary rein, vielleicht weiß jemand von euch Rat.
schon mal vielen Dank im voraus!

[php]<?
function viewcommentary($section,$message="Kommentar hinzufügen?",$limit=10,$talkline="sagt", $sticky = false) {
global $HTTP_POST_VARS,$session,$REQUEST_URI,$HTTP_GET_VARS, $doublepost,$appoencode_str;
$nobios = array("motd.php"=>true);
if ($nobios[basename($_SERVER['SCRIPT_NAME'])]) $linkbios=false; else $linkbios=true;
//output("`b".basename($_SERVER['SCRIPT_NAME'])."`b`n");
if ($doublepost) output("`\$`bDoppelpost?`b`0`n");
if ((int)getsetting("expirecontent",180)>0){
$sql = "DELETE FROM commentary WHERE postdate<'".date("Y-m-d H:i:s",strtotime("-".getsetting("expirecontent",180)." days"))."'";
db_query($sql);
}
$com=(int)$HTTP_GET_VARS[comscroll];
// Guild/Clans code by Dasher, modified by Gargamel
if (!$sticky) {
$sql = "SELECT commentary.*,
accounts.name,
accounts.login,
accounts.guildID,
accounts.clanID,
guilds.GuildPrefix as GuildPrefixG,
clans.GuildPrefix as GuildPrefixC
FROM commentary
INNER JOIN accounts
ON accounts.acctid = commentary.author
LEFT JOIN lotbd_guilds as guilds
ON guilds.ID = accounts.GuildID
LEFT JOIN lotbd_guilds as clans
ON clans.ID = accounts.clanID
WHERE section = '$section'
AND accounts.locked=0
ORDER BY commentid DESC
LIMIT ".($com*$limit).",$limit";
} else {
$sql = "SELECT stickycom.*,
accounts.name,
accounts.login,
accounts.guildID,
accounts.clanID,
guilds.GuildPrefix as GuildPrefixG,
clans.GuildPrefix as GuildPrefixC
FROM stickycom
INNER JOIN accounts
ON accounts.acctid = stickycom.author
LEFT JOIN lotbd_guilds as guilds
ON guilds.ID = accounts.GuildID
LEFT JOIN lotbd_guilds as clans
ON clans.ID = accounts.clanID
WHERE section = '$section'
AND accounts.locked=0
ORDER BY commentid DESC
LIMIT ".($com*$limit).",$limit";
}
$result = db_query($sql) or die(db_error(LINK));
$counttoday=0;
for ($i=0;$i < db_num_rows($result);$i++){
$row = db_fetch_assoc($result);
$row[comment]=preg_replace("'[`][^".$appoencode_str."`]'","",$row[comment]);
$commentids[$i] = $row[commentid];
if (date("Y-m-d",strtotime($row[postdate]))==date("Y-m-d")){
if ($row[name]==$session[user][name]) $counttoday++;
}
$x=0;
$ft="";
for ($x=0;strlen($ft)<3 && $x<strlen($row[comment]);$x++){
if (substr($row[comment],$x,1)=="`" && strlen($ft)==0) {
$x++;
}else{
$ft.=substr($row[comment],$x,1);
}
}
$link = "bio.php?char=".rawurlencode($row[login]) . "&ret=".URLEncode($_SERVER['REQUEST_URI']);
if (substr($ft,0,2)=="::") $ft = substr($ft,0,2);
else
if (substr($ft,0,2)=="/x") $ft = substr($ft,0,2);
else
if (substr($ft,0,1)==":") $ft = substr($ft,0,1);
// Guild/Clans code by Dasher
// modified by gargamel
// - supports general suppressing of guilds abbreviation
// - fixes links to guild and bio within commentary output
// - supports display of Guilds and clans TLA at the same time
if (!(unserialize($row['GuildPrefixG'])===false)) {
$row['GuildPrefixG']=unserialize($row['GuildPrefixG']);
$pre=$row['GuildPrefixG']['pre']; // Prefix or postfix
$prefix=$row['GuildPrefixG']['display'].""; // This Guild TLA
if ($prefix!="") {
// The link to display the guild info for non-members
$Guildshortlink = "guild.php?op=nonmember&action=examine&id=".$row['guildID'].
"&return=".URLEncode(CalcReturnPath());
$Guildlink = "`0<a href='".$Guildshortlink."' style='text-decoration: none'>`0[$prefix`0]</a>`& ";
switch ( $pre ) {
case 0: // suffix
$guildsuf = $Guildlink;
$guildpre = "";
addnav("",$Guildshortlink);
break;
case 1: // prefix
$guildsuf = "";
$guildpre = $Guildlink;
addnav("",$Guildshortlink);
break;
case 2: // nofix
default:
$guildsuf = "";
$guildpre = "";
break;
}
}
}
if (!(unserialize($row['GuildPrefixC'])===false)) {
$row['GuildPrefixC']=unserialize($row['GuildPrefixC']);
$pre=$row['GuildPrefixC']['pre']; // Prefix or postfix
$prefix=$row['GuildPrefixC']['display'].""; // This Guild TLA
if ($prefix!="") {
// The link to display the guild info for non-members
// replace GuildID with clanID - Raven
$Clanshortlink = "clan.php?op=nonmember&action=examine&id=".$row['clanID'].
"&return=".URLEncode(CalcReturnPath());
$Clanlink = "`0<a href='".$Clanshortlink."' style='text-decoration: none'>`0[$prefix`0]</a>`& ";
switch ( $pre ) {
case 0: // suffix
$clansuf = $Clanlink;
$clanpre = "";
addnav("",$Clanshortlink);
break;
case 1: // prefix
$clansuf = "";
$clanpre = $Clanlink;
addnav("",$Clanshortlink);
break;
case 2: // nofix
default:
$clansuf = "";
$clanpre = "";
break;
}
}
}
/*
Landschafts-Emote by Eliwood
*/
/*if ($ft=="/x")
{
$x = strpos($row[comment],$ft);
if ($x!==false)
{
if ($linkbios)
$op[$i] = str_replace("&amp;","&",HTMLEntities(substr($row[comment],0,$x)))
."`0\n`& "
.str_replace("&amp;","&",HTMLEntities(substr($row[comment],$x+strlen($ft))))
."`0`n";
else
$op[$i] = str_replace("&amp;","&",HTMLEntities(substr($row[comment],0,$x)))
."`0\n`& "
.str_replace("&amp;","&",HTMLEntities(substr($row[comment],$x+strlen($ft))))
."`0`n";
}
}
/*Landschaft-Emote Ende*/
/*
Landschafts-Emote by Eliwood
Edited by Lestat
*/
if ($ft=="/x"){
if ($session[user][superuser]>=4){
$x = strpos($row[comment],$ft);
if ($x!==false)
{
if ($linkbios)
$op[$i] = str_replace("&amp;","&",HTMLEntities(substr($row[comment],0,$x)))
."`0\n`& "
.str_replace("&amp;","&",HTMLEntities(substr($row[comment],$x+strlen($ft))))
."`0<a href='$link' style='text-decoration: none'>\n`&[ $row[name]`& ]`0</a>\n`&`n ";
else
$op[$i] = str_replace("&amp;","&",HTMLEntities(substr($row[comment],0,$x)))
."`0\n`& "
.str_replace("&amp;","&",HTMLEntities(substr($row[comment],$x+strlen($ft))))
."`0\n`&[ $row[name]`& ]`0\n`&`n ";
}
}

else{
$x = strpos($row[comment],$ft);
if ($x!==false)
{
if ($linkbios)
$op[$i] = str_replace("&amp;","&",HTMLEntities(substr($row[comment],0,$x)))
."`0\n`& "
.str_replace("&amp;","&",HTMLEntities(substr($row[comment],$x+strlen($ft))))
."`0`n";
else
$op[$i] = str_replace("&amp;","&",HTMLEntities(substr($row[comment],0,$x)))
."`0\n`& "
.str_replace("&amp;","&",HTMLEntities(substr($row[comment],$x+strlen($ft))))
."`0`n";
}
}
}




/*Landschaft-Emote Ende*/
/*if ($ft=="::" || $ft=="/me" || $ft==":")*/elseif ($ft=="::" || $ft=="/me" || $ft==":"){
$x = strpos($row[comment],$ft);
if ($x!==false){
if ($linkbios)
$op[$i] = str_replace("&amp;","&",HTMLEntities(substr($row[comment],0,$x)))
.$guildpre.$clanpre
."`0<a href='$link' style='text-decoration: none'>\n`&$row[name]`0</a>\n`"
.$session['flags']['emote']." "
.$guildsuf.$clansuf
.str_replace("&amp;","&",HTMLEntities(substr($row[comment],$x+strlen($ft))))
."`0`n";
else
$op[$i] = str_replace("&amp;","&",HTMLEntities(substr($row[comment],0,$x)))
.$guildpre.$clanpre
."`0\n`&$row[name]`0\n`& "
.$guildsuf.$clansuf
.str_replace("&amp;","&",HTMLEntities(substr($row[comment],$x+strlen($ft))))
."`0`n";
}
}
if ($op[$i]=="")
if ($linkbios)
//$op[$i] = "`0<a href='$link' style='text-decoration: none'>`&$row[name]`0</a>`3 says, \"`#"
$op[$i] = $guildpre.$clanpre."`0<a href='$link' style='text-decoration: none'>`&$row[name] `0</a>"
.$guildsuf.$clansuf."`".$session['flags']['emote']."sagt: \"`"
.$session['flags']['chat']." "
.str_replace("&amp;","&",HTMLEntities($row[comment]))."`3\"`0`n";
else
//$op[$i] = "`0`&$row[name]`0`3 says, \"`#"
$op[$i] = $guildpre.$clanpre."`0`&$row[name]`0 ".$guildsuf.$clansuf."`3sagt: \"`#"
.$guildsuf.$clansuf.str_replace("&amp;","&",HTMLEntities($row[comment]))."`3\"`0`n";
if ($message=="X") $op[$i]="`0($row[section]) ".$op[$i];
if ($row['postdate']>=$session['user']['recentcomments']) $op[$i]="<img src='images/new.gif' alt='&gt;' width='3' height='5' align='absmiddle'> ".$op[$i];
addnav("",$link);
$guildpre = $guildsuf = $clanpre = $clansuf = "";
}
$i--;
$outputcomments=array();
$sect="x";
for (;$i>=0;$i--){
$out="";
if ($session[user][superuser]>=3 && $message=="X"){
$out.="`0[ <a href='superuser.php?op=commentdelete&commentid=$commentids[$i]&return=".URLEncode($_SERVER['REQUEST_URI'])."'>Löschen</a> ]&nbsp;";
addnav("","superuser.php?op=commentdelete&commentid=$commentids[$i]&return=".URLEncode($_SERVER['REQUEST_URI']));
$matches=array();
preg_match("/[(][^)]*[)]/",$op[$i],$matches);
$sect=$matches[0];
}
//output($op[$i],true);
$out.=$op[$i];
if (!is_array($outputcomments[$sect])) $outputcomments[$sect]=array();
array_push($outputcomments[$sect],$out);
}
ksort($outputcomments);
reset($outputcomments);
while (list($sec,$v)=each($outputcomments)){
if ($sec!="x") output("`n`b$sec`b`n");
reset($v);
while (list($key,$val)=each($v)){
output($val,true);
}
}

if ($session[user][loggedin]) {
//if ($counttoday<($limit/4) || $session['user']['superuser']>=4){

if ($message!="X"){
if ($talkline!="says") $tll = strlen($talkline)+11; else $tll=0;

output("<form action=\"$REQUEST_URI\" method='POST'>$message`n<input name='insertcommentary[$section]' size='90' maxlength='".(900 -$tll)."'><input type='hidden' name='talkline' value='$talkline'><input type='hidden' name='section' value='$section'><input type='submit' class='button' value='reden'>`0`n</form>",true);
addnav("",$REQUEST_URI);
}
//}else{
// output("`@$message`nDu hast deine Posts für heute aufgebraucht.`0`n");
//}
}
if (db_num_rows($result)>=$limit){
$req = preg_replace("'[&]?c(omscroll)?=([[:digit:]-])*'","",$REQUEST_URI)."&comscroll=".($com+1);
//$req = substr($REQUEST_URI,0,strpos($REQUEST_URI,"c="))."&c=$HTTP_GET_VARS[c]"."&comscroll=".($com+1);
$req = str_replace("?&","?",$req);
if (!strpos($req,"?")) $req = str_replace("&","?",$req);
//output("<a href=\"$req\">&lt;&lt; Previous</a>",true);
output("<a href=\"$req\">&lt;&lt; Vorherige</a>",true);
addnav("",$req);
}
$req = preg_replace("'[&]?c(omscroll)?=([[:digit:]]|-)*'","",$REQUEST_URI)."&comscroll=0";
//$req = substr($REQUEST_URI,0,strpos($REQUEST_URI,"c="))."&c=$HTTP_GET_VARS[c]"."&comscroll=".($com-1);
$req = str_replace("?&","?",$req);
if (!strpos($req,"?")) $req = str_replace("&","?",$req);
//output("&nbsp;<a href=\"$req\">Refresh</a>&nbsp;",true);
output("&nbsp;<a href=\"$req\"> Aktualisieren</a>&nbsp;",true);
addnav("",$req);
if ($com>0){
$req = preg_replace("'[&]?c(omscroll)?=([[:digit:]]|-)*'","",$REQUEST_URI)."&comscroll=".($com-1);
//$req = substr($REQUEST_URI,0,strpos($REQUEST_URI,"c="))."&c=$HTTP_GET_VARS[c]"."&comscroll=".($com-1);
$req = str_replace("?&","?",$req);
if (!strpos($req,"?")) $req = str_replace("&","?",$req);
//output(" <a href=\"$req\">Next &gt;&gt;</a>",true);
output(" <a href=\"$req\">Nächste &gt;&gt;</a>",true);
addnav("",$req);
}
db_free_result($result);
}
?>[/php]

Autor:  Eliwood [ Do 23 Aug, 2007 17:20 ]
Betreff des Beitrags: 

Wie wärs mit den Einstellungen?
Das Pack unterstützt Dashers Gilden problemlos, soweit ich weis. Zumindest in die Rabenthaler Edition konnte es ohne Probleme eingebaut werden (Und das sind Dashers Gilden, mit Rabenthalfixes halt).

Autor:  Drazaar [ So 02 Sep, 2007 00:22 ]
Betreff des Beitrags: 

Die Gilden sucken zwar (weil buggy²), aber wenigstens bei dieser Sache machen sie keine Probleme Oo

Einfach bei der entsprechenden Konstante 'dashguild' eingeben... Steht doch alles auskommentiert dahinter, was man da so eingeben muss.
Ich hab die standard Dashergilden und es funzt problemlos. Schon seit immer *g*

Autor:  Shris [ So 02 Sep, 2007 13:12 ]
Betreff des Beitrags: 

Jetzt hätt ich noch ne Frage..

Kann man irgendwie einstellen, dass der /em und /X nur für bestimmte User benutzbar sind. (Also das ein Admin das erst freigeben muss)

Autor:  Auric [ So 02 Sep, 2007 15:20 ]
Betreff des Beitrags: 

Nö, das wirst du dir schon selber schreiben müssen.

Aber im prinzip nur eine If-Verzeweigung auf $session['user']['darfdiesunddas'] (wahlweise noch ein ['prefs'] dazwischen ^^)

Tipp: Schon gleich beim Add, nicht erst bei view^^

Autor:  Shris [ So 02 Sep, 2007 15:59 ]
Betreff des Beitrags: 

Mhm okay...

Nur: Wo müsste das dann rein? Das ist die Frage..^^

Bzw. beim Add?

Autor:  Rikkarda [ So 02 Sep, 2007 16:38 ]
Betreff des Beitrags: 

Shris hat geschrieben:
Jetzt hätt ich noch ne Frage..

Kann man irgendwie einstellen, dass der /em und /X nur für bestimmte User benutzbar sind. (Also das ein Admin das erst freigeben muss)


jap natürlich ist das möglich.. siehe Silienta *fg*

Autor:  Shris [ So 02 Sep, 2007 16:42 ]
Betreff des Beitrags: 

Hab ich schon :).

Nur: ich weis nicht wirklich, wie ich das rein kriegen sollt.. In der Common gibts ja kein Add bzw. Viewcommentary mehr...

Autor:  MySql [ So 02 Sep, 2007 17:05 ]
Betreff des Beitrags: 

Dan machst du es halt in der commentary.php ? o.ô

Autor:  Shris [ So 02 Sep, 2007 17:19 ]
Betreff des Beitrags: 

Hatte ich ja schon.. Wahrscheinlich mit nem Fehler *denk*


€:

Klappt einfach nicht :(

Seite 1 von 1 Alle Zeiten sind UTC + 1 Stunde
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/