24
Sacramento Professional Network Contact Info QR codes

Sacramento Professional Network Contact Info QR codes · the “QR Code vCard Fields” sub-tab. As shown in Figure 2, the page has a text field labeled “Full Name:” and three

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Sacramento Professional Network Contact Info QR codes · the “QR Code vCard Fields” sub-tab. As shown in Figure 2, the page has a text field labeled “Full Name:” and three

Sacramento

Professional Network

Contact Info

QR codes

Page 2: Sacramento Professional Network Contact Info QR codes · the “QR Code vCard Fields” sub-tab. As shown in Figure 2, the page has a text field labeled “Full Name:” and three

Contact Info QR Codes

SacProNet ii

Revision History

Date Description Author

8/26/2012 Initial writeup John Mohammed

Page 3: Sacramento Professional Network Contact Info QR codes · the “QR Code vCard Fields” sub-tab. As shown in Figure 2, the page has a text field labeled “Full Name:” and three

Contact Info QR Codes

SacProNet iii

Table of Contents

Revision History ................................................................................................................. ii

Table of Contents ............................................................................................................... iii

Table of Figures ................................................................................................................. iii

I. Functionality ............................................................................................................... 1

A. Member Contact Information Codes ................................................................... 1

B. Marketing QR codes ............................................................................................ 4

II. Access ......................................................................................................................... 6

III. Under the Hood ........................................................................................................ 7

A. Modules (see “How to install a module” and “How to enable a module”) ......... 7

B. Module Configuration (see How to configure a module) .................................... 7

C. New Content Types.............................................................................................. 8

IV. How to do it ........................................................................................................... 20

A. How to install a module ..................................................................................... 20

B. How to enable a module .................................................................................... 20

C. How to configure a module................................................................................ 20

D. How to set permissions for a module ................................................................. 21

E. How to create a navigation menu item .............................................................. 21

Table of Figures Figure 1. Member page before creation of vCard fields. .................................................... 2

Figure 2. Edit page for QR Code vCard Fields. .................................................................. 3

Figure 3. Completed QR Code vCards Fields, showing QR Code. .................................... 4

Figure 4. Marketing QR Codes page showing instructions and a sample QR Code. ......... 5

Figure 5 Navigation to the Marketing QR Codes page for an Executive Committee

member. .............................................................................................................................. 6

Page 4: Sacramento Professional Network Contact Info QR codes · the “QR Code vCard Fields” sub-tab. As shown in Figure 2, the page has a text field labeled “Full Name:” and three

Contact Info QR Codes

SacProNet 1

I. Functionality QR (“Quick Response”) codes are 2-dimensional bar codes that encode up to a couple of

thousand characters of text in a square bicolored bit pattern. They were originally

developed by the automobile industry to manage car parts. However, with the rise of the

ubiquitous “smart phone” for which one can obtain free apps to read such codes, they

have become a popular way to connect potential customers with information about

products and events.

They can be used to encode a large variety of types of information, but the two most

frequent uses are to encode the URL of a website, and to encode contact information in

the form of a vCard.

When a QR scanning app reads a URL, the user is immediately connected with the web

page identified by the URL, which could be a registration page for an event or

organization, or detailed information about a specific product, vendor or event.

When a QR scanning app reads a vCard, the contact information is acquired in a format

that can readily be inserted into the user’s address book.

The functionality implemented on the Sacramento Professional Network’s website

facilitates using QR codes for two purposes:

1. To enable members to create QR codes that encode their contact information. The

members can use such codes on their business cards, resumes, personal websites,

and name badges. This gives the member an easy way to give their contact

information to potential networking contacts, in a manner that makes the

information readily accessible to the recipient. Having the codes on their name

badges will also eventually facilitate taking attendance at General Meetings, by

having the attendance software read the codes on their badges.

2. To enable the Marketing Committee to create QR codes for use in marketing

materials that take the reader to web pages on our site that promote specific

events, promote the organization, or email the Resume Committee.

A. Member Contact Information Codes

The member page for each member now sports a link near the bottom of the page entitled

“Create your QR Code vCard Fields” (see Figure 1). Clicking on this link takes you

to a page where you can enter the contact information to be encoded. This gives you

complete control over what information will be transmitted to potential contacts.

You can get to this same page by clicking on the “Edit” tab at the top, then clicking on

the “QR Code vCard Fields” sub-tab.

As shown in Figure 2, the page has a text field labeled “Full Name:” and three vertical

tabs labeled “Identification,” “Employment” and “Contact.”

The “Full Name”, “Given Name” and “Surname” are the only fields that must be

given values. Furthermore, to support automatic attendance taking, the values for the

“Given Name” and “Surname” fields should match the respective values of the “Real First Name” and “Real Last Name” from the “Personal Information” part of your

profile. To facilitate this, the default values for these fields are set from the corresponding

fields.

Page 5: Sacramento Professional Network Contact Info QR codes · the “QR Code vCard Fields” sub-tab. As shown in Figure 2, the page has a text field labeled “Full Name:” and three

Contact Info QR Codes

SacProNet 2

Figure 1. Member page before creation of vCard fields.

All other fields on the page are optional. The other fields on the “Identification” tab are:

Prefix: any title or honorific that should precede your name, such as “Dr.,”

“Mrs.,” “Rev.,” or “Sir.”

Middle names: any middle names or initials that should be included in your

name.

Suffix: anything that should follow your name, such as “Jr.,” “III,” “Esq.”

“MBA,” “Ph.D.,” or “J.D.”

The “Employment” tab contains three fields to describe your actual or desired

employment:

Job Title: the job title or “headline” that tells people what type of work you (want

to) do.

Organization: the name of the organization, if any, that you want to include

(such as your business, or the Sacramento Professional Network).

Website: the URL, if any, of your personal or business website or your LinkedIn

