View Full Version : Joomla Menus disappearing
newby
01-29-2006, 04:28 PM
Hi all,
I've been playing around with the Calendar for a couple of days now
- however I can't manage to integrate it correctly with Joomla.
This is my current setup:
Joomla! 1.0.7 Stable
ECP installed
kl_php installed
When I attempt to link a menu item to a content item containing the
following kl_php code:
{kl_php}require('modules/calendar/calendar.php');{/kl_php}
I get this error in my mainmenu
Warning: Invalid argument supplied for foreach() in /home/waterfor/
public_html/includes/frontend.php on line 64
You can see what I mean here, click the "Calendar" link on the left:
http://www.waterfordmtb.com/index.php.
So I'm not sure if this is a kl_php problem or a Joomla\Mambo issue?
Anybody got any ideas?
regards
ve9gra
01-29-2006, 08:28 PM
I really don't know where the issue lies but it seems to be in the menu. I've never needed to use the kl_php to get the calendar working. Have you tried without it?
newby
01-30-2006, 05:02 AM
Hi Gervais,
Thanks for the reply.
How did you integrate the Calendar with Joomla without using kl_php
(or Moslate - I tried this to, but the moslate code wasnt being executed). I don't like the idea of using wrappers.
I've read a few posts on this forum where folks have integrated the
calendar successfully using either kl_php or moslate. My only worry is
that I'm using the most recent version of Joomla and something may
have changed.
BTW, I've updated my "Calendar" link to now point to the following
content code:
{kl_php}
$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');
{/kl_php}
I get the same error message within my menus. But if I remove the last line:
require('modules/calendar/calendar.php');
The menu is fine but the Calendar doesnt display. You ca see this by
clicking "Calendar 2".
http://www.waterfordmtb.com/index.php
Still not sure how to go about fixing this??
W.
ve9gra
01-30-2006, 07:39 AM
It seems that the problem is when Joomla is trying to initialize it's modules. It must come across the calendar and crap out because it's not a real Joomla module.
I haven't seen the calendar module being used on your site (the block), so I would assume it's safe to move the calendar installation?
I would suggest you move the calendar folder up one in the folder hiarchy... basically move from /*joomla-install*/modules/calendar to /*joomla-install*/calendar. As soon as it's moved, run the Setup Manager to update the paths, then fix the paths in your kl_php code. Hopefully then, Joomla won't puke as it shouldn't try to initialize the Calendar as a module.
Let me know how it goes and if you get into more problems.
newby
01-30-2006, 10:33 AM
HI Gervais,
I've tried your suggestion, by doing the following:
1. Uninstalled the EasyPHPCalendar module
2. Moved the code to <root>\calendar\
3. Run the setup manager to recreate the paths
4. Used kl_php to point to the new locations:
i.e require('calendar/calendar.php');
But I still get the same error in my mainmenu
So now I re-installed the EasyPHPCalendar module within the modules
directory: You can see it here:
http://www.waterfordmtb.com/index.php
Notice that the "block" calendar is now visible.
My question is this - I want the block to appear within a content item,
but when I reference it via kl_php (within my content item), the menus still get messed up.
W.
ve9gra
01-30-2006, 02:32 PM
Is the calendar the only thing you use kl_php for? I'm wondering if that's not your problem (calendar seems to be installed properly as the block shows up fine).
newby
01-30-2006, 03:55 PM
Yep, I only installed kl_php to load in the calendar within a content item.
kl_php - works fine for standard php calls:
i.e.
{kl_php}
echo "test";
{/kl_php}
Strange - I'll keep trying...
ve9gra
02-01-2006, 07:38 AM
I'll see if I can find the kl_php module at a site where I don't need to register to download it and I'll check with my own installation to see if it works.
swimmrguy
02-01-2006, 09:19 PM
newby,
I have been able to successfully use kl_php to embed calendar into a content item. I wanted a customized version of the list view to show as a content item on the front page. However, I set it up so long ago, I don't remember all the nuances I finally decided on.
I just quickly looked back at my set up, and from what I can tell this is what worked for me:
First, I mad a custom php file for the calendar, using the settings I wanted.
Second, I put an absolute URL in the kl_php string, ie:
{kl_php} include('http://pediatricsatqueens.ca/modules/calendar/todayevent.php');{/kl_php}
If you want to see it, my URL is http://pediatricsatqueens.ca and it is the "Today's Rounds and Conferences" listing.
Maybe that will help...
newby
02-02-2006, 09:44 AM
Hi Bob & Gervais,
Bob I'll give your code a try - thanks.
W
newby
02-02-2006, 10:10 AM
That worked perfectly Bob.
I've included a link to the "demo.php" code from my content item
http://www.waterfordmtb.com/index.php?option=com_content&task=view&id=14&Itemid=31
I'll customise this view more later - nice to know it's working now.
Thanks again Bob & Gervais - great component.
swimmrguy
02-02-2006, 10:13 AM
newby,
I am glad it worked...I found that kl_php really does add a lot of flexibility for using EPC in Joomla.
vBulletin® v3.8.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.