Sponsored Content
Top Forums Web Development Notes with Ravinder on Badging System Development Part II Post 303028218 by RavinderSingh13 on Wednesday 2nd of January 2019 08:21:37 AM
Old 01-02-2019
Quote:
Originally Posted by Neo
No. Hurry.
Take your time. Glad you like the three new badges... Smilie
Hey Neo,

Following will be my approach in order to get consecutive days BADGE's creation.

Step 1st: Create a field named daily_login_count in user TABLE(mysql).
Step 2nd: Now whenever user logs in to forum then check condition if (TODAY's date-1)==lastvisit(fied value) then add 1 in daily_login_count.(I know this method should be invoked when user is clicking on LOGIN button and able to successfully login Smilie )
Step 3rd:
i- Now check if value of daily_login_count>=1 && daily_login_count<14 then BADGE color should be orangered.
ii- Check if value of daily_login_count>=14 && daily_login_count<30 then BADGE color should be darkorange.
iii- Check if value of daily_login_count>=30 && daily_login_count<60 then BADGE color should be lightgray.
iv- Check if value of daily_login_count>=60 && daily_login_count<90 then BADGE color should be limegreen.
v- Check if value of daily_login_count>=90 && daily_login_count<120 then BADGE color should be blue.
vi- Check if value of daily_login_count>=120 && daily_login_count<150 then BADGE color should be indigo.
vii- Check if value of daily_login_count>=150 && daily_login_count<180 then BADGE color should be black.

Step 4th: In case condition 2nd is NOT TRUE means user is logging after some days then make daily_login_count=1 and change BADGE color to red.

Thanks,
R. Singh

Last edited by RavinderSingh13; 01-02-2019 at 10:22 AM..
 

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
Catalyst::Manual::Deployment::DevelopmentServer(3pm)	User Contributed Perl Documentation   Catalyst::Manual::Deployment::DevelopmentServer(3pm)

NAME
Catalyst::Manual::DevelopmentServer - Development server deployment The development server is a mini web server written in Perl. However, if you supply the "-f" option to the development server, it will load the higher performance Starman server, which can be used as an application server with a lightweight proxy web server at the front. Setup Start up the development server script/myapp_server.pl -p 8080 -k -f --pidfile=/tmp/myapp.pid You will probably want to write an init script to handle stop/starting the app using the pid file. Configuring Apache Make sure mod_proxy is enabled and add: # Serve static content directly DocumentRoot /var/www/MyApp/root Alias /static /var/www/MyApp/root/static ProxyRequests Off <Proxy *> Order deny,allow Allow from all </Proxy> # Need to specifically stop these paths from being passed to proxy ProxyPass /static ! ProxyPass /favicon.ico ! ProxyPass / http://localhost:8080/ ProxyPassReverse / http://localhost:8080/ # This is optional if you'd like to show a custom error page # if the proxy is not available ErrorDocument 502 /static/error_pages/http502.html You can wrap the above within a VirtualHost container if you want different apps served on the same host. Other web servers The proxy configuration above can also be replicated with a different frontend server or proxy, such as varnish, nginx, or lighttpd. AUTHORS
Catalyst Contributors, see Catalyst.pm COPYRIGHT
This library is free software. You can redistribute it and/or modify it under the same terms as Perl itself. perl v5.14.2 2012-01-20 Catalyst::Manual::Deployment::DevelopmentServer(3pm)
All times are GMT -4. The time now is 01:10 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy