[TYPO3-project-formidable] Formidable edit in list using a modalbox in the Backend - Does not work!

Hauke Hain newgrp at googlemail.com
Fri Mar 6 19:59:26 CET 2009


Do you have any idea how I can get formidable work in another file than the
index.php?

I tried inserting extends t3lib_SCbase
and require_once(PATH_t3lib.'class.t3lib_scbase.php');
but it doesn't worked.

Kind regards,
Hauke

"Hauke Hain" <newgrp at googlemail.com> schrieb im Newsbeitrag 
news:mailman.1.1235571057.2617.typo3-project-formidable at lists.netfielders.de...
> Hi Jerome,
>
> I started it with the kickstarter, but I had to make a few changed to the 
> way a backend module worked in older times.
> Here the new method is decribed (what you have to replace from the old 
> one) and I changed my module juse backwards: the new to the old: 
> http://bugs.typo3.org/view.php?id=5278
>
> Ups, almost fortgot to say: I splitted my backend module to more than one 
> file.
>
> In my index.php file I get the $content with my own function:
>
> class tx_preview_module1 extends t3lib_SCbase {
> //some code
>
> function moduleContent() {
>   global $LANG;
>
>   switch((string)$this->MOD_SETTINGS['function']) {
>    case 1:
>    $content .= $this->previews();
>    $this->content .= $this->doc->section($LANG->getLL('menu.group').':', 
> $content, 0, 1);
>    break;
>   }
>  }
>
>  /**
>  * Displays the 'previews' module. See mod1/class.tx_preview_peviews.php
>  * @return  string module content.
>  */
>  function previews() {
>   $previews = t3lib_div::makeInstance('tx_preview_previews');
>   $previews->p = $this;
>   return $previews->main('');
>  }
> //some code
> }
>
>
> I inserted the code of my last mail in the index.php and it works. Too bad 
> that I hadn't thought about that.
>
>
> Do you have any idea how I can get it work in another file than the 
> index.php?
>
> I tried inserting extends t3lib_SCbase
> and require_once(PATH_t3lib.'class.t3lib_scbase.php');
> but it doesn't worked.
>
> Thank you for all your help,
> Hauke
>
> "Jerome Schneider" <typo3dev at ameos.com> schrieb im Newsbeitrag 
> news:mailman.1.1235568851.23419.typo3-project-formidable at lists.netfielders.de...
>> Hi Hauke,
>>
>> could you tell me how you execute your module in the typo3 bakend ? is it 
>> a standard PHP module as the kickstarter produces ?
>>
>> I noticed that my BE modules all extend the t3lib_SCbase class.
>>
>> Regards,
>> Jerome
>>
>> Hauke Hain a écrit :
>>> No, I haven't. Maybe it's to obvisious that I do not see it (but I have 
>>> to admit, that I woked with the tinymce renderlet and captcha in a 
>>> frontend module in the last days instead of the backend module).
>>>
>>> My sourcecode looks like this and no JavaScript works:
>>>
>>> class tx_preview_reviews {
>>>  function main() {
>>>   $this->init();
>>>
>>>    $content .= '<div><a href="index.php?tx_preview_previews[user]=1"
>>> '.($this->instVars['user']<>2 ?
>>> 'style="font-weight:bold;"':'').'>'.$GLOBALS['LANG']->getLL('user.notPublished').'</a>&nbsp;|&nbsp;'; 
>>> $content .= '<a href="index.php?tx_preview_previews[user]=2"
>>> '.($this->instVars['user']==2 ?
>>> 'style="font-weight:bold;"':'').'>'.$GLOBALS['LANG']->getLL('user.all').'</a>'; 
>>> $content .= '</div><hr>';
>>>    $content .= '<input type="hidden" name="tx_preview_previews[user]"
>>> value="'.$this->instVars['user'].'" />';
>>>
>>>    if ($this->instVars['user']==2) {
>>>      $this->oForm->init(
>>>       $this, // reference to the current plugin object
>>>       "EXT:preview/res/xml/EditAll.xml" // soft-path to xml file
>>>        );
>>>      }
>>>      else {
>>>        $this->oForm->init(
>>>       $this, // reference to the current plugin object
>>>       "EXT:preview/res/xml/pi1.xml" // soft-path to xml file
>>>        );
>>>      }
>>>
>>>      $content.=$this->oForm->render();
>>>      tx_ameosformidable::backendHeaders(&$this);
>>>    return $content;
>>>  }
>>>
>>> /**
>>>  * Initializes the installation module.
>>>  *
>>>  * @return void
>>>  */
>>>  function init() {
>>>   $this->instVars = t3lib_div::_GP('tx_preview_reviews');
>>>   $this->conf = $this->p->config['plugin.']['tx_preview.'];
>>>
>>> $GLOBALS['LANG']->includeLLFile('EXT:preview/mod1/locallang_reviews.xml');
>>>      $this->oForm = t3lib_div::makeInstance("tx_ameosformidable");
>>>  }
>>> }
>>>
>>> Do you why this happens? I added
>>> tx_ameosformidable::backendHeaders($this);
>>> but it does not help...
>>>
>>> Hauke
>>>
>>> "Jerome Schneider" <typo3dev at ameos.com> schrieb im Newsbeitrag 
>>> news:mailman.1.1235552435.5056.typo3-project-formidable at lists.netfielders.de...
>>>> Have you finaly managed to have the modalbox working in the backend ?
>>>
> 



More information about the TYPO3-project-formidable mailing list