Forum .LRN Q&A: Add a new portlet

Collapse
Posted by Nagita Karunaratne on
Hello

Does anyone know offhand what is happening?

1.  I tried to add a new calendar portlet by copying
calendar-full-portlet-create.sql
calendar-portlet-procs.tcl
calendar-full-portlet.adp
calendar-full-portlet.tcl

and changing the names in the target files as appropriate. Then I installed dotlrn (v. 1.0.1) but the new portlets are not on the template portals. I know that somewhere i have to tell it to place the new portlet on a specific page in the template portal. Does anyone know what am I doing wrong?

2.  Where in the install process are the portal templates created? When a new portal is created, the information as to  where to place a PE is taken from the template portal but where is the template portal created during initial install?

Thanks.

Collapse
2: Re: Add a new portlet (response to 1)
Posted by Janine Ohmer on
It has been quite a while since I had to figure this out, so I could be misremembering, but I think you have to add your portlet to the dotlrn package paramters that list them. For example:

<parameter datatype="string"  min_n_values="1"  max_n_values="1"  name="default_user_portal_applets" default="dotlrn_dotlrn,dotlrn_calendar,dotlrn_
forums,dotlrn_faq,dotlrn_fs,dotlrn_news" description="a csv list of the applets to call when creating the user portal template"/>

This is from dotlrn/dotlrn.info, but of course on an already installed site you would use the site map to edit the parameter.  There are several of them that list applets and I'm not sure which one(s) you need to update.  Doing all of them is probably safe.

Collapse
3: Re: Add a new portlet (response to 1)
Posted by Don Baccus on
You also need to define the dotlrn applets that do the actual mounting of the portlets.

The version of the portal package that comes with .LRN is not able to mount portlets by itself (the new version of portals I'm working on can do so perfectly well but I don't expect it to be out until sometime in April due to the amount of work involved in writing upgrade scripts).

Collapse
4: Re: Add a new portlet (response to 3)
Posted by Randy O'Meara on
Don,

How about making your portal rewrite available for those that don't require an upgrade path. For new development only?

Randy

Collapse
5: Re: Add a new portlet (response to 1)
Posted by Don Baccus on
I'm planning to a week or so after I return home from the University of Galileo.  Rocael Hernandez has me chained to my chair helping them with the design of a variety of new .LRN packages they're writing.
Collapse
6: Re: Add a new portlet (response to 1)
Posted by Don Baccus on
March 1 is a good target date, Randy ...
Collapse
7: Re: Add a new portlet (response to 6)
Posted by Randy O'Meara on
What's the status of the portal rewrite?

I am interested in looking at portal capability in detail. Any guidance would be appreciated.

Collapse
8: Re: Add a new portlet (response to 1)
Posted by Don Baccus on
Randy ... I'm running a couple of weeks late.  You can see an extremely simple demo at donbaccus.com - the first two tabbed pages are portal pages, the second two standard acs-subsite "group-master" (tabbed-style) application pages.

I'm hoping to tie stuff off by the end of the week for folks to play with.

Oh, the calendar portlets at my site don't work well ... they make innappropriate .LRN-ish assumptions which I haven't taken time to fix, yet, which lead to broken links.  You should be able to play with the forum portlet and test forum though.

Collapse
9: Re: Add a new portlet (response to 8)
Posted by Randy O'Meara on
Thank you, Don. Looks good. When you're ready to let us play, if you could point toward a place that provides a description or sample of API usage, that would be great.

BTW, after registering I was unable to post to your test forum (perms). I was able to make a calendar entry.

Collapse
10: Re: Add a new portlet (response to 1)
Posted by Jun Yamog on
Hi Don,

So this will be the portal code that will be used for OpenACS?  Is it already in cvs head?  We will try to lend a hand if possible.  Since we really one just like this :)  Estimated time is April or May though.  So you might be already finished by that time.

Collapse
11: Re: Add a new portlet (response to 1)
Posted by Don Baccus on
The portal package is in contrib/packages.  I plan to more or less wrap up a first cut in the next day or two, along with a few portlets which I'll make available for testing.
Collapse
12: Re: Add a new portlet (response to 1)
Posted by Don Baccus on
OK I've updated donbaccus.com with some additional examples.  I also added a download repository and put the portlets tarball up there.

So you can now install contrib/packages/portal (just ln -s it into packages), untarball the portlets in packages, and off you go.  The portlets are marked as services (as they don't mount) so go to select services, click on the desired portlets (NOT news-aggregator - it's not been redone), install, restart, then mount the portal package somewhere and visit it.

Hopefully the rest will be reasonably self-explanatory.