Sponsored Content
Top Forums Web Development Notes with Ravinder on Badging System Development Part II Post 303028197 by Neo on Tuesday 1st of January 2019 11:20:42 PM
Old 01-02-2019
Hi Ravinder,

Please keep in mind that this also will work, is easier to read, and it a lot shorter:

Code:
$time_join = time() - $modaluser['joindate'];
$years_a_member = $time_join / $year;

if ($time_inactive < $year) { 
    if ($years_a_member >= 10) { 
        $color['fajoin_time'] = 'black'; 
    } 
    elseif ($years_a_member >= 5) { 
        $color['fajoin_time'] = 'indigo'; 
    }
    elseif ($years_a_member  >= 4) { 
        $color['fajoin_time'] = 'blue'; 
    }
    elseif ($years_a_member  >= 3) { 
        $color['fajoin_time'] = 'limegreen'; 
    }
    elseif ($years_a_member  >= 2) { 
        $color['fajoin_time'] = 'lightgray'; 
    }
    elseif ($years_a_member  >= 1) { 
        $color['fajoin_time'] = 'darkorange'; 
    } 
     else { 
        $color['fajoin_time'] = 'red'; 
    } 
} else { 
    $color['fajoin_time'] = 'red'; 
} 

$badgejs .= 'badge["fajoin_time"] = "' . $color['fajoin_time'] . '";';   
$badgejs .= 'badge["fajoin_timeval"] = "' . number_format($years_a_member) . '";';

At this point, I am thinking that soon we should move to a new phase of rapid prototype development if we cannot easily think of new badges. No need to waste time on the final 20% when when are 80% there, more-or-less.

So, if we do not have any ideas for additional badges now, we can just leave the as-is (reserved) and move on.

Or maybe you have some more badge ideas?

So far, it is only you and me with badge ideas, so no need to wait for other UG members to come up with badge logic Smilie
 

3 More Discussions You Might Find Interesting

1. What is on Your Mind?

New Badging System - Badges Prototype Beta 1 (Badges Only)

Today I mapped out the new badging system using FA icons, Beta 1 in no particular order except a 6 x 8 grid: https://www.unix.com/members/1-albums215-picture991.png The prototype HTML code for this layout: <style> .fa-badge-grid { font-size: 1.5em; } .row { ... (38 Replies)
Discussion started by: Neo
38 Replies

2. What is on Your Mind?

Status of Badging System - Beta 1

Dear All, Here is the current status of the badging system: The Beta 1 phase of the new badging system is close to completion. 42 prototype badges have been "allocated" 6 prototype badge slots are held in reserve The "alert you have new badges" prototype is running and is currently... (4 Replies)
Discussion started by: Neo
4 Replies

3. What is on Your Mind?

Badging System: UNIX.COM Bug Hunter Badge (New)

I have moved the bug badge out of reserve and into the main stream. Basically, I will assign a color level like the others, based on who has made a good actionable bug report for UNIX.COM. "Good" means screenshots, links, and even details from web dev tools our the HTML source code. So far,... (0 Replies)
Discussion started by: Neo
0 Replies
php-config(1)							Scripting Language						     php-config(1)

NAME
php-config - get information about PHP configuration and compile options SYNOPSIS
php-config [options] DESCRIPTION
php-config is a simple shell script for obtaining information about installed PHP configuration. OPTIONS
--prefix Directory prefix where PHP is installed, e.g. /usr/local --includes List of -I options with all include files --ldflags LD Flags which PHP was compiled with --libs Extra libraries which PHP was compiled with --man-dir The directory prefix where the manpages is installed --extension-dir Directory where extensions are searched by default --include-dir Directory prefix where header files are installed by default --php-binary Full path to php CLI or CGI binary --php-sapis Show all SAPI modules available --configure-options Configure options to recreate configuration of current PHP installation --version PHP version --vernum PHP version as integer SEE ALSO
php(1) VERSION INFORMATION
This manpage describes php, version 7.1.19. COPYRIGHT
Copyright (C) 1997-2018 The PHP Group This source file is subject to version 3.01 of the PHP license, that is bundled with this package in the file LICENSE, and is available through the world-wide-web at the following url: http://www.php.net/license/3_01.txt If you did not receive a copy of the PHP license and are unable to obtain it through the world-wide-web, please send a note to license@php.net so we can mail you a copy immediately. The PHP Group 2018 php-config(1)
All times are GMT -4. The time now is 08:50 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy