[ 2.0.4 ] phpBB2 Nickpage

Du hast Probleme beim Einbau oder bei der Benutzung eines Mods? In diesem Forum bist du richtig.
Forumsregeln
phpBB 2.0 hat das Ende seiner Lebenszeit überschritten
phpBB 2.0 wird nicht mehr aktiv unterstützt. Insbesondere werden - auch bei Sicherheitslücken - keine Patches mehr bereitgestellt. Der Einsatz von phpBB 2.0 erfolgt daher auf eigene Gefahr. Wir empfehlen einen Umstieg auf phpBB 3.0, welches aktiv weiterentwickelt wird und für welches regelmäßig Updates zur Verfügung gestellt werden.
garugc
Mitglied
Beiträge: 80
Registriert: 09.05.2006 21:38
Wohnort: Wadgassen
Kontaktdaten:

Beitrag von garugc »

war mein Fehler - es gibt keine lang_main.tpl zum hochladen.. voll bescheuert !!

In der Mod-Anweisung müsste folgendes stehen:

Code: Alles auswählen

//
//Öffne------------------------------------------------------------------------------------
//
	language/lang_german_sie/lang_main.php 
	(kann auch anderer Ordner sein: lang_english o. lang_german,... - 
	je nachdem welches Languagepack du benutzt)

