Seite 1 von 2

Problem mit show user groups mod 1.3.6

Verfasst: 30.06.2004 16:34
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

Verfasst: 30.06.2004 19:43
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

Verfasst: 01.07.2004 08:58
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

Verfasst: 01.07.2004 09:28
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

Verfasst: 01.07.2004 09:49
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

Verfasst: 01.07.2004 10:08
von Markus67
Hi ...

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

Hast du mal einen Link zum Forum ?

Markus

Verfasst: 01.07.2004 10:14
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

Verfasst: 01.07.2004 11:10
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

Verfasst: 01.07.2004 11:51
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

Verfasst: 01.07.2004 12:31
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