Skip to content

Commit 06b267d

Browse files
committed
v1.6.1 merged from off LWT 1.5.20, docu updated
1 parent 09913be commit 06b267d

10 files changed

Lines changed: 1320 additions & 845 deletions

File tree

‎README.txt‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
Learning with Texts (LWT) is a tool for Language Learning.
22

3+
THIS IS A THIRD PARTY VERSION
4+
IT DIFFERS IN MANY RESPECTS FROM THE OFFICIAL LWT-VERSION
5+
36
PLEASE READ MORE ...
47
Either open ... info.htm (within the distribution)
5-
or open ... http://lwt.sf.net
8+
or open ... http://lwt.sf.net(official LWT)
69

710
"Learning with Texts" (LWT) is free and unencumbered software
811
released into the PUBLIC DOMAIN.

‎bulk_translate_words.php‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,9 @@
2626
echo '<script type="text/javascript">var context = window.parent.frames[\'l\'].document;';
2727
while($record = mysql_fetch_assoc($res)){
2828
$hex = strToClassName(prepare_textdata($record["WoTextLC"]));
29-
echo '$(".TERM',$hex,'",context).removeClass("status0").addClass("status',$record["WoStatus"],'").attr("data_wid","',$record["WoID"],'").attr("data_status","',$record["WoStatus"],'").attr("data_trans",',prepare_textdata_js($record["WoTranslation"]),').each(function(){this.title = make_tooltip($(this).text(), $(this).attr(\'data_trans\'), $(this).attr(\'data_rom\'), $(this).attr(\'data_status\'));});';
29+
echo '$(".TERM',$hex,'",context).removeClass("status0").addClass("status',$record["WoStatus"],'").attr("data_wid","',$record["WoID"],'").attr("data_status","',$record["WoStatus"],'").attr("data_trans",',prepare_textdata_js($record["WoTranslation"]),').each(function(){this.title = make_tooltip($(this).text(), $(this).attr(\'data_trans\'), $(this).attr(\'data_rom\'), $(this).attr(\'data_status\'));});',"\n";
3030
}
31+
mysql_free_result($res);
3132
echo "</script>";
3233
flush();
3334
do_mysql_query('UPDATE ' . $tbpref . 'textitems2 join ' . $tbpref . 'words on lower(Ti2Text)=WoTextLC AND Ti2WordCount =1 and Ti2LgID=WoLgID and WoID > ' . $max . ' set Ti2WoID = WoID');
@@ -95,11 +96,11 @@ function googleTranslateElementInit() {
9596
while($record = mysql_fetch_assoc($res)){
9697
if(++$cnt<$limit){
9798
$value=tohtml($record['word']);
98-
echo '<tr><td class="td1 center notranslate"><input name="marked[', $cnt ,']" type="checkbox" class="markcheck" checked="checked" value="', $cnt , '" /></td><td id="Term_', $cnt ,'" class="td1 left notranslate">',$value,'</td><td class="td1 right trans" id="Trans_', $cnt ,'">',$value,'</td><td class="td1 center notranslate"><select id="Stat_', $cnt ,'" name="term[', $cnt ,'][status]"><option value="1" selected="selected">[1]</option><option value="2">[2]</option><option value="3">[3]</option><option value="4">[4]</option><option value="5">[5]</option><option value="99">[WKn]</option><option value="98">[Ign]</option></select><input type="hidden" id="Text_', $cnt ,'" name="term[', $cnt ,'][text]" value="',$value,'" /><input type="hidden" name="term[', $cnt ,'][lg]" value="',tohtml($record['Ti2LgID']),'" /></td></tr>';
99+
echo '<tr><td class="td1 center notranslate"><input name="marked[', $cnt ,']" type="checkbox" class="markcheck" checked="checked" value="', $cnt , '" /></td><td id="Term_', $cnt ,'" class="td1 left notranslate">',$value,'</td><td class="td1 right trans" id="Trans_', $cnt ,'">',$value,'</td><td class="td1 center notranslate"><select id="Stat_', $cnt ,'" name="term[', $cnt ,'][status]"><option value="1" selected="selected">[1]</option><option value="2">[2]</option><option value="3">[3]</option><option value="4">[4]</option><option value="5">[5]</option><option value="99">[WKn]</option><option value="98">[Ign]</option></select><input type="hidden" id="Text_', $cnt ,'" name="term[', $cnt ,'][text]" value="',$value,'" /><input type="hidden" name="term[', $cnt ,'][lg]" value="',tohtml($record['Ti2LgID']),'" /></td></tr>',"\n";
99100
}
100101
else $lastpos='<input type="hidden" name="lastpos" value="' . ($record['Ti2Order'] - 1) . '" /><input type="hidden" name="sl" value="' . $sl . '" /><input type="hidden" name="tl" value="' . $tl . '" />';
101102
}
102-
103+
mysql_free_result($res);
103104
echo '</table><input type="hidden" name="tid" value="',$tid,'" />', $lastpos ,'</form>';
104105
}
105106
pageend();

‎do_text_text.php‎

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -118,14 +118,11 @@
118118
<?php
119119
$data_trans=$ann_exists?'data_ann':'data_trans';
120120
$displaystattrans=getSettingWithDefault('set-display-text-frame-term-translation');
121-
echo '<style>';
122-
if(checkStatusRange(1, $displaystattrans))echo '.wsty.status1:after{content: " " attr(' . $data_trans . ');}';
123-
if(checkStatusRange(2, $displaystattrans))echo '.wsty.status2:after{content: " " attr(' . $data_trans . ');}';
124-
if(checkStatusRange(3, $displaystattrans))echo '.wsty.status3:after{content: " " attr(' . $data_trans . ');}';
125-
if(checkStatusRange(4, $displaystattrans))echo '.wsty.status4:after{content: " " attr(' . $data_trans . ');}';
126-
if(checkStatusRange(5, $displaystattrans))echo '.wsty.status5:after{content: " " attr(' . $data_trans . ');}';
127-
if(checkStatusRange(98, $displaystattrans))echo '.wsty.status98:after{content: " " attr(' . $data_trans . ');}';
128-
if(checkStatusRange(99, $displaystattrans))echo '.wsty.status99:after{content: " " attr(' . $data_trans . ');}';
121+
echo "<style>\n";
122+
$stat_arr = array(1,2,3,4,5,98,99);
123+
foreach ($stat_arr as $value) {
124+
if(checkStatusRange($value, $displaystattrans))echo '.wsty.status',$value,':after{content: " " attr(',$data_trans,');}',"\n";
125+
}
129126
echo '.wsty:after{font-size:50%;}</style>';
130127
echo '<div id="thetext" ' . ($rtlScript ? 'dir="rtl"' : '') . '><p style="' . ($removeSpaces ? 'word-break:break-all;' : '') .
131128
'font-size:' . $textsize . '%;line-height: 1.4; margin-bottom: 10px;">';

‎info.htm‎

Lines changed: 34 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ <h4>
119119
<script type="text/javascript">
120120
$.ajax({type: 'POST',url:'ajax_get_theme.php', data: { file:'img/lwt_icon_big.png' }, success:function (data) {
121121
$('.lwtlogoright').attr( "src", data );}});
122-
if(!$('.lwtlogoright').attr('src').length){$('.lwtlogoright').attr( "src", 'img/lwt_icon_big.png' );}
122+
if(!$('.lwtlogoright[src]').length){$('.lwtlogoright').attr( "src", 'img/lwt_icon_big.png' );}
123123
</script>
124124

125125
<p class="inline">
@@ -213,6 +213,10 @@ <h4>
213213

214214
<dd>
215215
<ul>
216+
<li><b><strong>THIS IS A THIRD PARTY VERSION -
217+
IT DIFFERS IN MANY RESPECTS FROM THE OFFICIAL LWT-VERSION</strong></b>
218+
</li>
219+
216220
<li>I started this software application in 2010 as a hobby project for my personal learning (reading &amp; listening to foreign texts, saving &amp; reviewing new words and expressions).
217221
</li>
218222

@@ -242,7 +246,7 @@ <h4>
242246

243247
<dd>
244248
<ul>
245-
<li>The current version is <b>1.6.1 (September 18 2014)</b>.
249+
<li>The current version is <b>1.6.1 (September 28 2014)</b>.
246250
</li>
247251

248252
<li>
@@ -2217,7 +2221,7 @@ <h4>
22172221
<dd>
22182222
<ul>
22192223
<li>
2220-
The following sixteen tables are one "LWT table set". The default table set has no table name prefix, so the tables are named just as written below: "settings", "languages", etc.
2224+
The following fifteen tables are one "LWT table set". The default table set has no table name prefix, so the tables are named just as written below: "settings", "languages", etc.
22212225
<br />
22222226
<br />
22232227
Additional table sets have its "table set name" plus an underscore "_" as a table name prefix: "setname_settings", "setname_languages", etc.
@@ -2382,7 +2386,7 @@ <h4>
23822386
<li>
23832387
<b>Table "words" (the words and expressions you have saved):</b>
23842388
<br />
2385-
WoID int(11) unsigned NOT NULL AUTO_INCREMENT,
2389+
WoID mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
23862390
<br />
23872391
WoLgID tinyint(3) unsigned NOT NULL, -- LANGUAGE FOREIGN KEY --
23882392
<br />
@@ -2597,6 +2601,32 @@ <h4>
25972601

25982602
<dd>
25992603
<ul>
2604+
<li>1.6.1 (September 28 2014):<br />
2605+
New Feature: translations of terms can now be display in the reading frame<br />
2606+
New Feature: key bindings when hovering over words in the reading frame<br />
2607+
New Feature: bulk translate new words in the reading frame<br />
2608+
Changes from official LWT version 1.5.20 imported:<br />
2609+
<ul><li><b>New Feature:</b> Possibility to display similar terms while creating or editing a term. This will give you more language insight, and may ease inputting new terms that are similar. The number of displayed similar terms can be set from 0 (old behavior, default) to 9 on the "Settings" page. Clicking on the green icon in front of a similar term will copy the translation and romanization into the form fields for further editing. Important: If you want to use this new feature, you must change the setting "Similar terms to be displayed while adding/editing a term" to a value greater than 0. It will make more sense to do this if you have already many saved terms (e.g. more than 1,000). If you start with a language and have only a few terms, no or not very similar terms will be normally displayed and this feature will not make much sense.</br /></li>
2610+
<li>"https://" dictionary URIs are now allowed in the language settings. Checking of dictionary URIs in the language settings has been improved. </li>
2611+
<li>The Glosbe dictionary page has been improved with a simple form to change the term and do a requery if you are unhappy with the query results.</br /></li>
2612+
<li>The jQuery and jPlayer libraries have been updated to v1.11.1 and v2.7.0, respectively. The jQuery.ScrollTo package has been updated to v1.4.13. The Floating Menu package has been updated to v1.12.<br /></li>
2613+
<li>Broken links corrected or deleted. From now on, only the installation with EasyPHP for Windows and MAMP for Mac OS X will be explained in detail and is recommended. Other local web server packages, like XAMPP, etc., are of course still possible, but it's beyond the scope of this document to explain all the details for every webserver package (it will also confuse most LWT users who are not familiar with web server packages and their setup).</li>
2614+
<li>"Mobile_Detect.php" updated to v2.8.3.</li>
2615+
</ul>
2616+
Documentation updated.<br />
2617+
<br />
2618+
</li>
2619+
2620+
<li>1.6.0 (September 12 2014):<br />
2621+
Database Changes: table textitems replaced by textitems2, temporary tables added, global table tts added<br />
2622+
New Feature: Longer (>9) expressions can now be saved<br />
2623+
New Feature: TextToSpeech support for words added<br />
2624+
New Feature: experimental google api (use 'ggl.php' instead of '*http://translate.google.com' for google translate)<br />
2625+
New Feature: new word select mode in read texts (hold down mouse button)<br />
2626+
statistics.php, upload_words.php rewritten<br />
2627+
<br />
2628+
</li>
2629+
26002630
<li>1.5.17 (June 08 2014):<br />
26012631
New Feature: Selecting terms according to a text tag<br />
26022632
New Feature: Start a document where you left off (only "Read Text Screen")<br />

‎js/jq_pgm.js‎

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,7 @@ function word_hover_over () {
484484
if (!$(".tword")[0]){
485485
var v = $(this).attr("class").replace(/.*(TERM[^ ]*)( .*)*/, '$1');
486486
$( "." + v ).addClass("hword");
487-
if (!$(".kwordmarked .uwordmarked")[0]){
487+
if (!$(".kwordmarked, .uwordmarked")[0]){
488488
var p = $(this);
489489
$(document).on('keyup',function(e) {
490490
var wid = p.attr('data_wid');
@@ -527,14 +527,28 @@ function word_hover_over () {
527527
}
528528
return false;
529529
}
530-
if (e.which == 80) {
530+
if (e.which == 80) { // P : PRONOUNCE
531531
if(p.hasClass( "mwsty" ))var txt = p.attr('data_text');
532532
else var txt = p.text();
533533
var lg = WBLINK3.replace(/.*&sl=([a-zA-Z\-]*)&.*/,'$1');
534534
var audio = new Audio();
535535
audio.src ='tts.php?tl=' + lg + '&q=' + txt;
536536
audio.play();
537537
}
538+
if (e.which == 69) { // E : EDIT
539+
if(p.hasClass('mword'))
540+
window.parent.frames['ro'].location.href =
541+
'edit_mword.php?wid=' + wid + '&tid=' + TID + '&ord=' + ord;
542+
else if(p.hasClass('status0'))
543+
window.parent.frames['ro'].location.href =
544+
'edit_word.php?wid=&tid=' + TID + '&ord=' + ord;
545+
else {
546+
window.parent.frames['ro'].location.href =
547+
'edit_word.php?wid=' + wid + '&tid=' + TID + '&ord=' + ord;
548+
}
549+
return false;
550+
}
551+
538552
});
539553
}
540554
}

0 commit comments

Comments
 (0)