JUK 2013-implementation-wo-coding

62
Implementation without coding using Community Builder framework tools @ JoomlaDay UK 2013

description

Presentation slides given at Joomla Day UK 2013. Describes the powerfull CB Auto Actions plugin and how it can be used to implement workflows without

Transcript of JUK 2013-implementation-wo-coding

Page 1: JUK 2013-implementation-wo-coding

Implementation without coding using Community Builder

framework tools  

@ JoomlaDay UK 2013

Page 2: JUK 2013-implementation-wo-coding

© Joomlapolis - 2013 2

Hello ….Is everyone having fun?

JUK-2013

Page 3: JUK 2013-implementation-wo-coding

© Joomlapolis - 2013 3

Our profiles:

Nick A. Beat B.

‘beat’ on forums Lake Geneva,

Switzerland MS EE/CS, PhD CS Internet security /

web-apps “Make it as simple as

possible, but no less”

‘nant’ on forums Athens, Greece MS EE, MS CS Telecom / CIO “Good engineers don’t

need tools, bad ones also have no use for them”

JUK-2013

Page 4: JUK 2013-implementation-wo-coding

© Joomlapolis - 2013 4

Reminder

JUK-2013

Page 5: JUK 2013-implementation-wo-coding

© Joomlapolis - 2013 5

Presentation Agenda Universal uniqueness principle Hacking vs. coding 90% of code is just overhead Community Builder™ framework Available CB Solutions CB Auto Actions CBSubs GPL SQL and URL actions CB Query field and CB Database lookup field Use case examples Summary

JUK-2013

Page 6: JUK 2013-implementation-wo-coding

© Joomlapolis - 2013 6

Everything is unique

Always rememberyou’re

uniqueJust like

everyoneelse

JUK-2013

Page 7: JUK 2013-implementation-wo-coding

© Joomlapolis - 2013 7

Hacking vs. programming

What’s your

definition?

JUK-2013

Page 8: JUK 2013-implementation-wo-coding

© Joomlapolis - 2013 8

More

Hacking vs. programming One opinion I have heard expressed is that a

hacker can put a lot of code together in a hurry but if a change is needed the code has to be completely rewritten.

A programmer may take a little longer but if changes are needed they are more quickly and easily installed without the need for a complete rewrite.

Hacking is usually described as “quick and dirty.”

Programmers research, think ahead, design and implement,Hackers just make the ”fix” and move on

JUK-2013

Page 9: JUK 2013-implementation-wo-coding

© Joomlapolis - 2013 9

90% of code is overhead Input handling Exception handling & special cases Output presentation Language readiness Joomla has event triggers, but coding is still needed

What if we could easily interject our use case logic

in the right place without modifying existing code

and with no overhead?

JUK-2013

Page 10: JUK 2013-implementation-wo-coding

© Joomlapolis - 2013 10

More Community Builder™

architecture

JUK-2013

Page 11: JUK 2013-implementation-wo-coding

© Joomlapolis - 2013 11

Available CB Solutions

CBFramework

UserProfiles

OrganicGroups

PaidMembers

ActivityStreams

CB Connect

Integra-tions

Fields, tabs,apps

Empower your users

Subscribe for privileges

Motivate participation

Joomla, Kunena, uddeIM, K2 …

Facebook, Twitter, Linkedin,

Google+, Live

Auto actions

JUK-2013

Page 12: JUK 2013-implementation-wo-coding

© Joomlapolis - 2013 12

CB Solution answers

What if we could easily interject our use case

logic in the right place without modifying

existing code and

with no overhead?

Community Builder tools that address this:

CB Auto Actions CBSubs GPL SQL

Actions CBSubs GPL URL

Actions CB Query field CB DB Lookup

validation field

JUK-2013

Page 13: JUK 2013-implementation-wo-coding

© Joomlapolis - 2013 13

CB Auto Action Triggers

Event Triggers Community Builder:

43 frontend, 20 backend, 20 fe & be

GroupJive: 206 CBSubs: 26 Activity: 12 Privacy: 25 Antispam: 40

Conditional filtering CB Field before/after Rich unlimited AND

criteria

JUK-2013

Identify event

Choose action

Add your use case logic

Page 14: JUK 2013-implementation-wo-coding

© Joomlapolis - 2013 14

CB Auto Action Types

CB Activity AcyMailing CBSubs GPL Code Connection Email Field FlySpray GroupJive K2 Kunena

Login/Logout Private Message Query Redirect Registration Request Usergroup VirtueMart CiviCRM

JUK-2013

Page 15: JUK 2013-implementation-wo-coding

© Joomlapolis - 2013 15

CB Activity Action

Activity Action settings: Owner (id) User (target user) Type (activity type) Sub-Type Item (item id) From (old value) To (new value) Title (activity entry

title) Message (act.

message) Icon (icon name) Class (class name)

