FluxCP icon indicating copy to clipboard operation
FluxCP copied to clipboard

[ Bug ] Import ItemDesc

Open admkakaroto opened this issue 7 years ago • 25 comments

It is not possible to import the description of items in the iteminfo.lua file, even taking the clean fluxcp here in github and the iteminfo.lua file in the zackdreaver repository, the flux starts reading but does not return any description, sometimes it still matters 1 description or 2 at most, I have already changed the size of the php.ini import_max but it does not resolve.

See: https://imgur.com/HzpRf4q

admkakaroto avatar Feb 08 '18 01:02 admkakaroto

Mine is not even doing anything image

SneakyRO avatar Mar 15 '18 21:03 SneakyRO

Same problem with 10mb of zackdreaver's file suekec

CyberDevil75 avatar Apr 03 '18 19:04 CyberDevil75

Guys, it wasn't a bug. Make sure you also have 777 permission on itemInfo.lua file you uploading / or the folder.

Also, check the format in your itemInfo.lua file, I had to regex replace to fit a older format.

SneakyRO avatar Apr 07 '18 00:04 SneakyRO

@SneakyRO I do this on localhost with 777 permission, and it only takes 2 items and ignores the rest.

admkakaroto avatar Apr 07 '18 00:04 admkakaroto

exactly what is the folder where the upload file is inserted?

CyberDevil75 avatar Apr 07 '18 10:04 CyberDevil75

desktop...

admkakaroto avatar Apr 07 '18 14:04 admkakaroto

@admkakaroto Check if you have the right format

@CyberDevil75 Check ur root folder / fluxcp folder

SneakyRO avatar Apr 10 '18 20:04 SneakyRO

what format?

admkakaroto avatar Apr 10 '18 21:04 admkakaroto

I can't get this to work either. It would be nice to have a conversion tool or something.

AnisotropicDefixation avatar Jun 14 '18 13:06 AnisotropicDefixation

anyone want to try my script? replace your /module/item/iteminfo.php with this iteminfo.php

cydh avatar Jun 20 '18 09:06 cydh

@cydh for me it worked perfectly, it imported very fast, I just need to test if it took all the items, but it was sensational.

admkakaroto avatar Jun 20 '18 10:06 admkakaroto

however items that have special characters in the description did not work properly on the import.

admkakaroto avatar Jun 20 '18 10:06 admkakaroto

items that have special characters are not having their description imported completely.

admkakaroto avatar Jun 20 '18 10:06 admkakaroto

however items that have special characters in the description did not work properly on the import.

@admkakaroto what is the example? maybe related to the column collation

cydh avatar Jun 20 '18 10:06 cydh

Works but it seems like a portion of the text is cut, the first line or two and in some cases it's cropped on both ends. Does it require some specific syntax?

AnisotropicDefixation avatar Jun 21 '18 03:06 AnisotropicDefixation

uh my bad. wrong cutting string. please retry https://gist.github.com/cydh/f22fcb1920e8c8251c1e1b6614a35811

image

if got anymore cuts, copy here the item block in ur iteminfo (without reformat or post a link) because there's no native lua for PHP and we need to match the patterns/structures in iteminfo

cydh avatar Jun 21 '18 07:06 cydh

@cydh img_itemdesc

admkakaroto avatar Jun 21 '18 14:06 admkakaroto

Seems to work so far, although some descriptions do get botched, maybe due to connection timeouts (would be ideal to have a tool to create a populated SQL table locally). There's an issue with coloring though, anything after ^000000 will change to black and this breaks many descriptions (your own example has this issue also).

AnisotropicDefixation avatar Jun 22 '18 03:06 AnisotropicDefixation

well because ^000000 means to black. see what I meant here

I can change with a title workaround, such open with <font color="#000000"> or maybe if every ^000000 as <font class='item-desc-default-color-class'> we can't rely all desc with ^RRGGBB asdasd ^000000, because it's not pair tag at first place, and you can find more in newer desc

cydh avatar Jun 22 '18 07:06 cydh

Now that I think about it, it would be nice to have an option to reverse the black text to white, for those who use dark backgrounds so it's readable.

Basically a define option for the "default color" and what comes after ^000000.

AnisotropicDefixation avatar Jun 22 '18 07:06 AnisotropicDefixation

updated https://gist.github.com/cydh/f22fcb1920e8c8251c1e1b6614a35811 no more force black

cydh avatar Jun 22 '18 08:06 cydh

This is nice. I found more issues though;

  1. text [x]^000000", results in nothing getting parsed right after.
  2. %"; results in lack of line break when there should be one.

AnisotropicDefixation avatar Jun 23 '18 04:06 AnisotropicDefixation

still does not work with special characters like '~'` ^' and letters like 'ã õ à è ó ò ú ù'.

admkakaroto avatar Jun 25 '18 12:06 admkakaroto

I also have the same problem of accents. Anotação 2020-02-29 172505

RagnaWay avatar Feb 29 '20 20:02 RagnaWay

for mine doesn't work, I try the last file, and it doesn't do anything. after I select the iteminfo.lua and press submit.

another question where can I setup the permission 777 permission on itemInfo.lua https://drive.goog fluxcp_error le.com/file/d/1wg_dX8XCFStmknDSF6Q6CGYQrYK5Svdd/view?usp=sharing

ffman22 avatar Aug 18 '21 22:08 ffman22