implementation without coding using community builder framework tools
DESCRIPTION
Implementation without coding using Community Builder framework tools -- Every website is a different use case in terms of design and functionality. Most integrators choose to "hack" code in order to solve client needs. This compromises future maintenance and upgrading. The CB framework and add-ons can turn any integrator into a hack-free developer. Learn how in this session. The CB framework provides an API with over 300 events as well as a plethora of tools that take advantage of these events and supports a structured implementation methodology. "Developing" a Joomla website for a client always involves satisfying specific customer use case needs. Despite the hundreds of JED extensions, in most instances these customer specific needs cannot be satisfied with out-of-the-box solutions. Hands-on implementation (PHP, CSS, HTML, etc.) is needed or maybe not? This session focuses on the Community Builder framework and the available solutions and how they can be extended with any, or only, minimal coding in order to implement many different use cases. Developers should alway strive to provide clean hack-free solutions for their customers. The CB Framework and available tools can be used to provide such solutions. The CB solutions (CB, GroupJive, Activity, CBSubs) provide over 300 event triggers that can be used to extend or add functionality to your Joomla community or membership website. In this presentation we will: + Structured implementation + Learn how to use the CB Auto Actions plugin to harness this power. + See how CBSubs SQL and URL integration plugins can be exploited. + Explore the CB Query field type and CB database lookup validation field possibilities. + Update on work-in-progress enhancementsTRANSCRIPT
Implementation without coding using Community Builder
framework tools
@ J and Beyond 2013
© Joomlapolis - 2013 2
Hello ….Is everyone having fun?
JAB-2013
© 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”
JAB-2013
© Joomlapolis - 2013 4
Reminder
JAB-2013
© 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
JAB-2013
© Joomlapolis - 2013 6
Everything is unique
Always rememberyou’re
uniqueJust like
everyoneelse
JAB-2013
© Joomlapolis - 2013 7
Hacking vs. programming
What’s your
definition?
JAB-2013
© 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
JAB-2013
© 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?
JAB-2013
© Joomlapolis - 2013 10
More Community Builder™
architecture
JAB-2013
© 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 +++
Facebook, Twitter, Linkedin,
Google+, Live
Auto actions
JAB-2013
© 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
JAB-2013
© 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
JAB-2013
Identify event
Choose action
Add your use case logic
© 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 (planned)
JAB-2013
© 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
JAB-2013
© Joomlapolis - 2013 16
More
Mood field change activity
JAB-2013
http://www.joomlapolis.com/support/tutorials/107-use-cases/18338-adding-your-own-events-to-activity-stream
© 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
JAB-2013
© Joomlapolis - 2013 18
More
AcyMailing Action example
JAB-2013
© 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
JAB-2013
© Joomlapolis - 2013 20
More
Antispam action example
JAB-2013
© 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)
JAB-2013
© Joomlapolis - 2013 22
More CBSubs action example on GJ
join
JAB-2013
www.joomlapolis.com/support/tutorials/107-use-cases/18339-startend-cbsubs-plan-subscription-when-user-joinsleaves-a-groupjive-group
© 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)
JAB-2013
© Joomlapolis - 2013 24
More
Code action to popup alert
JAB-2013
© Joomlapolis - 2013 25
More
Code action registration form
JAB-2013
index.php?option=com_comprofiler&task=registers&Itemid=478&type=Athlete
© Joomlapolis - 2013 26
More
Code action registration form
JAB-2013
© 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
JAB-2013
© 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)
JAB-2013
© Joomlapolis - 2013 29
More
Email with member data
JAB-2013
© Joomlapolis - 2013 30
More
Email with member data
JAB-2013
© Joomlapolis - 2013 31
More Sending email from other
server
JAB-2013
© Joomlapolis - 2013 32
More Sending email from other
server
JAB-2013
© 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)
JAB-2013
© 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
JAB-2013
© Joomlapolis - 2013 35
More
Flyspray action example
JAB-2013
© Joomlapolis - 2013 36
More
Flyspray action example
JAB-2013
© 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)
JAB-2013
© Joomlapolis - 2013 38
More
GroupJive action example
JAB-2013
© 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
JAB-2013
© Joomlapolis - 2013 40
Kunena action
Kunena Action settings: Name (category) Parent (category) Description
Use Case Examples
Create new forum category based on field data
JAB-2013
© 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
JAB-2013
© Joomlapolis - 2013 42
More
Login action example
JAB-2013
© 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
JAB-2013
© Joomlapolis - 2013 44
More
Menu action example
JAB-2013
© 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
JAB-2013
© 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
JAB-2013
© 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
JAB-2013
© Joomlapolis - 2013 48
More
Query action example
JAB-2013
© 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
JAB-2013
© Joomlapolis - 2013 50
More
Redirect action example
JAB-2013
© 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)
JAB-2013
© 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
JAB-2013
© 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
JAB-2013
© 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
JAB-2013
© Joomlapolis - 2013 55
More
VM2 action example
JAB-2013
© 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
JAB-2013
© 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
JAB-2013
© 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)
JAB-2013
© 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]' )
JAB-2013
© 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
JAB-2013
© 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
JAB-2013
© 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
JAB-2013