Drupal Macros

The BSOE web site makes use of macros that have been specially created so that you can take advantage of several BSOE databases without having to know how to do any programming in HTML or PHP.

soe:contact:<username>

If you would like to include a person's name, e-mail address and phone number in the middle of a sentence or paragraph, you should use the soe:contact:<username> macro. By replacing <username> with the BSOE login name of the person in question, the web site will replace the macro with the person's real name, e-mail address and phone number, as listed in the BSOE directory.

Example:

, e-mail:

soe:biography:<user name>

This macro adds the user's biography information to the web page.  Example:

soe:biography:darrell

soe:e-mail:<username>

If you would like to include a person's name and e-mail address in the middle of a sentence or paragraph, you should use the soe:e-mail:<username> macro. By replacing <username> with the BSOE login name of the person in question, the web site will replace the macro with the person's real name and e-mail address, as listed in the BSOE directory.

Example:

soe:user:<username>

If you are creating a link to a specific person and would like that link to include the person's office location and hours, you should use the soe:user:<username> macro. This macro is designed to be used in a standalone paragraph by itself, not as part of another sentence or paragraph.

Example:


soe:link:<username>

If you would like to create a link to someone's personal home page, you can use the soe:link:<username> macro.  This macro creates a clickable link to the person's personal home page. (NOTE:  This macro is not yet enabled on the SOE web site; it will be during the next Drupal upgrade, which will happen over the next week or two.)

Example:

Jim Whitehead

soe:photo:<username>

If you would like to embed a thumbnail of the photograph for a faculty member, you can use this macro.  Example:

Please note that this macro does -not- put a border around the picture or align it to the right.

soe:gallery:<node id>

If you would like to display all the JPG attachments to a particular node as a gallery, use the soe:gallery:<node id> macro.  This macro will be replaced with a five-column table that will contain the thumbnails of all the JPG attachments on node <node id>.  Note that you can use this macro to display a gallery of JPGs attached to a different node - it does not have to display attachments to the current node.

soe:random:<node id>

If you would like to display a random photo on a web page, you can use the soe:random:<node id> macro.  This macro will be replaced with a random JPG photo from the attachments listed on <node id>.  Note that because of page caching, you will not necesarily see a different photo each time you go to the page, but the photo will change over time.

soe:slideshow:<node id>

If you would like to display all the photos from a web page in a slideshow, use the soe:slideshow:<node id> macro.  This is different than a gallery in that each picture attachment will be shown in turn with a neat fade effect as the system goes from one picture to the next, whereas the gallery macro just displays all the images at the same time and lets users click on individual image to show the large version.

soe:course:<course>

If you would like to display the official name of a course along with a link to the course home page, use this macro.

Example:

ams3

soe:google-calendar:<calendar ID>

If you would like to embed a Google calendar in a web page, you can use this macro.  Example:

soe:youtube:<video id>

If you would like to embed a video from YouTube into your page, you can use this macro.  To get your YouTube Video ID, look at your video's YouTube link.  For example:

http://www.youtube.com/watch?v=uUXWSQxXQgU&feature=player_embedded

The Video ID is the part after v= and before &feature - in this case, uUXWSQxXQgU.

Example:

soe: counter

The soe: counter macro enables you to embed a counter into your web page that will keep track of the total number of people who have viewed that page.  Example:

soe:counter