//
//Füge ein---------------------------------------------------------------------------------
//
	//Header und Navigation
	$lang['NP_NOT_ACTIVATED'] = 'Deine Nickpage ist bisher nicht eingerichtet!<br><br>Möchtest du das jetzt tun?';
	$lang['NP_NOT_ACTIVATED_2'] = 'Deine Nickpage ist bisher nicht eingerichtet!';
	$lang['NP_NEEDED_POSTS'] = 'Du benötigst noch <b>'.$posts.'</b> Posts, um dir eine Nickpage anzulegen.';
	$lang['NP_NICKPAGE_REQUEST'] = 'Eine Nickpage ist in folgender Form aufzurufen:<br><br><b>nickpage.php?user=NicknamedeinerWahl</b>';
	$lang['NP_NICKPAGE_OF'] =  'Nickpage von';
	$lang['NP_VOTE_FOR'] = 'bewerte diese Nickpage';
	$lang['NP_LAST_ONLINE'] = 'zuletzt online';
	$lang['NP_STATUS'] = 'Status';
	$lang['NP_VISITS'] = 'Visits';
	$lang['NP_NAVIGATION'] = 'Navigation';
	$lang['NP_HOME'] = 'Home';
	$lang['NP_SELFMADE'] = 'Kreatives';
	$lang['NP_GALERIE'] = 'Galerie';
	$lang['NP_PM_ME'] = 'PM an mich';
	$lang['NP_GB_ENTRY'] = 'GB Eintrag';
	$lang['NP_ADMIN'] = 'Admin';
	$lang['NP_FAVORTIE_URL'] = 'Top Links';
	$lang['NP_BUDDY'] = 'Buddies';
	$lang['NP_VOTES'] = 'Bewertungen';
	$lang['NP_YES'] = 'ja';
	$lang['NP_NO'] = 'nein';
	$lang['NP_STOP'] = 'Zugriff verwehrt';
	$lang['NP_WINDOW_CLOSE'] = 'Das Fenster schließt sich in 5 Sekunden.';
	$lang['NP_BUDDY_ADD_ME'] = 'Füge mich deiner Buddielist hinzu';
	
	//Allgemein
	$lang['NP_NAME'] = 'Name';
	$lang['NP_OLD'] = 'Alter';
	$lang['NP_FROM'] = 'Wohnort';
	$lang['NP_EMAIL'] = 'Email';
	$lang['NP_WEBSITE'] = 'Webseite';
	$lang['NP_INTERESTS'] = 'Hobbies';
	$lang['NP_GUESTBOOK'] = 'Gästebuch';
	$lang['NP_SITE'] = 'Seite';
	$lang['NP_WRITE_ON'] = 'schreibt am';
	$lang['NP_NEXT_SITE'] = 'nächste Seite';
	$lang['NP_SITE_BEFORE'] = 'vorherige Seite';
	$lang['NP_GB_BUTTON'] = 'Eintrag vornehmen';
	
	//Galerie
	$lang['NP_NEXT'] = 'vor';
	$lang['NP_BEFORE'] = 'zurück';
	$lang['NP_PIC_ALT'] = 'hau mal drauf';
	
	//Guestbook Entry
	$lang['NP_GUESTBOOK_AT'] = 'Gästebucheintrag an';
	$lang['NP_WARNING'] = 'HTML ist <b><font color="red">deaktiviert</b></font>, BB-CODE ist <b><font color="green">aktiviert</font></b>, , Smilie-Code ist <b><font color="green">aktiviert</font></b>';
	$lang['NP_YOUR_NAME'] = 'Dein Name';
	$lang['NP_MESSAGE_TO'] = 'Message an';
	$lang['NP_ADD_ENTRY'] = 'Eintrag hinzufügen';
	$lang['NP_RESET_ENTRY'] = 'Zurücksetzen';
	$lang['NP_GB_THX'] = 'Vielen Dank für deinen Gästebucheintrag.';
	$lang['NP_GB_USER_WANTS'] = 'möchte, das nur registrierte Forenbenutzer in sein Gästebuch schreiben dürfen';
	$lang['NP_GB_REGISTERED_ONLY'] = 'nur registrierte Forenbenutzer dürfen in die Gästebücher schreiben';
	$lang['NP_GB_FORBIDDEN_FROM_ADMIN'] = 'Das Gästebuch wurde durch den Administrator deativiert';
	
	//Vote
	$lang['NP_VOTE'] = 'Bewerte';
	$lang['NP_CHOOSE'] = 'wähle aus';
	$lang['NP_FANTASTIC'] = 'sehr gut';
	$lang['NP_GOOD'] = 'gut';
	$lang['NP_NORMAL'] = 'geht so';
	$lang['NP_BAD'] = 'schlecht';
	$lang['NP_VERY_BAD'] = 'sehr schlecht';
	$lang['NP_DO_VOTE'] = 'Bewertung abgeben';
	$lang['NP_VOTES_BEFORE'] = 'Du hast diesen User bereits bewertet ;-).';
	$lang['NP_NOT_ALLOWED'] = 'Du bist nicht befugt, diesen User zu bewerten!';
	$lang['NP_VOTE_THX'] = 'Vielen Dank für deine Bewertung.';
	
	//Nickpage CMS
	$lang['NP_BACK_TO_NICKPAGE'] = 'zurück zur Nickpage';
	$lang['NP_CONFIGURATION'] = 'Allgemeine Konfiguration';
	$lang['NP_SECURITY'] = 'Sicherheit';
	$lang['NP_GUESTBOOK'] = 'Gästebuch';
	$lang['NP_BIRTHDAY'] = 'Geburtsdatum (TT.MM.JJJJ)';
	$lang['NP_BIRTHDAY_COMMENT'] = '(Ist die Anzeige des Alters nicht erwünscht,<br>müssen alle 3 Felder frei bleiben!)';
	$lang['NP_SHOW_EMAIL'] = 'Emailaddy zeigen';
	$lang['NP_SHOW_EMAIL_COMMENT'] = '(Diese Veränderung wirkt sich auf<br>deine allgemeine Foreneinstellung aus!)';
	$lang['NP_INFORMATION'] = 'Information';
	$lang['NP_SPECIALNICKNAME'] = 'Spezialnickname';
	$lang['NP_USERPIC'] = 'Userpic (200x200,PNG/GIF/JPEG)';
	$lang['NP_SAFE'] = 'Speichern';
	$lang['NP_SETBACK'] = 'Zurücksetzen';
	$lang['NP_ADD_LINK'] = 'Link hinzufügen';
	$lang['NP_LINK_NAME'] = 'Bezeichnung';
	$lang['NP_LINK_ADRESS'] = 'URL';
	$lang['NP_EDIT_LINK'] = 'Links bearbeiten';
	$lang['NP_EDIT'] = 'Bearbeiten';
	$lang['NP_DELETE'] = 'Löschen';
	$lang['NP_ADD_BUDDY'] = 'Buddy hinzufügen';
	$lang['NP_NICKNAME'] = 'Nickname';
	$lang['NP_NICKNAME_SEARCH'] = 'Nickname finden';
	$lang['NP_ADD_GALERIE'] = 'Bild hinzufügen';
	$lang['NP_PIC'] = 'Bild';
	$lang['NP_PIC_TITLE'] = 'Bezeichnung';
	$lang['NP_ADD_SELFMADE'] = 'mache Kreatives';
	$lang['NP_SECURITY_SETTINGS'] = 'Sicherheit einstellen';
	$lang['NP_REGISTERED_ONLY_VIEW'] = 'Nur registrierte/eingeloggte User dürfen meine Nickpage anschauen';
	$lang['NP_REGISTERED_ONLY_GB'] = 'Nur registrierte/eingeloggte User dürfen in mein Gästebuch posten';
	$lang['NP_MANAGE_GUESTBOOK'] = 'Gästebucheinträge verwalten';
	$lang['NP_AUTHOR'] = 'Autor';
	$lang['NP_DATE'] = 'Datum';
	$lang['NP_TIME'] = 'Zeit';
	$lang['NP_ENTRY'] = 'Eintrag';
	$lang['NP_DELETE_PIC'] = 'Bild löschen';
	$lang['NP_GB_EMAIL'] = 'Emailbenachrichtigung bei neuen Gästebuch Einträgen?';
	//Notification
	$lang['Notification_nickpage_subject'] = 'neuer Gästebucheintrag vorhanden';
	
	//Adminref
	$lang['NICKPAGE'] = "Anzeigen einer Nickpage";

