919 - 926 - 9847

My First Farcry Plugin... it's done, and here it is

Alrighty. I've created a zip of the plugin, and it will be available from here to download.

Installation instructions:

1) Install the latest version of FarCry Beta from either Jeff Coughlin's site or from the FarCry CMS page. Pertinent installation information can be found at their respective sites.

2) Modify your project//www/Application.cfm so that the plugins list includes massMailer in the list. This is a comma delimited list.

3) Open the FarCry admin and click on the Admin tab. Select COAPI from the dropdown list, and then click types. Deploy the three massMailer types. Next click rules, and deploy the massMailer rule.

Usage

Example 1: You want to have a form add a user to an email distribution list.

1) Open the FarCry admin and click on the Mass Mailer tab.

2) Click (in the left hand pane) the Mass Mailer List to create a new list.

3) Click Add to create a new List. Each List has two properties, a name, and a list of emails. We'll only worry about the name for now. Give the List a name, and Save.

4) Open a window to view your FarCry site. Switch to Design Mode, and click on a container where you'd like the new form to reside.

5) Choose the Mass Mailer Rule from the list, and add it to the container using the Commit button. This should take you to the next step. From here, select the Display Method (one is supplied for you), and use the Open Library to add a list. You can add only one list per rule! I'm thinking of modifying this in the future, but for now it stays. Save the results.

6) Refresh the page, and you should now see a form containing the Name and Email fields. Complete the form, and once submitted, it will add a new entry to your list (as well as create a new massMailerUser object). To verify, open the FarCry admin/Mass Mailer Tab and edit the Mass Mailer List you just created.

Example 2:

1) Follow steps 1-3 above. While still in the open library, you can choose to attach a new object.

2) Otherwise, click Mass Mailer User, add the new user, and then attach using the open library from Mass Mailer List.

Sending Mail

1) Open the FarCry admin, and click the Mass Mailer tab.

2) Click on the Mass Mailer link in the left hand pane. And then click Add from the top navigation.

3) Fill out the form fields as required. You need, at minimum, the Subject and List (open library). You can add as many lists as you like to the email.

4) There is a plan to add an attachment to the emails, but that's slated for the next release.

5) Save the object. Then select the object, and from the top/central navigation buttons, click Send.

The end! Tomorrow (or as time permits) I'll break down the objects and the "Why" of it.

Comments (Comment Moderation is enabled. Your comment will not appear until approved.)
Matthew Bryant's Gravatar Congratulations Matthew, the first non-Daemon developed farcry plugin for 4.0. I'm extremely impressed. I've installed it without a hitch.

One small point though (caused by another recent change made to core ;-). You now need to wrap the admin:header and admin:footer around objectAdmin because it doesn't include this by default. The idea of this change was to allow objectAdmin to be run outside the webtop and to include your own header/footer. Take a look at the latest customLists in the farcryCMS plugin.

Cheers, Mat.
# Posted By Matthew Bryant | 2/21/07 5:14 PM
Matthew Williams's Gravatar Glad ya'll like it. I've been digging farcry since the 2.x, and it's only getting better! I'll snag the latest build from Jeff tonight, and apply those changes. I also should refactor the webskin, since it's really just a frankenstein of library.cfm. There's likely a better way, but I'm happy that I was able to use only FarCry based objects to get the task done :).
# Posted By Matthew Williams | 2/21/07 6:36 PM