[TYPO3-english] data['media'] and image thumbnails

Sten Gruener sten.gruener at gmail.com
Sat Feb 14 17:55:55 CET 2009


Hello,

thanks for clues ;) Can you also provide me a clue about handling
thumbnails? ;)

Thank you,
Sten

2009/2/13 Xavier Perseguers <typo3 at perseguers.ch>

> Hi Sten,
>
> > I'm sorry for being a noob. This is my problem, I`d like to have a
> > micro-gallery extension. My approach is: edit the subtemplate to generate
> a
> > TS element and embedd it on the page using tscobj extension.
> > The template:
> >
> > includeLibs.test_library = fileadmin/test_library.php
> > temp.output = USER
> > temp.output.userFunc = user_test_library_class->test
> >
> > php.output < temp.output
>
> Why not creating a real extension? It's easy with kickstarter.
>
> > Now inside of the php file I`d like to access 'media' propery of the page
> to
> > read it`s images. $this->cObj->data['media'] was empty because I use
> > templavoila. I solved it with this hacky mehtod:
> >
> > $query = "SELECT media FROM pages WHERE uid = "
> .$this->cObj->data['pid'];
> > $res = mysql(TYPO3_db,$query);
> > $row = mysql_fetch_row($res);
> > return $row[0];
> >
> > It works, but I wonder if there is a better solution then that.
>
> - There's a whole documentation on backend programming, you may find
> useful to read it.
>
> - Do not use double quotes when single quotes suffices
>
> - Never use mysql* functions directly, use t3lib_BEfunc static methods
> or $GLOBALS['TYPO3_DB']
>
> - t3lib_pageSelect has some methods for dealing with pages that may help
> you
>
> Regards
>
> --
> Xavier Perseguers
> http://xavier.perseguers.ch/en
>
> One contribution a day keeps the fork away
> _______________________________________________
> TYPO3-english mailing list
> TYPO3-english at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english
>


More information about the TYPO3-english mailing list