//
//Speichern und Schließen der Datei--------------------------------------------------------
//
Mach das mal.
DadyCool
Mitglied
Beiträge: 9
Registriert: 24.08.2006 09:37

Beitrag von DadyCool »

das habe ich gemacht. Der Text ist im Admin-Panel auch da nur halt für die User nicht....

DadyCool
--------
aktuelles Projekt: strike2Death
garugc
Mitglied
Beiträge: 80
Registriert: 09.05.2006 21:38
Wohnort: Wadgassen
Kontaktdaten:

Beitrag von garugc »

es gibt mindestens zwei deutsche language-Dateien in Deinem Forum:

lang_main.tpl und lang_admin.tpl (die erste für die Sprache im Forum, die zweite für die Sprache im Admin-bereich)

vielleicht hast Du die obigen Angaben unter der lang_admin.tpl gespeichert?
Mach doch mal folgendes:

öffne die lang_main.tpl nomma, und guck einfach rein, ob die obigen Angaben drin stehen.

Ansonsten weiß ichs auch nicht. Was ich seltsam finde, ist, dass auch den Bestätigungs-buttons unten wortwörtlich die Sprache fehlt..

vielleicht kann hier noch jemand anderes helfen.
DadyCool
Mitglied
Beiträge: 9
Registriert: 24.08.2006 09:37

Beitrag von DadyCool »

danke genau das war der Fehler... ich hatte alles in der lang_admin.tpl drin.
Manchmal hat man einfach Tomaten auf den Augen
--------
aktuelles Projekt: strike2Death
garugc
Mitglied
Beiträge: 80
Registriert: 09.05.2006 21:38
Wohnort: Wadgassen
Kontaktdaten:

Beitrag von garugc »

jaha.. das kenn ich - wenn ich drüber nachdenke, wieviel Blödsinn ich schon fabriziert habe :lol:
latis
Mitglied
Beiträge: 1
Registriert: 10.09.2006 08:25

Beitrag von latis »

Hi, ich habe den Mod installiert und es funktioniert ohne Probleme 1a
Nun möchte ich aber von den standart Profilen auf Nickpages umstellen, also das wenn man aufs profil klickt eines Users das man auf die Nickpage der Person kommt.
Nun zu meinen Problem:
Ich möchte folgende Daten die im Profil stehen in die Nickpage übergeben:

Code: Alles auswählen

{L_MESSENGER} {MSN} {L_YAHOO} {YIM_IMG} {L_AIM} {AIM_IMG} {L_ICQ_NUMBER} {ICQ_IMG} {ICQ_STATUS_IMG} {L_JOINED} {JOINED} {L_TOTAL_POSTS} {POSTS} {L_OCCUPATION} {OCCUPATION} {POSTER_RANK}
Aber sobald ich die Codetags drinne habe, in der Nickpage, werden diese nicht wiedergegeben. Woran liegt das?
sir barion
Mitglied
Beiträge: 5
Registriert: 09.09.2006 04:55
Wohnort: Hannover

Beitrag von sir barion »

Ok danke aber nurn habe ich ein seltsames prob

1.bei mir zeign sich die schaltfächen jeweils zweimal für shadow und glanz

2.wenn ich einen text makiere und ihn dann damit bearbeiten will wird der bbcode nicht angzeigt.

wenn ich die codes von hand eingeben funzen die denn noch?


wo dran kann das denn liegen?
wer kann mir schnell und effektiv helfen?

link zu dem Forum mit dem Prob

http://barion.ba.funpic.de/phpBB2/login.php

DANKE für schnell hilfe schon mal im Vorraus

MfG barion
am lernen!!! IMMER

Sei du selbst , damit man dich erkennt.
Throgan
Mitglied
Beiträge: 5
Registriert: 12.09.2006 09:23

Beitrag von Throgan »

Ich hab die Suche benutzt und nun 2 Stunden über hunderten von Threads gehangen, doch bin ich leider nicht schlauer -.-

Ich hab Nickpage 1.3 eingebaut und bekomme sobald ich auf einen x beliebigen Thread klicke folgende Fehlermeldung:

Code: Alles auswählen

