Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> NSN Gr Downloads - a.k.a NukeDepository
Author Message
blaci
New Member
New Member



Joined: Feb 16, 2009
Posts: 22

PostPosted: Thu Oct 11, 2018 5:30 am Reply with quote

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.
 
View user's profile Send private message
blaci







PostPosted: Thu Oct 11, 2018 6:14 am Reply with quote

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: 6432

PostPosted: Sun Oct 14, 2018 12:52 pm Reply with quote

Interesting

_________________
I search, therefore I exist...
nukeSEO - nukeFEED - nukePIE - nukeSPAM - nukeWYSIWYG
 
View user's profile Send private message
blaci







PostPosted: Mon Oct 15, 2018 2:06 am Reply with quote

I think it's interesting too. But it works.
 
neralex
Site Admin



Joined: Aug 22, 2007
Posts: 1772

PostPosted: Mon Oct 15, 2018 10:29 am Reply with quote

I will check it in the current builds asap.

_________________
Github: RavenNuke 
View user's profile Send private message
neralex







PostPosted: Sat Oct 20, 2018 6:52 am Reply with quote

In RN25x is all as it should. No issue found.
 
blaci







PostPosted: Tue Apr 13, 2021 1:17 am Reply with quote

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







PostPosted: Tue Apr 13, 2021 12:32 pm Reply with quote

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?
[ Only registered users can see links on this board! Get registered or login! ]

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







PostPosted: Tue Apr 13, 2021 1:54 pm Reply with quote

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







PostPosted: Tue Apr 13, 2021 3:03 pm Reply with quote

blaci wrote:
But I don't really understand the other thing. Do I need to place these image files in the theme I use?


No, but you can replace it on this way for a theme. This if-statemant checks only the file-locations on the used theme before it checks the images in the module-folder. The "Legend of Symbols" area on the index of the Downloads-module is using the same function to build the links. Your images should be displayed there on the same way.

Did you already tried to open the image-links directly in your browser?
[ Only registered users can see links on this board! Get registered or login! ] [ Only registered users can see links on this board! Get registered or login! ] [ Only registered users can see links on this board! Get registered or login! ] [ Only registered users can see links on this board! Get registered or login! ]
 
blaci







PostPosted: Wed Apr 14, 2021 12:55 am Reply with quote

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







PostPosted: Thu Apr 15, 2021 2:57 pm Reply with quote

Can send me please a PM with a link to your website, where I can check this issue?
 
blaci







PostPosted: Fri Apr 16, 2021 10:09 am Reply with quote

Hello!
I wrote a private.
 
neralex







PostPosted: Fri Apr 16, 2021 10:22 am Reply with quote

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







PostPosted: Fri Apr 16, 2021 11:16 am Reply with quote

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







PostPosted: Sat Apr 17, 2021 1:09 am Reply with quote

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: [ Only registered users can see links on this board! Get registered or login! ]
 
blaci







PostPosted: Sat Apr 17, 2021 1:18 am Reply with quote

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







PostPosted: Sat Apr 17, 2021 2:09 am Reply with quote

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







PostPosted: Sat Apr 17, 2021 2:29 am Reply with quote

All right. I understood. Thanks for trying to help.
 
neralex







PostPosted: Sat Apr 17, 2021 3:01 am Reply with quote

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 '&nbsp;';
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







PostPosted: Sat Apr 17, 2021 12:26 pm Reply with quote

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







PostPosted: Sat Apr 17, 2021 1:06 pm Reply with quote

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







PostPosted: Sun Apr 18, 2021 3:02 am Reply with quote

Of course, as soon as I'm done with it, I'll send it in private.
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> NSN Gr Downloads - a.k.a NukeDepository

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©