Author |
Message |
blaci
New Member


Joined: Feb 16, 2009
Posts: 22
|
Posted:
Thu Oct 11, 2018 5:30 am |
|
Hi!
Unfortunately, I've found another bug that I'd like to ask for your help. Also on PHP-Nuke 8.0.
The downloads do not show the icons that would indicate the number of days that are being downloaded as well as the popularity. new_01.png, new_03.png, new_07.png, new_14.png, popular.png,
If I remember correctly, I would have to rewrite something in the code of a file but I can not remember what and in which file.
Thank you for your help. |
|
|
|
 |
blaci

|
Posted:
Thu Oct 11, 2018 6:14 am |
|
Thanks, but I probably found the mistake.
If someone is struggling with this mistake I found this solution.
In the language file, you need to correct this in the 195-th queue:
define("_LINKSDATESTRING","%Y-%b-%d");
for:
define("_LINKSDATESTRING","%d-%b-%Y");
The code for the English file was good, but I used Hungarian as it was bad. |
|
|
|
 |
kguske
Site Admin

Joined: Jun 04, 2004
Posts: 6437
|
Posted:
Sun Oct 14, 2018 12:52 pm |
|
Interesting |
_________________ I search, therefore I exist...
Only registered users can see links on this board! Get registered or login! |
|
|
 |
blaci

|
Posted:
Mon Oct 15, 2018 2:06 am |
|
I think it's interesting too. But it works. |
|
|
|
 |
neralex
Site Admin

Joined: Aug 22, 2007
Posts: 1775
|
Posted:
Mon Oct 15, 2018 10:29 am |
|
I will check it in the current builds asap. |
_________________ Only registered users can see links on this board! Get registered or login! |
|
|
 |
neralex

|
Posted:
Sat Oct 20, 2018 6:52 am |
|
In RN25x is all as it should. No issue found. |
|
|
|
 |
blaci

|
Posted:
Tue Apr 13, 2021 1:17 am |
|
Hello! Again, I have a problem with the download module.
I installed RavenNuke Version 2.52.00.
Downloads do not show icons indicating the number of days downloaded: new_01.png, new_03.png, new_07.png, new_14.png
This did not help to correct the language file.
I would like to thank you for any help. |
|
|
|
 |
neralex

|
Posted:
Tue Apr 13, 2021 12:32 pm |
|
blaci wrote: | Thanks, but I probably found the mistake.
If someone is struggling with this mistake I found this solution.
In the language file, you need to correct this in the 195-th queue:
define("_LINKSDATESTRING","%Y-%b-%d");
for:
define("_LINKSDATESTRING","%d-%b-%Y");
The code for the English file was good, but I used Hungarian as it was bad. |
I found a simular issue only in the hungarian and norwegian language-files for the Web_Links module, which I fixed now. But I can't find something like this in the Downloads module.
Did you checked the images-folder of this module, if the image-files are exist?
https://github.com/neralex/RavenNuke/tree/master/html/modules/Downloads/images
And if the image-files are exist there, did you checked the images-folder of your used theme, if there exist maybe damaged image-files with the same file-names?
In the Downloads module this function builds the image-paths:
php Code:function myimage($imgfile) {
global $module_name;
$ThemeSel = get_theme();
if (file_exists('themes/' . $ThemeSel . '/images/downloads/' . $imgfile)) {
$myimage = 'themes/' . $ThemeSel . '/images/downloads/' . $imgfile;
} else {
$myimage = 'modules/' . $module_name . '/images/' . $imgfile;
}
return ($myimage);
}
|
|
|
|
|
 |
blaci

|
Posted:
Tue Apr 13, 2021 1:54 pm |
|
The image files exist in the download module image folder, and the permissions are OK.
But I don't really understand the other thing. Do I need to place these image files in the theme I use? |
|
|
|
 |
neralex

|
Posted:
Tue Apr 13, 2021 3:03 pm |
|
|
|
 |
blaci

|
Posted:
Wed Apr 14, 2021 12:55 am |
|
Hello! They appear in the legend area. Here I can open it with my browser. But below the category area is no longer. It's like the system doesn't even try to display it. His place is not there either. There is nothing to open with the browser.
If I type the path to the symbol in the browser, the symbol will appear. |
|
|
|
 |
neralex

|
Posted:
Thu Apr 15, 2021 2:57 pm |
|
Can send me please a PM with a link to your website, where I can check this issue? |
|
|
|
 |
blaci

|
Posted:
Fri Apr 16, 2021 10:09 am |
|
Hello!
I wrote a private. |
|
|
|
 |
neralex