Parse error: syntax error, unexpected '}' in /usr/export/www/vhosts/funnetwork/hosting/throgan/phpBB2/includes/template.php(127) : eval()'d code on line 72
Ich hab schon gelesen das es eigentlich nicht an der genannten Datei liegen soll, sondern an der overall_header.tpl!?!?!

Ich komm einfach nicht mehr weiter...BITTE BITTE hilf mir jemand....

template.php:

Code: Alles auswählen

<?php
/***************************************************************************
 *                              template.php
 *                            -------------------
 *   begin                : Saturday, Feb 13, 2001
 *   copyright            : (C) 2001 The phpBB Group
 *   email                : support@phpbb.com
 *
 *   $Id: template.php,v 1.10.2.5 2005/05/06 20:50:11 acydburn Exp $
 *
 *
 ***************************************************************************/

/***************************************************************************
 *
 *   This program is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation; either version 2 of the License, or
 *   (at your option) any later version.
 *
 ***************************************************************************/

/**
 * Template class. By Nathan Codding of the phpBB group.
 * The interface was originally inspired by PHPLib templates,
 * and the template file formats are quite similar.
 *
 */

class Template {
	var $classname = "Template";

	// variable that holds all the data we'll be substituting into
	// the compiled templates.
	// ...
	// This will end up being a multi-dimensional array like this:
	// $this->_tpldata[block.][iteration#][child.][iteration#][child2.][iteration#][variablename] == value
	// if it's a root-level variable, it'll be like this:
	// $this->_tpldata[.][0][varname] == value
	var $_tpldata = array();

	// Hash of filenames for each template handle.
	var $files = array();

	// Root template directory.
	var $root = "";

	// this will hash handle names to the compiled code for that handle.
	var $compiled_code = array();

	// This will hold the uncompiled code for that handle.
	var $uncompiled_code = array();

	/**
	 * Constructor. Simply sets the root dir.
	 *
	 */
	function Template($root = ".")
	{
		$this->set_rootdir($root);
	}

	/**
	 * Destroys this template object. Should be called when you're done with it, in order
	 * to clear out the template data so you can load/parse a new template set.
	 */
	function destroy()
	{
		$this->_tpldata = array();
	}

	/**
	 * Sets the template root directory for this Template object.
	 */
	function set_rootdir($dir)
	{
		if (!is_dir($dir))
		{
			return false;
		}

		$this->root = $dir;
		return true;
	}

	/**
	 * Sets the template filenames for handles. $filename_array
	 * should be a hash of handle => filename pairs.
	 */
	function set_filenames($filename_array)
	{
		if (!is_array($filename_array))
		{
			return false;
		}

		reset($filename_array);
		while(list($handle, $filename) = each($filename_array))
		{
			$this->files[$handle] = $this->make_filename($filename);
		}

		return true;
	}


	/**
	 * Load the file for the handle, compile the file,
	 * and run the compiled code. This will print out
	 * the results of executing the template.
	 */
	function pparse($handle)
	{
		if (!$this->loadfile($handle))
		{
			die("Template->pparse(): Couldn't load template file for handle $handle");
		}

		// actually compile the template now.
		if (!isset($this->compiled_code[$handle]) || empty($this->compiled_code[$handle]))
		{
			// Actually compile the code now.
			$this->compiled_code[$handle] = $this->compile($this->uncompiled_code[$handle]);
		}

		// Run the compiled code.
		eval($this->compiled_code[$handle]);
		return true;
	}

	/**
	 * Inserts the uncompiled code for $handle as the
	 * value of $varname in the root-level. This can be used
	 * to effectively include a template in the middle of another
	 * template.
	 * Note that all desired assignments to the variables in $handle should be done
	 * BEFORE calling this function.
	 */
	function assign_var_from_handle($varname, $handle)
	{
		if (!$this->loadfile($handle))
		{
			die("Template->assign_var_from_handle(): Couldn't load template file for handle $handle");
		}

		// Compile it, with the "no echo statements" option on.
		$_str = "";
		$code = $this->compile($this->uncompiled_code[$handle], true, '_str');

		// evaluate the variable assignment.
		eval($code);
		// assign the value of the generated variable to the given varname.
		$this->assign_var($varname, $_str);

		return true;
	}

