Linux 软件免费装

AJAX Signup forms for Drip

开发者 aliakro
更新时间 2015年8月21日 04:34
捐献地址: 去捐款
PHP版本: 4.2.0 及以上
WordPress版本: 4.2.2
版权: GPLv2 or later
版权网址: 版权信息

标签

mail ajax list subscribe drip sweetalert

下载

1.0 1.1

详情介绍:

"AJAX Signup forms for Drip" is a plugin that allows you to place one or more subscribe forms for Drip (www.getdrip.com) on your site. Using Shortcodes (or direct PHP calls) a form that captures an email address can be placed. Using AJAX, the email is submitted to Drip (www.getdrip.com) without refreshing the page. All dialog boxes are presented using Sweet Alert (http://t4t5.github.io/sweetalert/). You can drop as many shortcodes as you wish and a new subscribe form is dropped. You can associate each form with a Drip Campaign by specifying the ID (shortcode attribute "campaign_id"). Once a form has been completed successfully, a CSS class (defined by shortcode attribute "already_submitted_class") is added to all Drip AJAX Signup forms and a cookie is set. This allows you to hide them if you wish. Please read the FAQ on how to place the shortcode / PHP call.

安装:

  1. Login into Wordpress Admin Panel
  2. Goto Plugins > Add New
  3. Search for "Drip AJAX Signup"
  4. Install
  5. Goto Tools > Drip AJAX Signup and complete the relevant fields
Read the guide on Tools > Drip AJAX Signup on how to place a Subscribe form.

屏幕截图:

  • Default unstyled Signup form
  • Form in progress of being submitted (throbber displayed)
  • Form succesfully submitted
  • Display error from Drip
  • Screenshot of Admin page

常见问题:

To get an API key follow these steps:

  1. Goto https://www.getdrip.com/user/edit
  2. Copy API Token. Paste these into the settings page fpr Drip Signup

To get a campaign ID:

  1. Goto your campaigns page (e.g. https://www.getdrip.com/1111111/campaigns)
  2. Click on the desired campaign
  3. You should see a link like https://www.getdrip.com/1111111/campaigns/5151381 Copy the number at the end of the URL. In this case 5151381 - this is your campaign ID.

To get your account ID:

  1. Goto Settings page: https://www.getdrip.com/
  2. Goto Settings > Site Setup
  3. Copy Account ID under third party integrations

How do I add a Drip Ajax Signup form to a page / post?

On the page you require a Drip signup form, simply place the following shortcode: [drip-signup campaign_id="12345678"] The shortcode supports the following attributes: campaign_id - mandatory. This is the Drip Campaign that the visitor should be subscribed to. Read the FAQ section to get more information on getting a campaign ID. form_class - optional. The CSS class that should be applied to the form; this allows you to style the form as you wish via style sheets. Default: ''. placeholder_text - optional. The default placeholder text that appears in the email address text box. Default: 'Enter your email address'. button_text - optional. Specifies the text on the submit button. Default: 'Submit'. already_submitted_class - optional. Specifies the class that should be applied to the form if the user has already subscribed. Default 'yk-ds-hide-form' loader_colour - optional. Specifies the colour of the animated "loading" graphic. This allows you to contrast it against backgrounds. Default: '#000000' hide_another_element_on_page - optional. This attribute allows you to specify the ID of another HTML element on the page. When a form is submitted or a cookie has been detected, the css class specified by argument "already_submitted_class" will also be applied to given HTML element. For example this allows you to hide a div containging the form and other text. Default: none. Here is a full example: [drip-signup campaign_id="12345678" form_class="my-css-form-class" placeholder_text="Enter your email address" button_text="Subscribe" already_submitted_class="my-css-form-submitted" hide_another_element_on_page="id-of-another-html-element"]

How do I use the shortcode via template / PHP calls?

If you wish to render a form via PHP, use the following sytnax: if (function_exists('yk_ds_shortcode')) { $shortcode_args = array( 'campaign_id' => 12345678, 'form_class' => 'my-css-form-class', 'placeholder_text' => 'Enter your email address', 'button_text' => 'Subscribe', 'already_submitted_class' => 'my-css-form-submitted', 'loader_colour' => '#000000', 'hide_another_element_on_page' => 'id-of-another-html-element' ); echo yk_ds_shortcode($shortcode_args); }

Forms no longer appear?

Once a user has subscribed to a form, a generic cookie is dumped. If detected, the class specified by already_submitted_class parameter is applied to the form. This means your form maybe getting hidden as the user has already subscribed. You can test this by ensuring your CSS doesn't cause elements with that class to be hidden.

Cookies aren't being set?

By default cookies are set using PHP. This however may not work on some setups (for example due to caching). Therefore, you can specify that cookies are set via JavaScript. To do this, go to the admin page. Settings > Drip Ajax Signup. Ensure "Use JavaScript to set Cookies?" is set to "Yes".

更新日志:

1.1 1.0