|
Posted:
Fri Apr 16, 2021 10:22 am |
|
Thanks, got it. Did you made changes on the hungarian language-file of the Downloads module? If yes, please check if the constant '_DL_LINKSDATESTRING' exists. It should be like this:
php Code:define('_DL_LINKSDATESTRING', '%d-%b-%Y');
|
|
|
|
|
 |
blaci

|
Posted:
Fri Apr 16, 2021 11:16 am |
|
Hello!
I didn't change it. That's exactly what it looks like.
Respectively, I set everything to UTF 8. Because there was a problem with the Hungarian accent. |
|
|
|
 |
neralex

|
Posted:
Sat Apr 17, 2021 1:09 am |
|
I don't get this issue. It tested it with the hungarian language-file and it works as expected. BTW: UTF-8 is not supported and it cause other big issues in RN. If you are getting the issues with the umlauts inside the hungarian language-files, then you can use the HTML encoding of foreign language characters like this: https://www.thesauruslex.com/typo/eng/enghtml.htm#hu |
|
|
|
 |
blaci

|
Posted:
Sat Apr 17, 2021 1:18 am |
|
And because of utf 8, the symbols don't appear on the download? Because, for example, the symbol appears in web links. Because I also transcoded the web link language file to utf 8.
If I convert the page to English, the symbols will not appear on the download. |
|
|
|
 |
neralex

|
Posted:
Sat Apr 17, 2021 2:09 am |
|
blaci, no it means not more than UTF-8 as Content-Type is simply not supported because it cause other big issues in RN.
What should I say other than the same version from github is running here on RPS and as you can see, it works. |
|
|
|
 |
blaci

|
Posted:
Sat Apr 17, 2021 2:29 am |
|
All right. I understood. Thanks for trying to help. |
|
|
|
 |
neralex

|
Posted:
Sat Apr 17, 2021 3:01 am |
|
What you can try is to install a local environment like XAMPP or WAMP for Windows. There you can install a copy of RN for testing purpose. You can also check your php-error-log of your server. Maybe you get there more details about the issues.
To close out some issues with your server-settings based on the date-function, you can try to create a new php-file and name it: test.php
Put the following code inside the test.php and upload it on your web directory where RN is installed:
php Code:<?php
$error_reporting = E_ALL;
global $datetime;
define('_DL_LINKSDATESTRING', '%d-%b-%Y');
$time = '2021-04-13 10:41:15';
function newdownloadgraphic($datetime, $time) {
global $module_name, $locale;
echo ' ';
setlocale(LC_TIME, $locale);
preg_match('%([0-9]{4})-([0-9]{1,2})-([0-9]{1,2}) ([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2})%', $time, $datetime);
$datetime = strftime(_DL_LINKSDATESTRING, mktime($datetime[4], $datetime[5], $datetime[6], $datetime[2], $datetime[3], $datetime[1]));
$datetime = ucfirst($datetime);
$startdate = time();
$count = 0;
while ($count <= 14) {
$daysold = date('d-M-Y', $startdate);
if ($daysold == $datetime) {
if ($count <= 1) {
echo '<p>new_01.png</p>';
}
if ($count <= 3 && $count > 1) {
echo '<p>new_03.png</p>';
}
if ($count <= 7 && $count > 3) {
echo '<p>new_07.png</p>';
}
if ($count <= 14 && $count > 7) {
echo '<p>new_14.png</p>';
}
}
$count++;
$startdate = (time() -(86400*$count));
}
return;
}
newdownloadgraphic($datetime, $time);
?>
|
This is the function, which is creating the images for the downloads. If you open this file in the browser like yourdomain.tld/test.php, you should get today the output of the file-name: new_07.png and you can play with the datetime-string of the variable $time above the function like '2021-04-16 10:41:15' or '2021-04-15 10:41:15', then you should get the output of the other file-names. |
|
|
|
 |
blaci

|
Posted:
Sat Apr 17, 2021 12:26 pm |
|
It is now certain that there is a problem with the Hungarian language file of the download module. The latest RavenNuke also has English in the Hungarian language file. Therefore, I extracted the Hungarian language file from an older version. But as soon as I put this up, the new symbols disappear right away. Regardless of character encoding. I downloaded the latest version of github and did a clean install. I didn't change anything. And everything was good, except for the Hungarian accented characters. After uploading the mentioned Hungarian language file, the symbols disappeared immediately during the download. I'm trying to translate the Hungarian language file. See if it will be good.
Thank you for your patience. |
|
|
|
 |
neralex

|
Posted:
Sat Apr 17, 2021 1:06 pm |
|
Maybe the php-file from the older version has a broken charset in the file-header. Which could cause this issue. If you like, you can provide us your translated files. I will add them to the current version. |
|
|
|
 |
blaci

|
Posted:
Sun Apr 18, 2021 3:02 am |
|
Of course, as soon as I'm done with it, I'll send it in private. |
|
|
|
 |
|