A quick suggestion for the Download Page.

Discuss any suggestions you may have here.
Post Reply
User avatar
OldGnashburg
Posts: 91
Joined: Tue Nov 19, 2013 3:00 pm
Location: Sherwood Park, Alberta, Canada: A place with free universal healthcare, and lots and lots of oil.

A quick suggestion for the Download Page.

Post by OldGnashburg » Mon Feb 02, 2015 9:22 pm

Hey all, I have a suggestion. Would it be possible to add a note or something beside each download telling us when it was last updated?
Gnash, Gnash, Gnash...

User avatar
MarathonMan
Site Admin
Posts: 692
Joined: Fri Oct 04, 2013 4:49 pm

Re: A quick suggestion for the Download Page.

Post by MarathonMan » Tue Feb 03, 2015 2:15 pm

In the meantime, http://downloads.cen64.com/ has a "last modified' field.

I'm not really interested (or knowledgeable) in webdev, so I'll leave it to someone else if they're interested.

User avatar
Snowstorm64
Posts: 303
Joined: Sun Oct 20, 2013 8:22 pm

Re: A quick suggestion for the Download Page.

Post by Snowstorm64 » Tue Feb 03, 2015 2:45 pm

For PHP just add this next to a filename:

Code: Select all

echo "Compiled on: ".date("Y-m-d, H:i:s.",filectime("cen64.exe"));
The filectime() function returns the UNIX timestamp of the file.

The syntax of date() function is date(format,timestamp).

The time format is: YYYY-MM-DD, hh:mm:ss.

EDIT: Or even better, we could do something like this, assuming you have properly checked the paths:

Code: Select all

<?php
function lastbuild($timestamp) {
  $date = date("Y-m-d",filectime($timestamp));
  return $date;
} ?>

<h3>Linux 64-bit builds</h3>
<table>
  <tr><td>AVX: <a href="http://downloads.cen64.com/cen64-linux64-avx-latest"><?php echo lastbuild("cen64-linux64-avx-latest") ?></a></td></tr>
  <tr><td>SSE4.1: <a href="http://downloads.cen64.com/cen64-linux64-sse41-latest"><?php echo lastbuild("cen64-linux64-sse41-latest") ?></a></td></tr>
  <tr><td>SSSE3: <a href="http://downloads.cen64.com/cen64-linux64-ssse3-latest"><?php echo lastbuild("cen64-linux64-ssse3-latest") ?></a></td></tr>
  <tr><td>SSE2: <a href="http://downloads.cen64.com/cen64-linux64-sse2-latest"><?php echo lastbuild("cen64-linux64-sse2-latest") ?></a></td></tr>
</table>
<br>
<h3>Windows 64-bit builds</h3>
<table>
  <tr><td>AVX: <a href="http://downloads.cen64.com/cen64-win64-avx-latest.exe"><?php echo lastbuild("cen64-win64-latest.exe") ?></a></td></tr>
  <tr><td>SSE4.1: <a href="http://downloads.cen64.com/cen64-win64-sse41-latest.exe"><?php echo lastbuild("cen64-win64-sse41-latest.exe") ?></a></td></tr>
  <tr><td>SSSE3: <a href="http://downloads.cen64.com/cen64-win64-ssse3-latest.exe"><?php echo lastbuild("cen64-win64-ssse3-latest.exe") ?></a></td></tr>
  <tr><td>SSE2: <a href="http://downloads.cen64.com/cen64-win64-sse2-latest.exe"><?php echo lastbuild("cen64-win64-sse2-latest.exe") ?></a></td></tr>
  <tr><td>Debugger: <a href="http://downloads.cen64.com/cen64d.exe"><?php echo lastbuild("cen64d.exe") ?></a></td></tr>
</table>
The code should print like this:
Linux 64-bit builds
AVX: 2015-01-29
SSE4.1: 2015-01-29
SSSE3: 2015-01-29
SSE2: 2015-01-29

Windows 64-bit builds
AVX: 2015-01-29
SSE4.1: 2015-01-29
SSSE3: 2015-01-29
SSE2: 2015-01-29
Debugger: 2015-01-18
OS: Debian GNU/Linux Jessie (8.0)
CPU: Intel i7 4770K @ 3.5 GHz
Build: AVX (compiled from git)