	/**
	 * Block-level variable assignment. Adds a new block iteration with the given
	 * variable assignments. Note that this should only be called once per block
	 * iteration.
	 */
	function assign_block_vars($blockname, $vararray)
	{
		if (strstr($blockname, '.'))
		{
			// Nested block.
			$blocks = explode('.', $blockname);
			$blockcount = sizeof($blocks) - 1;
			$str = '$this->_tpldata';
			for ($i = 0; $i < $blockcount; $i++)
			{
				$str .= '[\'' . $blocks[$i] . '.\']';
				eval('$lastiteration = sizeof(' . $str . ') - 1;');
				$str .= '[' . $lastiteration . ']';
			}
			// Now we add the block that we're actually assigning to.
			// We're adding a new iteration to this block with the given
			// variable assignments.
			$str .= '[\'' . $blocks[$blockcount] . '.\'][] = $vararray;';

			// Now we evaluate this assignment we've built up.
			eval($str);
		}
		else
		{
			// Top-level block.
			// Add a new iteration to this block with the variable assignments
			// we were given.
			$this->_tpldata[$blockname . '.'][] = $vararray;
		}

		return true;
	}

	/**
	 * Root-level variable assignment. Adds to current assignments, overriding
	 * any existing variable assignment with the same name.
	 */
	function assign_vars($vararray)
	{
		reset ($vararray);
		while (list($key, $val) = each($vararray))
		{
			$this->_tpldata['.'][0][$key] = $val;
		}

		return true;
	}

	/**
	 * Root-level variable assignment. Adds to current assignments, overriding
	 * any existing variable assignment with the same name.
	 */
	function assign_var($varname, $varval)
	{
		$this->_tpldata['.'][0][$varname] = $varval;

		return true;
	}


	/**
	 * Generates a full path+filename for the given filename, which can either
	 * be an absolute name, or a name relative to the rootdir for this Template
	 * object.
	 */
	function make_filename($filename)
	{
		// Check if it's an absolute or relative path.
		if (substr($filename, 0, 1) != '/')
		{
       		$filename = ($rp_filename = phpbb_realpath($this->root . '/' . $filename)) ? $rp_filename : $filename;
		}

		if (!file_exists($filename))
		{
			die("Template->make_filename(): Error - file $filename does not exist");
		}

		return $filename;
	}


	/**
	 * If not already done, load the file for the given handle and populate
	 * the uncompiled_code[] hash with its code. Do not compile.
	 */
	function loadfile($handle)
	{
		// If the file for this handle is already loaded and compiled, do nothing.
		if (isset($this->uncompiled_code[$handle]) && !empty($this->uncompiled_code[$handle]))
		{
			return true;
		}

		// If we don't have a file assigned to this handle, die.
		if (!isset($this->files[$handle]))
		{
			die("Template->loadfile(): No file specified for handle $handle");
		}

		$filename = $this->files[$handle];

		$str = implode("", @file($filename));
		if (empty($str))
		{
			die("Template->loadfile(): File $filename for handle $handle is empty");
		}

		$this->uncompiled_code[$handle] = $str;

		return true;
	}



