Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

Data Import plugin question??

Quote Reply
Data Import plugin question??
On the data_import plugin, everything works fine, except for the category thing...
If you select, say field 10 to be the default category and it is separated by /'s, (example: Dogs/Breeds/Yorkshire), everything works fine, but some of the data feeds are separated by >'s or even periods... Is there anyway for the import to either automatically recognize these, or have a selection to choose what is the separator for the categories???

</not a clue>
Quote Reply
Re: [Dinky] Data Import plugin question?? In reply to
Unfortunatly this isn't supported yet.

To get around this problem, you could try editing /admin/Plugins/Data_Import.pm, and find;

Line 422;

Code:
$cat_name =~ s/^\///; # get rid of leading slashes... as we dont need these...

...and add;

Code:
$cat_name =~ s/\>/\//; # get rid of leading slashes... as we dont need these...
$cat_name =~ s/\Q&gt;/\//; # get rid of leading slashes... as we dont need these...

... and the same, just ABOVE;

Code:
my $fatherid = $DB->table('Category')->select( ['ID'],{ Full_Name => $cat_name })->fetchrow;

(line 560~)

.. and add the same line of code.

Let me know how it works :)

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!