Welcome to the Request a Feature script. This is the user side of the script where approved features are displayed and people have the chance to vote on feature they would want implementing or create a new feature which must then be approved by an admin user. Click here to visit the admin panel.
| Name | Amount Needed | Amount Received | Status | Votes | Vote |
|---|---|---|---|---|---|
| Email users when their feature is in developement/completed | 90.00 | 0.00 | Pending | 3237 | |
| Allow people to comment on features | 60.00 | 20.00 | Pending | 1745 | |
| Send admins emails when a new Feature is added | 30.00 | 0.00 | Pending | 1040 | |
| Ban an IP | 60.00 | 0.00 | Pending | 859 | |
| Contribute | 0.00 | 0.00 | Done | 689 | |
| Categories | 90.00 | 0.00 | Pending | 689 |
N.B. Hover over the feature name to see more details
First create the database and tables using the SQL below:
CREATE DATABASE `cc_feature_vote`;
CREATE TABLE `features` (
`id` INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
`name` VARCHAR(255),
`description` TEXT,
`approved` TINYINT(1) DEFAULT 1,
`amount_needed` DECIMAL(4,2) DEFAULT 0,
`amount_received` DECIMAL(4,2) DEFAULT 0,
`feature_status` ENUM('Done','Pending','In Progress') DEFAULT 'Pending',
`created` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
`modified` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
`status` TINYINT(1) DEFAULT 1
);
CREATE TABLE `votes` (
`id` INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
`feature_id` INT NOT NULL DEFAULT 0,
`ip` VARCHAR(255),
`created` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
`modified` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
`status` TINYINT(1) DEFAULT 1
);
CREATE TABLE `users` (
`id` int(11) NOT NULL PRIMARY KEY AUTO_INCREMENT,
`username` varchar(255) NOT NULL,
`password` varchar(50) NOT NULL,
`created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`modified` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`status` tinyint(1) DEFAULT '1'
);
/*Data for the table `users` */
insert into `users`(`id`,`username`,`password`,`created`,`modified`,`status`) values (1,'admin','009b747592533070b1746533f3543103\r\n','0000-00-00 00:00:00','0000-00-00 00:00:00',1);
/* CHANGES FOR UPGRADING */
ALTER TABLE `features` ADD `feature_status` ENUM('Done','Pending','In Progress') DEFAULT 'Pending' AFTER `approved`;
ALTER TABLE `features` ADD `amount_needed` DECIMAL(4,2) DEFAULT 0 AFTER `approved`;
ALTER TABLE `features` ADD `amount_received` DECIMAL(4,2) DEFAULT 0 AFTER `approved`;
Now you need to modifiy the includes/config.php file with the base path and base URL of the script.
$base_path = 'C:\Xampplite\htdocs\Testing\cc_feature_vote\\';
$base_url = 'http://localhost/Testing/cc_feature_vote/';
Along with your database settings.
define('HOSTNAME','localhost');
define('DB_USERNAME','USERNAME');
define('DB_PASSWORD','PASSWORD');
define('DB_NAME','cc_feature_vote');
If you want to change the password security salt you can do so in the config file, however you will need to regenerate all passwords in the database.
If you using paypal to accept donations for the development of the features you must enter your paypal email address in the config file.
// paypal email address
$paypal_email = 'info@doubleacedesign.co.uk';
To use IPN you must first login to your Paypal account and enter a URL that Paypal will use to send you donation notifications. If you have uploaded all the files from this script you will find a paypal folder and in there a file called paypal.php, this is the script that Paypal can use and my Paypal IPN address is below:
// IPN address
http://feature-request.jamesfairhurst.co.uk/paypal/paypal.php
Ensure that you have filled out the correct database settings in the IPN script and also the email settings at the bottom. Once a donation is received Paypal with query this script and it will update the database automatically if everything went well.
The script will also automatically create a log file on your server for you to inspect and also send you an email with the log of the current action.
The main page (this one) will display a list of approved features which you can vote on. To vote on a particular feature simply click on the "Thumbs Up" icon. If you have Javascript enabled the vote will register via Ajax otherwise the page will refresh.
To add a feature click the "Add New Feature" link at the top right of the page. A form will display that allows you to enter a Feature name and a small description. Click save and the Feature will be display. This will have to be approved by an admin user before it displays on the site
The admin area is password protected and can have multiple admin users from the database. These must be manually created. From the admin area you can add/edit/delete/approve Features
To edit a Feature click on the "Page Edit" icon. You will be redirected to the edit page where you can modify the Feature name and description.
To approve a Feature click on the green "Tick" icon, this will approve the Feature so that it's visible on the main Feature page for everyone to see.
To delete a Feature click on the "Bin" icon, you will be asked for confirmation before the Feature is deleted. Everything is still kept in the database so if you want to recover anything you can do