pragmaMx Support Forum

pragmaMx => integrierte Module => Thema gestartet von: moskote01 am 22 Februar 2007, 11:28:03

Titel: Neuste User Block Zeichenbegrenzung
Beitrag von: moskote01 am 22 Februar 2007, 11:28:03
Hallo  :)

Ich habe versucht im block-Newest_Users.php die Zeichenlänge der Namen + dem dazugehärigen Link zum Profil in der Zeichenlänge zu begrenzen da sich jemand mit einem sehr langem Namen angemeldet hat und das dadurch das Theme an der Seite aussprengt.

Habe mehrere Varianten ausprobiert doch es will leider nicht klappen.

Code:
<?php // $Id: block-Newest_Users.php,v 1.1 2004/03/12 01:00:11 EllselAn Exp $
/**********************************************************************/
/* pragmaMx 0.2 / Mx 2.2  Content Management System Platform          */
/* ================================================================== */
/* Copyright (C) 2004 by the vkpMx & pragmaMx Developer Team          */
/* email:        team@pragmamx.org                                    */
/* homepage:     http://www.maax-design.de & http://www.pragmaMx.org  */
/* ================================================================== */
/*   The vkpMx is distributed free of charge by maax-design.de.       */
/*   The use of this system is allowed until copyright information    */
/*   is shown perspicuous visible and correcty on all system pages.   */
/*   Sales, rent out and the use of single code parts from this       */
/*   system must be allowed by maax-design.de.                        */
/**********************************************************************/
if (!defined("mxMainFileLoaded")) die ("You can't access this file directly...");

################# Einstell Variablen ##############
//// Anzahl der anzuzeigenden User
$ucount 8;
//// Blockcache erlauben
$mxblockcache TRUE;
###################################################
$textlen 10;
global 
$user_prefix;
$ucount intval($ucount);
$qry="SELECT uname, user_regtime FROM ${user_prefix}_users WHERE user_stat=1 ORDER BY user_regtime DESC LIMIT ".$ucount.";";
$result sql_query($qry); # x neuste User ermitteln
while (list($uname$user_regtime) = sql_fetch_row($result)) {
$lasts[] = '<img src="images/menu/rarrow.gif" width="14" height="9" alt="" border="0">&nbsp;<a href="modules.php?name=Userinfo&amp;uname='.$uname.'">'.$uname.'</a>';
}
$lasts mxCutString($uname$textlen"&nbsp;...""");
if (isset(
$lasts)) {
$content implode("<br>\n",$lasts);
}

?>


Danke in vorraus und MfG
Titel: Re: Neuste User Block Zeichenbegrenzung
Beitrag von: jubilee am 22 Februar 2007, 15:00:08

<?php // $Id: block-Newest_Users.php,v 1.1 2004/03/12 01:00:11 EllselAn Exp $
/**********************************************************************/
/* pragmaMx 0.2 / Mx 2.2  Content Management System Platform          */
/* ================================================================== */
/* Copyright (C) 2004 by the vkpMx & pragmaMx Developer Team          */
/* email:        team@pragmamx.org                                    */
/* homepage:     http://www.maax-design.de & http://www.pragmaMx.org  */
/* ================================================================== */
/*   The vkpMx is distributed free of charge by maax-design.de.       */
/*   The use of this system is allowed until copyright information    */
/*   is shown perspicuous visible and correcty on all system pages.   */
/*   Sales, rent out and the use of single code parts from this       */
/*   system must be allowed by maax-design.de.                        */
/**********************************************************************/
if (!defined("mxMainFileLoaded")) die ("You can't access this file directly...");

################# Einstell Variablen ##############
//// Anzahl der anzuzeigenden User
$ucount 8;
//// Blockcache erlauben
$mxblockcache TRUE;
###################################################
$textlen 10;
global 
$user_prefix;
$ucount intval($ucount);
$qry="SELECT uname, user_regtime FROM ${user_prefix}_users WHERE user_stat=1 ORDER BY user_regtime DESC LIMIT ".$ucount.";";
$result sql_query($qry); # x neuste User ermitteln
while (list($uname$user_regtime) = sql_fetch_row($result)) {
$uname2=mxCutString($uname$textlen"&nbsp;...""");
$lasts[] = '<img src="images/menu/rarrow.gif" width="14" height="9" alt="" border="0">&nbsp;<a href="modules.php?name=Userinfo&amp;uname='.$uname.'">'.$uname2.'</a>';
}
if (isset(
$lasts)) {
$content implode("<br>\n",$lasts);
}

?>

Titel: Re: Neuste User Block Zeichenbegrenzung
Beitrag von: moskote01 am 22 Februar 2007, 17:04:05
DANKE :)