plugin

You are currently browsing articles tagged plugin.

A long sought after calendar plugin for Elgg has been created by Kevin Jardine. This add-on, commissioned by the Royal Society of Architects, provides an event calendar for each group created in the Elgg installation.

Event Calendar requires Elgg 1.1 or higher. The only departure for a standard installation is that the plugin’s directory should be changed from event_calendar_0.6 to event_calendar before activating. There is no configuration—the group calendar just appears in the owner’s block as a link when you are in a group.

cal1

Clicking on the calendar link brings up the following page.

Click to enlarge

Click to enlarge

In the main content area, there are options for viewing the list of events for a given day, week, or month. In addition there is an interactive calendar/datepicker. The large blank area displays the events. Right now there aren’t any, but to create an event, one clicks the Add Event link on the owner’s block

Click to enlarge

Click to enlarge

There are several fields for information about the event. Note the popup calendar for selecting dates. There is no option for a time, so I put the time in the title. Once an event is created the event appears in the main content area

Click to enlarge

Click to enlarge

This displays all the information entered about the event. And you now have some new options in the owner’s block.

cal5

Beyond the options to edit or delete the event, you can add the event to your personal calendar. The entire site’s event calendar can be access through the tools menu of the top bar. In addition, the Events Calendar plugin provides a widget that can appear on your dashboard of profile list the events that you added to your personal calendar.

cal6

Returning to the Group’s page reveals an event calendar list all the events for that group in the main content area.

Click to enlarge

Click to enlarge

One last great feature appears as you return to an individual event. Once you are on an event page, a personal event calendars button appears on the owner’s block. If you click on that, you get a list of each user that added the event to their personal calendar.

cal8

To customize the appearance of the calendar on the page, edit:

event_calendar/datepicker.css

To change messages, spellings, or wordings, edit:

event_calendar/languages/en.php

This is clearly a well developed plugin width a great depth of presence in the installation in that includes, not only group event calendars, but a sitewide calendar, and a widget to display individuals’ event calendars. The ability to view who else has added an event to their personal calendar is also a great addition.

This is an outstanding extension to the Elgg core and goes far in fleshing out Elgg’s functionality. It is currently version 0.6 beta. I wouldn’t be surprised to see further enhancements of this plugin as new version emerge.

Tags: , , , ,

Matt Leifer commented on my post about the advent of BuddyPress wondering if there was some sort of integration with a wiki and WordPress. His question aroused my curiousity as I use WordPress and MediaWiki. Indeed there is a very interesting WordPress plugin that works MediaWiki.

Append Wiki Page by Enej Bajgoric at the University of British Columbia is a WordPress extension that allows users to actually embed a MediaWiki page within an individual blog post. Install this plugin and a new option appears at the bottom of the edit post page.

wiki-inc

Simply type in the url of the desired wikipage and it appears in the post when you publish it. Here is a screencast illustrating its use. It includes edit links to the wiki, so that a reader could actually move from the blog post to the actual MediaWiki page and edit it if they have those priviledges. I first saw this on Jim Groom’s post/wiki on installing BuddyPress and wondered how he did it.  In a round about way, I found out how.

I like this plugin and it generally works well. I think that it has a great deal of potential in education and documentation. My only problem is that it, for some reason, will not work correctly when I use it with wikis on my server. If I link to any other wiki page, it works fine. I can only assume it is because of some setting on my server. I certainly would like to resolve this (any offers for help gracefully accepted) as the Append Wiki Page plugin is a great tool.

Tags: , ,

Ibo, from the Elgg Developer Google Group, just updated my Tinymce with TinyBrowser implementation. I’d like to thank him as I have been very busy.

It implements the new version of TinyBrowser 1.40 beta. New features include:

  • Multiple Folder support with ability to create, change, and delete folders.
  • Action for moving files between folders
  • Height and width values in the pop up window.

It also fixes a number of bugs. In addition, it allows TinyBrowser to create a full upload path.

