View Full Version : Any luck using moslate?
swimmrguy
10-02-2005, 06:59 PM
I love this calendar, and it has been easy to integrate into Joomla. I haven't been using the module, since I really want to use the List view and the TOC view. Wrapper works very well for this.
I have run into a little snag, however. I have been trying to put a List view into a content item. In particular, I want a customized List View (customized to show only today's events) to appear in a news content page. That way, I can show it on the Front Page as "Today's Events."
After a suggestion I found on this forum, I gave moslate a try. I can get it to "include" the php script that contains my customized List view, and it displays the list as I would expect. However, it screws up the rest of the page. In particular, the menu modules completely disappear!!!! I tried replacing the list view php file, with a simple "Hello, World" php script and it works fine--all the menus stay in place.
Anyone have any luck using moslate...or any other method of getting the calendar into a content page?
In the meantime, I'll keep digging into further info about moslate.
ve9gra
10-07-2005, 08:27 AM
I'm just getting used to Mambo/Joomla, but correct me if I'm wrong... you're trying to include the list view as part of a news item?
If you were to add the list view to one of the side blocks, that would be easy, but trying to include PHP inside of another module might be tricky... If that really is what you're doing, I'll see what I can find out.
swimmrguy
10-13-2005, 12:01 AM
Gervais,
That is correct. I was trying to add a list view as a news item. I wanted it to appear in one of the frontpage news items. Yes, I could try to put it in a module but I didn't particularly want it on the Left or Right positions of the template.
The moslate component appears to be a way to include php code into a content item. But I can't get it to work with a php file that displays a calendar in list view. It looks to be a pretty complex component, so I might need to spend some time figuring out how it works in more depth.
Thanks for your reply.
Bob
ve9gra
10-13-2005, 08:41 AM
I've tried it and it works.
I'm using a stock install of Joomla, a stock install of Moslate 0.5.4, and EPC installed to /*joomla_root*/modules/calendar/. I don't know if this actually affects anything, but I've also installed the samples_export from Moslate.
I went to Components > Moslate > Manage Moslates - and created a new moslate. I named it "epc_calendar". Then for the content here's what I've added (note the absence of <?php ?> tags).
$CSS=1;
require('modules/calendar/calendar.php');
$OL=1;
require('modules/calendar/calendar.php');
$LIST=1;
$DF = "D - M d";
$template="modern.php";
require('modules/calendar/calendar.php');
I know that this actually breaks the official rules of having the CSS in the head, but heck... it works. ;)
Before you save your Moslate, go to the "Options" tab at the right and change the mode to "Eval as PHP". Then save your Moslate.
Then you go to your content-item and add this wherever you want the list to appear.
{mostlate}{epc_calendar/}{/moslate}Then just save your item and view the website.
In order to have a better integration, you might want to edit whichever template you're using for the listing module, and change the .tableListings' width attribute to "100%" instead. That way you don't have to mess with your Joomla template...
Good luck :)
swimmrguy
10-13-2005, 03:47 PM
Thanks Gervais. I didn't think about pasting the PHP file directly in the moslate. I had it linked to an external file.
However, using moslate gives me the same grief. I can get it to display the ListView correctly in the content, but it then makes all my left sided modules disappear. So I can list the calendar events for today (that's how I have it set up) but then all the menus are gone.
Another strange oddity is that the flash object I have in another content item also disappears.
Bob
swimmrguy
10-13-2005, 04:25 PM
Gervais,
Can I take you up on your first offer??? Is there a way to make a module that just display's today's events? I tried writing a new module, following the escal module example and trying to use list view...but can only get the title! No listings of events.
I think this might ultimately give me what I want. I don't know if I will figure out why moslate removes my menus.
Thanks,
Bob
ve9gra
10-13-2005, 04:48 PM
If you want you could set me up an admin account on your Joomla installation, I'll take a look at things and then when I'm done you could delete the account.
If you want to go that route, you can forward me the appropriate info (Joomla account, FTP account, server names, etc...) to <removed>
swimmrguy
10-14-2005, 11:46 PM
I got it to work! I have my customized List View as a News item, and my menus have reappeared.
Instead of using moslate, I got it to work with a mambot called kl_php.
If you want to see it, go to http://pediatricsatqueens.ca
On the front page, you will see "Today's Rounds and Conferences" which should be showing anything on today's date. If you click on "Rounds and Conferences," you can see some of my other EPC listings of our Rounds schedule. These were an easy implementation using wrapper.
EPC is GREAT!
silverfish
10-18-2005, 02:03 PM
Can you have subcategories? I want an alternative to the typical Joomla events calendar. I have tried <another calendar>, but it does not have subcategory features.
Silver
mcsmom
10-31-2005, 10:20 AM
Here is a way I used moslate to include calendars on a content page:
{moslate}{jsp:include page="calendar_toc.php"}{/moslate}
or
{moslate}{jsp:include page="escal.php"}{/moslate}
vBulletin® v3.8.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.