User avatar
MarathonMan
Site Admin
Posts: 692
Joined: Fri Oct 04, 2013 4:49 pm

Re: A quick suggestion for the Download Page.

Post by MarathonMan » Fri Jun 05, 2015 9:56 am

Sorry, just seeing this now for some reason... adding it to the main page.

User avatar
Breadwinka
Posts: 54
Joined: Fri Oct 04, 2013 11:35 pm

Re: A quick suggestion for the Download Page.

Post by Breadwinka » Fri Jun 05, 2015 6:56 pm

Yay, front page looks much better now.

User avatar
Snowstorm64
Posts: 303
Joined: Sun Oct 20, 2013 8:22 pm

Re: A quick suggestion for the Download Page.

Post by Snowstorm64 » Mon Jun 08, 2015 11:22 am

MarathonMan wrote:Sorry, just seeing this now for some reason... adding it to the main page.
No problem. :) I think it would be nice if there was also a link to the source code in a .zip, but maybe it is not so useful with the git button.
OS: Debian GNU/Linux Jessie (8.0)
CPU: Intel i7 4770K @ 3.5 GHz
Build: AVX (compiled from git)

User avatar
MarathonMan
Site Admin
Posts: 692
Joined: Fri Oct 04, 2013 4:49 pm

Re: A quick suggestion for the Download Page.

Post by MarathonMan » Tue Jun 09, 2015 9:58 am

Snowstorm64 wrote:No problem. :) I think it would be nice if there was also a link to the source code in a .zip, but maybe it is not so useful with the git button.
That's pretty easy to do with gitweb; added it to the main page.

User avatar
Snowstorm64
Posts: 303
Joined: Sun Oct 20, 2013 8:22 pm

Re: A quick suggestion for the Download Page.

Post by Snowstorm64 » Thu Jan 28, 2016 8:51 pm

I thought that it would be a neat thing to add a sign next the URL, so it informs the user of a new build. Like this:

Code: Select all

function lastbuild($binary,$url) {
  $timestamp = filemtime($binary);
  $diff_time = time() - $timestamp;

  # One day equals to 86400 in Unix timestamp numbers (60*60*24), so 1 week = 604800
  $date = '<a href="'.$url.'">'.date("Y-m-d",$timestamp).'</a>';
  if ($diff_time <= 604800) {
      $date .= '&nbsp;<span style="color:red;vertical-align: super; font-size: 75%">*updated*</span>';
  }
  return $date;
}
The function accepts two arguments: the binary's location on the server and its URL to be shown, like this:

Code: Select all

AVX: <?php echo lastbuild("cen64-linux64-avx-latest","http://downloads.cen64.com/cen64-linux64-avx-latest"); ?>
SSE4.1: <?php echo lastbuild("cen64-linux64-sse41-latest","http://downloads.cen64.com/cen64-linux64-sse41-latest"); ?>
We would see something like this:
AVX: 2016-01-27 *updated*
SSE4.1: 2016-01-20
But this solution has some flaws: It doesn't differentiate between two or more builds in less than one week, and any user is likely to miss the notification when he doesn't visit the homepage for more a week. So I thought of a better solution, but it involves setting up the cookies that register the last time the user has visited the homepage, and then comparing with the binary's timestamp, so that the server will raise a notification if that timestamp is after the time of the last visit. I don't know how to do this, because my knowledge of PHP is still rudimental...yet. :)
OS: Debian GNU/Linux Jessie (8.0)
CPU: Intel i7 4770K @ 3.5 GHz
Build: AVX (compiled from git)

ShadowFX
Posts: 86
Joined: Sat Oct 05, 2013 2:08 am
Location: The Netherlands

Re: A quick suggestion for the Download Page.

Post by ShadowFX » Fri Jan 29, 2016 4:07 am

Nice going!
I know the website will be updated eventually, or at least updated to something more appealing. I made a concept some time ago but never really went through with it so without any promises, I'll see what I can do and come up with a better placeholder.
"Change is inevitable; progress is optional"

OS: Windows 10 Pro x64
Specs: Intel Core i7-7700K @ 4.2GHz, 16GB DDR4-RAM, NVIDIA GeForce GTX 1080 Ti
Main build: AVX (official)

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest