---
title: "Eigene Extension funktioniert nicht"
url: "https://www.typo3.net/d/26352-eigene-extension-funktioniert-nicht"
source: "typo3.net"
tags: ["Extensions","Entwicklung","Frage"]
created: "2005-06-23"
last_reply: "2005-06-23"
replies: 1
solved: false
page: 1
pages: 1
lang: "de"
---

# Eigene Extension funktioniert nicht

Extensions › Entwicklung · 1 Antwort · gestartet 2005-06-23

## Eröffnungsbeitrag

**todo** · 2005-06-23 · [Beitrag #1](https://www.typo3.net/d/26352-eigene-extension-funktioniert-nicht/1)

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:**

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

**Setup:**

```typoscript
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:**

```typoscript
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

## Antworten

### [#2](https://www.typo3.net/d/26352-eigene-extension-funktioniert-nicht/2) · todo · 2005-06-23

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

---

Quelle: „Eigene Extension funktioniert nicht“, typo3.net, https://www.typo3.net/d/26352-eigene-extension-funktioniert-nicht
Beiträge von Mitgliedern des Forums. Bitte mit Link auf die Diskussion zitieren.
