Skip to content

Commit

Permalink
LAN support added
Browse files Browse the repository at this point in the history
  • Loading branch information
septor committed Nov 5, 2015
1 parent 2662d66 commit e7c9b12
Show file tree
Hide file tree
Showing 9 changed files with 129 additions and 149 deletions.
19 changes: 6 additions & 13 deletions README.mkd
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
# NOTE -- THE FILES IN THIS REPO SHOULD BE CONSIDERED ALPHA QUALITY

Refer to the [TODO file](https://github.com/septor/anteup/blob/master/TODO.md) for a list of things that need to happen before the beta is released.

## Reporting Bugs & Requesting Features

If you have an issue, bug, or you would like to request something be added utilize the [issue tracker](https://github.com/septor/anteup/issues). It's the most effective way to get my attention.

# Ante Up!

An extensive Donation Tracker with PayPal integration.
Expand All @@ -16,6 +8,11 @@ While this is being published as a rewrite of the Roofdog Donation Tracker it sh

In all honesty, you should consider AnteUp as a brand new plugin based on the Roofdog Donation Tracker plugin. With that said it's likely to be your only option as a replacement for now. Using your old tables, preferences, etc is not an option though. You'll have to start fresh.

## Reporting Bugs & Requesting Features

If you have an issue, bug, or you would like to request something be added utilize the [issue tracker](https://github.com/septor/anteup/issues). It's the most effective way to get my attention.


## Prerequisites
Using AnteUp requires the following. Plus a pizza:

Expand All @@ -24,11 +21,7 @@ Using AnteUp requires the following. Plus a pizza:

## Translations

**!! DO NOT TRANSLATE THIS PLUGIN YET. !!**

Once a LAN freeze takes place, I'll be accepting translations. The easiest way to get your translations added is by forking this repo and submitting a pull request with your translations. Documentation on how to fork and submit a pull request are easily found on the GitHub website.

The LAN files will be getting another overhaul (not the one previously mentioned) to utilize the new LAN structure in v2 of e107. Translations will not be accepted until after **THIS** line gets removed from the README file!
You can translate AnteUp easily by [forking](https://help.github.com/articles/fork-a-repo/) this repo, and then submitting a [pull request](https://help.github.com/articles/creating-a-pull-request/) with your translations.

## Credits

Expand Down
15 changes: 0 additions & 15 deletions TODO.md

This file was deleted.

74 changes: 37 additions & 37 deletions admin_config.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ class anteup_ipn_ui extends e_admin_ui
'thclass' => 'left',
),
'item_name' => array (
'title' => 'Item Name',
'title' => LAN_ANTEUP_IPN_01,
'type' => 'text',
'data' => 'str',
'width' => 'auto',
Expand All @@ -98,7 +98,7 @@ class anteup_ipn_ui extends e_admin_ui
'thclass' => 'left',
),
'payment_status' => array (
'title' => 'Payment Status',
'title' => LAN_ANTEUP_IPN_02,
'type' => 'dropdown',
'data' => 'str',
'width' => 'auto',
Expand All @@ -110,7 +110,7 @@ class anteup_ipn_ui extends e_admin_ui
'thclass' => 'left',
),
'mc_gross' => array (
'title' => 'Gross Income',
'title' => LAN_ANTEUP_IPN_03,
'type' => 'text',
'data' => 'str',
'width' => 'auto',
Expand All @@ -122,7 +122,7 @@ class anteup_ipn_ui extends e_admin_ui
'thclass' => 'left',
),
'mc_currency' => array (
'title' => 'Currency',
'title' => LAN_ANTEUP_IPN_04,
'type' => 'dropdown',
'data' => 'str',
'width' => 'auto',
Expand All @@ -134,7 +134,7 @@ class anteup_ipn_ui extends e_admin_ui
'thclass' => 'left',
),
'txn_id' => array (
'title' => 'Transaction ID',
'title' => LAN_ANTEUP_IPN_05,
'type' => 'text',
'data' => 'str',
'width' => '5%',
Expand Down Expand Up @@ -170,7 +170,7 @@ class anteup_ipn_ui extends e_admin_ui
'thclass' => 'left',
),
'payment_date' => array (
'title' => 'Payment Date',
'title' => LAN_ANTEUP_IPN_06,
'type' => 'datestamp',
'data' => 'str',
'width' => 'auto',
Expand All @@ -183,7 +183,7 @@ class anteup_ipn_ui extends e_admin_ui
'thclass' => 'left',
),
'comment' => array (
'title' => LAN_COMMENT,
'title' => LAN_ANTEUP_IPN_07,
'type' => 'textarea',
'data' => 'str',
'width' => '40%',
Expand All @@ -209,76 +209,76 @@ class anteup_ipn_ui extends e_admin_ui

protected $prefs = array(
'anteup_mtitle' => array(
'title' => 'Menu Title',
'title' => LAN_ANTEUP_PREFS_01_A,
'type' => 'text',
'data' => 'str',
'help' => 'The text you want displayed as your menu item',
'help' => LAN_ANTEUP_PREFS_01_B,
),
'anteup_currency' => array(
'title' => 'Default Currency',
'title' => LAN_ANTEUP_PREFS_02_A,
'type' => 'dropdown',
'data' => 'str',
'help' => 'The default currency for accepting donations',
'help' => LAN_ANTEUP_PREFS_02_B,
),
'anteup_goal' => array(
'title' => 'Donation Goal',
'title' => LAN_ANTEUP_PREFS_03_A,
'type' => 'text',
'data' => 'str',
'help' => 'The current donation goal',
'help' => LAN_ANTEUP_PREFS_03_B,
),
'anteup_due' => array(
'title' => 'Due Date',
'title' => LAN_ANTEUP_PREFS_04_A,
'type' => 'datestamp',
'data' => 'str',
'help' => 'The date in which you want the donations by',
'help' => LAN_ANTEUP_PREFS_04_B,
),
'anteup_lastdue' => array(
'title' => 'Previous Due Date',
'title' => LAN_ANTEUP_PREFS_05_A,
'type' => 'datestamp',
'data' => 'str',
'help' => 'The previous due date',
'help' => LAN_ANTEUP_PREFS_05_B,
),
'anteup_menutext' => array(
'title' => 'Menu Text',
'title' => LAN_ANTEUP_PREFS_06_A,
'type' => 'text',
'data' => 'str',
'help' => 'The text you want to display on the donation menu.',
'help' => LAN_ANTEUP_PREFS_06_B,
),
'anteup_pagetext' => array(
'title' => 'Donate Page Text',
'title' => LAN_ANTEUP_PREFS_07_A,
'type' => 'textarea',
'data' => 'str',
'help' => 'The text you want on your donate page. Make it romantic.',
'help' => LAN_ANTEUP_PREFS_07_B,
),
'anteup_pageviewclass' => array(
'title' => 'Who can see your donations page?',
'title' => LAN_ANTEUP_PREFS_08_A,
'type' => 'userclass',
'data' => 'str',
'help' => 'Select a userclass that can view your donations page.',
'help' => LAN_ANTEUP_PREFS_08_B,
),
'anteup_menuviewclass' => array(
'title' => 'Who can see your donation menu?',
'title' => LAN_ANTEUP_PREFS_09_A,
'type' => 'userclass',
'data' => 'str',
'help' => 'Select a userclass that can view your donation menu.',
'help' => LAN_ANTEUP_PREFS_09_B,
),
'anteup_button' => array(
'title' => 'Donation Image',
'title' => LAN_ANTEUP_PREFS_10_A,
'type' => 'dropdown',
'data' => 'str',
'help' => 'Donation image to use',
'help' => LAN_ANTEUP_PREFS_10_B,
),
'anteup_paypal' => array(
'title' => 'PayPal Address',
'title' => LAN_ANTEUP_PREFS_11_A,
'type' => 'text',
'data' => 'str',
'help' => 'Your PayPal email address. Donations cannot be accepted without it!',
'help' => LAN_ANTEUP_PREFS_11_B,
),
'anteup_dateformat' => array(
'title' => 'Date Format',
'title' => LAN_ANTEUP_PREFS_12_A,
'type' => 'dropdown',
'data' => 'str',
'help' => 'Refer to the toDate() parser function in the developers manual on e107.org',
'help' => LAN_ANTEUP_PREFS_12_B,
),
);

Expand All @@ -298,13 +298,13 @@ public function init()

$this->fields['mc_currency']['writeParms'] = $this->currency;

$this->status = array('Pending' => 'Pending', 'Completed' => 'Completed', 'Denied' => 'Denied');
$this->status = array('Pending' => LAN_ANTEUP_IPN_08, 'Completed' => LAN_ANTEUP_IPN_09, 'Denied' => LAN_ANTEUP_IPN_10);
$this->fields['payment_status']['writeParms'] = $this->status;

// preferences
$this->prefs['anteup_currency']['writeParms'] = $this->currency;

$this->dateformat = array('short' => 'short', 'long' => 'long', 'relative' => 'relative');
$this->dateformat = array('short' => LAN_ANTEUP_PREFS_13, 'long' => LAN_ANTEUP_PREFS_14, 'relative' => LAN_ANTEUP_PREFS_15);
$this->prefs['anteup_dateformat']['writeParms'] = $this->dateformat;

$this->donateImage[e107::pref('anteup', 'anteup_button')] = e107::pref('anteup', 'anteup_button');
Expand Down Expand Up @@ -406,7 +406,7 @@ class anteup_currency_ui extends e_admin_ui
'thclass' => 'left',
),
'symbol' => array (
'title' => 'Currency Symbol',
'title' => LAN_ANTEUP_CURR_01,
'type' => 'text',
'data' => 'str',
'width' => 'auto',
Expand All @@ -417,7 +417,7 @@ class anteup_currency_ui extends e_admin_ui
'thclass' => 'left',
),
'code' => array (
'title' => 'Code',
'title' => LAN_ANTEUP_CURR_02,
'type' => 'text',
'data' => 'str',
'width' => 'auto',
Expand All @@ -441,7 +441,7 @@ class anteup_currency_ui extends e_admin_ui
'thclass' => 'left',
),
'location' => array (
'title' => 'Symbol Location',
'title' => LAN_ANTEUP_CURR_03,
'type' => 'dropdown',
'data' => 'str',
'width' => 'auto',
Expand All @@ -467,7 +467,7 @@ class anteup_currency_ui extends e_admin_ui

public function init()
{
$this->symLoc = array('front' => 'front', 'back' => 'back');
$this->symLoc = array('front' => LAN_ANTEUP_CURR_04, 'back' => LAN_ANTEUP_CURR_05);
$this->fields['location']['writeParms'] = $this->symLoc;
}

Expand Down
4 changes: 2 additions & 2 deletions donate.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@
}
else
{
$text = "Unable to accept donations because there is no PayPal address setup.";
$text = "<div class='center'>".LAN_ANTEUP_DONATE_05."</div>";
}

$ns->tablerender(ANTELAN_DONATE_CAPTION00, $tp->toHTML($text, true));
e107::getRender()->tablerender(LAN_ANTEUP_DONATE_TITLE, $tp->toHTML($text, true));
require_once(FOOTERF);
?>
6 changes: 3 additions & 3 deletions donations.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,14 @@
}
else
{
$text .= "<div style='text-align:center;'>There were no donations made in that time frame.</div>";
$text .= "<div style='text-align:center;'>".LAN_ANTEUP_DONATIONS_07."</div>";
}
}
else
{
$text = "<div style='text-align:center;'>Sorry, friend, but you can't view this page based on your userclass.</div>";
$text = "<div style='text-align:center;'>".LAN_ANTEUP_DONATIONS_08."</div>";
}

e107::getRender()->tablerender("Donations", $text);
e107::getRender()->tablerender(LAN_ANTEUP_DONATIONS_TITLE, $text);
require_once(FOOTERF);
?>
91 changes: 46 additions & 45 deletions languages/English_admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,52 +7,53 @@
define("LAN_ANTEUP_CREATE_CURRENCIES", "Create Currencies");
define("LAN_ANTEUP_PREFERENCES", "Preferences");

// Menu Configuration
define("LAN_ANTEUP_CONFIG_M_01", "Menu Title:");
define("LAN_ANTEUP_CONFIG_M_02", "The title of your donation tracker menu.");
define("LAN_ANTEUP_CONFIG_M_05", "Menu Text:");
define("LAN_ANTEUP_CONFIG_M_06", "Text to display under the progress bar. This will display even if the progress bar does not.");
define("LAN_ANTEUP_CONFIG_M_07", "Full Progress Bar Color:");
define("LAN_ANTEUP_CONFIG_M_08", "The color of the full progress bar. Enter the 6 digit hex code.");
define("LAN_ANTEUP_CONFIG_M_09", "Empty Progress Bar Color: ");
define("LAN_ANTEUP_CONFIG_M_10", "The background color of the progress bar. Enter the 6 digit hex code.");
define("LAN_ANTEUP_CONFIG_M_11", "Progress Bar Border Color:");
define("LAN_ANTEUP_CONFIG_M_12", "The color of the border. Enter the 6 digit hex code.");
define("LAN_ANTEUP_CONFIG_M_13", "Progress Bar Height: ");
define("LAN_ANTEUP_CONFIG_M_14", "The height of the progress bar. Enter your value in pixels.");
define("LAN_ANTEUP_CONFIG_M_15", "Progress Bar Width: ");
define("LAN_ANTEUP_CONFIG_M_16", "The width of the progress bar. Use either a static number (12px) or a percentage (90%).");
// Donations/IPN
define("LAN_ANTEUP_IPN_01", "Item Name");
define("LAN_ANTEUP_IPN_02", "Payment Status");
define("LAN_ANTEUP_IPN_03", "Gross Income");
define("LAN_ANTEUP_IPN_04", "Currency");
define("LAN_ANTEUP_IPN_05", "Transaction ID");
define("LAN_ANTEUP_IPN_06", "Payment Date");
define("LAN_ANTEUP_IPN_07", "Comment");

define("LAN_ANTEUP_CONFIG_P_01", "Button image:");
define("LAN_ANTEUP_CONFIG_P_02", "Choose an image or upload your own into '/anteup/images/icons/'");
define("LAN_ANTEUP_CONFIG_P_03", "PayPal Email or PayPal Business ID:");
define("LAN_ANTEUP_CONFIG_P_04", "This must be a valid PayPal account.");
define("LAN_ANTEUP_IPN_08", "Pending");
define("LAN_ANTEUP_IPN_09", "Completed");
define("LAN_ANTEUP_IPN_10", "Denied");
define("LAN_ANTEUP_IPN_11", "");

// Preferences
define("LAN_ANTEUP_PREFS_01", "Currency to display on menu:");
define("LAN_ANTEUP_PREFS_02", "Select the currency symbol to display in the menu.");
define("LAN_ANTEUP_PREFS_03", "Goal Donation Amount:");
define("LAN_ANTEUP_PREFS_04", "The amount of money you are requesting.");
define("LAN_ANTEUP_PREFS_05", "Due Date:");
define("LAN_ANTEUP_PREFS_06", "The date by which you want to receive your target donation. Defaults to the last day of the month.");
define("LAN_ANTEUP_PREFS_07", "Date Format:");
define("LAN_ANTEUP_PREFS_08", "Format you would like dates to be displayed on the plugin.");
define("LAN_ANTEUP_PREFS_09", "Donation Request Blurb");
define("LAN_ANTEUP_PREFS_10", "Text to convince people to donate. Displayed on the donations page.");
define("LAN_ANTEUP_PREFS_11", "Show progress bar?");
define("LAN_ANTEUP_PREFS_12", "Displays a progress bar of your current donations to your goal.");
define("LAN_ANTEUP_PREFS_13", "Show initial balance?");
define("LAN_ANTEUP_PREFS_14", "Displays the balance prior to the current due date.");
define("LAN_ANTEUP_PREFS_15", "Show current donation amount?");
define("LAN_ANTEUP_PREFS_16", "Displays the amount of donations received so far.");
define("LAN_ANTEUP_PREFS_17", "Show total balance?");
define("LAN_ANTEUP_PREFS_18", "Displays the entire donation balance.");
define("LAN_ANTEUP_PREFS_19", "Show goal amount?");
define("LAN_ANTEUP_PREFS_20", "Displays the goal donation amount.");
define("LAN_ANTEUP_PREFS_21", "Show due date?");
define("LAN_ANTEUP_PREFS_22", "Displays the due date.");
define("LAN_ANTEUP_PREFS_23", "Show amount left?");
define("LAN_ANTEUP_PREFS_24", "Displays the amount of money you need to get before you met your goal.");
define("LAN_ANTEUP_PREFS_25", "Show configuration link?");
define("LAN_ANTEUP_PREFS_26", "Displays the link to this page on the menu item.");
define("LAN_ANTEUP_PREFS_01_A", "Menu Title");
define("LAN_ANTEUP_PREFS_01_B", "The caption for your menu item.");
define("LAN_ANTEUP_PREFS_02_A", "Default Currency");
define("LAN_ANTEUP_PREFS_02_B", "The currency you want displayed around your site.");
define("LAN_ANTEUP_PREFS_03_A", "Donation Goal");
define("LAN_ANTEUP_PREFS_03_B", "Your goal donation amount.");
define("LAN_ANTEUP_PREFS_04_A", "Due Date");
define("LAN_ANTEUP_PREFS_04_B", "The date you would like to get your donation goal.");
define("LAN_ANTEUP_PREFS_05_A", "Previous Due Date");
define("LAN_ANTEUP_PREFS_05_B", "Your last due date.");
define("LAN_ANTEUP_PREFS_06_A", "Menu Text");
define("LAN_ANTEUP_PREFS_06_B", "The text you want to display on your donation menu.");
define("LAN_ANTEUP_PREFS_07_A", "Donate Page Text");
define("LAN_ANTEUP_PREFS_07_B", "The text you want on your donate page. Make it romantic.");
define("LAN_ANTEUP_PREFS_08_A", "Donations Page Viewclass");
define("LAN_ANTEUP_PREFS_08_B", "Select the userclass that can view your donations page. This should not be confused with donate.php!");
define("LAN_ANTEUP_PREFS_09_A", "Donate Menu Viewclass");
define("LAN_ANTEUP_PREFS_09_B", "Select the userclass that can view your donation menu.");
define("LAN_ANTEUP_PREFS_10_A", "Donation Button Image");
define("LAN_ANTEUP_PREFS_10_B", "Image to use on your donate page and donation menu.");
define("LAN_ANTEUP_PREFS_11_A", "PayPal Address");
define("LAN_ANTEUP_PREFS_11_B", "Your PayPal email address. Donations cannot be accepted without it!");
define("LAN_ANTEUP_PREFS_12_A", "Date Format");
define("LAN_ANTEUP_PREFS_12_B", "Refer to the toDate() parser function in the developers manual on e107.org");
define("LAN_ANTEUP_PREFS_13", "short");
define("LAN_ANTEUP_PREFS_14", "long");
define("LAN_ANTEUP_PREFS_15", "relative");

// Currencies
define("LAN_ANTEUP_CURR_01", "Currency Symbol");
define("LAN_ANTEUP_CURR_02", "Code");
define("LAN_ANTEUP_CURR_03", "Symbol Location");
define("LAN_ANTEUP_CURR_04", "front");
define("LAN_ANTEUP_CURR_05", "back");
?>
Loading

0 comments on commit e7c9b12

Please sign in to comment.