Zum Inhalt springen

Eigene Extension funktioniert nicht

Erstellt am 23. Juni 2005 · 1 Antwort · letzte Antwort am 23. Juni 2005

Tags: Frage

todo ·

Hallo zusammen,

ich habe eine Extension erstellt (Typo3 V3.8-), welche mir Bilder ausgeben soll. Das tut sie auch, allerdings nicht mit dem richtigen Format und ohne Link.

Ich habe die Extension über den Kickstarter installiert.
Dabei habe ich die Tabelle 'pages' für meine Zwecke erweitert.

Mein Static TypoScript Code:

Constants:

plugin.tx_familysite_pi1 {
  templateFile = fileadmin/scripts/gallery_template.tmpl
  columns = 3
}

Setup:

plugin.tx_familysite_pi1 {
  templateFile = {$plugin.tx_familysite_pi1.templateFile}
  columns = {$plugin.tx_familysite_pi1.columns}
  image {
    file.maxW = 40
    imageLinkWrap = 1
    imageLinkWrap {
      enable = 1
      bodyTag (
        <body bgcolor="#000000" leftmargin="2" topmargin="2" marginwidth="2" marginheight="2">
      )
      wrap = <a href="javascript:close();"> | </a>
      width = 640m
      height = 640m
      JSwindow = 1
      JSwindow.newWindow = 1
      JSwindow.expand = 4,4
    }
  }
}
 
tx_familysite_pi1 >
tx_familysite_pi1 = < plugin.tx_imagegallery_pi1
tx_familysite_pi1.displayCurrentRecord = 1
}

Und hier der Code der Klasse:

class tx_trfamilysite_pi1 extends tslib_pibase {
	var $prefixId = 'tx_trfamilysite_pi1';		// Same as class name
	var $scriptRelPath = 'pi1/class.tx_trfamilysite_pi1.php';	// Path to this script relative to the extension dir.
	var $extKey = 'tr_familysite';	// The extension key.
	var $pi_checkCHash = TRUE;
	
	var $conf;
  var $templateCode;
  var $columns;
	
	/**
	 * [Put your description here]
	 */
	function main($content,$conf)	{
		$this->conf=$conf;
		$this->pi_setPiVarDefaults();
		$this->pi_loadLL();
		
		
		/**
    * Get the necessary database rows
    */
 
    // 001: Database query
    $query = "SELECT tx_trfamilysite_tr_famimages " .
             "FROM pages " .
             "WHERE uid=" . $GLOBALS["TSFE"]->id .
    $this->cObj->enableFields("pages");

    // 002: Execute query
    $res = mysql(TYPO3_db, $query);
 		
    // 005: Some values
    $this->columns = $this->conf["columns"];
    $row = mysql_fetch_array($res);
    
		foreach ($row as $value)
		{
			$imageList = $value;
		}
		
		$imagesArray = split(",",$imageList);
		
		foreach ($imagesArray as $value)
		{
			$imageConfig = $this->conf["image."];
      $imageConfig["file"] = "uploads/tx_imagegallery/" . $value;
			$content .= $this->cObj->IMAGE($imageConfig).'<br /><br />';
			//$content .= 'Conf: '.$this->columns;
		}
	
		return $this->pi_wrapInBaseClass($content);
	}

Kann mir jemand helfen?

Vielen Dank im voraus

ToDo

todo ·

Jetzt wird es peinlich.....
Wenn man wie ich nicht überall die gleichen Namen verwendet, dann pkann es auch nicht funktionieren... #paralyzed#