Use Case Examples

Mood field change activity

About me update activity

JUK-2013

Page 16: JUK 2013-implementation-wo-coding

© Joomlapolis - 2013 16

More

Mood field change activity

JUK-2013

http://www.joomlapolis.com/support/tutorials/107-use-cases/18338-adding-your-own-events-to-activity-stream

Page 17: JUK 2013-implementation-wo-coding

© Joomlapolis - 2013 17

AcyMailing Action

AcyMailing Action Settings: Subscribe Unsubscribe Remove Pending

Use Case Examples

Subscribe during registration based on field selected

Subscribe/Unsubscribe when user joins/leaves a GJ group

Variation with CBSubs plan

JUK-2013

Page 18: JUK 2013-implementation-wo-coding

© Joomlapolis - 2013 18

More

AcyMailing Action example

JUK-2013

Page 19: JUK 2013-implementation-wo-coding

© Joomlapolis - 2013 19

Antispam Action

Antispam action settings: Mode (Block,

Whitelist) Type (User, IP, email,

domain) Value (id, IP, email,

domain) Date (start date) Time (start time) Duration (how long) Reason (reason

notes)

Use Case Examples

Block user for a day when warning field reaches certain level

JUK-2013

Page 20: JUK 2013-implementation-wo-coding

© Joomlapolis - 2013 20

More

Antispam action example

JUK-2013

Page 21: JUK 2013-implementation-wo-coding

© Joomlapolis - 2013 21

CBSubs GPL Action

CBSubs Action Settings: Plans (Select plans) Mode:

SubscribeRenewUnsubscribeDelete

Use Case Examples

Subscribe user to plan when user Joins GJ Group

Unsubscribe user from plan when user specific CB field reaches a certain level(Support time consumed use case)

JUK-2013

Page 22: JUK 2013-implementation-wo-coding

© Joomlapolis - 2013 22

More CBSubs action example on GJ

join

JUK-2013

www.joomlapolis.com/support/tutorials/107-use-cases/18339-startend-cbsubs-plan-subscription-when-user-joinsleaves-a-groupjive-group

Page 23: JUK 2013-implementation-wo-coding

© Joomlapolis - 2013 23

Code action

Code Action settings: HTML PHP (eval) PHP (create_function) JS (inline) JS (URL) jQuery CSS (inline) CSS (URL) Header Page Title Pathway

(Breadcrumb)

Use Case Examples

Popup alert when user visits profile after long period of time

Registration hidden field population from URL get(Different URL-based registration forms use case)

JUK-2013

Page 24: JUK 2013-implementation-wo-coding

© Joomlapolis - 2013 24

More

Code action to popup alert

JUK-2013

Page 25: JUK 2013-implementation-wo-coding

© Joomlapolis - 2013 25

More

Code action registration form

JUK-2013

index.php?option=com_comprofiler&task=registers&Itemid=478&type=Athlete

Page 26: JUK 2013-implementation-wo-coding

© Joomlapolis - 2013 26

More

Code action registration form

JUK-2013

Page 27: JUK 2013-implementation-wo-coding

© Joomlapolis - 2013 27

Connection action

Connections Action settings: Users (ids) Message Direction

User to usersUsers to user

AcceptEnableDisabled

MethodSilentNormal CB

Use Case Examples

Establish connection of user with other user based on CB field value

JUK-2013

Page 28: JUK 2013-implementation-wo-coding

© Joomlapolis - 2013 28

Email action

Email Action settings: To Subject Body Mode (HTML, Text) CC / BCC Attachment From Address From Name Mailer

Default CBPHP MailSendmailSMTP

Use Case Examples

Send email after registration with registration data(Existing membership inquiry use case)

Send language specific emails based on CB field selection

Sending emails from different SMTP mail server(Google non-spam use case)

JUK-2013

Page 29: JUK 2013-implementation-wo-coding

© Joomlapolis - 2013 29

More

Email with member data

JUK-2013

Page 30: JUK 2013-implementation-wo-coding

© Joomlapolis - 2013 30

More

Email with member data

JUK-2013

Page 31: JUK 2013-implementation-wo-coding

© Joomlapolis - 2013 31

More Sending email from other

server

JUK-2013

Page 32: JUK 2013-implementation-wo-coding

© Joomlapolis - 2013 32

More Sending email from other

server

JUK-2013

Page 33: JUK 2013-implementation-wo-coding

© Joomlapolis - 2013 33

Field action

Field Action settings: Field Operator

Set (Field = Value)Prefix (ValueField)Suffix (FieldValue)Add (Field += Value)Subtract (Field -=

Value)Divide (Field /=

Value)Multiply (Field *=

Value) Value

Use Case Examples

Add 2 integer fields and store result in third field