profile. (Omit the protocol: www.mysite.com. NOT http://www.mysite.com/)

Page 6: Sacramento Professional Network Contact Info QR codes · the “QR Code vCard Fields” sub-tab. As shown in Figure 2, the page has a text field labeled “Full Name:” and three

Contact Info QR Codes

SacProNet 3

The “Contact” tab contains four fields for describing how best to contact you:

Email: the email address, if any, that you want the contact to have (this does not

have to be the same as the email address by which you identified yourself to our

organization, but should be a valid email address that you check regularly, that

has a professional-sounding name).

Work Telephone: the daytime telephone number, if any, at which you can be

reached.

Mobile Telephone: the mobile telephone number, if any, at which you can be

reached.

FAX Telephone: the telephone number, if any, at which you can receive facsimile

(FAX) transmissions.

Figure 2. Edit page for QR Code vCard Fields.

To preserve a youthful appearance, you may want to restrict yourself to one telephone

number, preferably for a mobile phone. However, if your are promoting a business, you

may want to include all three types of telephone number, or at least numbers for both

voice and FAX.

Once you click the Save button, you can return to the presentation of your member page

by clicking on the View tab at the top of the page. There you will find that the “Create your QR Code vCard Fields” link has been replaced with a section of your profile

Page 7: Sacramento Professional Network Contact Info QR codes · the “QR Code vCard Fields” sub-tab. As shown in Figure 2, the page has a text field labeled “Full Name:” and three

Contact Info QR Codes

SacProNet 4

entitled “QR Code vCard Fields,” that lists any information you entered and shows a

QR code that encodes that information (see Figure 3).

You can drag the QR code from your member page and drop it into any document that

accepts pictures, such as an MS Word document. You can also right-click on the image

of the QR code, and select the option to “Save image as…” (to save the image to a file

that you can later import into a document) or “Copy image” (to transfer the image using

the copy and paste paradigm) from the context menu that pops up.

Figure 3. Completed QR Code vCards Fields, showing QR Code. Field entries are in collapsed

fieldsets.

B. Marketing QR codes

The website now supports the creation of QR codes for marketing purposes in two ways.

First, a new content type called QR Code Generator contains a text field that displays its

contents as a QR code. Thus, to encode any arbitrary text as a QR code, one merely has

to enter the text into the QR Code field of a QR Code Generator node and save the node.

To facilitate this, a node of this type was added as a book page in the Marketing

Committee book with the title “Marketing QR Codes.” The page is accessible by

navigating the Marketing Committee book, and is also accessible as a menu item in the

Marketing Committee and Executive Committee portions of the Navigation menu.

Page 8: Sacramento Professional Network Contact Info QR codes · the “QR Code vCard Fields” sub-tab. As shown in Figure 2, the page has a text field labeled “Full Name:” and three

Contact Info QR Codes

SacProNet 5

The body of the node contains instructions for how to use the page to create QR codes.

(See Figure 4).

Second, the Filtered HTML input format, which is the default input format used for all

text area fields was modified to allow for the insertion of QR codes amidst other

formatted text. To insert a QR code, one uses the following syntax:

[mobilecode #preset=”preset”]content[/mobilecode]

Where:

preset is one of the defined mobilecode presets (e.g., “small,” “medium” or

“large”) and

content is the text to be encoded in the QR code.

This syntax should be entered using the plain text editor. The rich text editor will

“escape” the quotes in the syntax, replacing them with ", breaking the syntax.

This will happen every time the text is edited so, you must switch to the plain text editor,

remove the entities, and replace them with quotes EVERY TIME.

Figure 4. Marketing QR Codes page showing instructions and a sample QR Code.

Page 9: Sacramento Professional Network Contact Info QR codes · the “QR Code vCard Fields” sub-tab. As shown in Figure 2, the page has a text field labeled “Full Name:” and three

Contact Info QR Codes

SacProNet 6

II. Access The Member Contact Information Codes are accessible to New Members, Members, and

Alumni.

The Marketing QR Codes are accessible only the members of the Executive, Marketing

and Computer Committees. Thus the page appears in two places:

1. The “Committees” “Executive” “Marketing QR Codes” on the navigation

menu (visible to all members with the “Executive Committee” role – see Figure

5);

2. The “Committees” “Marketing” “Marketing QR Codes” on the navigation

menu (visible to all members with the “Marketing Committee” role).

If you feel that you should be able to access this functionality (by virtue of your

committee membership) but cannot, contact the Computer Committee.

Figure 5 Navigation to the Marketing QR Codes page for an Executive Committee member.

Page 10: Sacramento Professional Network Contact Info QR codes · the “QR Code vCard Fields” sub-tab. As shown in Figure 2, the page has a text field labeled “Full Name:” and three

Contact Info QR Codes

SacProNet 7

III. Under the Hood This functionality was obtained by installing and configuring two Drupal modules

entitled:

1. “Mobile Codes” obtained from the website: “drupal.org/project/mobile_codes”

and

2. “Computed Field” obtained from the website:

“drupal.org/project/computed_field”

The Mobile Codes module requires (depends on) the Chaos Tools module, which was

also installed.

A. Modules (see “How to install a module” and “How to enable a module”)

Module Name Version Description Depends on

Mobile Codes 6.x-2.0 Constructs QR

codes via an input

filter or a PHP call

Chaos tools

Computed Field 6.x-1.0 Allows for

computed values in

custom content

types.

Content (already

present and enabled)

Chaos Tools 6.x-1.8 A library of helpful

tools by Merlin of

Chaos.

The Marketing QR Codes page is a straight-forward application of the Mobile Codes

module. The Member Contact Information QR Code functionality required the definition

of a new content type to record the vCard information, and the use of the Computed Field

module and PHP code to generate the vCard text from the information in the fields, and

to display the vCard as a QR code using the Mobile Codes module.

B. Module Configuration (see “How to configure a module”)

1. Mobile Codes

Set permissions to allow SubAdmin members to administer the mobile codes module:

mobile_codes module: administer mobile codes SubAdmin

The module defines presets (specific code sizes with specific providers) , providers

(external or internal sources for code generation) and settings (the only setting is

whether to use path aliases).

The defaults for all configuration parameters are acceptable as they are.

2. Computed Fields

The Computed Fields module has no parameters to configure.

Page 11: Sacramento Professional Network Contact Info QR codes · the “QR Code vCard Fields” sub-tab. As shown in Figure 2, the page has a text field labeled “Full Name:” and three

Contact Info QR Codes

SacProNet 8

C. New Content Types

1. QR Code Generator

a) Marketing QR Codes

The Marketing QR Codes page requires two things: a field whose display mode is a QR

code, and a text field for which the input filter accepts Mobile Code specifications. Thus,

we create a new content type with the appropriate field, and we configure the input filters

for text fields.

1. Create new content type: Content management Content types Add content

type

a. Identification

i. Name: QR Code Generator

ii. Type: qr_code_generator

iii. Description: Content type for generating QR codes from arbitrary text

b. Submission form settings – no changes

c. Workflow settings

i. Default options: Published (not Promoted to front page, nor Sticky)

ii. Multilingual support: Disabled

iii. Attachments: Disabled

d. Page Title Settings – no changes

e. Signup settings – Disabled

f. Meta tags settings – no changes

g. Comment Settings – Disabled

h. Printer, email and PDF versions – no changes

i. Content profile – no changes (do not use as a profile for users)

2. Access Control

View any content Edit any content Delete any content

anonymous user

authenticated user

member

Marketing Committee Marketing Committee Marketing Committee

Executive Committee Executive Committee Executive Committee

View own content Edit own content Delete own content

anonymous user

authenticated user

member member member

Page 12: Sacramento Professional Network Contact Info QR codes · the “QR Code vCard Fields” sub-tab. As shown in Figure 2, the page has a text field labeled “Full Name:” and three

Contact Info QR Codes

SacProNet 9

Marketing Committee Marketing Committee Marketing Committee

Executive Committee Executive Committee Executive Committee

(Blog editor, Committee Chair and SubAdmin will already have access.)

3. Manage Fields

a. Add new field:

i. Label: QR Code

ii. Field Name: field_qr_code

iii. Field data type: Text area (multiple rows)

iv. Rows: 5

v. Help text: Enter the text to be encoded as a QR code

vi. (No default value)

vii. (Not Required)

viii. Number of values: 1

ix. Text processing: Plain text

x. (no maximum length)

4. Display fields

Field Label Teaser Exclude Full node Exclude

QR Code above Mobile code:small N Mobile code: medium N

5. Set permissions (see How to set permissions for a module)

Permission anonymous user

authenticated user

Executive Committee

Marketing Committee

SubAdmin

content_permissions module (for QR Code Generator)

edit field_qr_code Y Y Y

view field_qr_code Y Y Y Y Y

node module

Create qr_code_generator content

Y Y Y

6. Create the sample generator page

Content management Create content QR Code Generator

i. Title: Marketing QR Codes

ii. Body:

To create a QR code: 1. Edit this page by clicking on the Edit tab;

2. Click "Switch to plain text editor" below the QR code field below; 3. Paste the text that you want to encode (e.g., the URL of the web page to which the reader should be

delivered) into the QR code field; 4. Click the Save button.

Page 13: Sacramento Professional Network Contact Info QR codes · the “QR Code vCard Fields” sub-tab. As shown in Figure 2, the page has a text field labeled “Full Name:” and three

Contact Info QR Codes

SacProNet 10

iii. Menu Settings:

a. Menu Link Title: Marketing QR Codes

b. Parent Item: ---- Marketing (<Navigation> Committees Marketing)

c. Weight: 10

iv. Book Outline:

a. Book: Committees

b. Parent Item: -- Marketing

c. Weight: 10

7. Put the page in the Executive Committee menu (see “How to create a navigation

menu item”)

b) Enable Mobile Code for text input filters

1. Site configuration Input formats List

2. Configure Filtered HTML format

3. In the Filters section, click on Mobile Codes filter

4. Save Configuration

This allows insertion of mobile codes into any text field that uses the default Filtered

HTML input format by using the syntax:

[mobilecode #preset=”preset”]content[/mobilecode]

2. QR Code vCard Fields

We create a new profile content type that accepts information for each of the fields that

can be added to the vCard that represents the member’s contact information. Then we use

a Computed Field to actually construct the text of the vCard. Finally, we use the Mobile Codes theme to cause the field’s contents to display as a QR code.

1. Create new content type: Content management Content types Add content

type

a. Identification

i. Name: QR Code vCard Fields

ii. Type: vcard_fields

iii. Description: Content type that defines the fields to be included in the user’s vCard encoded his/her QR Code

b. Submission form settings

i. Title field label: Full Name

ii. Body field label: <none>

iii. Minimum number of words: 0

iv. Explanation or submission guidelines: Enter the contact information to be included in your vCard QR Code. The only obligatory values are your first and last names, and your full name.

Page 14: Sacramento Professional Network Contact Info QR codes · the “QR Code vCard Fields” sub-tab. As shown in Figure 2, the page has a text field labeled “Full Name:” and three

Contact Info QR Codes

SacProNet 11

c. Workflow settings: Published

d. Comment settings: Disabled

e. Content Profile: Use this content type as a content profile for users

2. Access Control

View any content Edit any content Delete any content

Alumnus

Member

New Member

View own content Edit own content Delete own content

Alumnus Alumnus Alumnus

Member Member Member

New Member New Member New Member

3. Manage Fields

a. Add New Group:

i. Label: Identification

ii. Group name: group_identification

iii. Form settings:

1. Style: collapsed

2. Help Text: Enter the components of your full name as you wish it to appear in the vCard.

iv. Display settings:

1. Description: Name components

b. Add New Group:

i. Label: Employment

ii. Group name: group_employment

iii. Form settings:

1. Style: collapsed

2. Help Text: Enter information about your actual or desired employment

iv. Display settings:

1. Description: Employment Description

c. Add New Group:

i. Label: Contact

ii. Group name: group_contact

iii. Form settings:

1. Style: collapsed

Page 15: Sacramento Professional Network Contact Info QR codes · the “QR Code vCard Fields” sub-tab. As shown in Figure 2, the page has a text field labeled “Full Name:” and three

Contact Info QR Codes

SacProNet 12

2. Help Text: Enter information about how to contact you.

iv. Display settings:

1. Description: Contact Information

d. Add New field: (move into Identification group)

i. Label: Prefix

ii. Field name: field_vcard_prefix

iii. Type: Text

iv. Widget: Text field

v. Size of text field: 20

vi. Help text: Enter any prefix associated with your name as you'd like it to appear in your contact information. E.g., Mrs., Dr., Rev., Sir

vii. No default value

viii. Required: No

ix. Number of values: 1

x. Text Processing: Plain text

xi. Maximum length: no value

e. Add New field: (move into Identification group)

i. Label: Given Name

ii. Field name: field_vcard_first_name

iii. Type: Text

iv. Widget: Text field

v. Size of text field: 60

vi. Help text: Enter your given (first) name. (For the purpose of checking in to SacProNet meetings, this should match the first name in your user profile.)

vii. Default value: PHP

global $user;

$account = user_load($user->uid);

return array(0 => array('value' => $account->profile_FirstName));

viii. Required: Yes

ix. Number of values: 1

x. Text Processing: Plain text

xi. Maximum length: no value

f. Add New field: (move into Identification group)

i. Label: Middle Names

ii. Field name: field_vcard_middle_name

iii. Type: Text

Page 16: Sacramento Professional Network Contact Info QR codes · the “QR Code vCard Fields” sub-tab. As shown in Figure 2, the page has a text field labeled “Full Name:” and three

Contact Info QR Codes

SacProNet 13

iv. Widget: Text field

v. Size of text field: 60

vi. Help text: Enter any middle name(s) or initial(s) associated with your name as you'd like it to appear in your contact QR code.

vii. No default value

viii. Required: No

ix. Number of values: 1

x. Text Processing: Plain text

xi. Maximum length: no value

g. Add New field: (move into Identification group)

i. Label: Surname

ii. Field name: field_vcard_surname

iii. Type: Text

iv. Widget: Text field

v. Size of text field: 60

vi. Help text: Enter your surname (family name/last name). (For the purpose of checking into SacProNet meetings, this should match the last name on your user profile.)

vii. Default value: PHP

global $user;

$account = user_load($user->uid);

return array(0 => array('value' => $account->profile_Lname));

viii. Required: Yes

ix. Number of values: 1

x. Text Processing: Plain text

xi. Maximum length: no value

h. Add New field: (move into Identification group)

i. Label: Suffix

ii. Field name: field_vcard_suffix

iii. Type: Text

iv. Widget: Text field

v. Size of text field: 20

vi. Help text: Enter any suffix associated with your full name as you'd like it to appear in your contact information QR Code. E.g., Jr., III, BA, Ph.D., J.D.

vii. No default value

viii. Required: No

ix. Number of values: 1

Page 17: Sacramento Professional Network Contact Info QR codes · the “QR Code vCard Fields” sub-tab. As shown in Figure 2, the page has a text field labeled “Full Name:” and three

Contact Info QR Codes

SacProNet 14

x. Text Processing: Plain text

xi. Maximum length: no value

i. Add New field: (move into Employment Group)

i. Label: Job Title

ii. Field name: field_vcard_job_title

iii. Type: Text

iv. Widget: Text field

v. Size of text field: 60

vi. Help text: Enter the job title you currently have with the organization you identified, or the job category in which you are looking for employment.

vii. No default value

viii. Required: No

ix. Number of values: 1

x. Text Processing: Plain text

xi. Maximum length: no value

j. Add New field: (move into Employment Group)

i. Label: Organization

ii. Field name: field_vcard_organization

iii. Type: Text

iv. Widget: Text field

v. Size of text field: 60

vi. Help text: Enter the name of the organization, if any, to appear in your vCard & QR Code (e.g., your company, Sacramento Professional Network, etc.)

vii. No default value

viii. Required: No

ix. Number of values: 1

x. Text Processing: Plain text

xi. Maximum length: no value

k. Add New field: (move into Employment Group)

i. Label: Website

ii. Field name: field_vcard_url

iii. Type: Link

iv. Widget: Link

v. Size of text field: 60

vi. Help text: Enter the URL, if any, of your personal or business website, or your LinkedIn profile, that you want to share with people reading your QR Code. EXCLUDE the "http://"

Page 18: Sacramento Professional Network Contact Info QR codes · the “QR Code vCard Fields” sub-tab. As shown in Figure 2, the page has a text field labeled “Full Name:” and three

Contact Info QR Codes

SacProNet 15

protocol specification: i.e.: www.mywebsite.com, NOT http://www.mywebsite.com/.

vii. No default value

viii. Required: No

ix. Number of values: 1

x. Validate URL: YES

xi. Optional URL: YES

xii. Link Title: No Title

xiii. Allow user-entered tokens: NO

xiv. URL Display Cutoff: 120

xv. Link Target: Default (no target attribute)

xvi. Rel Attribute: nofollow

xvii. Additional CSS Class: none

xviii. Link ‘title’ attribute: none

l. Add New field: (move into Contact group)

i. Label: Email

ii. Field name: field_vcard_email

iii. Type: Text

iv. Widget: Text field

v. Size of text field: 60

vi. Help text: Enter the Email address, if any, at which you would like to be contacted by people reading your QR Code. (This does not have to be the same as the email address that identifies you to SacProNet, but should be a valid email address that you regularly check, with a professional-sounding name.)

vii. No default value

viii. Required: No

ix. Number of values: 1

x. Text Processing: Plain text

xi. Maximum length: no value

m. Add New field: (move into Contact group)

i. Label: Work Telephone

ii. Field name: field_vcard_workphone

iii. Type: Text

iv. Widget: Text field

v. Size of text field: 60

vi. Help text: Enter the daytime telephone number, if any, at which you want people reading your QR code to contact you.

Page 19: Sacramento Professional Network Contact Info QR codes · the “QR Code vCard Fields” sub-tab. As shown in Figure 2, the page has a text field labeled “Full Name:” and three

Contact Info QR Codes

SacProNet 16

vii. No default value

viii. Required: No

ix. Number of values: 1

x. Text Processing: Plain text

xi. Maximum length: no value

n. Add New field: (move into Contact group)

i. Label: Mobile Telephone

ii. Field name: field_vcard_cellphone

iii. Type: Text

iv. Widget: Text field

v. Size of text field: 60

vi. Help text: Enter the mobile telephone number, if any, at which you want people reading your QR Code to contact you.

vii. No default value

viii. Required: No

ix. Number of values: 1

x. Text Processing: Plain text

xi. Maximum length: no value

o. Add New field: (move into Contact group)

i. Label: Fax Telephone

ii. Field name: field_vcard_faxphone

iii. Type: Text

iv. Widget: Text field

v. Size of text field: 60

vi. Help text: Enter the facsimile (fax) telephone number, if any, at which you want people reading your QR Code to contact you by fax.

vii. No default value

viii. Required: No

ix. Number of values: 1

x. Text Processing: Plain text

xi. Maximum length: no value

p. Add new field

i. Label: QR Code

ii. Field type: Computed

iii. Widget type: Computed

iv. Help text: none

Page 20: Sacramento Professional Network Contact Info QR codes · the “QR Code vCard Fields” sub-tab. As shown in Figure 2, the page has a text field labeled “Full Name:” and three

Contact Info QR Codes

SacProNet 17

v. Default value: none

vi. Required: NO

vii. Number of values: 1

viii. Computed Code:

$data = "BEGIN:VCARD\nVERSION:3.0\n";

$data .= "FN:".$node->title."\n";

$data .= "N:".$node->field_vcard_surname[0]['value'].";". $node->field_vcard_first_name[0]['value'].";". $node->field_vcard_middle_name[0]['value'].";". $node->field_vcard_prefix[0]['value'].";".$node->field_vcard_suffix[0]['value']."\n";

if (isset($node->field_vcard_job_title[0]['value'])) {

$data .= "TITLE:".$node->field_vcard_job_title[0]['value']."\n"; }

if (isset($node->field_vcard_organization[0]['value'])) {

$data .= "ORG:".$node->field_vcard_organization[0]['value']."\n"; }

if (isset($node->field_vcard_url[0]['url'])) {

$data .= "URL:".$node->field_vcard_url[0]['url']."\n"; }

if (isset($node->field_vcard_email[0]['value'])) {

$data .= "EMAIL:".$node->field_vcard_email[0]['value']."\n"; }

if (isset($node->field_vcard_workphone[0]['value'])) {

$data .= "TEL;TYPE=WORK:".$node->field_vcard_workphone[0]['value']."\n"; }

if (isset($node->field_vcard_cellphone[0]['value'])) {

$data .= "TEL;TYPE=CELL:".$node->field_vcard_cellphone[0]['value']."\n"; }

if (isset($node->field_vcard_faxphone[0]['value'])) {

$data .= "TEL;TYPE=FAX:".$node->field_vcard_faxphone[0]['value']."\n"; }

$data .= "END:VCARD\n";

$node_field[0]['value'] = $data;

ix. Display Format:

$display = theme('mobilecode',$node_field_item['value'], array('#preset' => 'medium'));

x. Store: YES

xi. Database Storage Settings:

1. Data Type: text

2. Data length: 500

xii. Not NULL: NO

xiii. Sortable in views: NO

Page 21: Sacramento Professional Network Contact Info QR codes · the “QR Code vCard Fields” sub-tab. As shown in Figure 2, the page has a text field labeled “Full Name:” and three

Contact Info QR Codes

SacProNet 18

4. Display fields

Field Label Teaser Exclude Full node Exclude

Identification Above Fieldset – collapsed

NO Fieldset – collapsed

NO

Prefix Inline Default NO Default NO

Given Name Inline Default NO Default NO

Middle Names

Inline Default NO Default NO

Surname Inline Default NO Default NO

Suffix Inline Default NO Default NO

Employment Above Fieldset – collapsed

NO Fieldset – collapsed

NO

Job Title Inline Default NO Default NO

Organization Inline Default NO Default NO

Website Inline URL, as link NO URL, as link NO

Contact Above Fieldset – collapsed

NO Fieldset – collapsed

NO

Email Inline Default NO Default NO

Work Telephone

Inline Default NO Default NO

Mobile Telephone

Inline Default NO Default NO

Fax Telephone

Inline Default NO Default NO

QR Code Above Raw text NO Raw text NO

5. Content profile

a. Display settings

i. User page display style: Display the full content

ii. Show link to content profile creation page: YES

iii. Profile edit tab: Show a secondary tab below the user’s edit tab

b. User registration

i. Use on registration: NO

ii. Use on administrative user creation form: NO

iii. Hide form fields: none

c. Weight: 10

Page 22: Sacramento Professional Network Contact Info QR codes · the “QR Code vCard Fields” sub-tab. As shown in Figure 2, the page has a text field labeled “Full Name:” and three

Contact Info QR Codes

SacProNet 19

6. Set permissions (see “How to set permissions for a module”)

Permission Alumnus Member New Member

content_permissions module (QR Code vCard Fields)

edit field_vcard_cellphone Y Y Y

edit field_vcard_email Y Y Y

edit field_vcard_faxphone Y Y Y

edit field_vcard_first_name Y Y Y

edit field_vcard_job_title Y Y Y

edit field_vcard_middle_name Y Y Y

edit field_vcard_organization Y Y Y

edit field_vcard_prefix Y Y Y

edit field_vcard_qrcode

edit field_vcard_suffix Y Y Y

edit field_vcard_surname Y Y Y

edit field_vcard_url Y Y Y

edit field_vcard_workphone Y Y Y

view field_vcard_cellphone Y Y Y

view field_vcard_email Y Y Y

view field_vcard_faxphone Y Y Y

view field_vcard_first_name Y Y Y

view field_vcard_job_title Y Y Y

view field_vcard_middle_name Y Y Y

view field_vcard_organization Y Y Y

view field_vcard_prefix Y Y Y

view field_vcard_qrcode Y Y Y

view field_vcard_suffix Y Y Y

view field_vcard_surname Y Y Y

view field_vcard_url Y Y Y

view field_vcard_workphone Y Y Y

node module

Create vcard_fields content Y Y Y

Page 23: Sacramento Professional Network Contact Info QR codes · the “QR Code vCard Fields” sub-tab. As shown in Figure 2, the page has a text field labeled “Full Name:” and three

Contact Info QR Codes

SacProNet 20

IV. How to do it This section documents the procedures to follow to accomplish the installations and

configurations described above.

A. How to install a module

1. Find the module on the web. Select and download the version of the module that

is compatible with the version of Drupal on which the website is based (in our

case: Version 6.x)

2. Download the tar.gz file, and extract the files into their own folder (ensure that the

extraction process uses the folder information.) (N.B.: the way this is done

depends on the particular decompression software you are using.)

3. Connect to the www.sacpronet.com site using FTP, then copy the extracted

folders to the public_html\site\all\modules directory. (N.B.: the way this is done

depends on the particular FTP software you are using.)

4. The next time the website is started up, the modules will be loaded.

B. How to enable a module

1. Login to the www.sacpronet.com site using a username that has the SubAdmin

role.

2. From the Administration menu, select site building modules list

3. Locate the module in the list of modules.

4. Click on the Enabled check box to the left of the module name.

5. Ensure that all modules on which the specific module depends (listed to the right

of the module name) are also loaded and enabled. If any are missing, repeat the

procedure to install and enable each of the missing or disabled modules.

6. Click on the Save Configuration button at the bottom of the page.

(You may not be able to enable a module until you first load and enable the modules on

which it depends. Also, you must save the configuration after enabling these modules

before you can enable dependent modules.)

C. How to configure a module

1. Ensure that the SubAdmin role has the permission to administer the module (see

“How to set permissions for a module”)

2. Login to the www.sacpronet.com site using a username that has the SubAdmin

role.

3. From the Administration menu, select site configuration By Module.

4. Click on the By Module tab.

5. Find and click on the module you wish to configure in the hierarchical list of

modules.

6. Click on the name of the configuration page you wish to modify.

Page 24: Sacramento Professional Network Contact Info QR codes · the “QR Code vCard Fields” sub-tab. As shown in Figure 2, the page has a text field labeled “Full Name:” and three

Contact Info QR Codes

SacProNet 21

7. Change the settings as desired using the widgets on the page.

8. Click the Save Settings button.

D. How to set permissions for a module

1. Login to the www.sacpronet.com site using a username that has the SubAdmin

role.

2. From the Administration menu, select user management permissions

3. In the Roles to Display menu, select the role(s) for which you wish to adjust the

permissions (use shift-click to select a contiguous subset of the list, or ctrl-click to

select multiple roles individually).

4. In the Modules to Display menu, select the module(s) for which you wish to

adjust the permissions (use shift-click to select a contiguous subset of the list, or

ctrl-click to select multiple roles individually).

5. Click on the Filter Permissions button.

6. This will display a table listing the selected modules and their associated

permissions as rows, and the selected roles as columns.

7. Click the check box in the row and column for the permission you wish to change

for each role.

8. Click the Save Permissions button at the bottom of the table.

E. How to create a navigation menu item

1. Login to the www.sacpronet.com site using a username that has the SubAdmin

role.

2. From the Administration menu, select site building Menus List menus.

3. Click on the Navigation menu.

4. Click on the Add Item tab.

5. In Path: enter the path to the page that should appear when the menu item is

selected (e.g.: “admin/reports/google-analytics”)

6. In Menu link title: enter the name of the page as it should appear in the menu

(e.g.: “Google Analytics Report”)

7. In Description: enter a brief description of the page that can appear in a tooltip

8. Ensure that the Enabled check box is checked.

9. In Parent item: select the item in the navigation menu under which the new item

should appear.

10. Optionally:

a. click the Expanded check box if the add item is a menu and you want it to

appear expanded

b. change the weight if you want to control the position where the item

should appear relative to other items with the same parent

11. Click the Save button.