[TYPO3] Front End Plugin develop within template selection campacity

Rocky Ou rockyo at max-source.com
Fri Nov 10 07:54:38 CET 2006


Rocky wrote:
> Hey List,
> 
> It would be extremely easy if knows how. Please bear me as a newbie in 
> TYPO3 extension building area.
> 
> I know I can put the CSS style and HTML tag in $content of the 
> pi1/class.ext.php file. And the CSS will change the presentation of the 
> element thrown out by my extension at Front End. It means each time if I 
> want to change the presentation of the extension rendered content I need 
> to edit the pi1/class.ext.php. Can any of you give me a hint on how can 
> I code my EXT to use a template html file in charge of the EXT's 
> presentation in Front End please?
> 
> Thanks in advance!
> Rocky

Ok to be more specific. I'm writing an extension to collect client's 
information and write it into database. Instead of putting the form 
source code in $content of pi1/class.ext.php I want to use an external 
HTML so that the user of the EXT can collect whatever information he/she 
want simply by providing his/her own HTML form template. Right now the 
code looks like this

function formrender(){
	...
	<input type="text" name="'.$this->prefixId.'[DATA][uname]">
	...
}

function datawriter(){
....
  	$instQury='INSERT INTO '.$this->tablecl.'  (uname) VALUES 			 
("'.addslashes($this->piVars['DATA']['uname']).'")';
	 $result=mysql_query($instQury);
...
}

Another question is that there are several forms(e.g. 1 for collecting 
user's information, one for writing comments for the user etc.) I need 
to render in the front end. Is that possible I can use one HTML template 
for one form. Is this doable?

I'm quite new to EXT development. If any of you could give me some hint, 
I would really appreciate it?

Thanks a lot in advance!

Rocky Ou



More information about the TYPO3-english mailing list