Concatenate fields and store in third field

Set field value when user joins GJ group

Set field value when user subscribes to specific CBSubs plan (can also be done via CBSubs plan)

JUK-2013

Page 34: JUK 2013-implementation-wo-coding

© Joomlapolis - 2013 34

Flyspray action

Flyspray Action settings: Mode

Synchronize Delete

Add Groups (S) Remove Groups (S) Encryption (S)

MD5 SH1 CRYPT

Database Host Username Password Database Charset Table Prefix

Use Case Examples

Add new website users to flyspray database

Sync flyspray user database when user updates profile

Add user to flyspray project when they join a specific GJ group

JUK-2013

Page 35: JUK 2013-implementation-wo-coding

© Joomlapolis - 2013 35

More

Flyspray action example

JUK-2013

Page 36: JUK 2013-implementation-wo-coding

© Joomlapolis - 2013 36

More

Flyspray action example

JUK-2013

Page 37: JUK 2013-implementation-wo-coding

© Joomlapolis - 2013 37

GroupJive action

GroupJive Action settings: Auto

Join GroupsLeave GroupsNew GroupNew Category

Groups (JG, LG) Status (JG)

Active | Banned | Inactive | Moderator | Admin | Owner

Use Case Examples

Automatically create a new group based on first login and field data(voting area use case)

Join GJ group based on user field value(Interest groups use case)

JUK-2013

Page 38: JUK 2013-implementation-wo-coding

© Joomlapolis - 2013 38

More

GroupJive action example

JUK-2013

Page 39: JUK 2013-implementation-wo-coding

© Joomlapolis - 2013 39

K2 action

K2 Action settings: Mode

SynchronizeDelete

User Group (S) Gender (S) Description (S) URL (S) Notes (S)

Use Case Examples

Synchronize user to specific K2 group at first login

Delete user from K2 group when user leaves specific GJ group

JUK-2013

Page 40: JUK 2013-implementation-wo-coding

© Joomlapolis - 2013 40

Kunena action

Kunena Action settings: Name (category) Parent (category) Description

Use Case Examples

Create new forum category based on field data

JUK-2013

Page 41: JUK 2013-implementation-wo-coding

© Joomlapolis - 2013 41

Login/logout action

Login/logout Action settings: Mode

LoginLogout

Method (Login)UsernameEmail

Username (U) Email Address (El) Redirect Message

Use Case Examples

Automatically login user when email confirmation link is clicked

JUK-2013

Page 42: JUK 2013-implementation-wo-coding

© Joomlapolis - 2013 42

More

Login action example

JUK-2013

Page 43: JUK 2013-implementation-wo-coding

© Joomlapolis - 2013 43

Menu action

Menu Action settings: Title Type (UE_MENU_VIEW,

_UE_MENU_EDIT, _UE_MENU_MESSAGES, _UE_MENU_CONNECTIONS, _UE_MENU_MODERATE)

Class (e.g. _UE_MENU_MYMENU)

PositionMenu BarMenu List

URL URL Target Tooltip Image URL

Use Case Examples

Add new personalized CB Menu on a user profile

JUK-2013

Page 44: JUK 2013-implementation-wo-coding

© Joomlapolis - 2013 44

More

Menu action example

JUK-2013

Page 45: JUK 2013-implementation-wo-coding

© Joomlapolis - 2013 45

Private Message action

Private Messages Action settings: From To Subject Message

Use Case Examples

Send auto-welcome message to user when they join a specific GJ group

Send message to specific user when new member signs in

JUK-2013

Page 46: JUK 2013-implementation-wo-coding

© Joomlapolis - 2013 46

Privacy action

Privacy Action settings: Owner Type Subtype Item Rule

PublicUsersPrivateConnectionsConnections of

ConnectionsConnection Types

– Friend– Co Worker

Use Case Examples

Add privacy rule to user when user joins GJ group

JUK-2013

Page 47: JUK 2013-implementation-wo-coding

© Joomlapolis - 2013 47

Query action

Query Action settings: Query Mode

InternalExternal

Host (E) Username (E) Password (E) Database (E) Charset (E) Table Prefix (E)

Use Case Examples

Insert entry to legacy user database when new registration happens

Update legacy database when profile update happens

JUK-2013

Page 48: JUK 2013-implementation-wo-coding

© Joomlapolis - 2013 48

More

Query action example

JUK-2013

Page 49: JUK 2013-implementation-wo-coding

© Joomlapolis - 2013 49

Redirect action

Redirect Action settings: URL Message Type

MessageNoticeNoteAttentionAlertError

Use Case Examples

Redirect user to specific site URL after login when a specific CB field criteria is met

JUK-2013

Page 50: JUK 2013-implementation-wo-coding

© Joomlapolis - 2013 50

More

Redirect action example

JUK-2013