	/**
	 * Compiles the given string of code, and returns
	 * the result in a string.
	 * If "do_not_echo" is true, the returned code will not be directly
	 * executable, but can be used as part of a variable assignment
	 * for use in assign_code_from_handle().
	 */
	function compile($code, $do_not_echo = false, $retvar = '')
	{
		// replace \ with \\ and then ' with \'.
		$code = str_replace('\\', '\\\\', $code);
		$code = str_replace('\'', '\\\'', $code);

		// change template varrefs into PHP varrefs

		// This one will handle varrefs WITH namespaces
		$varrefs = array();
		preg_match_all('#\{(([a-z0-9\-_]+?\.)+?)([a-z0-9\-_]+?)\}#is', $code, $varrefs);
		$varcount = sizeof($varrefs[1]);
		for ($i = 0; $i < $varcount; $i++)
		{
			$namespace = $varrefs[1][$i];
			$varname = $varrefs[3][$i];
			$new = $this->generate_block_varref($namespace, $varname);

			$code = str_replace($varrefs[0][$i], $new, $code);
		}

		// This will handle the remaining root-level varrefs
		$code = preg_replace('#\{([a-z0-9\-_]*?)\}#is', '\' . ( ( isset($this->_tpldata[\'.\'][0][\'\1\']) ) ? $this->_tpldata[\'.\'][0][\'\1\'] : \'\' ) . \'', $code);

		// Break it up into lines.
		$code_lines = explode("\n", $code);

		$block_nesting_level = 0;
		$block_names = array();
		$block_names[0] = ".";

		// Second: prepend echo ', append ' . "\n"; to each line.
		$line_count = sizeof($code_lines);
		for ($i = 0; $i < $line_count; $i++)
		{
			$code_lines[$i] = chop($code_lines[$i]);
			if (preg_match('#<!-- BEGIN (.*?) -->#', $code_lines[$i], $m))
			{
				$n[0] = $m[0];
				$n[1] = $m[1];

				// Added: dougk_ff7-Keeps templates from bombing if begin is on the same line as end.. I think. :)
				if ( preg_match('#<!-- END (.*?) -->#', $code_lines[$i], $n) )
				{
					$block_nesting_level++;
					$block_names[$block_nesting_level] = $m[1];
					if ($block_nesting_level < 2)
					{
						// Block is not nested.
						$code_lines[$i] = '$_' . $n[1] . '_count = ( isset($this->_tpldata[\'' . $n[1] . '.\']) ) ?  sizeof($this->_tpldata[\'' . $n[1] . '.\']) : 0;';
						$code_lines[$i] .= "\n" . 'for ($_' . $n[1] . '_i = 0; $_' . $n[1] . '_i < $_' . $n[1] . '_count; $_' . $n[1] . '_i++)';
						$code_lines[$i] .= "\n" . '{';
					}
					else
					{
						// This block is nested.

						// Generate a namespace string for this block.
						$namespace = implode('.', $block_names);
						// strip leading period from root level..
						$namespace = substr($namespace, 2);
						// Get a reference to the data array for this block that depends on the
						// current indices of all parent blocks.
						$varref = $this->generate_block_data_ref($namespace, false);
						// Create the for loop code to iterate over this block.
						$code_lines[$i] = '$_' . $n[1] . '_count = ( isset(' . $varref . ') ) ? sizeof(' . $varref . ') : 0;';
						$code_lines[$i] .= "\n" . 'for ($_' . $n[1] . '_i = 0; $_' . $n[1] . '_i < $_' . $n[1] . '_count; $_' . $n[1] . '_i++)';
						$code_lines[$i] .= "\n" . '{';
					}

					// We have the end of a block.
					unset($block_names[$block_nesting_level]);
					$block_nesting_level--;
					$code_lines[$i] .= '} // END ' . $n[1];
					$m[0] = $n[0];
					$m[1] = $n[1];
				}
				else
				{
					// We have the start of a block.
					$block_nesting_level++;
					$block_names[$block_nesting_level] = $m[1];
					if ($block_nesting_level < 2)
					{
						// Block is not nested.
						$code_lines[$i] = '$_' . $m[1] . '_count = ( isset($this->_tpldata[\'' . $m[1] . '.\']) ) ? sizeof($this->_tpldata[\'' . $m[1] . '.\']) : 0;';
						$code_lines[$i] .= "\n" . 'for ($_' . $m[1] . '_i = 0; $_' . $m[1] . '_i < $_' . $m[1] . '_count; $_' . $m[1] . '_i++)';
						$code_lines[$i] .= "\n" . '{';
					}
					else
					{
						// This block is nested.

						// Generate a namespace string for this block.
						$namespace = implode('.', $block_names);
						// strip leading period from root level..
						$namespace = substr($namespace, 2);
						// Get a reference to the data array for this block that depends on the
						// current indices of all parent blocks.
						$varref = $this->generate_block_data_ref($namespace, false);
						// Create the for loop code to iterate over this block.
						$code_lines[$i] = '$_' . $m[1] . '_count = ( isset(' . $varref . ') ) ? sizeof(' . $varref . ') : 0;';
						$code_lines[$i] .= "\n" . 'for ($_' . $m[1] . '_i = 0; $_' . $m[1] . '_i < $_' . $m[1] . '_count; $_' . $m[1] . '_i++)';
						$code_lines[$i] .= "\n" . '{';
					}
				}
			}
			else if (preg_match('#<!-- END (.*?) -->#', $code_lines[$i], $m))
			{
				// We have the end of a block.
				unset($block_names[$block_nesting_level]);
				$block_nesting_level--;
				$code_lines[$i] = '} // END ' . $m[1];
			}
			else
			{
				// We have an ordinary line of code.
				if (!$do_not_echo)
				{
					$code_lines[$i] = 'echo \'' . $code_lines[$i] . '\' . "\\n";';
				}
				else
				{
					$code_lines[$i] = '$' . $retvar . '.= \'' . $code_lines[$i] . '\' . "\\n";'; 
				}
			}
		}

		// Bring it back into a single string of lines of code.
		$code = implode("\n", $code_lines);
		return $code	;

	}


	/**
	 * Generates a reference to the given variable inside the given (possibly nested)
	 * block namespace. This is a string of the form:
	 * ' . $this->_tpldata['parent'][$_parent_i]['$child1'][$_child1_i]['$child2'][$_child2_i]...['varname'] . '
	 * It's ready to be inserted into an "echo" line in one of the templates.
	 * NOTE: expects a trailing "." on the namespace.
	 */
	function generate_block_varref($namespace, $varname)
	{
		// Strip the trailing period.
		$namespace = substr($namespace, 0, strlen($namespace) - 1);

		// Get a reference to the data block for this namespace.
		$varref = $this->generate_block_data_ref($namespace, true);
		// Prepend the necessary code to stick this in an echo line.

		// Append the variable reference.
		$varref .= '[\'' . $varname . '\']';

		$varref = '\' . ( ( isset(' . $varref . ') ) ? ' . $varref . ' : \'\' ) . \'';

		return $varref;

	}


