Kan dit met een include?

Installatie lukt niet? Plotseling een foutmelding. Of weet je niet hoe iets werkt. Problemen met phpBB2 kun je in dit archief opzoeken.
Forumregels

Sinds 1 januari 2009 wordt phpBB2 niet meer ondersteund.
Onderstaande informatie is verouderd en dient uitsluitend als archief.
phpBB2.0.x
Gesloten
sukkelaap
Berichten: 1345
Lid geworden op: 03 dec 2003, 19:09
Locatie: Zeist

Kan dit met een include?

Bericht door sukkelaap » 20 sep 2004, 14:17

Ik wil in het bestand Viewprofile bij deze pijl iets neerzetten:

Afbeelding

Te groote van dat blokje die ik er naast heb getekend. Maar wat ik daar neer wil zetten staat in een ander bestand. Ik kan het doen met een iframe maar dat wil ik niet aangezien het een apparte pagina dan word. Een andere mogelijkheid die opzich wel mogelijk is is met een include. Alleen weet ik niet waar ik dat in het bestand usercp_viewprofile zo moet zetten dat die alles goed oproept.

Dus een pagina te groote van dat zwarte blokje moet die laden op de plek van de pijl en het mag geen iframe zijn.

Ik heb al veel geprobeerd met ene include maar het is er best ingewikkeld dus kan iemand precies vertellen wat ik moert aanpassen om dat een pagina op te roepen?

(De plek die ik aanwees is niet belangrijk maar ik wil geowoon in de viewprofile een blokje met iets hebben dsat in een ander bestand staat. En de inhoud van dat tweede bestand is te groote van dat blokje.)

Gebruikersavatar
Luuk
Berichten: 7311
Lid geworden op: 22 okt 2003, 10:07
Locatie: Delft

Bericht door Luuk » 20 sep 2004, 14:55

misschien iets in de richting van 'INCLUDE' => include($phpbb_root_path . 'includes/pagina.'.$phpEx),

en dat je dan {INCLUDE} kunt gebruiken in het .tpl bestand
Laatst gewijzigd door Luuk op 20 sep 2004, 15:45, 1 keer totaal gewijzigd.
Afbeelding

sukkelaap
Berichten: 1345
Lid geworden op: 03 dec 2003, 19:09
Locatie: Zeist

Bericht door sukkelaap » 20 sep 2004, 15:16

jah kijk ik heb een bestand genaamd extraprofiel.php en die verwijst dus nog eens naar extraprofiel.tpl maar ik wil dat die in dat hoekje extraprofiel.PHP laat.

Dus ik weet opzich wel hoe ik het met een include moet doen alleen ik weet niet waar ik dat zinnetje include moet plaatsen enzo in dat ene bestand want hij misvormt alles of laat iets niet dus.

Ik heb in extraprofiel.tpl alleen een tabel te grote van dat zwarte blokje staand dus met een include zal die alleen dat bl;okje weergeven maar waar moet ik die include zetten?

Gebruikersavatar
Luuk
Berichten: 7311
Lid geworden op: 22 okt 2003, 10:07
Locatie: Delft

Bericht door Luuk » 20 sep 2004, 15:45

dat van mij achter

Code: Selecteer alles