Page 51: JUK 2013-implementation-wo-coding

© Joomlapolis - 2013 51

Registration action

Registration Action settings: Username Password First Name Middle Name Last Name Fields Suppress Emails

EnableDisable

Use Case Examples

Create new account when user subscribes to specific plan(Child account use case)

JUK-2013

Page 52: JUK 2013-implementation-wo-coding

© Joomlapolis - 2013 52

Request action

Request Action settings: URL Method

GetPostXML JSON

Request (e.g. GET: name=[name], POST: username=[username], XML: <email>[email]</email>)

Return (Hide | Show) Error (Hide | Show) Debug (Hide | Show)

Use Case Examples

Call external script

JUK-2013

Page 53: JUK 2013-implementation-wo-coding

© Joomlapolis - 2013 53

Usergroup action

Usergroup Action settings: Mode

Create UsergroupAdd UsergroupsReplace UsergroupsRemove Usergroups

Groups

Use Case Examples

Add user to specific ACL user group after registration based on CB field value

JUK-2013

Page 54: JUK 2013-implementation-wo-coding

© Joomlapolis - 2013 54

VirtueMart 2.x action

VirtueMart 2.x Action settings: Mode:

SynchronizeDelete

Address type Address Name User Group Shopper Group Fields

VM fieldCB field

Use Case Examples

Add user to VM shopper group when user subscribes to CBSubs plan

Synchronize VM data from CB data

JUK-2013

Page 55: JUK 2013-implementation-wo-coding

© Joomlapolis - 2013 55

More

VM2 action example

JUK-2013

Page 56: JUK 2013-implementation-wo-coding

© Joomlapolis - 2013 56

CBSubs GPL SQL Action

CBSubs SQL(5) Action parameters: Type (database

connection): InternalExternal

Activation Renewal Expiration Deactivation

Use Case Examples

Integration with other Joomla extensions using database layer

External connections to push subscriber data to other systems

JUK-2013

Page 57: JUK 2013-implementation-wo-coding

© Joomlapolis - 2013 57

CBSubs GPL URL Action

CBSubs URL Action parameter URLs: First subscription Renewal Expiration Deactivation

All URLs pass XML/POST data to target script:

http://www.mysite.com/insert.php?username=[username]&user_id=[user_id]

Use Case Examples

Pass information to external script for integration purposes

JUK-2013

Page 58: JUK 2013-implementation-wo-coding

© Joomlapolis - 2013 58

CB Query Field

Query field parameters: Query Mode

InternalExternal

OutputSingle rowMultiple rows

ColumnsSingle columnMultiple colums

DisplayDelimiterCustom

Use Case Examples

Count number of CB Gallery items user has

Count total number of users on site

Count number of users in GJ Groups that a specific user owns(use case to give free membership to user if he has attracted many users in his groups)

JUK-2013

Page 59: JUK 2013-implementation-wo-coding

© Joomlapolis - 2013 59

More

CB Query field examples Number of users in site:

SELECT COUNT(*) FROM #__comprofiler; SELECT COUNT(*) FROM `jos_comprofiler` WHERE `approved`=1;

Number of Gallery items user has in CB GallerySELECT COUNT(*) FROM `jos_comprofiler_plug_profilegallery`;SELECT COUNT(*) FROM `jos_comprofiler_plug_profilegallery` WHERE `userid`=[user_id]

Number of GJ users in groups the specific user ownsSELECT COUNT(*) FROM `#__groupjive_users` WHERE `group` IN ( SELECT `id` FROM `#__groupjive_groups` WHERE `user_id` = '[user_id]' )

JUK-2013

Page 60: JUK 2013-implementation-wo-coding

© Joomlapolis - 2013 60

CB DB Lookup field

DB Lookup field parameters: SQL Query check SQL Query update SQL Query Roll back

Use Case Examples

Limit access to registration for only those that have active one-use code

JUK-2013

Page 61: JUK 2013-implementation-wo-coding

© Joomlapolis - 2013 61

More

DB Lookup Example Check Query:

SELECT * FROM `testcodes` WHERE `code`= '[value]' AND `userid` = '0’

Update Query:UPDATE `testcodes` SET `userid` = '[user_id]' WHERE `code`= '[value]' AND `userid` = '0' LIMIT 1

Rollback Query:UPDATE `testcodes` SET `userid` = '0' WHERE `code` = '[value]' AND `userid` = '[user_id]' LIMIT 1

JUK-2013

Page 62: JUK 2013-implementation-wo-coding

© Joomlapolis - 2013 62

Summary / Questions

Community Builder solutions and framework have great tools to help integrators prepare quick, clean

and future proof use case implementations with minimum or even no coding.

CB Auto Actions pluginCB Query Field type

CB DB Lookup Field typeCBSubs SQL and URL actions

JUK-2013