MyBB Community Forums

Full Version: add 50 thread prefix in 1 click ?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Use a csv file, it will be the simplest way to import.
(2023-06-23, 03:32 PM)Crazycat Wrote: [ -> ]Use a csv file, it will be the simplest way to import.

Can you send me the format or I should import csv directly on phpmyadmin?
Attach your list example here and we will see if we can help you after that.
(2023-06-23, 03:35 PM)jkcool Wrote: [ -> ]
(2023-06-23, 03:32 PM)Crazycat Wrote: [ -> ]Use a csv file, it will be the simplest way to import.

Can you send me the format or I should import csv directly on phpmyadmin?

in a file.csv file there should be the format like this

"pid","prefix","displaystyle","forums","groups"
"1","News","<span style=""prefix news-p"">News</span>","-1","-1"
"2","Romance ","<span style=""prefix romance-p"">Romance</span>","-1","-1"

add more into it as you want....
(2023-06-28, 12:45 AM)PARADOX987 Wrote: [ -> ]
(2023-06-23, 03:35 PM)jkcool Wrote: [ -> ]
(2023-06-23, 03:32 PM)Crazycat Wrote: [ -> ]Use a csv file, it will be the simplest way to import.

Can you send me the format or I should import csv directly on phpmyadmin?

in a file.csv file there should be the format like this

"pid","prefix","displaystyle","forums","groups"
"1","News","<span style=""prefix news-p"">News</span>","-1","-1"
"2","Romance ","<span style=""prefix romance-p"">Romance</span>","-1","-1"

add more into it as you want....

Can you tell me the filename in phpmyadmin ?
Go on your mybb_threadprefixes table and at the top of the page you'll see "Import".
(2023-08-18, 01:59 PM)Crazycat Wrote: [ -> ]Go on your mybb_threadprefixes table and at the top of the page you'll see "Import".

When I am importing the mybb_threadprefixes.csv file its saying this:

SQL query: Copy

INSERT INTO `mybb_threadprefixes` VALUES ('pid', 'prefix', 'displaystyle', 'forums', 'groups');

MySQL said: [Image: dot.gif]
#1366 - Incorrect integer value: 'pid' for column 'pid' at row 1


Can anyone reply on this ?
(2023-09-03, 06:16 PM)jkcool Wrote: [ -> ]
(2023-08-18, 01:59 PM)Crazycat Wrote: [ -> ]Go on your mybb_threadprefixes table and at the top of the page you'll see "Import".

When I am importing the mybb_threadprefixes.csv file its saying this:

SQL query: Copy

INSERT INTO `mybb_threadprefixes` VALUES ('pid', 'prefix', 'displaystyle', 'forums', 'groups');

MySQL said: [Image: dot.gif]
#1366 - Incorrect integer value: 'pid' for column 'pid' at row 1


Can anyone reply on this ?

Based on PARADOX987'S answer, all you need is
"1","Romance ","<span style=""prefix romance-p"">Romance</span>","-1","-1"
Make sure you look in your mybb_threadprefixes table and check to see what is the latest pid that you have, then your new pid number should be bigger than the last. You can't import new data with the same pid that already exists in that table of the database.

After that, make sure to go in to ACP » Tools & Maintenance » Cache Manager » (Rebuild & Reload All) to clear the cache in order to see the new prefixes you just added through phpmyadmin
(2023-12-20, 05:04 AM)Joey_Pham423 Wrote: [ -> ]
(2023-09-03, 06:16 PM)jkcool Wrote: [ -> ]
(2023-08-18, 01:59 PM)Crazycat Wrote: [ -> ]Go on your mybb_threadprefixes table and at the top of the page you'll see "Import".

When I am importing the mybb_threadprefixes.csv file its saying this:

SQL query: Copy

INSERT INTO `mybb_threadprefixes` VALUES ('pid', 'prefix', 'displaystyle', 'forums', 'groups');

MySQL said: [Image: dot.gif]
#1366 - Incorrect integer value: 'pid' for column 'pid' at row 1


Can anyone reply on this ?

Based on PARADOX987'S answer, all you need is
"1","Romance ","<span style=""prefix romance-p"">Romance</span>","-1","-1"
Make sure you look in your mybb_threadprefixes table and check to see what is the latest pid that you have, then your new pid number should be bigger than the last. You can't import new data with the same pid that already exists in that table of the database.

After that, make sure to go in to ACP » Tools & Maintenance » Cache Manager » (Rebuild & Reload All) to clear the cache in order to see the new prefixes you just added through phpmyadmin

That can work but I am looking for more simpliest way.
Then code some script for the list you already have, it should be easy but depends on the format (list) you have already.
Pages: 1 2