PDA

Zobacz pełną wersję : Tworzenie wtyczek - pytanko o poprawność



K.S.91
09-04-2009, 11:49
Witam.
Wziąłem się za tworzenie wtyczek do komponentów i mam kilka drobnych pytań:
1. Czy tylko do komponentów trzeba je tworzyć?
2. To będzie pytanie obszerniejsze na bazie komponentu JoomlaComment:


jos_3comment
jos_3comment_captcha
jos_3comment_setting
jos_3comment_voting2a) Czy tworząc pliki etl wystarczy jeden czyli comment.php czy trzeba robić do wszystkich czyli comment_captcha.php itp?
2b) Czy ta wtyczka etl jest dobrze wykonana?

<?php
class comment_ETL extends ETLPlugin {
function getName() { return "Joomlacomment"; }
function getAssociatedTable() { return "comment"; }
}
?>
2c) czy ta wtyczka sql jest dobrzee wykonana?

CREATE TABLE IF NOT EXISTS `jos_3comment` (
`id` int(10) NOT NULL auto_increment,
`contentid` int(10) NOT NULL default '0',
`component` varchar(50) NOT NULL default '',
`ip` varchar(15) NOT NULL default '',
`userid` int(11) default NULL,
`usertype` varchar(25) NOT NULL default 'Unregistered',
`date` datetime NOT NULL default '0000-00-00 00:00:00',
`name` varchar(30) NOT NULL default '',
`email` varchar(50) default NULL,
`website` varchar(100) default NULL,
`notify` tinyint(1) NOT NULL default '0',
`title` varchar(50) NOT NULL default '',
`comment` text NOT NULL,
`published` tinyint(1) NOT NULL default '0',
`voting_yes` int(10) NOT NULL default '0',
`voting_no` int(10) NOT NULL default '0',
`parentid` int(10) NOT NULL default '-1',
`importtable` varchar(30) NOT NULL default '',
`importid` int(10) NOT NULL default '0',
`importparentid` int(10) NOT NULL default '-1',
PRIMARY KEY (`id`),
KEY `contentid` (`contentid`),
KEY `com_contentid` (`component`,`contentid`)
) TYPE=MyISAM AUTO_INCREMENT=7117 ;

To wszystko i bardzo bym prosił o odpowiedzi na te pytanka.

Pozdrawiam

zwiastun
09-04-2009, 12:03
to raczej nie kłopot utworzyć odrębne wtyczki, ale jedna też pewno zadziała
sql wygląda na poprawną

K.S.91
09-04-2009, 13:29
no ok.
stworzyłem sobie wszystkie, zainstalowałem lecz mam jedynie problem z community builder.
Wydaje mi się ze wtyczki są zrobione dobrze ale po wrzuceniu w liscie wtyczek pokazuje się "new transformation" (jakoś tak).
Dziwne troche.

ETL:

<?php
class comprofiler_ETL extends ETLPlugin {
function getName() { return "Community Builder"; }
function getAssociatedTable() { return "comprofiler"; }
}
?>

SQL

CREATE TABLE IF NOT EXISTS `jos_3comprofiler` (
`id` int(11) NOT NULL default '0',
`user_id` int(11) NOT NULL default '0',
`firstname` varchar(100) default NULL,
`middlename` varchar(100) default NULL,
`lastname` varchar(100) default NULL,
`hits` int(11) NOT NULL default '0',
`message_last_sent` datetime NOT NULL default '0000-00-00 00:00:00',
`message_number_sent` int(11) NOT NULL default '0',
`avatar` varchar(255) default NULL,
`avatarapproved` tinyint(4) NOT NULL default '1',
`approved` tinyint(4) NOT NULL default '1',
`confirmed` tinyint(4) NOT NULL default '1',
`lastupdatedate` datetime NOT NULL default '0000-00-00 00:00:00',
`registeripaddr` varchar(50) NOT NULL default '',
`cbactivation` varchar(50) NOT NULL default '',
`banned` tinyint(4) NOT NULL default '0',
`banneddate` datetime default NULL,
`unbanneddate` datetime default NULL,
`bannedby` int(11) default NULL,
`unbannedby` int(11) default NULL,
`bannedreason` mediumtext,
`acceptedterms` tinyint(1) NOT NULL default '0',
`pu_profilename` varchar(255) default NULL,
`website` varchar(255) default NULL,
`location` varchar(255) default NULL,
`occupation` varchar(255) default NULL,
`interests` varchar(255) default NULL,
`company` varchar(255) default NULL,
`address` varchar(255) default NULL,
`city` varchar(255) default NULL,
`state` varchar(255) default NULL,
`zipcode` varchar(255) default NULL,
`country` varchar(255) default NULL,
`phone` varchar(255) default NULL,
`fax` varchar(255) default NULL,
`cb_mynotes` mediumtext,
`fbviewtype` varchar(255) NOT NULL default '_UE_FB_VIEWTYPE_FLAT',
`fbordering` varchar(255) NOT NULL default '_UE_FB_ORDERING_OLDEST',
`fbsignature` mediumtext,
PRIMARY KEY (`id`),
UNIQUE KEY `user_id` (`user_id`),
KEY `apprconfbanid` (`approved`,`confirmed`,`banned`,`id`),
KEY `avatappr_apr_conf_ban_avatar` (`avatarapproved`,`approved`,`confirmed`,`banned`, `avatar`),
KEY `lastupdatedate` (`lastupdatedate`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

może to wina w sql CHARSET=utf8; ?joomle mam w iso

zwiastun
09-04-2009, 14:04
raczej nie może tylko na pewno

K.S.91
09-04-2009, 14:20
no ok. dałem na 8320 i poszło.
Mam nadzieje że nie będzie błędów.
Pozdrawiam i dziękuję

szmidt344
09-04-2009, 21:15
No niestety przy comprofiler wywalił błąd, więc 8320 jest złe.
Bardzo bym prosił o pomoc.

//pisze z innego konta