PDA

View Full Version : LancerForHire - Paid Registration [and Anti Spam!]



PhucSD
20-06-2011, 08:01 PM
Mission

Complete the vBulletin experience by providing much needed functionality and putting money in your pocket.

Overview

This product allows (and can require) visitors to select a paid subscription at registration time. Be sure to read the license, FAQ's, and notes below!

War on Spam

If you disable free registration it is virtually impossible for spam bots to sign up (even with a one-time 49-cent payment). In the case of a human spammer, payment would have to be made to gain access to spam your board. To top it off, you have a Transaction ID which you can take to the payment processor (e.g. PayPal) who has the spammer's address and contact information. At the very minimum, you can contact the authorities and have a solid form of recourse. At best you can pursue legal action. After receiving payment and the registration is complete, you can refund the fee so registration is actually free, yet retain the spam-deterring effects of paid registration!

Before installing this modification for spam prevention, you must disable registration and purge the existing spammers. After proper installation, you can enable registration with peace of mind.

3.x/Legacy Version
A legacy version of the modification (working for versions 3.6.9 to 3.8.7) has been released! All legacy product xmls are suffixed with -legacy to distinguish them from the 4.x versions. All legacy versions are kept fully up-to-date with 4.x releases in the same time frame.

Professional Installation Service
Due to demand, I am providing a professional installation service for this modification at a low cost. I am only doing this for 20 clients(11 slots remain), and only for a limited time, so send me a PM immediately if you would like for me to install this modification on your board.

Keep in mind this is not a support service; it is an installation service.

License
Copyright 2011 LancerForHire <lancerforhire@gmail.com>. All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are
not permitted.

THIS SOFTWARE IS PROVIDED BY LANCERFORHIRE ``AS IS'' AND ANY EXPRESS OR IMPLIED
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL LANCERFORHIRE OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Install Summary
Difficulty: Easy
Time: 5 minutes

1+ Subscription Permission Changes
1 Xml Import
1 File Edit (2 Instances [1 for 3.x/legacy])

Let's install! (be sure to click install and vote for MOTM! http://www.vbulletin.org/forum/images/smilies/wink.gif)
Make each subscription accessible to the Users Awaiting Email Confirmation group in the subscription permissions. Any subscription you do not do this for will not show on the subscription selection page.
Import the product xml.
Download register.php from your forum root and open it. In register.php, find each (2 [1 for 3.x/legacy]):


= $userdata->save();
Add below each:



if ($userId) { $vbulletin->userinfo['userid'] = $userid = $userId;}
Upload register.php.
The product installation is complete. http://www.vbulletin.org/forum/images/smilies/smile.gif

Frequently Asked Questions (HELP)
I posted a question or support request regarding the product and did not receive a response from the modification author. What can I do?
I use a special thread reader that only shows the questions of those that have downloaded the product and marked it as installed. If you are still not receiving a reply, the answer to your question is listed in this FAQ.
I do not want visitors to be able to register for free; how can I disable free registration?
Set AdminCP > Settings > Options > LancerForHire - Paid Registration > Allow Free/Unpaid Registrations to No.
I got a product error with some sort of code.
Product errors are reported with a code. This is what they mean:
Code:

329865343No subscriptions accessible to "Users Awaiting Email Confirmation" usergroup.2245760575Data Manager error; regular expression that does not match "Pending Subscription 123".3525174458, 4260190346Internal query error; this should not occur. Please report this.3227546689Paid Registration Key cookie expired or tampered with.2566107177Session hash cookie is not set. This can be caused by the user having cookies disabled or attempting to register behind a proxy.2764966795Cannot find user note with registration key.
I see one or more users with the username Pending Subscription n. What are those? Can I delete them?
We refer to these as ghost users. Ghost users are generated when an order is started and they will receive the subscriptions that are purchased. When payment and registration are completed, the ghost user will have it's details (e.g. username, password, email, etc.) replaced with the ones the visitor entered at registration, and this user will become the new subscriber. Do NOT tamper with ghost users, their user notes (reading does not count as tampering), or their resources in any way including deletion, or you will experience unexpected results.
In step 2 of the installation instructions, I can only find one instance of:Code:

