typolink über eid

  • esman esman
    TYPO3-Anwärter
    0 x
    4 Beiträge
    0 Hilfreiche Beiträge
    13. 09. 2008, 19:13

    Ich hole eine seite vom server mit hilfe von ajax und eid.
    Das script das ich aufrufe soll unter anderem einen typolink generieren.

    Mein Problem ist das ich einen typolink für die defaultsprache bekomme. Ich möchte jetzt aber einen für, z.B. Deutsch, haben. #angry#

    was bis jetzt funktioniert:
    - ich habe eine Verbindung zur Datenbank
    - habe den fe_user geladen
    - kann links erzeugen (nur immer in der defaultsprache)

    kann mir jemand helfen ??


  • nixda nixda
    Typ im Roten Hemd
    0 x
    3 Beiträge
    0 Hilfreiche Beiträge
    12. 03. 2009, 16:36

    Frage: Hat jemand im Zusammenhang mit eID und TypoLink schon mal folgende Fehlermeldung gesehen ? Typo3 4.2.6

    1. Fatal error: Call to a member function getPage_noCheck() on a non-object in
    2. [...Path...]/typo3/sysext/cms/tslib/class.tslib_content.php on line 5200

  • 0 x
    11 Beiträge
    0 Hilfreiche Beiträge
    24. 11. 2011, 15:03

    [quote="nixda"]
    Frage: Hat jemand im Zusammenhang mit eID und TypoLink schon mal folgende Fehlermeldung gesehen ? Typo3 4.2.6

    1. Fatal error: Call to a member function getPage_noCheck() on a non-object in
    2. [...Path...]/typo3/sysext/cms/tslib/class.tslib_content.php on line 5200

    [/quote]

    Ich suche für CoolURL einen code. Hier mal ein all-inclusive code für RealUrl:

    1. <?php
    2.  
    3. require_once(PATH_tslib.'class.tslib_pibase.php');
    4.  
    5. class tx_myext_eID extends tslib_pibase{
    6.  
    7. function init(){
    8.  
    9. require_once(PATH_tslib.'class.tslib_content.php');
    10. require_once(PATH_t3lib.'class.t3lib_page.php');
    11. require_once(t3lib_extMgm::extPath('realurl').'class.tx_realurl.php');
    12. tslib_eidtools::connectDB();
    13. $this->realurl = t3lib_div::makeInstance('tx_realurl');
    14. $GLOBALS['TSFE']->sys_page = t3lib_div::makeInstance('t3lib_pageSelect');
    15. $GLOBALS['TSFE']->tmpl = t3lib_div::makeInstance('t3lib_TStemplate');
    16. $GLOBALS['TSFE']->config['config']['tx_realurl_enable'] = 1;
    17. $this->cObj = t3lib_div::makeInstance('tslib_cObj');
    18.  
    19. }
    20.  
    21. function main(){
    22. $this->init();
    23. // .. add you functionality here
    24. // .. for links use $this->geturl($pid, $params) where $params are $key => $value pairs
    25. }
    26.  
    27. function geturl($pid, $params){
    28. $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'pages', 'uid = '.(int)$pid);
    29. $pagerow = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res);
    30. $conf['LD'] = $GLOBALS['TSFE']->tmpl->linkData($pagerow, '', 0, 'index.php', '', t3lib_div::implodeArrayForUrl('',$params);
    31. $this->realurl->encodeSpURL($conf, $this);
    32. $url = $conf['LD']['totalURL'];
    33. return $url;
    34. }
    35.  
    36. }
    37.  
    38. $eID = t3lib_div::makeIntance('tx_myext_eID');
    39. $content = $eID->main();
    40. echo $content;
    41. ?>