php - Hilfe [beantwortet]

Moderator: Sisko1990

Forum rules
Forumregeln
Locked
User avatar
jgobiz
Joomla! Explorer
Joomla! Explorer
Posts: 311
Joined: Fri Aug 19, 2005 12:14 am
Location: Bremerhaven - Germany
Contact:

php - Hilfe [beantwortet]

Post by jgobiz » Sat Sep 03, 2005 8:29 pm

Joomla!

kann mir dabei vielleicht jemand von Euch helfen? Danke ;)

http://forum.opensourcematters.org/inde ... 153.0.html
Joomla!

I want to be able to do a selection of the integration mode (include or iframe) in the modul-backend. Does someone have a suggestion on how to do that in the php-file of the module?

Thanks for your help ;D

Best regards,

Joern

Module:

Code: Select all

<?php
defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
global $_CONFIG, $_LANG;
$params->def( 'path', '' );
$params->def( 'parameter1', '' );
$params->def( 'parameter2', '' );
?>
<div>
	<iframe
	...
	src="<?php echo $params->get( 'path' ); ?>?file=<?php echo $params->get( 'parameter1' ); ?>&folder=<?php echo $params->get( 'parameter2' ); ?>">
	</iframe>
</div>
Path means a file e.g. joomla!root/directory/directory/file.php

The normal include is possible as follows:

Code: Select all

session_start();
$file="parameter1";
$folder="parameter2";
include("path");

Herzliche Grüsse

Jörn
Last edited by jgobiz on Sun Sep 04, 2005 2:36 am, edited 1 time in total.

 
User avatar
jgobiz
Joomla! Explorer
Joomla! Explorer
Posts: 311
Joined: Fri Aug 19, 2005 12:14 am
Location: Bremerhaven - Germany
Contact:

php - Hilfe [beantwortet]

Post by jgobiz » Sun Sep 04, 2005 2:35 am

Code: Select all

<?php
switch ($i):
case 0:
   echo "i ist gleich 0";
   break;
case 1:
   echo "i ist gleich 1";
   break;
case 2:
   echo "i ist gleich 2";
   break;
default:
   echo "i ist weder 0, 1 noch 2";
endswitch;
?> 

 

Locked

Return to “Komponenten, Module, Mambots 1.0.x”