Styleguide: Difference between revisions

Content deleted Content added
Cbarr (talk | contribs)
m Socialmedia template no longer needed
 
(23 intermediate revisions by 3 users not shown)
Line 1:
'''Note: some of this documentation needs to be updated'''
 
==Introduction==
In order to get an better picture of how the templates on donate.wiki relate to one another review the images below. The Landing Page is chopped up into many templates so that we can change and test individual pieces of the page without changing core functional pieces of the page. This provides us with more stability for a broader range of users.
Line 11 ⟶ 13:
 
==Banner==
Banner settings completely determine which landing page is displayed, in which language, and where the page runs. All banners call the [[Template:Lp-layout-default]] template and pass it the names of 4 templates. The default values follow:
*[[Template:2011FR/Appeal-template-default]]
*"Appeal-default"
Line 19 ⟶ 21:
For specifics of the donate.wiki versions of the banner code visit [[Styleguide/Banner]].
 
==Appeal Templates==
The "2011FR/'''Appeal-default'''" is used by [[Template:2011FR/Appeal-template-default]] to call the following 2 templates:
*[[Template:2011FR/Appeal-default/text/en]]
*[[Template:2011FR/Appeal-default/title/en]]
 
==Donation Form Templates==
==Payment==
The template that ties together the payment form on the right of the page is [[Template:2011FR/Form-template-default]]. The country specific details are set by the template [[Template:2011FR/Form-countryspecific-control]].
 
===Form-countryspecific-control example===
This is example code from [[Template:2011FR/Form-countryspecific-control/AU]].
<codepre>
<html>
</html>
Line 58 ⟶ 60:
<html>
</html>
</codepre>
 
===Payment Processing===
This part of the code pulls in the display method for the donation options and sets the values to be displayed. The "donate-amount-*" perimeters set the values that will be used in the country. These values are in the currency that has been set as the local currency.
*[[Template:2012FR/Form-section/PaymentmethodsProcessing/StatusDefault]]
<pre>
This template pulls in the payment processing.
{{2011FR/Form-section-radiobuttons
Currently, there are the following credit card combinations available:
| country = {{{country}}}
*cc-vm - Visa, Master Card
| uselang = {{{uselang}}}
*cc-vma - Visa, Master Card, JCB
| currency = {{2011FR/core-currency-code|{{{country}}}}}
*cc-vmj - Visa, Master Card, American Express
| donate-amount-0 = 5
*cc-vmaj - Visa, Master Card, American Express, JCB
| donate-amount-1 = 10
| donate-amount-2 = 20
| donate-amount-3 = 25
| donate-amount-4 = 50
| donate-amount-5 = 100
| donate-amount-6 = 250
}}
</pre>
 
==Helper=Donation TemplatesAmounts===
*[[Template:2011FR2012FR/lpForm-social-mediasection/Radiobuttons/Default]]
This part of the codetemplate pulls in the display method for the donation options and sets the values to be displayed. The "donate-amount-*" perimeters set the values that will be used in the country. These values are in the currency that has been set as the local currency.
 
===Payment Methods===
ThisThere is a list of all the payment methods that can be added to a country at [[Template:2012FR/Form-section/Paymentmethods]].
 
==Helper Templates==
===Currency templates===
The following 2 templates contain the information needed to get currency details.
Line 97:
 
===Payment method templates===
There is a list of all the payment methods that can be added to a country at [[Template:2012FR/Form-section/Paymentmethods]].
The following template is used to turn on and off payment methods by toggling the "display" value stored inside the template between "block"(on) and "none"(off).
*[[Template:2012FR/Form-section/Paymentmethods/Status]]
 
===Misc. Templates===
This is a list of all the payment methods that can be added to a country:
*[[Template:Numstaff]] - Controls the # we display for our staff count.
*[[Template:2012FR/Form-section/Paymentmethods/Banktransfer]]
*[[Template:2012FR/Form-section/Paymentmethods/Cash/Boletos]]
*[[Template:2012FR/Form-section/Paymentmethods/Cash/Westernunion]]
*[[Template:2012FR/Form-section/Paymentmethods/Creditcard]]
*[[Template:2012FR/Form-section/Paymentmethods/Directdebit]]
*[[Template:2012FR/Form-section/Paymentmethods/EWallet/Alipay]]
*[[Template:2012FR/Form-section/Paymentmethods/EWallet/Nordea]]
*[[Template:2012FR/Form-section/Paymentmethods/EWallet/PayPal]]
*[[Template:2012FR/Form-section/Paymentmethods/EWallet/Skrill]]
*[[Template:2012FR/Form-section/Paymentmethods/EWallet/Webmoney]]
*[[Template:2012FR/Form-section/Paymentmethods/EWallet/Yandex]]
*[[Template:2012FR/Form-section/Paymentmethods/Link/PayPalEUR]]
*[[Template:2012FR/Form-section/Paymentmethods/Link/PayPalUSD]]
*[[Template:2012FR/Form-section/Paymentmethods/OnlineBT/BPay]]
*[[Template:2012FR/Form-section/Paymentmethods/Realtime/EPS]]
*[[Template:2012FR/Form-section/Paymentmethods/Realtime/Enets]]
*[[Template:2012FR/Form-section/Paymentmethods/Realtime/Giropay]]
*[[Template:2012FR/Form-section/Paymentmethods/Realtime/Ideal]]
*[[Template:2012FR/Form-section/Paymentmethods/Realtime/Sofort]]
 
==F.A.Q.==
Line 149 ⟶ 130:
 
===How do I customize Landing Pages for a country?===
To customize the donation forms for each country changes need to be made to the corresponding "Form-countryspecific-*" and "Form-template-*" templates.
 
===How do I add new payment methods?===
To add new payment methods 1 template needs to be edited and 1 new template must be created.
 
The template that must be edited is [[Template:2012FR/Form-section/Processing/Default]] and a new "Form-section/Paymentmethod/*" template must be made.
 
===How do I enable or disable payment methods?===
Each payment method has a master switch that can disable all processing of that type. The switch is located in the template [[Template:2012FR/Form-section/Paymentmethods/Status]]. By going to this template and changing the CSS property "display" to either "block" or "none", one can enable or disable payment methods respectively.
 
Enabling and disabling payment methods for individual countries can be done by adding and removing the payment method templates listed above from the "Form-countryspecific-*" template.
 
==Tools==
===Scripts===
[[Styleguide/Scripts]]