Forum OpenACS Q&A: Forums includelet.

Collapse
Posted by Richard Hamilton on
I have just installed the forums includelet service. After restart the Forums package is in the mountable applications list but the includelet is not present either in the list of services or in the mountable applications list.

I had not installed the forums package before installing the includelet.

R.

Collapse
2: Re: Forums includelet. (response to 1)
Posted by Don Baccus on
includelet's aren't package instances, they're UI snippets that map an include script to a package instance such as forums. You manage them through the layout-managed-subsite admin pages.

Have you created a layout-managed-subsite instance, yet?

Or, if you want your root (/) subsite to be a layout-managed-subsite, have you gone to the admin page and converted that acs-subsite to a layout managed one?

In either case, once you have an unconfigured layout-managed-subsite instance created, visiting the subsite will redirect you to the configuration wizard (you must be admin to do this).

That will step you through various things, among them a page that lists applications and links to a page that allows you to create includelet instance mapped to the app (forums-includelet mapped to forums, etc).

This management/admin page replaces the .lrn applet stuff, which I chose to not re-implement.

Then you'll enter a page configuration page - it's very similar to the .LRN one.

There is some package documentation for layout-managed-subsite, though it's a bit sketchy. Go to your [host]/doc directory and you should see a link there.

Actually I'd love it if you'd look at that documentation and point out what's not clear since obviously, since I wrote the package, the documentation seems crystal clear to me since I already know how the package works!

Collapse
3: Re: Forums includelet. (response to 2)
Posted by Richard Hamilton on
Don,

I have created the layout-managed-subsite and converted the 'Main' subsite. I have installed the includelets and have run through the wizard.

As admin I now have all my admin links shown as beautifully 3D shaded tabs. One observation is that by default the 'active' tab is blank until I click the tab link. Then it populates. Presumably there is a way to specify a default tab to be populated on arrival.

If I go to the site root at '/' I have a simple blank page. So I guess I have another stage of configuration to do.

I read all the documentation before I started. It is clear and concise, however I wasn't helped by the fact that I read the docs for both Layout-Managed-Subsites AND Layout-Subsite-Integration, and as a result was left a little confused as to their respective functions. I was left floundering in the terminology!

I will review the docs again knowing what I now know and will report back on progress (or lack of it!).

Thanks for all your help, and for a great development.

Richard

Collapse
4: Re: Forums includelet. (response to 1)
Posted by Richard Hamilton on
Penny has dropped! Oh my goodness - how cool is that!?

😊

Only slight issue I have is that all my includelets are displaced 50% to the right of the browser.

I will leave as is for you to see. This is set as a two column layout.

http://63.246.8.12:8004

(In any case, it really is only a short hop from this to enabling the <div>s to be moved around at will in the browser!)

Regards
Richard

Collapse
5: Re: Forums includelet. (response to 4)
Posted by Richard Hamilton on
OK, answering my own question! The reason for choosing the Layout-Managed-Subsite-Tabbed style is that it resolves the issue of the page contents being displaced to the right and also prevents the XoWiki admin links from sitting on top of the rightmost tabs.

The only downside to that is that it seems to disable the XoWiki layout directives >>left-col<< ..... >><< etc.

Is this by design or is it a bug?

R.

Collapse
6: Re: Forums includelet. (response to 5)
Posted by Don Baccus on
Hmm probably a clash in CSS?

I think I'm doing the left/right stuff ala "theme zen" in .LRN - perhaps this clashes with how xowiki tries to do layouts if it's being displayed in an includelet?

I haven't done much with the xowiki includelet, just used it on a client site with thoroughly custom CSS and with a user sophistication low enough so that I doubt layout directives are used at all (I'm no longer maintaining the site for them so don't know).

