Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - TE
1
The Pub / Re: Distributed Project Translation (Transifex)
« on June 3rd, 2014, 08:31 AM »
Not sure about the Array ..

Just a note on the probably updated english files. You don't have to upload the english files every time you update a string.
Transifex can synchronize the english files automatically, you just have to add the raw github URL to the "automatically update ressources box"

example for the admin language file:
Code: [Select]
https://raw.githubusercontent.com/Wedge/wedge/master/core/languages/Admin.english.php
2
The Pub / Re: Distributed Project Translation (Transifex)
« on June 1st, 2014, 09:55 AM »
Quote from Nao on May 31st, 2014, 10:45 PM
Do you think it's possible to force array() strings into the system, though..? There are so many of these strings, I don't see how I could do without them.
Can you give an example, please?
Quote from Nao on May 31st, 2014, 10:45 PM
Even worse, Wedge allows creating arrays where the original English files don't have any. (For internationalization of numbered strings). I don't think there's a way to do that at all. Which makes me think the only right tool is github... Sucks eh?
different amount of strings in languageX vs. english? Not sure if it's possible.. I'd recommend to contact their support. 
3
The Pub / Re: Distributed Project Translation (Transifex)
« on May 31st, 2014, 02:45 PM »
yep, the download from transifex should be done via CLI.. you'd just need to modify the file "config"  for the ressources and add a lang map.
Have a look at the config file for Elk, it's basically the same for Wedge
http://www.elkarte.net/community/index.php?topic=1459.0
With the proper config it's just
Code: [Select]
tx pull -a
and all files are downloaded with the proper structure.
4
Importing into Wedge / Re: SMF 2 to Wedge importer errors
« on March 24th, 2014, 01:11 PM »
Quote from Nao on March 21st, 2014, 03:19 PM
@TE, do you think it's possible to make a version that ignores any missing input fields from the database?
mhh, that's getting complicated ..

Would require a "SHOW COLUMNS FROM `table`" for each and every table + related code & error handling in order to compare the existing fields with the query.
I feel it might be "overkill" for a rare case.
5
Importing into Wedge / Re: SMF 2 to Wedge importer errors
« on March 3rd, 2014, 01:25 PM »
ahhhh ok , that's probably the problem.. I'll try it with a forced INT instead.
6
Importing into Wedge / Re: SMF 2 to Wedge importer errors
« on March 3rd, 2014, 11:40 AM »
That's the problem. that b'value' isn't there, but it needs to be.. (or I'm misreading the docs)
I currently get the 
Code: [Select]
Data too long for column 'can_collapse' at row 1

Did you change your database layer in order to properly support bit inserts?
https://dev.mysql.com/doc/refman/5.0/en/bit-field-literals.html
a proper INSERT would be
INSERT INTO table SET bit_field = b'1';
wheras the importer basically does this:
INSERT INTO table SET bit_field = '1';

7
Importing into Wedge / Re: SMF 2 to Wedge importer errors
« on March 2nd, 2014, 08:51 PM »
ok, Importer seems completely broken (MYSQL strict mode) and I have no clue how to fix that..
that's the old code, which is generated from the categories SELECT

Code: [Select]
INSERT INTO `wedgem`.wedge_categories
(id_cat, name, cat_order, can_collapse)
VALUES ('6', 'Film, Fernsehen & Musik', '0', '1'),
Never worked with binary before, but reding the docs that needs to be
Quote
INSERT INTO `wedgem`.wedge_categories
(id_cat, name, cat_order, can_collapse)
VALUES ('6', 'Film, Fernsehen & Musik', '0', b'1'),
Put it in a quote just to mark the important change in red.
https://dev.mysql.com/doc/refman/5.0/en/bit-type.html
Not sure but I feel the importer would need to check the destination field in order to determine if the field is TINYINT or BIT and then modify the INSERT ..
What's the benefit of BIT(1)?  Saves a few bytes in the DB but is slower than ENUM and way more complicated than INT or TINYINT.
8
Importing into Wedge / Re: SMF 2 to Wedge importer errors
« on March 2nd, 2014, 08:58 AM »
tested the importer from the wedge repo, it seems to work fine for me (at least the members import)

but I get a
Code: [Select]
Data too long for column 'can_collapse' at row 1
Did you change the can_collapse to BIT(1)?
9
Importing into Wedge / Re: SMF 2 to Wedge importer errors
« on February 27th, 2014, 09:10 PM »
Quote from Nao on February 27th, 2014, 12:09 AM
message_labels is a valid members table fields in SMF 2... I don't know why it wouldn't work.

@TE, what do you think..? Is the <preparsecode> block buggy..?

Off to bed, personally.
message_labels is a field in SMF but is it still available in Wedge? If not there needs to be a
Code: [Select]
<preparsecode>
unset($row['message_labels']);
</preparsecode>
somewhere for that step.

Sorry, I'm ultra-busy at the moment, my wife's pregnant and the baby is coming soon ^_^
10
Importing into Wedge / Re: Importing member fields into members.data?
« on February 17th, 2014, 08:15 PM »
yep, looking good in general but you should use an unset at the end, unset the $data + all those rows that exist in the source system (SMF) but not in Wedge.
Code: [Select]
unset($data, $row['message_labels'], $row['mod_prefs']...)
11
Importing into Wedge / Re: Importing member fields into members.data?
« on February 17th, 2014, 05:27 PM »
Sorry, I'm currently busy (As always)..

<query> is designed to automatically LIMIT the sql query, default is IIRC 500 at a time. <Presql> is used to prepare tables for import, e.g. a TRUNCATE.
<preparsecode> is used to modify the collected data from Query, and put the modified data in a field
example from the WBB importer, the body field will  cleaned via the wbb_replace_bbc(); function.
Code: [Select]
<preparsecode>
$row['body'] = wbb_replace_bbc($row['body']);
</preparsecode>
<query>
SELECT
pmID AS id_pm, userID AS id_member_from, '0' AS deleted_by_sender,
time AS msgtime, username from_name, SUBSTRING(subject, 1, 255) AS subject,
SUBSTRING(message, 1, 65534) AS body
FROM {$from_prefix}{$wcf_prefix}pm;
</query>

If you need to collect data from one table and put it in another table, you might check the part below
Code: [Select]
<title>Importing poll choices</title>
in the MyBB importer.
12
Importing into Wedge / Re: MyBB Import
« on February 4th, 2014, 06:52 PM »
ah ok, I'll re-install MyBB and do some tests...
I think Poll choices  is a "must have" and avatar filenames need cleaning:
http://i.imgur.com/fgdovNX.png
13
Importing into Wedge / Re: MyBB Import
« on February 4th, 2014, 06:16 PM »
Quote from Bunstonious on February 3rd, 2014, 12:43 AM
The importer works well, has a few quirks tho.

8/10 would recommend.
Thanks, which version was your MyBB @Bunstonious ? I haven't used MyBB for a while, maybe they changed their database layout meanwhile..
14
Importing into Wedge / Re: Database permissions
« on February 2nd, 2014, 02:59 PM »
There's an easy solution: Install both forums (SMF and Wedge) in the same database. They use different prefixes (SMF tables start by default with smf_ and Wedge tables start with wedge_ by default.

15
Importing into Wedge / Re: Importer tool
« on February 2nd, 2014, 02:50 PM »
Quote from Nao on February 2nd, 2014, 12:43 PM
You could have said thanks, or something... Your post feels like you're punishing me :lol:
LOL yes, thanks. That post wasn't a direct answer to your's :lol: