Replies: 5 comments 3 replies
-
Your problems start with this -
That means there is not an entry in one of the language files for Help_Vacation_Actief If you added something like :
to your language/whatever.lang file everything might work. |
Beta Was this translation helpful? Give feedback.
-
Hi David,
In my version I had of course already created the variable in the language version
so the question remains
… Op 8 okt. 2022, om 09:39 heeft David Goodwin ***@***.***> het volgende geschreven:
Your problems start with this -
$Help_String_a = $PALANG['Help_Vacation_Actief']; <== this string gift a syntac error
That means there is not an entry in one of the language files for Help_Vacation_Actief
If you added something like :
$PALANG['Help_Vacation_Actief'] = 'Some translation here for what it means';
to your language/whatever.lang file everything might work.
—
Reply to this email directly, view it on GitHub <#657 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAGSBPQJIJCXOWUCXWPNO4TWCEQK5ANCNFSM6AAAAAAQ7WI5GM>.
You are receiving this because you authored the thread.
|
Beta Was this translation helpful? Give feedback.
-
David, Thanks again, echo " " . json_encode($PALANG, JSON_PRETTY_PRINT); |
Beta Was this translation helpful? Give feedback.
-
Hi David,
Thanks for the tips.
By place this in the .php file it displays the hole translate file .
echo "<pre>" . json_encode($PALANG, JSON_PRETTY_PRINT);
die('check ^');
now I saw that mis placed the English en dutch word boo active. STUPID STUPID on me !!
Is there also something voor the "sql , date en string” problem.
Jan Kruis
… Op 8 okt. 2022, om 13:08 heeft David Goodwin ***@***.***> het volgende geschreven:
But it's as if it isn't being used.
Try perhaps adding something like this just before line 542 in list-virtual.php :
echo "<pre>" . json_encode($PALANG, JSON_PRETTY_PRINT);
die('check ^');
that should tell you what is actually in the $PALANG variable.
—
Reply to this email directly, view it on GitHub <#657 (reply in thread)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAGSBPRN2SUW652FHOOF4RDWCFI2NANCNFSM6AAAAAAQ7WI5GM>.
You are receiving this because you authored the thread.
|
Beta Was this translation helpful? Give feedback.
-
hi david, I solved the problem using your two line code I modified the two line of code to look at different variable and arrays to see how the values are constructed and what the vvalues are so thank you for the two line of code it made a lot clear to me at once |
Beta Was this translation helpful? Give feedback.
-
I have a question,
for an extension function I need two variables a $PALANG['Help_Vacation_Actief'] and one from the datebase activefrom and activeuntil. the function comes in list-virual.php
retrieving the data from the data succeeds and it can also be displayed correctly in the template, however I want to use the variable and adjust it in list-virtual.php and then it appears that the
date that I modified is on 1970-01-01, while if I first set a variable myself, the edit will be performed correctly
see example
$test_date_from = '2022-01-01 00:00:00'; <== testdate these ar working well
$test_date_until = '2023-12-31 23:59:59'; <== testdate these ar working well
$Help_String_a = $PALANG['Help_Vacation_Actief']; <== this string gift a syntac error
apache log file ==> PHP Warning: Undefined array key "Help_Vacation_Actief" in /usr/share/pfa/public/list-virtual.php on line 45, referer:
.
.
if (Config::bool('vacation_control_admin')) {
$table_vacation = table_by_key('vacation');
$sql_select .= ", $table_vacation.active AS v_active ";
$sql_select .= ", $table_vacation.activefrom AS from_date "; <== this is the way a get the variable i need works correctly in template with $item.from_date
$sql_select .= ", $table_vacation.activeuntil AS until_date "; <== this is the way a get the variable i need works correctly in template with $item.until_date
$sql_join .= " LEFT JOIN $table_vacation ON $table_mailbox.username=$table_vacation.email ";
}
.
.
$test_from = date($PALANG['date_display'],strtotime($test_date_from)); <= gifts correct date 01-01-2020 if $PALANG['date_display'] = d-m-Y
$test_until = date($PALANG['date_display'],strtotime($test_date_until)); <== gifts correct date 2023-12-31 if $PALANG['date_display'] = 'Y-m-d'
$test_from = date($PALANG['date_display'],strtotime($from_date)); <== gift 01-01-1970 if $PALANG['date_display'] = 'd-m-Y'
$test_until = date($PALANG['date_display'],strtotime($until_date)); <== gift 1970-01-01 if $PALANG['date_display'] = 'Y-m-d'
.
apache log file ==> PHP Warning: Undefined variable $Help_String_a in /usr/share/pfa/public/list-virtual.php on line 542, referer:
.
$Help_String = str_replace($PALANG['Vacation_from'], $test_from, $Help_String_a);
$Help_String = str_replace('<%Until_Date>',$test_until,$Help_String);
.
.
$DateArray = array('from' => $test_from ,'until' => $test_until , 'Help_Str' => $Help_String);
$smarty->assign('date',$DateArray);
what am i doing wrong, what do i need to change to get if working correct.
Regrads
Jan Kruis
Beta Was this translation helpful? Give feedback.
All reactions