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