	/**
	 * Generates a reference to the array of data values for the given
	 * (possibly nested) block namespace. This is a string of the form:
	 * $this->_tpldata['parent'][$_parent_i]['$child1'][$_child1_i]['$child2'][$_child2_i]...['$childN']
	 *
	 * If $include_last_iterator is true, then [$_childN_i] will be appended to the form shown above.
	 * NOTE: does not expect a trailing "." on the blockname.
	 */
	function generate_block_data_ref($blockname, $include_last_iterator)
	{
		// Get an array of the blocks involved.
		$blocks = explode(".", $blockname);
		$blockcount = sizeof($blocks) - 1;
		$varref = '$this->_tpldata';
		// Build up the string with everything but the last child.
		for ($i = 0; $i < $blockcount; $i++)
		{
			$varref .= '[\'' . $blocks[$i] . '.\'][$_' . $blocks[$i] . '_i]';
		}
		// Add the block reference for the last child.
		$varref .= '[\'' . $blocks[$blockcount] . '.\']';
		// Add the iterator for the last child if requried.
		if ($include_last_iterator)
		{
			$varref .= '[$_' . $blocks[$blockcount] . '_i]';
		}

		return $varref;
	}

}

?>
overall_header.tpl:

Code: Alles auswählen

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html dir="{S_CONTENT_DIRECTION}">
<head>
<meta http-equiv="Content-Type" content="text/html; charset={S_CONTENT_ENCODING}">
<meta http-equiv="Content-Style-Type" content="text/css">
{META}
{NAV_LINKS}
<title>{SITENAME} :: {PAGE_TITLE}</title>
<link rel="stylesheet" href="templates/subSilver/{T_HEAD_STYLESHEET}" type="text/css" />

<!-- BEGIN switch_enable_pm_popup -->
<script language="Javascript" type="text/javascript">
<!--
	if ( {PRIVATE_MESSAGE_NEW_FLAG} )
	{
		window.open('{U_PRIVATEMSGS_POPUP}', '_phpbbprivmsg', 'HEIGHT=225,resizable=yes,WIDTH=400');;
	}
//-->
</script>
<!-- END switch_enable_pm_popup -->
</head>
<body bgcolor="{T_BODY_BGCOLOR}" text="{T_BODY_TEXT}" link="{T_BODY_LINK}" vlink="{T_BODY_VLINK}">

<a name="top"></a>

<table width="100%" cellspacing="0" cellpadding="10" border="0" align="center"> 
	<tr> 
		<td class="bodyline"><table width="100%" cellspacing="0" cellpadding="0" border="0">
			<tr> 
				
				<td align="center" width="100%" valign="middle"><a href="{U_INDEX}"><img src="templates/subSilver/images/banner.jpg" border="0" alt="{L_INDEX}" vspace="1" /></a><br /><span class="maintitle">{SITENAME}</span><br /><span class="gen">{SITE_DESCRIPTION}<br />&nbsp; </span> 
				<table cellspacing="0" cellpadding="2" border="0">
					<tr> 
						<td align="center" valign="top" nowrap="nowrap"><span class="mainmenu">&nbsp;<a href="{U_FAQ}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_faq.gif" width="12" height="13" border="0" alt="{L_FAQ}" hspace="3" />{L_FAQ}</a>&nbsp; &nbsp;<a href="{U_SEARCH}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_search.gif" width="12" height="13" border="0" alt="{L_SEARCH}" hspace="3" />{L_SEARCH}</a>&nbsp; &nbsp;<a href="{U_MEMBERLIST}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_members.gif" width="12" height="13" border="0" alt="{L_MEMBERLIST}" hspace="3" />{L_MEMBERLIST}</a>&nbsp; &nbsp;<a href="{U_GROUP_CP}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_groups.gif" width="12" height="13" border="0" alt="{L_USERGROUPS}" hspace="3" />{L_USERGROUPS}</a>&nbsp;&nbsp;<a href="{U_STAFF}" class="mainmenu"><img src="templates/subSilver/images/staff.gif" width="12" height="13" border="0" alt="{L_STAFF}" hspace="3" />{L_STAFF}</a>&nbsp; 
						<!-- BEGIN switch_user_logged_out -->
						&nbsp;<a href="{U_REGISTER}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_register.gif" width="12" height="13" border="0" alt="{L_REGISTER}" hspace="3" />{L_REGISTER}</a>&nbsp;
						<!-- END switch_user_logged_out -->
						</span></td>
					</tr>
					<tr>
						<td height="25" align="center" valign="top" nowrap="nowrap"><span class="mainmenu">&nbsp;<a href="{U_PROFILE}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_profile.gif" width="12" height="13" border="0" alt="{L_PROFILE}" hspace="3" />{L_PROFILE}</a>&nbsp; &nbsp;<a href="{U_PRIVATEMSGS}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_message.gif" width="12" height="13" border="0" alt="{PRIVATE_MESSAGE_INFO}" hspace="3" />{PRIVATE_MESSAGE_INFO}</a>&nbsp; &nbsp;<a href="{U_LOGIN_LOGOUT}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_login.gif" width="12" height="13" border="0" alt="{L_LOGIN_LOGOUT}" hspace="3" />{L_LOGIN_LOGOUT}</a>&nbsp;</span></td>
					</tr>

