Länge der Eventtitel auf dem Portal ändern

Allgemeiner Support zum phpBB 2 Board und phpBB 2 Modifikationen
Forumsregeln
Auch wenn hier der Support für phpBB 2 weiterhin aufrecht erhalten bleibt, weisen wir darauf hin, dass das phpBB 2 nicht mehr offiziell unterstützt und weiterentwickelt wird!
Antworten
Benutzeravatar
oxpus
Administrator
Beiträge: 28735
Registriert: Mo 27.Jan, 2003 22:13
Wohnort: Bad Wildungen
Kontaktdaten:

Länge der Eventtitel auf dem Portal ändern

Beitrag von oxpus »

Wer den Events on ezPortal Mod installiert hat und die Titellänge unabhängig der Kalender-Einstellung haben möchte, muss folgende Änderungen machen:

Code: Alles auswählen

#
#-----[ OPEN ]-----
#
portal.php

#
#-----[ FIND ]-----
#
if ($cal_config['number_events'] <> 0)
{

#
#-----[ AFTER, ADD ]-----
#
	$subject_length = 20; // Change this number to decrease/increase the subject length!

#
#-----[ FIND ]-----
#
			if ( strlen($subject) > $cal_config['subject_length']) {
				if ((substr($subject,-3,1) == '(') && (substr($subject,-1,1) == ')')) {
					// store the number of permits and tack them on the end of the shortened subject
					$subjectnum = substr($subject,-2,1);
					$subject = substr($subject, 0, -3);
				}
				$subject = substr($subject, 0, $cal_config['subject_length']);
				$subject .= '..';
			}

#
#-----[ REPLACE WITH ]-----
#
			if ( strlen($subject) > $subject_length) {
				if ((substr($subject,-3,1) == '(') && (substr($subject,-1,1) == ')')) {
					// store the number of permits and tack them on the end of the shortened subject
					$subjectnum = substr($subject,-2,1);
					$subject = substr($subject, 0, -3);
				}
				$subject = substr($subject, 0, $subject_length);
				$subject .= '..';
			}


#
#-----[ SAVE/CLOSE ALL FILES ]-----
#
# EoM
Karsten Ude
-={ Das Mädchen für alles }=-
Kein Support per Messenger, Email oder PN! Unaufgeforderte Nachrichten werden ignoriert!
No support per Messenger, Email or PM. Each unasked message will be ignored!
Antworten