Problem mit show user groups mod 1.3.6

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.
BeTZe
Mitglied
Beiträge: 25
Registriert: 17.06.2004 15:38

Problem mit show user groups mod 1.3.6

Beitrag von BeTZe »

Hallo Zusammen,
ich habe bei mir den show user groups mod 1.3.6 mit Hilfe des EasyMod eingebaut. Hat auch ohne Fehler geklappt. Wenn ich jetzt einen Beitrag im Forum anschauen will kommt allerdings folgende Fehlermeldung:

Code: Alles auswählen

Fatal error: Call to undefined function: flush_block_vars() in /var/www/web1/html/joyhorses/includes/functions_usergroup.php on line 52
Ich habe mal die Dateien durchgeschaut die zu ändern sind. Wurden alle vom EasyMod so geändert wie es verlang wurde.
Wieso kommt dann noch eine Fehlermeldung??

Schonmal danke im voraus
BeTZe
Both

Beitrag von Both »

Gab es bei diesem Mod, eine auszuführende Datein, die Tabellen in der
DB hinzufügt? Wenn ja, hast du es hochgeladen und ausgeführt? Was sind für Ergebnisse gekommen?

Timmy
BeTZe
Mitglied
Beiträge: 25
Registriert: 17.06.2004 15:38

Beitrag von BeTZe »

moin,
nein da gab es keine auszuführende datei für Änderungen an der DB.
Die gesuchte Funktion steht auch in der Datei inculdes/template.php

Dies ist der Code den man da einfügen soll:

Code: Alles auswählen

#
#-----[ OPEN ]------------------------------------------------
#
includes/template.php

#
#-----[ FIND ]------------------------------------------------
#
}

?>

# 
#-----[ BEFORE, ADD ]----------------------------------------- 
#

// Start add - Show usergroups MOD
	function append_var_from_handle_to_block($blockname,$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->append_block_vars($blockname, array($varname => $_str));
		return true;
	}

	function append_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 .= '= array_merge('.$str.',$vararray);';
			// Now we evaluate this assignment we've built up.
			eval($str);
		}
		else
		{
			// Top-level block.
			// Add a to existing block with the variable assignments
			// we were given.
			$current_iteration = sizeof($this->_tpldata[$blockname . '.'])-1;
			$this->_tpldata[$blockname . '.'][$current_iteration] = array_merge($this->_tpldata[$blockname . '.'][$current_iteration],$vararray);
		}

		return true;
	}

	/**
	* Flush a root level block, so it becomes empty.
	*/
	function flush_block_vars($blockname)
	{
		// Top-level block.
		// flush a existing block we were given.
		$current_iteration = sizeof($this->_tpldata[$blockname . '.'])-1;
		unset($this->_tpldata[$blockname . '.']);
		return true;
	}
// End add - Show usergroups MOD
Das ist auch richtig eingetragen. Aber wie gesagt, ich bekomme dann die oben genannte Fehlermeldung.

Kann mir noch jemand weiterhelfen??

BeTZe
Benutzeravatar
Markus67
Ehrenadmin
Beiträge: 28346
Registriert: 12.01.2004 16:02
Wohnort: Neuss
Kontaktdaten:

Beitrag von Markus67 »

Hi ...

speichere mal bitte folgende Dateien als txt-Datei und verlinke sie hier ...

## viewtopic.php
## includes/template.php
## includes/usercp_viewprofile.php

Markus
BeTZe
Mitglied
Beiträge: 25
Registriert: 17.06.2004 15:38

Beitrag von BeTZe »

Moin Markus67,

hier meine Dateien:

http://www.betzepower.de/template.php.txt
http://www.betzepower.de/usercp_viewprofile.php.txt
http://www.betzepower.de/viewtopic.php.txt

Vielleicht kannst mir ja damit weiterhelfen.
Schonmal danke im voraus

BeTZe
Benutzeravatar
Markus67
Ehrenadmin
Beiträge: 28346
Registriert: 12.01.2004 16:02
Wohnort: Neuss
Kontaktdaten:

Beitrag von Markus67 »

Hi ...

hast du auch die ganzen Dateien und Images in die richtigen Ordner hochgeladen ?

Hast du mal einen Link zum Forum ?

Markus
BeTZe
Mitglied
Beiträge: 25
Registriert: 17.06.2004 15:38

Beitrag von BeTZe »

Moin,

also habe das ja mit EasyMod installiert. Und der hat alle Dateien auch richtig kopiert.

Forum findest du unter:
http://www.joyhorses.de/index.php

BeTZe
Benutzeravatar
Markus67
Ehrenadmin
Beiträge: 28346
Registriert: 12.01.2004 16:02
Wohnort: Neuss
Kontaktdaten:

Beitrag von Markus67 »

Hi ...

Dein Problem liegt nicht am Mod ... sondern am Template ...

Versuche mal folgendes ...

öffne template.php

suchen und ausschneiden ...

Code: Alles auswählen

// Start add - Show usergroups MOD
	function append_var_from_handle_to_block($blockname,$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->append_block_vars($blockname, array($varname => $_str));
		return true;
	}

	function append_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 .= '= array_merge('.$str.',$vararray);';
			// Now we evaluate this assignment we've built up.
			eval($str);
		}
		else
		{
			// Top-level block.
			// Add a to existing block with the variable assignments
			// we were given.
			$current_iteration = sizeof($this->_tpldata[$blockname . '.'])-1;
			$this->_tpldata[$blockname . '.'][$current_iteration] = array_merge($this->_tpldata[$blockname . '.'][$current_iteration],$vararray);
		}

		return true;
	}

	/**
	* Flush a root level block, so it becomes empty.
	*/
	function flush_block_vars($blockname)
	{
		// Top-level block.
		// flush a existing block we were given.
		$current_iteration = sizeof($this->_tpldata[$blockname . '.'])-1;
		unset($this->_tpldata[$blockname . '.']);
		return true;
	}
// End add - Show usergroups MOD
suche und davor einfügen:

Code: Alles auswählen

}

/*

Functions that might be useful to style developers.

*/

// xs_switch(template, key)
Markus
BeTZe
Mitglied
Beiträge: 25
Registriert: 17.06.2004 15:38

Beitrag von BeTZe »

Moin,
also das habe ich jetzt geändert.

Nun kommt folgender Fehler:
Fatal error: Call to undefined function ... line 1273

Kannst mir da auch weiterhelfen??

Danke schonmla
BeTZe
Benutzeravatar
Markus67
Ehrenadmin
Beiträge: 28346
Registriert: 12.01.2004 16:02
Wohnort: Neuss
Kontaktdaten:

Beitrag von Markus67 »

Hi ....

Ich kann dazu leider auch nichts finden bei Nils ...
Poste einfach mal dort dein Problem ....
Es ist Definitiv ein Problem mit dem Style Aeolus ...

Vielleicht kann er dir weiterhelfen ...

http://mods.db9.dk/viewforum.php?f=6

Oder soll ich das übernehmen ? :wink:

Markus
Antworten

Zurück zu „phpBB 2.0: Mod Support“