Sehr geehrte Community,
ich bin dabei meinen eigenen mp3player auf basis vom fe_mp3player zu basteln, jedoch haenge ich schon fest..
und zwar habe ich
$this->conf = $conf;
zugewiesen. Ich wollte dann $this->conf verwenden, jedoch ist es sogut wie leer. Ich habe mir dann $conf mal mit print_r() ausgeben lassen und dann kam folgendes dabei raus:
Bild: img89.imageshack.us/…/mp3error2xw9.th.gif
Meine Klasse schaut momentan so aus:
require_once(PATH_tslib.'class.tslib_pibase.php');
require_once(t3lib_extMgm::extPath('api_macmade').'class.tx_apimacmade.php');
class tx_smplayer_pi1 extends tslib_pibase {
var $prefixId = 'tx_smplayer_pi1'; // Same as class name
var $scriptRelPath = 'pi1/class.tx_smplayer_pi1.php'; // Path to this script relative to the extension dir.
var $extKey = 'sm_player'; // The extension key.
var $uploadDir = 'uploads/tx_smplayer/';
var $pi_checkCHash = true;
var $apimacmade_version = 4.1;
var $conf;
function main($content,$conf) {
$this->api = new tx_apimacmade($this);
$this->conf = $conf;
$this->pi_setPiVarDefaults();
$this->pi_loadLL();
$this->pi_initPIflexForm();
$this->piFlexForm = $this->cObj->data['pi_flexform'];
$this->setConfig();
$content = $this->buildOutput();
return $this->pi_wrapInBaseClass($content);
}
Hat jemand vielleicht eine Lösung? Für mehr Informationen, falls benötigt, bitte melden 🙂
Grüße,
Stefan
hallo,
zum einen bitte text als text posten oder wenigstens zB auf phpfi.com hochladen und nicht als bild...
und übergibst du denn per ts überhaupt was, dass das nicht leer ist?
georg
also ich habe bei Include static (from extensions) im Seitentemplate mein TS ausgewählt.. welches wie folgt ausschaut:
plugin.tx_smplayer_pi1 {
basic {
playlist = {$plugin.tx_smplayer.basic.playlist}
template_file = {$plugin.tx_smplayer.basic.template_file}
flash_version = {$plugin.tx_smplayer.basic.flash_version}
player_width = {$plugin.tx_smplayer.basic.player_width}
player_height = {$plugin.tx_smplayer.basic.player_height}
display_width = {$plugin.tx_smplayer.basic.display_width}
display_height = {$plugin.tx_smplayer.basic.display_height}
previewimage = {$plugin.tx_smplayer.basic.previewimage}
}
color {
background = {$plugin.tx_smplayer.color.background}
foreground = {$plugin.tx_smplayer.color.foreground}
highlight = {$plugin.tx_smplayer.color.highlight}
screen = {$plugin.tx_smplayer.color.screen}
}
appearance {
enable_autoscroll = {$plugin.tx_smplayer.appearance.enable_autoscroll}
allow_fullscreen = {$plugin.tx_smplayer.appearance.allow_fullscreen}
enable_large_controlbar = {$plugin.tx_smplayer.appearance.enable_large_controlbar}
watermark = {$plugin.tx_smplayer.appearance.watermark}
overstretch = {$plugin.tx_smplayer.appearance.overstretch}
show_digits = {$plugin.tx_smplayer.appearance.show_digits}
show_downloadbutton = {$plugin.tx_smplayer.appearance.show_downloadbutton}
show_eq = {$plugin.tx_smplayer.appearance.show_eq}
show_screenicons = {$plugin.tx_smplayer.appearance.show_screenicons}
show_volume = {$plugin.tx_smplayer.appearance.show_volume}
show_thumbs = {$plugin.tx_smplayer.appearance.show_thumbs}
enable_scriptaccess = {$plugin.tx_smplayer.appearance.enable_scriptaccess}
}
playback {
enable_autostart = {$plugin.tx_smplayer.playback.enable_autostart}
buffer_length = {$plugin.tx_smplayer.playback.buffer_length}
enable_repeat = {$plugin.tx_smplayer.playback.enable_repeat}
enable_shuffle = {$plugin.tx_smplayer.playback.enable_shuffle}
enable_smooth_playback = {$plugin.tx_smplayer.playback.enable_smooth_playback}
volume = {$plugin.tx_smplayer.playback.volume}
}
}
hab jetzt mal die klasse bei phpfi.com hochgeladen.. coole seite kannte ich garnicht!
http://phpfi.com/271354
{$plugin.tx_smplayer.basic.playlist}
Das wird dann aber schon über die Constants befüllt?
ja hier noch die konstanten:
plugin.tx_smplayer {
basic {
playlist =
template_file = EXT:sm_player/pi1/mp3player.html
flash_version = 7
player_width = 320
player_height = 340
display_width = 320
display_height = 240
previewimage =
}
color {
background = ffffff
foreground = 000000
highlight = 000000
screen = 000000
}
appearance {
enable_autoscroll = 0
allow_fullscreen = 1
enable_large_controlbar = 0
enable_watermark = 0
overstretch = 0
show_digits = 1
show_downloadbutton = 0
show_eq = 0
show_screenicons = 1
show_volume = 1
show_thumbs = 0
enable_scriptaccess = 1
}
playback {
enable_autostart = false
buffer_length = 3
enable_repeat = false
enable_shuffle = 0
enable_smooth_playback = 0
volume = 80
}
}
Hast eine ICQ Nachricht von mir diesbezüglich...
Dank wunschtacho weiss ich jetzt, dass das Problem anscheinden daran liegt, dass er die Daten aufm static Typoscript nicht ausliest. Wenn man ein neues Extension Template anlegt und dort alles reinschreibt, wird es ausgelesen..
Hallo Knalltuete,
ich stehe gerade vor dem selben Problem.
Wenn ich ein neues Extension Template anlgege und dort meinen TS Code eingebe funktioniert es wunderbar. Nur aus der setup.txt meiner Extension wird der Code nicht geladen. Hast du das irgendwie lösen können, oder hast du dich mit der Lösung über das erneute Extension Template abgefunden?
Danke Anderl