<!-- BEGIN Shownickpagebutton --> 
<img src="templates/nickpage/nickpage_button_small.gif" hspace="3"><a href="{Shownickpagebutton.U_NICKPAGE}" class="mainmenu">Nickpage</a>&nbsp; &nbsp; 
<!-- END Shownickpagebutton -->  
               
<!-- Intro + Portal MOD START -->
<!-- BEGIN switch_introportalmod_disable -->
<tr>
<td height="25" align="center" valign="top" nowrap="nowrap"><span class="mainmenu"><b>&nbsp;<a href="{U_IntroPortalMOD1}">{L_IntroPortalMOD1}</a>&nbsp;   &nbsp;<a href="{U_IntroPortalMOD2}">{L_IntroPortalMOD2}</a>&nbsp;   &nbsp;<a href="{U_IntroPortalMOD3}">{L_IntroPortalMOD3}</a>&nbsp;</b></span></td>
</tr>
<!-- END switch_introportalmod_disable -->
<!-- Intro + Portal MOD END -->
				</table></td>
			</tr>
		</table>

		<br />
Ich hab echt keinen Plan mehr..pls HELP
Benutzeravatar
area57
Mitglied
Beiträge: 2111
Registriert: 26.12.2005 19:43
Wohnort: Berlin
Kontaktdaten:

Beitrag von area57 »

Moin lies erstmal hier wg. Code-Brockenposting:

Posten von Code

und zu deinem Prob.

suche in der overall_header.tpl

Code: Alles auswählen

<!-- BEGIN Shownickpagebutton --> 
<img src="templates/nickpage/nickpage_button_small.gif" hspace="3"><a href="{Shownickpagebutton.U_NICKPAGE}" class="mainmenu">Nickpage</a>&nbsp; &nbsp; 
<!-- END Shownickpagebutton -->  
ersetze durch

Code: Alles auswählen

<img src="templates/nickpage/nickpage_button_small.gif" hspace="3"><a href="{Shownickpagebutton.U_NICKPAGE}" class="mainmenu">Nickpage</a>&nbsp; &nbsp; 
Basierend auf einen Thread den ich in der link:suche fand:
template.php-Fehler
miccom hat geschrieben:Vermutlich ein falsch gesetzter Kommentar (die Kommentare in den tpl-Dateien von php, welche mit BEGIN und END anfangen sind wichtige Markierungen!).

Windows - Ein Slangebegriff der Indianer: Weißer Mann starrt durch Glasscheibe auf Sanduhr
In a world without walls - Who need's windows and gates???
Throgan
Mitglied
Beiträge: 5
Registriert: 12.09.2006 09:23

Beitrag von Throgan »

Sry, wg. dem Code....

Doch zurück zu meinem Problem:

Ich hatte den Thread den Du verlinkt hast schon gesehen, wie gesagt habe gestern nacht 2 Stunden über diesem Forum gebrütet und gesucht gesucht gesucht......

Hab Deinen Vorschlag nochmal ausprobiert, jedoch hat es leider absolut keinen Effekt.....ich bekomme immernoch dieselbe Fehlermeldung.....

Und irgendwie sitzt der Button auch egal wo ich den einfüge immer oben links, doch das würd mich erstaml nicht stören, insofern erstnmal der Mod läuft.....



Ich kann machen was ich will, sobald ich auf nen Thread Klicke kommt immer :

Code: Alles auswählen

Parse error: syntax error, unexpected '}' in /usr/export/www/vhosts/funnetwork/hosting/throgan/phpBB2/includes/template.php(127) : eval()'d code on line 72
kein Plan, ich evtl. hab ich beim modden nen Fehler gemacht, werd es nochmal neu machen...glaub aber nicht das es was bringt ;(


/EDIT:

OK, hab ALLES nochmal neu gemacht und es funzt jetzt!!!!!
Antworten

Zurück zu „phpBB 2.0: Mod Support“