GithubHelp home page GithubHelp logo

lastfmlogos's Introduction

Installation

  1. Download the source files
  2. Download the [latest logos]([will provide link later])
  3. You need a installation of Apache/PHP5/MySQL/gd2
  4. Change the settings in /classes/bd/DBConfig.class.php and /classes/Config.class.php
  5. Run the SQL script /installation.sql
  6. Extract all logos to /logos/
  7. Make sure the /cache folder has read and write permissions
  8. Make sure /bans.php has read and write permissions

Usage

  • To add new logos, simply put the image files in your logos folder. JPG, PNG and GIF are supported. Make sure the width of each logo is 150-160px and that they are black and white.
  • The filename of the logo must be exactly the same as the band name is in the URL of their page on last.fm. For example, say you want to add the logo of Four Year Strong. Find them on last.fm and look at the url: http://www.last.fm/music/Four+Year+Strong, so the name of the logo must be Four+Year+Strong.png (or .jpg or .gif).
  • To update users' banners, click Empty Cache in admin, or delete all of the images in the cache folder manually.
  • Visit admin.php for more functions, including banning. There are instructions on the page.

Adding a new layout

There are currently one column and two column layouts. Look at their class files to figure out how to make your own.

Security configuration

Authentication can be added to prevent unwanted calls to utility scripts.

.htaccess

Create a file with the following content.

AuthName "Restricted Area" 
AuthType Basic 
AuthUserFile /some/path/.htpasswd 
AuthGroupFile /dev/null 

<Files admin*.php>
require valid-user
</Files>

.htpasswd

To create the password file use the following command.

htpasswd -c .htpasswd adminuser

Distributed Computing

This script now supports a distributed computing, implemented due to high load on the lastfmlogos.info server. If you have several servers that you want to distribute the load across then this is now possible with the master/slave system. IF YOU DON'T KNOW WHAT THIS IS, DON'T USE IT! The settings for this are in classes/Slaves.php.

Notice that no trailing forward slash is added after the URL.

  • Weight: this allows you to distribute the load unevenly across several servers. For example, say you have one slave and want your master server to handle three times as many requests as the slave, set MASTER_WEIGHT = 3 and the slave's weight to 1.

lastfmlogos's People

Contributors

alexobviously avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.