Jump to content

Archived

This topic is now archived and is closed to further replies.

systemtek

Duplicating modules in phpnuke

Recommended Posts

I am using phpnuke and i have read in the manual about Duplicating the PHP-Nuke FAQ module, this is section 22.1. 

Here : http://www.karakas-online.de/EN-Book/duplicating-php-nuke-faq-module.html

This is just what i need to do, but reading about it, it says about doing stuff from the command line to the MySQL.

I dont have command line access i just have mysql and phpnuke via cPanel, do i need to do any of that, if so how do i go about doing it as dont have ssh access.

Are the files anywhere i acn access them ?

Thanks

Share this post


Link to post
Share on other sites
[quote author=systemtek link=topic=103843.msg413823#msg413823 date=1155297781]
I am using phpnuke and i have read in the manual about Duplicating the PHP-Nuke FAQ module, this is section 22.1. 

Here : http://www.karakas-online.de/EN-Book/duplicating-php-nuke-faq-module.html

This is just what i need to do, but reading about it, it says about doing stuff from the command line to the MySQL.

I dont have command line access i just have mysql and phpnuke via cPanel, do i need to do any of that, if so how do i go about doing it as dont have ssh access.

Are the files anywhere i acn access them ?

Thanks
[/quote]

Looks like you can just run the following in from the SQL tab in phpMyAdmin and it'll create the 2 tables in your database - which means you can skip the MySQL Prompt portion. So do the following:

copy the below code. Open phpMyAdmin and select your phpnuke databaes. Click on the SQL tab and paste the code in the RUN SQL QUERY window and click GO. That'll create the 2 tables that you need.

[code]
#
# Table structure for table `nuke_faqAnswer2`
#
 
CREATE TABLE nuke_faqAnswer2 (
  id tinyint(4) NOT NULL auto_increment,
  id_cat tinyint(4) NOT NULL default '0',
  question varchar(255) default ",
  answer text,
  PRIMARY KEY  (id),
  KEY id (id),
  KEY id_cat (id_cat)
) TYPE=MyISAM;
#
# Dumping data for table `nuke_faqAnswer2`
#
# --------------------------------------------------------
#
# Table structure for table `nuke_faqCategories2`
#
CREATE TABLE nuke_faqCategories2 (
  id_cat tinyint(3) NOT NULL auto_increment,
  categories varchar(255) default NULL,
  flanguage varchar(30) NOT NULL default ",
  PRIMARY KEY  (id_cat),
  KEY id_cat (id_cat)
) TYPE=MyISAM;
#
# Dumping data for table `nuke_faqCategories2`
#
# --------------------------------------------------------
[/code]

Share this post


Link to post
Share on other sites
Hi thanks for the reply, tried as suggested and get the following error

#1075 - Incorrect table definition; there can be only one auto column and it must be defined as a key

Any ideas ?

Here is my code i just changed it and called it products :

#
# Table structure for table `nuke_products`
#
 
CREATE TABLE nuke_products (
  id tinyint(4) NOT NULL auto_increment,
  id_cat tinyint(4) NOT NULL default '0',
  question varchar(255) default ",
  answer text,
  PRIMARY KEY  (id),
  KEY id (id),
  KEY id_cat (id_cat)
) TYPE=MyISAM;
#
# Dumping data for table `nuke_products`
#
# --------------------------------------------------------
#
# Table structure for table `nuke_products`
#
CREATE TABLE nuke_products (
  id_cat tinyint(3) NOT NULL auto_increment,
  categories varchar(255) default NULL,
  flanguage varchar(30) NOT NULL default ",
  PRIMARY KEY  (id_cat),
  KEY id_cat (id_cat)
) TYPE=MyISAM;
#
# Dumping data for table `products`
#
# --------------------------------------------------------

Share this post


Link to post
Share on other sites
no. they changed the table names by adding a "2" to the end of the table name in the code that I posted.

In the faq2.php files, they will query those 2 tables by the table names. Try using the code posted as is.

Share this post


Link to post
Share on other sites
same error

#1075 - Incorrect table definition; there can be only one auto column and it must be defined as a key

Share this post


Link to post
Share on other sites
In your code,

CREATE TABLE nuke_products (
  id tinyint(4) NOT NULL auto_increment,
  id_cat tinyint(4) NOT NULL default '0',
  question varchar(255) default ",
  answer text,
  PRIMARY KEY  (id),
  KEY id (id),
  KEY id_cat (id_cat)
) TYPE=MyISAM;
#
# Dumping data for table `nuke_products`
#
# --------------------------------------------------------
#
# Table structure for table `nuke_products`
#
CREATE TABLE nuke_products (
  id_cat tinyint(3) NOT NULL auto_increment,
  categories varchar(255) default NULL,
  flanguage varchar(30) NOT NULL default ",
  PRIMARY KEY  (id_cat),
  KEY id_cat (id_cat)
) TYPE=MyISAM;
#
# Dumping data for table `products`
#
# --------------------------------------------------------

the table names you are creating are SAME!!
add 2 to the end of the second table name.

like this:

CREATE TABLE nuke_products (
  id tinyint(4) NOT NULL auto_increment,
  id_cat tinyint(4) NOT NULL default '0',
  question varchar(255) default ",
  answer text,
  PRIMARY KEY  (id),
  KEY id (id),
  KEY id_cat (id_cat)
) TYPE=MyISAM;
#
# Dumping data for table `nuke_products`
#
# --------------------------------------------------------
#
# Table structure for table `nuke_products`
#
CREATE TABLE nuke_products2 (
  id_cat tinyint(3) NOT NULL auto_increment,
  categories varchar(255) default NULL,
  flanguage varchar(30) NOT NULL default ",
  PRIMARY KEY  (id_cat),
  KEY id_cat (id_cat)
) TYPE=MyISAM;
#
# Dumping data for table `products`
#
# --------------------------------------------------------

Karkas guide is not good because it is so out-of-dated.
That doesn't help you a lot and most of nuke persons.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.