= $userdata->save();
In older versions of vB4, like those without facebook connect built in, there will only be one instance to find and add below.
Why do new subscribers not receive an email from my board after paying?
This is a limitation on vBulletin's side; there is no payment method-agnostic way to retrieve the payer's email address, and there are no similarly-agnostic plugin hooks after transactions are completed. Some payment processors like PayPal include the item number in the payment details (which is the registration key), but this may not hold true for all of the payment processors.
Changelog

1.9/1.3-Legacy: Removed the need to change the username maximum length to accommodate ghost usernames; this also narrows down the data manager error to a bad username regex, if it ever appears.
1.8/1.2-Legacy: Added a no permission error for registered users attempting to use the paid registration actions. Previously, this would be handled by the core registration script as an invalid action and it would exit with no output.
1.7/1.1-Legacy: Minor optimization.
!1.6: Added "Ghost Buster" plugin to daily cron job for pruning ghost users that have not completed orders and not become subscribers. Also added version check.
!1.0-Legacy: First legacy production release! Same changes as version 1.6 minus version check (cannot do this for both the 4.x and legacy version).
!0.1-Legacy: Legacy beta release.
1.5: 4.x dependency code added in preparation for the legacy release.
1.4: Removed dead code from many templates and updated the template caching plugin to cache all of the product's current templates.
1.3: Separated the logic and presentation of the cost-options for each subscription, and removed presentation from product controller. The cost-option presentation code is now located in the new lancerforhire_paid_registration_subscription_cost template. This presentation change required the replacement of the subscription_availablebit template withlancerforhire_paid_registration_subscription_a vailablebit. The end result is full control to change the subscription selection page without having to change plugins. A big shout out goes to HellRZR for the idea of doing something like this, and for the time he invests into making this product better for the community!

Here is an example of what you can do with the changes introduced in 1.3. This screenshot is brought to you by HellRZR andsideXside.ca (http://sidexside.ca/):
http://itvnn.net/attachment.php?attachmentid=3565&stc=1&d=1308574859

3.x/Legacy:

There are three different templates to edit instead of one like the 4.x version due to the lack of a looping tag in the 3.x template syntax. These templates are:
lancerforhire_paid_registration_subscription_cost
lancerforhire_paid_registration_subscription_cost_ bit
lancerforhire_paid_registration_subscription_cost_ bit_option

1.2: Added an installation step, fixed a bug that was causing error 2245760575 to not show, and changed the description for error 2245760575. Boards with a username maximum length at or above the default of 25 were not affected by this (now fixed) bug.
1.1: Cleaned up the select subscription page appearance and added page titles to modification pages.
!1.0: First stable release!
0.8: Added a message and link to the top of free registration form so visitors may select a paid subscription if they change their minds.
!0.7: Fixed a bug that would prevent free registrants from activating their accounts.
!0.6: Fixed a showstopper bug that caused error 2764966795 in version 0.5.
0.5: Code polished, phrases changed, dead code removed, functions added, some error codes changed, and security improved.
0.4: Changed version scheme and added a notice below the navigation bar for paid registrations to let the visitor know their payment succeeded. Also changed notes regarding payment methods; all payment methods are now supported.
0.0.3: Added email warning to webmaster when a registration is completed and the file edits in step four of the installation instructions are not done. This email will usually be sent after an incomplete product installation or vBulletin update was performed.
0.0.2: Added template groups, moved subscription template changes into independent templates to address the previous bug that deleted the default ones, and added template caching for all product templates.
0.0.1: Beta release.
Notes

If a user paid but lost their session and cannot finalize registration, request the Transaction ID. Then, go to AdminCP > Paid Subscriptions > Transaction Log > Tranaction Lookup, enter the Transaction ID, and hit "Go". If a transaction appears, visit the profileoutside of the AdminCP of the ghost user that appears and check for a user note titled "Registration Key Lookup". Read this note for further instructions. Do not edit the ghost user.