This remains a way to upload files from within the image and media embed functions in tinymce, while we wait for the new text area embedding tool being developed for Elgg 1.5 slated for February.

Tags: , , ,

Since I work in a k12 environment, I needed to make a plugin that removed “Public” as an option when users post content. I didn’t take me long to locate the file engine/lib/access.php as the file that controls these functions.

I hacked the core code and indeed it functioned as I wanted it to. Hacks to the core are undesireable because it complicates upgrading, so I wanted to create an override. I worked many hours trying to create a hack of the core access.php, but I was unsuccessful. I just couldn’t figure out how to write a start.php that would function. Finally, I had a break through, but it had nothing to do with overriding engine/lib/access.php.

Diego Andrés Ramírez Aragón and Jens von der Heydt suggested that the key to this may reside in the views directory. I knew how to write an override of elgg views. First I created the initial directories for the plugin:

nopublic/
nopublic/views

To find the rest of the pathway, I had to find where the access file was in the views directory and mirror it. Since it was in

views/default/input/access.php

I created

nopublic/views/default/input/

Next I opened created a copy of the original access.php, made my hacks and inserted it plugins’s input folder.

$class = $vars['class'];
if (!$class) $class = “input-access”;

if (!is_array($vars['options']))
{
$vars['options'] = array();
$vars['options'] = get_write_access_array();
}

if (is_array($vars['options']) && sizeof($vars['options']) > 0) {

?>

was changed to:

$class = $vars['class'];
if (!$class) $class = “input-access”;

if (!is_array($vars['options']))
{
$vars['options'] = array();
$vars['options'] = get_write_access_array();
unset($vars['options'][2]);
}

if (is_array($vars['options']) && sizeof($vars['options']) > 0) {

?>

The start.php requires no hooks. Simply initialize and register the plugin:

<?php
function nopublic_init() {

}

register_elgg_event_handler(’init’,’system’,’nopublic_init’);
?>

I put that in my plugin directory, along with an manifest.xml file so now I had:

nopublic/start.php
nopublic/manifest.xml
nopublic/views/default/input/access.php

That disables the public access option–the basic nopublic plugin. There are many directories in the views folder that can be overridden this easily.

Clearly, there is much to explore with views overrides. I look forward to learning more about the manifestations of each file. They provide important customization options beyond themes.

I’d like to hear how others are using views overrides!

Tags: , , , ,

Many people have asked how to change the ways things are worded on their Elgg sites. For example, where the word friends appears, the word colleagues may be more appropriate. This is easily achieved by editing the languages/en.php file (In the case of English). The problem is that this is editing the core. If you are careless about your upgrade, all your customizations disappear. This is best achieved using an override.

The languageoverride plugin allows you to edit the file using a plugin, leaving the core intact. Simply download and unpack the plugin, then upload it to the mod folder. Now you can customize mod/languageoverride/languages/en.php to achieve the same thing. Of course, the customizations can be made before uploading.

Open the en.php file in a text editor. You will see a well commented, tidily organized file:

Click to enlarge

Find the text you want to change by browsing the appropriate headings of by using the find function.

Lets take a closer look at the friends section of the code.

Click to enlarge

Click to enlarge

If you look at the left side of the arrow, you will see the code that calls for a string of text to display. The text actually displayed to the user is on the right side of the arrow. For example:

‘friends:yours’ => “Your friends”,

The code ‘friends:yours’ displays Your friends. If you want it to display Your colleague, you would change the line to:

‘friends:yours’ => “Your colleague”,

Note that the text to the left of the arrow remains the same.

Sometimes you may see a %s sign in the message. This is a call to a variable.

‘friends:add:successful’ => “You have successfully added %s as a friend.”,

Had you just added “John” as a friend, the text displayed would be: You have successfully added John as a friend. Do not remove the %s! For our colleague example it would be changed to:

‘friends:add:successful’ => “You have successfully added %s as a colleague.”,

Once you have made the changes, save the file. Provided the plugin is activated, the new terms will display.

You do not necessarily have to use this plugin to achieve the changes. You could put a languages file in any number of existing plugins including themes. Merely create a language folder for the plugin and put the en.php file in the languages folder:

myplugin/languages/en.php

Make you changes to the en.php as you would with the plugin.

Some text may not reside in the languages/en.php folder. In some cases plugins have their own languages/en.php files extending the core. In that case, it is appropriate to edit the languages/en.php file for the individual plugin. I am not sure if there is a way to override the plugin’s language file. When upgrading a mod, be sure to save copies of any changes to language/en.php.

While this is a fairly simple plugin, I’m sure that many will find it useful. Download the file here.

Read the comments for more good information!

Tags: , , , ,

By request, I have written another access plugin. This one eliminates the “private” and “logged in users” options leaving only “public.”

That’s all it does. Not much else to say but download here.

Tags: , , ,

I plan on using Elgg in a K12 environment, particularly my fifth graders. In order to do this in a manner that complies with our school policies and culture, I had to make some changes. Since the Elgg environment is unmoderated, I had to remove all public access to content.

Elgg’s “Walled Garden” does part of the job in that it disables public registration, but any content that users created had the option of public access which would be visible to individuals not logged in.

I created a plugin with a view override that removes this option. Now users have the choice of private or logged in users (along with any friends’ collections) when setting the access to content.

Still, access to the site could be had by RSS feeds and OpenDD. I’m not sure how big an issue this is, but I’d like to be able to do it. Dave Tosh suggested, I created an override of owners’ block eliminating those options. I believe access to these can be had unless I delete the rss and opendd views from the core. That will work, but I wonder if I could create an override of those views that disables them. I plan on looking into this.

No links to subscribe to feeds

I combined my initial plugin, with Marcus Povey’s “Walled Garden.” With “Higher Walls,” not only is registration disabled, but so is public access. Links to RSS and OpenDD feeds are also disabled.

Another issue remains. If access to content is restricted to logged in users, then the Latest Activity on the default main page will remain as a header with nothing below it. I used Customindex plugin to change the mainpage to a login page by pasting:

$form_body = “<p><label>” . elgg_echo(’username’) . “<br />” . elgg_view(’input/text’, array(’internalname’ => ‘username’, ‘class’ => ‘login-textarea’)) . “</label><br />”;
$form_body .= “<label>” . elgg_echo(’password’) . “<br />” . elgg_view(’input/password’, array(’internalname’ => ‘password’, ‘class’ => ‘login-textarea’)) . “</label><br />”;
$form_body .= elgg_view(’input/submit’, array(’value’ => elgg_echo(’login’))) . “</p>”;
$form_body .= “<p>” . elgg_echo(”) . “</a>  <a href=\”". $vars['url'] .”account/forgotten_password.php\”>” . elgg_echo(’user:password:lost’) . “</a></p>”;
echo elgg_view(’input/form’, array(’body’ => $form_body, ‘action’ => “”. $vars['url'] .”action/login”));

into customindex/views/default/customindex/content.php.

Further modifications could be done on the custom index, but this certainly serves the purpose. It is comparable to what one would encounter in a password protected WordPressMU blog.

Now I am convinced that Elgg can be modified to work within the K12 environment. Higher Walls and removing rss and opendd views directories restricts access to the community very effectively. A better solution would disabling rss and opendd through the plugin rather than deleting core files.

Now that these matters appear worked out, I plan to focus more on Elgg in terms of pedagogy. Nonetheless, I will tweak “Higher Walls” over time.

Download

Thanks to:

  • Marcus Povey
  • Boris Glumpler
  • Jens von der Heydt
  • Diego Andrés Ramírez Aragón

Tags: , , , , ,

Jeremey Ronnel from Elbee just released an autosubscribegroup plugin. This plugin automatically subscribes new users to a group or groups designated by tha administrator.

Installation is simple. FTP the unzipped folder to the mod directory of your Elgg installation, then activate it through Tolls Administration. Next click on more information.

A field appears for entering group ID numbers. You may enter as many as you like separating the numbers with a comma. Here’s where to find a group’s ID. Go to the group page in your site and look at the url in the address bar.

The group ID number appears after the word groups in the url. Type in the desired group numbers and click save. Now all new users will be subscribe automatically to the desired group or groups.

This plugin provides much sought after functionality. Many have asked for the ability to autosubscribe new members to groups of common interest to all members. It also helps give users unfamiliar with Elgg a starting point.

Tags: , ,

Jade Dominguez of TastySeed has created TidyPics, a new photo gallery for Elgg 1.0. After a slew of releases, Version 1.04 seems to have slain most of the bugs. Once installed via ftp to the mod folder and enabled in the admin interface, a new option appears in the menus:

Select Photos and you get the following page.

Click to enlarge

Click to enlarge

The first time, you are prompted to create an album with options for title, caption, tags, and access. Note the owner’s block to the left with options to view your, your friends’, and all site photo albums. Once the album is created, you are taken to a page for uploading files.

Again you have options for title, caption, and tags. Access is governed by the album. Once you upload the image, you are brought to the Album view.

Note that you have options to make comments on the album. To view an image, click on it and it appears full sized. Once you open the image view, you have the opotion to edit or delete the picture. If you select edit, you are given the option of making the image the album cover.

Tidypics has a clean simple, and easy to use interface. Jade has also created a support area in the Elgg Community where he offers assistance and seeks input. He plans to continue to develop TidyPics with new enhancements in the future.

Tags: , , ,

Many have expressed frustration in their attempts to try out the partially functional media embed tool that I wrote about a few days ago. Indeed, when I tried make a new installation, the function was initially absent. I was puzzled because I assumed the functionality existed in the Elgg core.

I checked the source file to the page in which the embed function worked, I discovered the embed code resides in mod/file. When I grabbed the latest version of the file extension from the svn repository and installed it, the embed media options appeared.

I apologize for any frustrations. If you want to play with this new tool, grab the newest file plugin.

Tags: , , ,

Pete Harris recently released a number of themes, some of them with css overrides controlling the appearance of  plugins that modification of the views/default/css.php did not touch. This is because many plugins have their own css.php files. Let’s look at the directory structure of one of his themes:

Looking at the third panel containing the hiles of the theme’s views/default/ directory, there are several folders for plugins that you do not see in the core views/default. Each of these contains a css.php file governing the appearance of the plugin when the theme is activated. In this case we are looking at the css.php file for the blog plugin.

Let’s look at the original blog plugin’s directory structure:

As you can see, there are parallels between the directory pathways to the governing css.php files. For the original blog mod:

views/default/blog/css.php

This is the same as the pathway within the theme folder:

views/default/blog/css.php

In order to create an override impacting plugins, you simply need to make a directory in your theme:

mytheme/views/default/pluginname/

Create a copy of the plugin’s original css.php, and edit it to change the appearance. Once you are done, save it and and put it in the apporpriate folder as css.php:

mytheme/views/default/pluginname/css.php

This will now override:

pluginname/views/default/pluginname/css.php

Examining Pete’s modification gave me a deeper understanding of how the appearance of Elgg is controlled. It certainly opens up many more avenues of customization than I previously realized.

Tags: , , ,

We have heard hints of a great new Elgg feature that will make life easier. I found a tidbit in the Elgg SVN. I wonder if this is what they meant:

While it does not appear fully wired up yet, this is an exciting and important functionality. It makes media easily embeddable in a way that works with the core file repository rather than creating a new one as my Tincymce/TinyBrowser extension did. This new text area feature gives access to all media from the  repository that an individual has access to, instead of giving everyone access to all files. It sorts them into categories according to the type of media.

Items are inserted by dragging and dropping them into the text field at the insertion point. Very simple and elegant.

Again, this does not appear entirely wired up yet. Hopefully, this will be one of the features of the Elgg 1.1 release.

Update: Please read additional information here.

Tags: ,

« Older entries