Forums / Cotonti / Extensions / How hard is it to convert a Joomla Module to Cononti?

Dyllon
#30919 2011-10-07 03:02

I'm browsing through the second module you posted, mod_wowboss, and it clearly wont be a simple copy/paste. As you said before, it does seems as though this module is strictly outputting most of the data through an xml file. I can think of several ways that you can accomplish what this plugin is looking for off the top of my head.

  1. Create a new SQL file, and create the following tables
  • wowboss_area
  • wowboss_monster
CREATE TABLE IF NOT EXISTS `cot_wowboss_area` (
	`id` INT(12) NOT NULL AUTO_INCREMENT,
	`name` VARCHAR(24) NOT NULL,
	`type` INT(12) NOT NULL,
	PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE IF NOT EXISTS `cot_wowboss_monster` (
	`id` INT(12) NOT NULL AUTO_INCREMENT,
	`name` VARCHAR(24) NOT NULL,
	`status` INT(12) NOT NULL,
	PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

Use this as a template. I haven't played WoW in nearly 4 years so I have no idea what columns you will need.

  1. In the same SQL File, insert the data using this:
INSERT INTO `cot_wowboss_area` (`name, type`) VALUES ('BOSS_NAME, 10 or 25');

That should do it for your SQL file. Now you need to create the rest of the plugin. You will need a php file for administrations tools (refer to contact plugin -> contact.tools.php). Then you will need a php file to output the information to your index page (refer to the tags plugin -> tags.index.php).

In your admin tools you will need to set it up so you can modify the values you created through your SQL file, and with your index page you need to set it up to display the values from the SQL file.

As I said before; I'll lend a helping hand, but I would like for you to give an honest attempt at it first. The best way to learn is analyzing another developers code. Eventually you will pick up/understand what is going on.

We are what we repeatedly do. Excellence then, is not an act, but a habit.