$template->assign_vars(array(
maar ik weet niet of dat zo werkt, ben bang van niet
Afbeelding

sukkelaap
Berichten: 1345
Lid geworden op: 03 dec 2003, 19:09
Locatie: Zeist

Bericht door sukkelaap » 20 sep 2004, 16:10

idee klinkt goed kijken of het werkt

sukkelaap
Berichten: 1345
Lid geworden op: 03 dec 2003, 19:09
Locatie: Zeist

Bericht door sukkelaap » 20 sep 2004, 16:12

fout schreef: Warning: main(./includes/extraprofiel.php): failed to open stream: No such file or directory in c:\appserv\www\mijnprofiel\includes\usercp_viewprofile.php on line 203

Warning: main(./includes/extraprofiel.php): failed to open stream: No such file or directory in c:\appserv\www\mijnprofiel\includes\usercp_viewprofile.php on line 203

Warning: main(): Failed opening './includes/extraprofiel.php' for inclusion (include_path='.;c:\php4\pear') in c:\appserv\www\mijnprofiel\includes\usercp_viewprofile.php on line 203
op lijn 203 staat nu dit:

Code: Selecteer alles

'INCLUDE' => include($phpbb_root_path . 'includes/extraprofiel.'.$phpEx), 
Ik kwam er achter dat er nog de map includes stond maar als ik dat verander werkt ie nog steeds nie
Laatst gewijzigd door sukkelaap op 20 sep 2004, 16:16, 1 keer totaal gewijzigd.

Gebruikersavatar
Luuk
Berichten: 7311
Lid geworden op: 22 okt 2003, 10:07
Locatie: Delft

Bericht door Luuk » 20 sep 2004, 16:16

staat het bestand extraprofiel.php ook in de map includes?
Afbeelding

sukkelaap
Berichten: 1345
Lid geworden op: 03 dec 2003, 19:09
Locatie: Zeist

Bericht door sukkelaap » 20 sep 2004, 16:20

nee lees mijn laatste edit maar ik heb nog eens iets gekeken en nog geloof wat veranderd maar nu geeft die de hele pagina niet meer weer maar alleen dit:

Code: Selecteer alles

Fatal error: Cannot redeclare class template in c:\appserv\www\mijnprofiel\includes\template.php on line 30
en ik geloof dat het nu juist wel goed staat

sukkelaap
Berichten: 1345
Lid geworden op: 03 dec 2003, 19:09
Locatie: Zeist

Bericht door sukkelaap » 20 sep 2004, 16:22

op lijn 30 staat:

Code: Selecteer alles

30. class Template {

Code: Selecteer alles

 31.	var $classname = "Template"; 

Gebruikersavatar
Luuk
Berichten: 7311
Lid geworden op: 22 okt 2003, 10:07
Locatie: Delft

Bericht door Luuk » 20 sep 2004, 16:24

dan gaat het niet op die manier :lol:

kun je het niet inbouwen dat het niet met een include hoeft, dus geen apart bestand?
Afbeelding

sukkelaap
Berichten: 1345
Lid geworden op: 03 dec 2003, 19:09
Locatie: Zeist

Bericht door sukkelaap » 20 sep 2004, 16:35

das mijn profiel het werkt niet

Maar misschien kunt u helpen?

Ik maak een stemfunctie op het profiel dus ik plaats wat script uit de cash mod maar dat pakt die niet.

Het is geen probleem om die cash.tpl in het tpl bestand te plaatsen maar in cash.php staat wel wat wat over gezet moet wordne naar de viewprofile. Ik zet hier effuh de tekst neer die naar viewprofile moet:

Code: Selecteer alles

<?php
/***************************************************************************
 *                               cash.php
 *                            -------------------
 *   begin                : Wednesday, Jul 16, 2003
 *   copyright            : (C) 2003 Xore
 *   email                : mods@xore.ca
 *
 *   $Id: cash.php,v 2.0.1.1 2003/09/26 01:20:53 Xore $
 *
 ***************************************************************************/

/***************************************************************************
 *
 *   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.
 *
 ***************************************************************************/

define('IN_PHPBB', true);
define('IN_CASHMOD', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);

//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_PROFILE);
init_userprefs($userdata);
//
// End session management
//




if ( !$userdata['session_logged_in'] )
{
	redirect(append_sid("login.$phpEx?redirect=cash.$phpEx", true));
}



//$cash_table = array();
//$indices = array();
//get_cash_table($cash_table,$indices);

$mode = isset($HTTP_POST_VARS['mode'])?$HTTP_POST_VARS['mode']:(isset($HTTP_GET_VARS['mode'])?$HTTP_GET_VARS['mode']:(""));

switch( $mode )
{
//
//========================================[ Donate Code ]===========================
//
	case "donate":
		$ref = isset($HTTP_GET_VARS['ref'])?$HTTP_GET_VARS['ref']:'index';
		$profiledata = get_userdata($HTTP_GET_VARS[POST_USERS_URL]);
		if ( (!$profiledata) || ($profiledata['user_id'] == $userdata['user_id']) )
		{
			if ( ($ref == 'viewtopic') && isset($HTTP_GET_VARS[POST_POST_URL]) )
			{
				redirect(append_sid('viewtopic.'.$phpEx.'?'.POST_POST_URL.'='.$HTTP_GET_VARS[POST_POST_URL]) . '#' . $HTTP_GET_VARS[POST_POST_URL]);
				exit;
			}
			else
			{
				redirect(append_sid("index.$phpEx"));
				exit;
			}
		}
		$target = $profiledata['user_id'];

		//
		// Load templates
		//
		$template->set_filenames(array(
			'body' => 'cash_donate.tpl')
		);

		//
		// Output page header
		//
		$page_title = $lang['Donate'];
		include($phpbb_root_path . 'includes/page_header.'.$phpEx);

		$hidden = '<input type="hidden" name="ref" value="' . $ref . '" />';
		$hidden .= '<input type="hidden" name="' . POST_USERS_URL . '" value="' . $target . '" />';
		if ( $ref == 'viewtopic' )
		{
			$hidden .= '<input type="hidden" name="' . POST_POST_URL . '" value="' . $HTTP_GET_VARS[POST_POST_URL] . '" />';
		}

		$template->assign_vars(array(
			'S_DONATE_ACTION' => append_sid("cash.$phpEx?mode=donated"),
			'S_HIDDEN_FIELDS' => $hidden,
			'L_DONATE' => $lang['Donate'],
			'L_FROM' => $lang['From'],
			'L_TO' => $lang['To'],
			'L_CONVERT' => $lang['Convert'],
			'L_SELECT_ONE' => $lang['Select_one'],

			'L_SUBMIT' => $lang['Submit'],
			'L_RESET' => $lang['Reset'],

			'L_AMOUNT' => $lang['Amount'],
			'L_DONATE_TO' => sprintf($lang['Donate_to'],$profiledata['username']),
			'L_MESSAGE' => $lang['Message'],

			'TARGET' => $profiledata['username'],
			'DONATER' => $userdata['username'])
		    );

		while ( $c_cur = &$cash->currency_next($cm_i,CURRENCY_ENABLED | CURRENCY_DONATE) )
		{
				$template->assign_block_vars('cashrow',array(	'CASH_NAME' => $c_cur->name(),
																'RECEIVER_AMOUNT' => $profiledata[$c_cur->db()],
																'DONATER_AMOUNT' => $userdata[$c_cur->db()],
																'S_DONATE_FIELD' => 'cash[' . $c_cur->id() . ']')
				);
		}

		$template->pparse('body');

		include($phpbb_root_path . 'includes/page_tail.'.$phpEx);

		break;
//
//========================================[ Donated Code ]===========================
//
	case "donated":
		$ref = isset($HTTP_POST_VARS['ref'])?$HTTP_POST_VARS['ref']:'index';
		$profiledata = get_userdata($HTTP_POST_VARS[POST_USERS_URL]);
		if ( !$profiledata )
		{
			if ( ($ref == 'viewtopic') && isset($HTTP_POST_VARS[POST_POST_URL]) )
			{
				redirect(append_sid('viewtopic.'.$phpEx.'?'.POST_POST_URL.'='.$HTTP_POST_VARS[POST_POST_URL]) . '#' . $HTTP_POST_VARS[POST_POST_URL]);
				exit;
			}
			else
			{
				redirect(append_sid("index.$phpEx"));
				exit;
			}
		}
		$target = new cash_user($profiledata['user_id'],$profiledata);
		$donater = new cash_user($userdata['user_id'],$userdata);
		if ( ($target->id() != $donater->id()) && isset($HTTP_POST_VARS['cash']) && is_array($HTTP_POST_VARS['cash']) )
		{
			$donate_array = array();
			$donate = false;
			while ( $c_cur = &$cash->currency_next($cm_i,CURRENCY_ENABLED | CURRENCY_DONATE) )
			{
				if ( isset($HTTP_POST_VARS['cash'][$c_cur->id()]) &&
					 is_numeric($HTTP_POST_VARS['cash'][$c_cur->id()]) )
				{
					$amount = cash_floatval($HTTP_POST_VARS['cash'][$c_cur->id()]);
					if ( $amount > 0 )
					{
						$amount = ( $donater->has($c_cur->id(),$amount) ) ? $amount : $donater->amount($c_cur->id());
						$donate_array[$c_cur->id()] = $amount;
						$message_clause[] = $c_cur->display($amount,true);
						$donate = true;
					}
				}
			}
			if ( $donate )
			{
				$donater->remove_by_id_array($donate_array);
				$target->give_by_id_array($donate_array);

				$action = array($donater->id(),
								$donater->name(),
								implode('</b>, <b>',$message_clause),
								$target->id(),
								$target->name());
				cash_create_log(CASH_LOG_DONATE,$action,$HTTP_POST_VARS['message']);
								
				if ( isset($HTTP_POST_VARS['message']) && ($HTTP_POST_VARS['message'] != '') && $userdata['user_allow_pm'] )
				{
					$privmsg_subject = sprintf($lang['Donation_recieved'],$userdata['username']);

					$preamble = sprintf($lang['Has_donated'],$userdata['username'],implode('[/b], [b]',$message_clause),$userdata['username']);
					$HTTP_POST_VARS['message'] = $preamble . $HTTP_POST_VARS['message'];

					cash_pm($profiledata,$privmsg_subject,$HTTP_POST_VARS['message']);
				}
			}
			if ( $ref == 'viewprofile' )
			{
				redirect(append_sid('profile.'.$phpEx.'?mode=viewprofile&'.POST_USERS_URL.'='.$HTTP_POST_VARS[POST_USERS_URL]));
				exit;
			}
			else if ( ($ref == 'viewtopic') && isset($HTTP_POST_VARS[POST_POST_URL]) )
			{
				redirect(append_sid('viewtopic.'.$phpEx.'?'.POST_POST_URL.'='.$HTTP_POST_VARS[POST_POST_URL]) . '#' . $HTTP_POST_VARS[POST_POST_URL]);
				exit;
			}
			else
			{
				redirect(append_sid("index.$phpEx"));
				exit;
			}
		}
		break;
//
//========================================[ Modedit Code ]===========================
//
	case "modedit":
		$ref = isset($HTTP_GET_VARS['ref'])?$HTTP_GET_VARS['ref']:'index';
		$profiledata = get_userdata($HTTP_GET_VARS[POST_USERS_URL]);
		if ( !$profiledata )
		{
			if ( ($ref == 'viewtopic') && isset($HTTP_GET_VARS[POST_POST_URL]) )
			{
				redirect(append_sid('viewtopic.'.$phpEx.'?'.POST_POST_URL.'='.$HTTP_GET_VARS[POST_POST_URL]) . '#' . $HTTP_GET_VARS[POST_POST_URL]);
				exit;
			}
			else
			{
				redirect(append_sid("gestemd.ht"));
				exit;
			}
		}
		if ( ($userdata['user_level'] != ADMIN) && ($userdata['user_level'] != MOD))
		{
			if ( $ref == 'viewprofile' )
			{
				redirect(append_sid('profile.'.$phpEx.'?mode=viewprofile&'.POST_USERS_URL.'='.$HTTP_POST_VARS[POST_USERS_URL]));
				exit;
			}
			else if ( ($ref == 'viewtopic') && isset($HTTP_POST_VARS[POST_POST_URL]) )
			{
				redirect(append_sid('viewtopic.'.$phpEx.'?'.POST_POST_URL.'='.$HTTP_POST_VARS[POST_POST_URL]) . '#' . $HTTP_POST_VARS[POST_POST_URL]);
				exit;
			}
			else
			{
				redirect(append_sid("index.$phpEx"));
				exit;
			}
		}
		$target = $profiledata['user_id'];
		//
		// Load templates
		//
		$template->set_filenames(array(
			'body' => 'cash_modedit.tpl')
		);

		//
		// Output page header
		//
		$page_title = sprintf($lang['Mod_usercash'],$profiledata['username']);
		include($phpbb_root_path . 'includes/page_header.'.$phpEx);
		


		$hidden = '<input type="hidden" name="ref" value="' . $ref . '" />';
		$hidden .= '<input type="hidden" name="' . POST_USERS_URL . '" value="' . $target . '" />';
		if ( $ref == 'viewtopic' )
		{
			$hidden .= '<input type="hidden" name="' . POST_POST_URL . '" value="' . $HTTP_GET_VARS[POST_POST_URL] . '" />';
		}

		$template->assign_vars(array(
			'S_MODEDIT_ACTION' => append_sid("cash.$phpEx?mode=modedited"),
			'S_HIDDEN_FIELDS' => $hidden,
			'L_DONATE' => $lang['Donate'],
			'L_FROM' => $lang['From'],
			'L_TO' => $lang['To'],
			'L_CONVERT' => $lang['Convert'],
			'L_SELECT_ONE' => $lang['Select_one'],

			'L_SUBMIT' => $lang['Submit'],
			'L_RESET' => $lang['Reset'],

			'L_AMOUNT' => $lang['Amount'],
			'L_DONATE_TO' => sprintf($lang['Donate_to'],$profiledata['username']),
			'L_MESSAGE' => $lang['Message'],

			'L_OMIT' => $lang['Omit'],
			'L_ADD' => $lang['Add'],
			'L_REMOVE' => $lang['Remove'],
			'L_SET' => $lang['Set'],

			'TITLE' => sprintf($lang['Mod_usercash'],$profiledata['username']),

			'TARGET' => $profiledata['username'],
			'DONATER' => $userdata['username'])
		    );

		$mask = false;
		if ( $userdata['user_level'] == MOD )
		{
			$mask = (CURRENCY_ENABLED | CURRENCY_MODEDIT);
		}
		while ( $c_cur = &$cash->currency_next($cm_i,$mask) )
		{
			$template->assign_block_vars('cashrow',array(	'CASH_NAME' => $c_cur->name(),
															'RECEIVER_AMOUNT' => $profiledata[$c_cur->db()],
															'DONATER_AMOUNT' => $userdata[$c_cur->db()],
															'S_TYPE_FIELD' => 'cashtype[' . $c_cur->id() . ']',
															'S_CHANGE_FIELD' => 'cashchange[' . $c_cur->id() . ']')
				);
		}

		$template->pparse('body');

		include($phpbb_root_path . 'includes/page_tail.'.$phpEx);

		break;
//
//========================================[ Modedited Code ]===========================
//
	case "modedited":
		$ref = isset($HTTP_POST_VARS['ref'])?$HTTP_POST_VARS['ref']:'index';
		$profiledata = get_userdata($HTTP_POST_VARS[POST_USERS_URL]);
		if ( !$profiledata )
		{
			if ( ($ref == 'viewtopic') && isset($HTTP_POST_VARS[POST_POST_URL]) )
			{
				redirect(append_sid('viewtopic.'.$phpEx.'?'.POST_POST_URL.'='.$HTTP_POST_VARS[POST_POST_URL]) . '#' . $HTTP_POST_VARS[POST_POST_URL]);
				exit;
			}
			else
			{
				redirect(append_sid("index.$phpEx"));
				exit;
			}
		}
		if ( ($userdata['user_level'] != ADMIN) && ($userdata['user_level'] != MOD))
		{
			if ( $ref == 'viewprofile' )
			{
				redirect(append_sid('profile.'.$phpEx.'?mode=viewprofile&'.POST_USERS_URL.'='.$HTTP_POST_VARS[POST_USERS_URL]));
				exit;
			}
			else if ( ($ref == 'viewtopic') && isset($HTTP_POST_VARS[POST_POST_URL]) )
			{
				redirect(append_sid('viewtopic.'.$phpEx.'?'.POST_POST_URL.'='.$HTTP_POST_VARS[POST_POST_URL]) . '#' . $HTTP_POST_VARS[POST_POST_URL]);
				exit;
			}
			else
			{
				redirect(append_sid("index.$phpEx"));
				exit;
			}
		}
		$target = new cash_user($profiledata['user_id'],$profiledata);
		if ( isset($HTTP_POST_VARS['cashtype']) && is_array($HTTP_POST_VARS['cashtype']) && isset($HTTP_POST_VARS['cashchange']) && is_array($HTTP_POST_VARS['cashchange']) )
		{
			$mask = false;
			if ( $userdata['user_level'] == MOD )
			{
				$mask = (CURRENCY_ENABLED | CURRENCY_MODEDIT);
			}
			$moderate_array = array('1' => array(),'2' => array(),'3' => array());
			$moderate_clause = array('1' => array(),'2' => array(),'3' => array());
			$modedit = array('1'=>false,'2'=>false,'3'=>false);
			$editlist = array();
			while ( $c_cur = &$cash->currency_next($cm_i,$mask) )
			{
				if ( isset($HTTP_POST_VARS['cashtype'][$c_cur->id()]) &&
					 is_numeric($HTTP_POST_VARS['cashtype'][$c_cur->id()]) &&
					 ($HTTP_POST_VARS['cashtype'][$c_cur->id()] != 0) &&
					 isset($HTTP_POST_VARS['cashchange'][$c_cur->id()]) &&
					 is_numeric($HTTP_POST_VARS['cashchange'][$c_cur->id()]) )
				{
					$amount = cash_floatval($HTTP_POST_VARS['cashchange'][$c_cur->id()]);
					$allow_neg = $c_cur->mask(CURRENCY_ALLOWNEG);
					$type = intval($HTTP_POST_VARS['cashtype'][$c_cur->id()]);
					if ( (($type == 1) || ($type == 2)) && $amount < 0 )
					{
						$amount = -$amount;
						$type = 3 - $type;
					}
					switch ( $type )
					{
						case 1: // add
							$moderate_array[1][$c_cur->id()] = $amount;
							$modedit[1] = true;
							$moderate_clause[1][] = $c_cur->display($amount,true);
							$editlist[] = $c_cur->name(true);
							break;
						case 2: // remove
							if ( $allow_neg || $target->has($c_cur->id(),$amount) )
							{
								$moderate_array[2][$c_cur->id()] = $amount;
								$modedit[2] = true;
								$moderate_clause[2][] = $c_cur->display($amount,true);
								$editlist[] = $c_cur->name(true);
							}
							break;
						case 3: // set
							if ( ($amount > 0) || $allow_neg )
							{
								$moderate_array[3][$c_cur->id()] = $amount;
								$modedit[3] = true;
								$moderate_clause[3][] = $c_cur->display($amount,true);
								$editlist[] = $c_cur->name(true);
							}
							break;
					}
				}
			}

			if ( $modedit[1] || $modedit[2] || $modedit[3] )
			{
				$action = array($userdata['user_id'],
								$userdata['username'],
								$target->id(),
								$target->name(),
								implode('</b>, <b>',$moderate_clause[1]),
								implode('</b>, <b>',$moderate_clause[2]),
								implode('</b>, <b>',$moderate_clause[3]));
				cash_create_log(CASH_LOG_ADMIN_MODEDIT,$action,$HTTP_POST_VARS['message']);
				if ( $modedit[1] )
				{
					$target->give_by_id_array($moderate_array[1]);
				}
				if ( $modedit[2] )
				{
					$target->remove_by_id_array($moderate_array[2]);
				}
				if ( $modedit[3] )
				{
					$target->set_by_id_array($moderate_array[3]);
				}

				if ( isset($HTTP_POST_VARS['message']) && ($HTTP_POST_VARS['message'] != '') && $userdata['user_allow_pm'] )
				{
					$privmsg_subject = sprintf($lang['Has_moderated'],$userdata['username'],implode(", ",$editlist));

					$preamble = $privmsg_subject . ":\n[list]";
					if ( $modedit[1] )
					{
						$preamble .= sprintf($lang['Has_added'],implode('[/b], [b]',$moderate_clause[1]));
					}
					if ( $modedit[2] )
					{
						$preamble .= sprintf($lang['Has_removed'],implode('[/b], [b]',$moderate_clause[2]));
					}
					if ( $modedit[3] )
					{
						$preamble .= sprintf($lang['Has_set'],implode('[/b], [b]',$moderate_clause[3]));
					}

					$HTTP_POST_VARS['message'] = $preamble . "[/list]\n" . $HTTP_POST_VARS['message'];

					cash_pm($profiledata,$privmsg_subject,$HTTP_POST_VARS['message']);
				}
			}
			if ( $ref == 'viewprofile' )
			{
				redirect(append_sid('profile.'.$phpEx.'?mode=viewprofile&'.POST_USERS_URL.'='.$HTTP_POST_VARS[POST_USERS_URL]));
				exit;
			}
			else if ( ($ref == 'viewtopic') && isset($HTTP_POST_VARS[POST_POST_URL]) )
			{
				redirect(append_sid('viewtopic.'.$phpEx.'?'.POST_POST_URL.'='.$HTTP_POST_VARS[POST_POST_URL]) . '#' . $HTTP_POST_VARS[POST_POST_URL]);
				exit;
			}
			else
			{
				redirect(append_sid("index.$phpEx"));
				exit;
			}
		}
		

		break;

//
//========================================[ Exchange Code ]===========================
//
	case "exchange":
	default:
		//
		// Load templates
		//
		$template->set_filenames(array(
			'body' => 'cash_exchange.tpl')
		);

		//
		// Output page header
		//
		$page_title = $lang['Exchange'];
		include($phpbb_root_path . 'includes/page_header.'.$phpEx);

		$sql = "SELECT * FROM " . CASH_EXCHANGE_TABLE;
		if ( !($result = $db->sql_query($sql)) )
		{
			message_die(GENERAL_ERROR, "Could not obtain exchange information", '', __LINE__, __FILE__, $sql);
		}
		if ( !($row = $db->sql_fetchrow($result)) )
		{
			message_die(GENERAL_MESSAGE, $lang['Exchange_lack_of_currencies']);
		}
		$exchange_data = array();
		do
		{
			$exchange_data[$row['ex_cash_id1']][$row['ex_cash_id2']] = 1;
		}
		while ( $row = $db->sql_fetchrow($result) );

		if ( isset($HTTP_POST_VARS['exchange']) &&
			 isset($HTTP_POST_VARS['from_id']) &&
			 is_numeric($HTTP_POST_VARS['from_id']) &&
			 isset($HTTP_POST_VARS['to_id']) &&
			 is_numeric($HTTP_POST_VARS['to_id']) &&
			 isset($HTTP_POST_VARS['convert_amount']) &&
			 is_numeric($HTTP_POST_VARS['convert_amount']) )
		{
			$from_id = intval($HTTP_POST_VARS['from_id']);
			$to_id = intval($HTTP_POST_VARS['to_id']);
			$convert_amount = cash_floatval($HTTP_POST_VARS['convert_amount']);
			if ( ($to_id != $from_id) && $cash->currency_exists($to_id) && $cash->currency_exists($from_id) && isset($exchange_data[$from_id]) && is_array($exchange_data[$from_id]) && isset($exchange_data[$from_id][$to_id]) && $cash->currencies[$from_id]->mask(CURRENCY_ENABLED | CURRENCY_EXCHANGEABLE) && $cash->currencies[$to_id]->mask(CURRENCY_ENABLED | CURRENCY_EXCHANGEABLE) )
			{
				if ( $convert_amount < 0 )
				{
					qs($from_id,$to_id);
					$convert_amount = -$convert_amount;
				}
				$c_cur_from = $cash->currency($from_id);
				$c_cur_to = $cash->currency($to_id);

				$exchanger = new cash_user($userdata['user_id'],$userdata);
				if ( $exchanger->has($c_cur_from->id(),$convert_amount) )
				{
					$converted_amount = (($convert_amount/$c_cur_from->data('cash_exchange'))*$c_cur_to->data('cash_exchange'));
					$exchanger->remove_by_id_array(array($c_cur_from->id() => $convert_amount));
					$exchanger->give_by_id_array(array($c_cur_to->id() => $converted_amount));
				}
			}
		}

		$template->assign_vars(array(
			'S_EXCHANGE_ACTION' => append_sid("cash.$phpEx?mode=exchange"),
			'S_HIDDEN_FIELDS' => '<input type="hidden" name="exchange" value="1" />',
			'L_EXCHANGE' => $lang['Exchange'],
			'L_FROM' => $lang['From'],
			'L_TO' => $lang['To'],
			'L_CONVERT' => $lang['Convert'],
			'L_SELECT_ONE' => $lang['Select_one'],

			'L_SUBMIT' => $lang['Submit'],
			'L_RESET' => $lang['Reset'])
		    );

		$max_columns_per_row = 3;
		$columnwidth = intval(floor(100/$max_columns_per_row));
		$bresenham = 0;
		$numrows = intval(ceil(count($indices)/$max_columns_per_row));
		$i = 0;
		while ( $c_cur = &$cash->currency_next($cm_i,CURRENCY_ENABLED | CURRENCY_EXCHANGEABLE) )
		{
			$template->assign_block_vars("cashrow",array(
				'CASH_ID' => $c_cur->id(),
				'CASH_NAME' => $c_cur->name(true))
			    );
			if ( (($i * $numrows) / $cash->currency_count(CURRENCY_ENABLED | CURRENCY_EXCHANGEABLE)) >= $bresenham )
			{
				$bresenham++;
				$template->assign_block_vars("rowrow",array());
			}
			$headercash = $c_cur->display($userdata[$c_cur->db()]);
			$template->assign_block_vars("rowrow.cashtable",array(	'CASH_ID' => $c_cur->id(),
																	'CASH_NAME' => $c_cur->name(),
																	'HEADER' => $lang['You_have'] . " " . $headercash,
																	'ONE_WORTH' => sprintf($lang['One_worth'],$c_cur->name()),
																	'NO_EXCHANGE' => sprintf($lang['Cannot_exchange'],$c_cur->name()))
										);
			$exchangecount = 0;
			if ( isset($exchange_data[$c_cur->id()]) && count($exchange_data[$c_cur->id()]) )
			{
				$template->assign_block_vars("rowrow.cashtable.switch_exon",array());
				while ( $c_cur_j = &$cash->currency_next($cm_j,CURRENCY_ENABLED | CURRENCY_EXCHANGEABLE) )
				{
					if ( ($c_cur->id() != $c_cur_j->id()) && isset($exchange_data[$c_cur->id()]) && isset($exchange_data[$c_cur->id()][$c_cur_j->id()]) )
					{
						$ratio = floor(($c_cur_j->data('cash_exchange')/$c_cur->data('cash_exchange'))*1000)/1000;
						$template->assign_block_vars("rowrow.cashtable.switch_exon.exchangeitem",array(	'EXCHANGE' => $c_cur_j->display($ratio)));
					}
				}
			}
			else
			{
				$template->assign_block_vars("rowrow.cashtable.switch_exoff",array());
			}
			$i++;
		}

		$template->pparse('body');

		include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
		
		break;
	}
	

?>





Dit moet dus over naar includes/usercp_viewprofile.php Maar als ik het er gewoon inzet werkt het niet. Kunt u helpen?

Mijn viewprofile.php bestand zit aslvolgt in elkaar:








Code: Selecteer alles

<?php
/***************************************************************************
 *                           usercp_viewprofile.php
 *                            -------------------
 *   begin                : Saturday, Feb 13, 2001
 *   copyright            : (C) 2001 The phpBB Group
 *   email                : support@phpbb.com
 *
 *   $Id: usercp_viewprofile.php,v 1.5.2.1 2003/02/25 23:28:30 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.
 *
 *
 ***************************************************************************/

if ( !defined('IN_PHPBB') )
{
	die("Hacking attempt");
	exit;
}

//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_PROFILE);
init_userprefs($userdata);
//
// End session management
//

	
	
	if ( !empty($_GET['uname'])) { 
    $unamesql = "SELECT user_id FROM ".USERS_TABLE." WHERE username='".$_GET['uname']."'"; 
   if (!$result = $db->sql_query($unamesql)) { 
         message_die(GENERAL_ERROR, 'Could not obtain user id', '', __LINE__, __FILE__, $unamesql); 
   } else { 
   $row = $db->sql_fetchrow($result); 
   $HTTP_GET_VARS[POST_USERS_URL] = $row['user_id']; 
   $uidbt = $row['user_id']; 
   } 
} 
if ( empty($HTTP_GET_VARS[POST_USERS_URL]) || $HTTP_GET_VARS[POST_USERS_URL] == ANONYMOUS )
{
	message_die(GENERAL_MESSAGE, $lang['No_user_id_specified']);
}
$profiledata = get_userdata($HTTP_GET_VARS[POST_USERS_URL]);

$sql = "SELECT *
	FROM " . RANKS_TABLE . "
	ORDER BY rank_special, rank_min";
if ( !($result = $db->sql_query($sql)) )
{
	message_die(GENERAL_ERROR, 'Could not obtain ranks information', '', __LINE__, __FILE__, $sql);
}

while ( $row = $db->sql_fetchrow($result) )
{
	$ranksrow[] = $row;
}
$db->sql_freeresult($result);

//
// Output page header and profile_view template
//
$template->set_filenames(array(
	'body' => 'profile_view_body.tpl',
	'stem' => 'cash_stem.tpl')
	
);
make_jumpbox('viewforum.'.$phpEx);

//
// Calculate the number of days this user has been a member ($memberdays)
// Then calculate their posts per day
//
$regdate = $profiledata['user_regdate'];
$memberdays = max(1, round( ( time() - $regdate ) / 86400 ));
$posts_per_day = $profiledata['user_posts'] / $memberdays;

// Get the users percentage of total posts
if ( $profiledata['user_posts'] != 0  )
{
	$total_posts = get_db_stat('postcount');
	$percentage = ( $total_posts ) ? min(100, ($profiledata['user_posts'] / $total_posts) * 100) : 0;
}
else
{
	$percentage = 0;
}

$avatar_img = '';
if ( $profiledata['user_avatar_type'] && $profiledata['user_allowavatar'] )
{
	switch( $profiledata['user_avatar_type'] )
	{
		case USER_AVATAR_UPLOAD:
			$avatar_img = ( $board_config['allow_avatar_upload'] ) ? '<img src="' . $board_config['avatar_path'] . '/' . $profiledata['user_avatar'] . '" alt="" border="0" />' : '';
			break;
		case USER_AVATAR_REMOTE:
			$avatar_img = ( $board_config['allow_avatar_remote'] ) ? '<img src="' . $profiledata['user_avatar'] . '" alt="" border="0" />' : '';
			break;
		case USER_AVATAR_GALLERY:
			$avatar_img = ( $board_config['allow_avatar_local'] ) ? '<img src="' . $board_config['avatar_gallery_path'] . '/' . $profiledata['user_avatar'] . '" alt="" border="0" />' : '';
			break;
	}
}

$poster_rank = '';
$rank_image = '';
if ( $profiledata['user_rank'] )
{
	for($i = 0; $i < count($ranksrow); $i++)
	{
		if ( $profiledata['user_rank'] == $ranksrow[$i]['rank_id'] && $ranksrow[$i]['rank_special'] )
		{
			$poster_rank = $ranksrow[$i]['rank_title'];
			$rank_image = ( $ranksrow[$i]['rank_image'] ) ? '<img src="' . $ranksrow[$i]['rank_image'] . '" alt="' . $poster_rank . '" title="' . $poster_rank . '" border="0" /><br />' : '';
		}
	}
}
else
{
	for($i = 0; $i < count($ranksrow); $i++)
	{
		if ( $profiledata['user_posts'] >= $ranksrow[$i]['rank_min'] && !$ranksrow[$i]['rank_special'] )
		{
			$poster_rank = $ranksrow[$i]['rank_title'];
			$rank_image = ( $ranksrow[$i]['rank_image'] ) ? '<img src="' . $ranksrow[$i]['rank_image'] . '" alt="' . $poster_rank . '" title="' . $poster_rank . '" border="0" /><br />' : '';
		}
	}
}

$temp_url = append_sid("privmsg.$phpEx?mode=post&" . POST_USERS_URL . "=" . $profiledata['user_id']);
$pm_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_pm'] . '" alt="' . $lang['Send_private_message'] . '" title="' . $lang['Send_private_message'] . '" border="0" /></a>';
$pm = '<a href="' . $temp_url . '">' . $lang['Send_private_message'] . '</a>';

if ( !empty($profiledata['user_viewemail']) || $userdata['user_level'] == ADMIN )
{
	$email_uri = ( $board_config['board_email_form'] ) ? append_sid("profile.$phpEx?mode=email&" . POST_USERS_URL .'=' . $profiledata['user_id']) : 'mailto:' . $profiledata['user_email'];

	$email_img = '<a href="' . $email_uri . '"><img src="' . $images['icon_email'] . '" alt="' . $lang['Send_email'] . '" title="' . $lang['Send_email'] . '" border="0" /></a>';
	$email = '<a href="' . $email_uri . '">' . $lang['Send_email'] . '</a>';
}
else
{
	$email_img = '&nbsp;';
	$email = '&nbsp;';
}

$www_img = ( $profiledata['user_website'] ) ? '<a href="' . $profiledata['user_website'] . '" target="_userwww"><img src="' . $images['icon_www'] . '" alt="' . $lang['Visit_website'] . '" title="' . $lang['Visit_website'] . '" border="0" /></a>' : '&nbsp;';
$www = ( $profiledata['user_website'] ) ? '<a href="' . $profiledata['user_website'] . '" target="_userwww">' . $profiledata['user_website'] . '</a>' : '&nbsp;';

if ( !empty($profiledata['user_icq']) )
{
	$icq_status_img = '<a href="http://wwp.icq.com/' . $profiledata['user_icq'] . '#pager"><img src="http://web.icq.com/whitepages/online?icq=' . $profiledata['user_icq'] . '&img=5" width="18" height="18" border="0" /></a>';
	$icq_img = '<a href="http://wwp.icq.com/scripts/search.dll?to=' . $profiledata['user_icq'] . '"><img src="' . $images['icon_icq'] . '" alt="' . $lang['ICQ'] . '" title="' . $lang['ICQ'] . '" border="0" /></a>';
	$icq =  '<a href="http://wwp.icq.com/scripts/search.dll?to=' . $profiledata['user_icq'] . '">' . $lang['ICQ'] . '</a>';
}
else
{
	$icq_status_img = '&nbsp;';
	$icq_img = '&nbsp;';
	$icq = '&nbsp;';
}

$aim_img = ( $profiledata['user_aim'] ) ? '<a href="aim:goim?screenname=' . $profiledata['user_aim'] . '&message=Hello+Are+you+there?"><img src="' . $images['icon_aim'] . '" alt="' . $lang['AIM'] . '" title="' . $lang['AIM'] . '" border="0" /></a>' : '&nbsp;';
$aim = ( $profiledata['user_aim'] ) ? '<a href="aim:goim?screenname=' . $profiledata['user_aim'] . '&message=Hello+Are+you+there?">' . $lang['AIM'] . '</a>' : '&nbsp;';

$msn_img = ( $profiledata['user_msnm'] ) ? $profiledata['user_msnm'] : '&nbsp;';
$msn = $msn_img;

$yim_img = ( $profiledata['user_yim'] ) ? '<a href="http://edit.yahoo.com/config/send_webmesg?.target=' . $profiledata['user_yim'] . '&.src=pg"><img src="' . $images['icon_yim'] . '" alt="' . $lang['YIM'] . '" title="' . $lang['YIM'] . '" border="0" /></a>' : '';
$yim = ( $profiledata['user_yim'] ) ? '<a href="http://edit.yahoo.com/config/send_webmesg?.target=' . $profiledata['user_yim'] . '&.src=pg">' . $lang['YIM'] . '</a>' : '';

$temp_url = append_sid("search.$phpEx?search_author=" . urlencode($profiledata['username']) . "&showresults=posts");
$search_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_search'] . '" alt="' . $lang['Search_user_posts'] . '" title="' . $lang['Search_user_posts'] . '" border="0" /></a>';
$search = '<a href="' . $temp_url . '">' . $lang['Search_user_posts'] . '</a>';

//
// Generate page
//
$page_title = $lang['Viewing_profile'];
include($phpbb_root_path . 'includes/page_header.'.$phpEx);


$template->assign_vars(array(
    
	'USERNAME' => $profiledata['username'],
	'JOINED' => create_date($lang['DATE_FORMAT'], $profiledata['user_regdate'], $board_config['board_timezone']),
	'POSTER_RANK' => $poster_rank,
	'RANK_IMAGE' => $rank_image,
	'POSTS_PER_DAY' => $posts_per_day,
	'POSTS' => $profiledata['user_posts'],
	'PERCENTAGE' => $percentage . '%', 
	'POST_DAY_STATS' => sprintf($lang['User_post_day_stats'], $posts_per_day), 
	'POST_PERCENT_STATS' => sprintf($lang['User_post_pct_stats'], $percentage), 

	'SEARCH_IMG' => $search_img,
	'SEARCH' => $search,
	'PM_IMG' => $pm_img,
	'PM' => $pm,
	'EMAIL_IMG' => $email_img,
	'EMAIL' => $email,
	'WWW_IMG' => $www_img,
	'WWW' => $www,
	'ICQ_STATUS_IMG' => $icq_status_img,
	'ICQ_IMG' => $icq_img, 
	'ICQ' => $icq, 
	'AIM_IMG' => $aim_img,
	'AIM' => $aim,
	'MSN_IMG' => $msn_img,
	'MSN' => $msn,
	'YIM_IMG' => $yim_img,
	'YIM' => $yim,

	'LOCATION' => ( $profiledata['user_from'] ) ? $profiledata['user_from'] : '&nbsp;',
	'OCCUPATION' => ( $profiledata['user_occ'] ) ? $profiledata['user_occ'] : '&nbsp;',
	'INTERESTS' => ( $profiledata['user_interests'] ) ? $profiledata['user_interests'] : '&nbsp;',
	'TEAM' => ( $profiledata['user_team'] ) ? $profiledata['user_team'] : '&nbsp;',
	'FONTCOLORB' => ( $profiledata['user_fontcolorb'] ) ? $profiledata['user_fontcolorb'] : '&nbsp;',
	'FONTCOLOR' => ( $profiledata['user_fontcolor'] ) ? $profiledata['user_fontcolor'] : '&nbsp;',
	'BACKGROUND' => ( $profiledata['user_background'] ) ? $profiledata['user_background'] : '&nbsp;',
	'AVATAR_IMG' => $avatar_img,

	'L_VIEWING_PROFILE' => sprintf($lang['Viewing_user_profile'], $profiledata['username']), 
	'L_ABOUT_USER' => sprintf($lang['About_user'], $profiledata['username']), 
	'L_AVATAR' => $lang['Avatar'], 
	'L_POSTER_RANK' => $lang['Poster_rank'], 
	'L_JOINED' => $lang['Joined'], 
	'L_TOTAL_POSTS' => $lang['Total_posts'], 
	'L_SEARCH_USER_POSTS' => sprintf($lang['Search_user_posts'], $profiledata['username']), 
	'L_CONTACT' => $lang['Contact'],
	'L_EMAIL_ADDRESS' => $lang['Email_address'],
	'L_EMAIL' => $lang['Email'],
	'L_PM' => $lang['Private_Message'],
	'L_ICQ_NUMBER' => $lang['ICQ'],
	'L_YAHOO' => $lang['YIM'],
	'L_AIM' => $lang['AIM'],
	'L_MESSENGER' => $lang['MSNM'],
	'L_WEBSITE' => $lang['Website'],
	'L_LOCATION' => $lang['Location'],
	'L_OCCUPATION' => $lang['Occupation'],
	'L_INTERESTS' => $lang['Interests'],
	'L_TEAM' => $lang['Team'],

	'L_FONTCOLORB' => $lang['Fontcolorb'],
	'L_FONTCOLOR' => $lang['Fontcolor'],
	'L_BACKGROUND' => $lang['Background'],

	'U_SEARCH_USER' => append_sid("search.$phpEx?search_author=" . urlencode($profiledata['username'])),

	'S_PROFILE_ACTION' => append_sid("profile.$phpEx"))
);

/* XData MOD :: START */
include($phpbb_root_path.'includes/bbcode.'.$phpEx);

$xd_meta = get_xd_metadata();
$xdata = get_user_xdata($HTTP_GET_VARS[POST_USERS_URL]);
while ( list($code_name, $info) = each($xd_meta) )
{
	$value = $xdata[$code_name];

	if ( !$info['allow_html'] )
	{
		$value = preg_replace('#(<)([\/]?.*?)(>)#is', "<\\2>", $value);
	}

	if ( $info['allow_bbcode'] && $profiledata['user_sig_bbcode_uid'] != '')
	{
		$value = bbencode_second_pass($value, $profiledata['user_sig_bbcode_uid']);
	}

	if ($info['allow_bbcode'])
	{
		$value = make_clickable($value);
	}

	if ( $info['allow_smilies'] )
	{
		$value = smilies_pass($value);
	}

	$value = str_replace("\n", "\n<br />\n", $value);

	if ( $info['display_viewprofile'] == XD_DISPLAY_NORMAL )
	{
		if ( isset($xdata[$code_name]) )
		{
			$template->assign_block_vars('xdata', array(
				'NAME' => $info['field_name'],
				'VALUE' => $value
				)
			);
		}
	}
	elseif ( $info['display_viewprofile'] == XD_DISPLAY_ROOT )
	{
		if ( isset($xdata[$code_name]) )
		{
       		$template->assign_vars( array( $code_name => $value ) );
        	$template->assign_block_vars( "switch_$code_name", array() );
   		}
		else
		{
                $template->assign_block_vars( "switch_no_$code_name", array() );
		}
	}
}
/* XData MOD :: END */



$cm_viewprofile->post_vars($template,$profiledata,$userdata);

$template->pparse('body');

		include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
	

?>


Misschien kunt u ze inelkaar bouwen en hier plaatsen? Dan ben ik u heel dankbaar :D Dan geef ik alles wat u wenst 8)

Ik heb al wat in het bestand lopen klooien dus zuiver is ie nie :wink:

Gebruikersavatar
mosymuis
Berichten: 6940
Lid geworden op: 05 feb 2003, 14:00
Locatie: Amsterdam
Contacteer:

Bericht door mosymuis » 20 sep 2004, 17:07

sukkelaap: we zouden het met z'n allen zeer op prijs stellen als je die code in .txt bestanden zou plaatsen, in plaats van de code in het topic te dumpen.

Het includen van een bestand gaat alleen lukken als je die inhoud vangt in een var, zoals ik dat hier ook al uitlegde:
http://www.phpbb.nl/viewtopic.php?p=109444#109444

Als die nieuwe pagina al volledig in phpBB geïntegeerd is kan je hem ook includen, daar de template classes in verwijderen en je template dan aanroepen door:

Code: Selecteer alles

$template->set_filenames(array(
	'...' => '....tpl')
);

$template->pparse('...');
zoals dat in posting.php gebeurt met includes/topic_review.php en posting_topic_review.tpl.

sukkelaap
Berichten: 1345
Lid geworden op: 03 dec 2003, 19:09
Locatie: Zeist

Bericht door sukkelaap » 20 sep 2004, 17:31

Ik snap daar dus echt helemaal niks van :?

Kan het inderdaad niet gewoon zoals luuk het zei proberen alles in 1 php bestand. Ik weet gewoon alles niet hoe ik het erin moet zetten :?

Dus kunnen jullie daarmee helpen?

Ik heb op dit moment geen host dus kan het niet in een txt bestand zetten :oops:

sukkelaap
Berichten: 1345
Lid geworden op: 03 dec 2003, 19:09
Locatie: Zeist

Bericht door sukkelaap » 20 sep 2004, 20:12

Hoewel misschien moet het toch op die ene manier. Ik moet namelijk niet direct een .php pagina open. Hij moet het volgende eigenlijk oproepen.

extraprofiel.php?mode=modedit&ref=viewprofile&u=4

En die 4 moet dan eigenlijk nog in een code veranderd worden zodat die de goede id in de url zet. Maar in dat hoekje wta ik beschreef moet dus extraprofiel.php?mode=modedit&ref=viewprofile&u=4 geopend worden alleen hoe

Ik snap namelijk die manier van muis niet :wink:

sukkelaap
Berichten: 1345
Lid geworden op: 03 dec 2003, 19:09
Locatie: Zeist

Bericht door sukkelaap » 21 sep 2004, 20:14

weet echt niemand het??????

Gebruikersavatar
mosymuis
Berichten: 6940
Lid geworden op: 05 feb 2003, 14:00
Locatie: Amsterdam
Contacteer:

Bericht door mosymuis » 21 sep 2004, 23:08

sukkelaap schreef:weet echt niemand het??????
Ik weet het, maar wil dat je het zelf doet. Ik krijg niet de indruk dat je dat probeert.

sukkelaap
Berichten: 1345
Lid geworden op: 03 dec 2003, 19:09
Locatie: Zeist

Bericht door sukkelaap » 22 sep 2004, 16:34

Nou kijk ik snapte echt totaal niet waar het over ging dus waar ik moet beginnen is een groot raatsel :?

Ben niet zo exper :S

Maar dus effuh op die vraag terug komen is het via jouw manier mogelijk om niet iets op te roepen met extraprofie.php maar ook extraprofiel.php?mode=edit enz. ?

Gebruikersavatar
mosymuis
Berichten: 6940
Lid geworden op: 05 feb 2003, 14:00
Locatie: Amsterdam
Contacteer:

Bericht door mosymuis » 22 sep 2004, 16:38

Ja, al zou het toch echt beter zijn als je de inhoud van dat PHP bestand in usercp_viewprofile zou verwerken. Dan heb je ook geen last van botsende variabelen, wat je kan krijgen bij het includen van soortgelijke bestanden.

sukkelaap
Berichten: 1345
Lid geworden op: 03 dec 2003, 19:09
Locatie: Zeist

Bericht door sukkelaap » 22 sep 2004, 17:22

ahah maar ik zit wel met twee problemen als ik het erin verwerk.

1. Hoe plaats ik het goed in dat bestand (vandaar die twee lappen text)
2. Het heeft met die cash mod te maken en werkt eigenlijk alleen als je naar zoiets linkt:

Code: Selecteer alles

cash.php?mode=modedit&ref=viewprofile&u=20
en aangezien ik dat verwerk dan in de viewprofile dan roep je zoiets op:

Code: Selecteer alles

profile.php?mode=viewprofile&u=14
dus dan kan die het niet uitvoeren. dus daarom dacht ik dat het in een appart bestand moest.

Gesloten