If you use the layout-managed-subsite-plain style you shouldn't have the formatting issues you saw ("page contents being displaced to the right"), however I just committed that change a couple hours ago and you'd have to reinstall (sorry, I didn't provide an update script).

Collapse
7: Re: Forums includelet. (response to 6)
Posted by Richard Hamilton on
Don,

Oh, not to worry about that. This is only a play-with-it site and I have backed up the db at every stage!

It may be a CSS clash, but it could be more fundamental than that. I notice that if I edit the default index page the >>left-col<< open and >><< close tags have been replaced as &gt;&gt;left-col&lt;&lt; and &gt;&gt;&lt;&lt;  respectively.

If I try changing them back to >>left-col<< and >><< they are then simply displayed as verbatim text on the output page rather than being interpreted as tags. I have tried submitting this as simple text and also as html.

If I switch to the Default OpenACS theme, the column layout is fully respected.

If you have fixed the page displacement issue and a fix can be found for the XoWiki admin links, then perhaps it would be better to recommend the Default OpenACS Tabbed theme.

R.

Collapse
8: Re: Forums includelet. (response to 6)
Posted by Richard Hamilton on
You're right, it must be a CSS clash because the div blocks are correctly rendered. Will have to have a look at the CSS to see what's going on.

<div id='left-col' class='column'>

<div class='recent'><div class='portlet-wrapper'><div class='portlet-header'>
     <div class='portlet-title-no-controls'>Recently Changed Pages</div></div>
     <div  class='portlet'><div><div class="table"><table class="list-table">
<tr class="list-header">
<th class="list">Last Modified</th><th class="list"></th><th class="list">Page Title</th>
</tr><tr class="odd">
<td class="list">2009-09-28 23:17:35</td><td class="list"></td><td class="list"><a href="/xowiki/index" title="" class="">Index Page</a></td>
</tr>
</table></div></div></div></div></div>

</div>

<div id='right-col' class='column'>

<div class='last-visited'><div class='portlet-wrapper'><div class='portlet-header'>
     <div class='portlet-title-no-controls'>Last Visited</div></div>
     <div  class='portlet'><div><div class="table"><table class="list-table">
<tr class="list-header"><th class="list">Page Title</th></tr><tr class="odd"><td class="list"><a href="/xowiki/index" title="" class="">Index Page</a></td></tr>
</table></div></div></div></div></div>

<br>
<div class='most-popular'><div class='portlet-wrapper'><div class='portlet-header'>
     <div class='portlet-title-no-controls'>Most Popular</div></div>
     <div  class='portlet'><div><div class="table"><table class="list-table">
<tr class="list-header">
<th class="list">Page Title</th><th class="list" align="right">Visits</th><th class="list" align="right">Visitors</th>
</tr><tr class="odd">
<td class="list"><a href="/xowiki/index" title="" class="">Index Page</a></td><td class="list" align="right">19</td><td class="list" align="right">1</td>
</tr>
</table></div></div></div></div></div>

</div>

Collapse
9: Re: Forums includelet. (response to 8)
Posted by Don Baccus on
perhaps it would be better to recommend the Default OpenACS Tabbed theme

This won't generate tabs for layout managed pages, nor will it display includelets according to the layout chosen for the page (which is why it appears to "work" for you).

Also, the xowiki stuff might display properly on a page with a single column.

Really, content displayed in includelets shouldn't be further sub-divided by embedded HTML, because results are going to be hard to predict and may work or fail depending on the layout/theme selected for the page/portlet.

You could display a "cover page", if you will, in the xowiki that just has summary information then link to the full page (when displaying in a non-managed application page, you'll get the standard one-column layout that you see in an ordinary subsite using the default theme).

BTW, if all you want is a simple way to have editable text in an includelet, check out the "content-includelet". It provides a simple way to provide versioned HTML with the typical controls to set a particular version "live", to delete, edit, etc. It also provides a simple way to do variable interpolation (so you can grab stuff from the db and have it appear in the text). It's been very useful for me ...

Collapse
10: Re: Forums includelet. (response to 9)
Posted by Richard Hamilton on
"Really, content displayed in includelets shouldn't be further sub-divided by embedded HTML, because results are going to be hard to predict and may work or fail depending on the layout/theme selected for the page/portlet."

I agree, I was thinking the same. It could be very hard to predict the results with a complex theme, and even harder to troubleshoot. However, in principle it should be possible, certainly for a simple theme, as long as the various components are 'contained' in div blocks with robust css. So whilst it probably shouldn't be a major selling point, whatever is causing the problem should probably be ironed out.

When I have time I will try to work out what is going on.

I will try the simple content includelet, thankyou. The XoWiki includelet appears to be an includelet for admin functions only.

We are now lucky enough to have gone from having no options to having two ways to achieve includelet driven pages! Having this capability in acs-core feels good. Both Layout-Manager and XoWiki are fantastic tools. The trick will be to find the best ways to utilise them fully without creating a muddle. There is definitely more than enough rope now! 😊

All we need now is a fully CSS compliant Xinha that produces tidy output!

R.

Collapse
11: Re: Forums includelet. (response to 10)
Posted by Claudio Pasolini on
Richard wrote:
"The XoWiki includelet appears to be an includelet for admin functions only."

Actually the XoWiki admin includelet allows you to pick any xowiki page and to register it as an includelet that you can lay out as you like.

Cheers,
Claudio

Collapse
12: Re: Forums includelet. (response to 10)
Posted by Don Baccus on
All we need now is a fully CSS compliant Xinha that produces tidy output!

Have you tried TinyMCE? Supposedly it generates valid HTML.

Collapse
13: Re: Forums includelet. (response to 11)
Posted by Richard Hamilton on
Oh, I see! Now I get it. Fantastic.

Thanks Claudio.