CAPA webmaster notes

NOTE: please add tips, tutorials and debugging logs here for future CAPA webmasters. This page is created in March 2021 by JS, and initial notes are from his experience from 2020-2021 ONLY.

How to edit Homepage (newsletter thumbnail images, etc.)

Much of the homepage is HARDCODED, and you need to manually edit "front-page.php". For example, to update the newsletter thumbnail images.  Make sure you create a thumbnail with the exact same size as previous ones, then simply replace the image link, etc.  The contact information at the bottom of the front page is hardcoded in file “footer.php”, which can be edited using “Theme Editor”.  For example, the email was changed from info@capa-ht.org to membership@capaht.org. You may also need to change the P.O. box and mailing address.

Member management system and Payment system issues

On a day decided by membership committee, usually in October, for new members who join, and regular members who renew, their active membership status will last until the end of "next" year. 

Problem: after a regular member renewed his membership in October 2020, his status in eMember plugin is still “regular 2020 member” instead of "regular 2021 member".  His profile also displays as "regular 2020 member". And his receipt from PayPal shows "2020 membership" as purchased item.

Solution:

First create a new "regular 2021" user level. Edit the page https://887m.redundant-webservers.com/~capahtor/updated/join-us/registration-regular-member/  There is a shortcode for the registration form.  The shortcode for 2020 member is: wp_eMember_registration_form_for level=6  and it needs to changed to:  wp_eMember_registration_form_for level=7

After that the registration process will automatically assign people to 2021 membership level. 

The following addresses the payment issue.

The payment button for renewing regular membership only appears after a user login, and is coded on this page:  https://www.capa-ht.org/join-us/

There are two payment buttons, one for regular and one for lifetime membership. "Regular" button is linked to this shortcode emember_payment_button id=3563 and "lifetime" to this shortcode emember_payment_button id=1115

At Dashboard -> WP eMember -> Payments -> Payment buttons, you need to edit the payment button 3563 to link it to "regular 2021 membership". 

Of note, PayPal, when it sends out receipts, will actually determine the “item name” on the receipt based on the form (see below) posted by clients (in our case, CAPA website).  It has nothing to do with the PayPal account, which is only accessed by CAPA treasurer.  After the fix described above, the automatic PayPal receipt should display “regular membership 2021” as the purchased item. 

<!

 <form action="https://www.paypal.com/cgi-bin/webscr" method="post" ><input type="hidden" name="cmd" value="_xclick" /><input type="hidden" name="charset" value="utf-8" /><input type="hidden" name="bn" value="TipsandTricks_SP" /><input type="hidden" name="business" value="paypal@capaht.org" /><input type="hidden" name="amount" value="80" /><input type="hidden" name="currency_code" value="USD" /><input type="hidden" name="item_number" value="3563" /><input type="hidden" name="item_name" value="Regular Membership 2021" /><input type="hidden" name="no_shipping" value="1" /><input type="hidden" name="notify_url" value="https://www.capa-ht.org/?emember_process_paypal_ipn=1" /><input type="hidden" name="return" value="https://www.capa-ht.org/thank-you/" /><input type="hidden" name="cancel_return" value="https://www.capa-ht.org" /><input type="hidden" name="custom" value="subsc_ref%3D7%26eMember_id%3D287" /><input type="image" src="/wp-content/uploads/2018/10/button_pay-now.png" class="emember-buy-now-button-submit" alt="Buy Now"/></form>

-->

How to manage CAPA elections?

Just updated and re-activated YOP Poll plugin for January 2021 election. This plugin was first used in 2018 election. Not sure how 2019 and 2020 elections were done (Eric Ruan was the webmaster then).

Created a new YOP poll and customize the messages. We are NOT sending acknowledgement emails after each vote. However, you can customize the "Thank you for voting. Your vote has been registered" message to make the text very big. 

One week before election, need to open a "test election" for members to test vote. Use the same YOP poll, and only change candidate's name to dummy.  When the actual election is starting, simply change the names back and CLEAN all previous voting records.  During the election, minimize or disable admin and editor access to website for privacy. 

When the election ends, open the poll with designated election monitors.  Save results and make screenshots. Send results to election committee chair. Then delete all poll data from website.

Troubleshooting member registration system

12/29/2020
Member registration form stopped working. This is possibly due to updates to plugins and/or a new version of WordPress.  I had to change the WP eMember custom form “CAPA registraton[sic]” to remove the required checkbox for “terms and conditions”.   People who tried to register seem to get stuck on “this field is required” error message, even after they check this box. 

“Forgot password” link stopped working.  When clicked it only shows “javascript void(0)”. Here is a link to online discussion: https://support.tipsandtricks-hq.com/forums/topic/forgot-password-function-not-working   We could ask members to use WordPress’s own password reset page at wp-login.php. But it may not be an ideal solution. 

https://www.capa-ht.org/membership-login/password-reset/  this is an old password reset page:

right now it has this shortcode swpm_reset_form - this is from a different plugin I used before 2018.

Changed it to this shortcode wp_eMember_password_reset

And updated WP eMember settings at Page/Form settings to redirect to this page.

Also confirmed that the password reset/changing password functions from eMember User Interface and wp-login.php are synchronized. Changing one will automatically change the other.

Problem fixed, for now at least.

 

Administrators and editors

Please note the all administrators and editors should be UNIQUE users that are DIFFERENT from their regular eMember users. The latter is used for CAPA member business such as casting votes. Membership committee also use the latter for group emails, etc.

In another word, all administrators and editors should only login through wp-login.php instead of the public login interface created by eMember, and these user profiles DO NOT even exist in eMember database - they are created in WordPress's native user management system.

The reason is: eMember will automatically check its users and re-assign them to "subscriber" in WordPress user system (if a user also exists in WordPress user system).  This may be a bug in eMember, or a feature? It seems the synchronization happens whenever the user login to eMember.

 

New Case Forum

This is a log for the procedure I took to set up the new case forum, developed a Chinese firm.

On bluehost.com, created a new subdomain forum.capaht.org

Then created a new mysql database capahtor_caseforum and a new database user capahtor_forum

Upload the initial .sql file (described below) from the developer, which contains a number of test users.  Import has been successfully finished, 953 queries executed. (vip0476-database-file.sql)

Updated the two .config files with database information and also the URL of the new website.

Source code is uploaded to: home4/capahtor - public_html/forum 

First run under windows “tar -czvf bbs.tar.gz .\bbs”  to gzip the entire folder.  .\ is necessary.

Upload and unzip the gzip file with cPanel File Manager.

After uploading/unzipping files, still cannot open http://forum.capaht.org/bbs/index.php

Need to change the file permission for the ENTIRE data folder including subfolders to 777.