| View previous topic :: View next topic |
| Author |
Message |
omoriginals
Joined: 24 Feb 2006 Posts: 133
|
Posted: Sun Apr 23, 2006 3:38 am Post subject: Views |
|
|
I'm working on having over 30 calenders.
I'd like to add a "Views" pull down menu, that lists about 7 different groupings of calendars.
and then have the regular Calendar pull down box below the Views one. I know that I can currently have Views and Calendars in the current Calendar pull down, but I think with a bunch of caledars it would be nice to keep it separated.
Is there a hack to do this?
another related question.
I want to place a small banner ad under teh Calendar drop down.
What file do I need to add my banner code to?
Thanks. |
|
| Back to top |
|
 |
esoft_ian
Joined: 12 Sep 2005 Posts: 5268
|
Posted: Sun Apr 23, 2006 11:35 am Post subject: |
|
|
Copy the folder modules/calendar_picker to
** 1)
modules/my_calendar_picker
- and -
modules/view_picker
** 2)
rename modules/my_calendar_picker/calendar_picker.php to modules/my_calendar_picker/my_calendar_picker.php
edit both
modules/my_calendar_picker/register_module.php
- and -
modules/my_calendar_picker/my_calendar_picker.php
Search and replace calendar_picker with my_calendar_picker in both files.
In register_module.php, change _CALENDARS_ to "Calendars only"
**** Repeat step 2 for modules/view_picker/*, using view_picker instead of my_calendar_picker. Except in modules/view_picker/register_module.php, change _CALENDARS_ to "Views".
*** 3)
Edit modules/view_picker/view_picker.php
Change $_cal_user->access->get_cals_sel(0) to
$_cal_user->access->get_cals_sel(0, " type > 0 ")
Edit modules/my_calendar_picker/my_calendar_picker.php
Change $_cal_user->access->get_cals_sel(0) to
$_cal_user->access->get_cals_sel(0, " type = 0 ")
Enable these in the nav bar and you should be set.
To create your banner module, you can copy the calendar links module as a starting point. Then use the Module development docs along with the examples provided here to modify it. Let me know if you have any questions/problems. |
|
| Back to top |
|
 |
omoriginals
Joined: 24 Feb 2006 Posts: 133
|
Posted: Thu Apr 27, 2006 5:12 pm Post subject: |
|
|
| ian wrote: |
To create your banner module, you can copy the calendar links module as a starting point. Then use the Module development docs along with the examples provided here to modify it. Let me know if you have any questions/problems. |
I'd just like to place a little code, in the space where the calendar links mod normally is.
I already have banner management.
Can I just alter the theme or index.php to add my banner? |
|
| Back to top |
|
 |
esoft_ian
Joined: 12 Sep 2005 Posts: 5268
|
Posted: Thu Apr 27, 2006 6:51 pm Post subject: |
|
|
| This info is not kept in a theme or index.php. You'll have to create a module. |
|
| Back to top |
|
 |
omoriginals
Joined: 24 Feb 2006 Posts: 133
|
Posted: Thu Apr 27, 2006 9:58 pm Post subject: |
|
|
i modified the links and my banner now works.
but, when I logged out, it went away.
logged in a again it reappeared.
I think the problem is the mod is available to admin, but not the public.
How can I make it live for everyone? |
|
| Back to top |
|
 |
esoft_ian
Joined: 12 Sep 2005 Posts: 5268
|
Posted: Thu Apr 27, 2006 10:10 pm Post subject: |
|
|
| Set it in Admin -> Default Options |
|
| Back to top |
|
 |
omoriginals
Joined: 24 Feb 2006 Posts: 133
|
Posted: Thu Apr 27, 2006 10:16 pm Post subject: |
|
|
 |
|
| Back to top |
|
 |
omoriginals
Joined: 24 Feb 2006 Posts: 133
|
Posted: Fri Apr 28, 2006 9:49 pm Post subject: |
|
|
i now have a calendars and a views menu.
THANK YOU.
My calendars menu still has some views in it.
I believe I know how to remove views from the calendars list.
but, how do I add views to the new VIEWS Module? Thanks. |
|
| Back to top |
|
 |
esoft_ian
Joined: 12 Sep 2005 Posts: 5268
|
Posted: Fri Apr 28, 2006 9:56 pm Post subject: |
|
|
The calendar module should not have any views in it. If it does, then there may be something wrong. Please use BOTH of the zips that I sent you.
To add views to the list, create Site Views and they will show up in the list. |
|
| Back to top |
|
 |
omoriginals
Joined: 24 Feb 2006 Posts: 133
|
Posted: Fri Apr 28, 2006 11:26 pm Post subject: |
|
|
views works.
calendars shows calendar AND views.
how can I remove them from the calendar pull down menu.
additionally.
when I'm not logged in, the Views menu is there, but it doesn't show any options.
i should have
arts
education
sports |
|
| Back to top |
|
 |
esoft_ian
Joined: 12 Sep 2005 Posts: 5268
|
Posted: Sat Apr 29, 2006 2:00 am Post subject: |
|
|
A view has to be a Global View in order for it to be seen by everyone. Admin -> Calendars -> Global Views.
Did you use the my_calendar_picker.zip file I sent you? |
|
| Back to top |
|
 |
omoriginals
Joined: 24 Feb 2006 Posts: 133
|
Posted: Sat Apr 29, 2006 2:00 pm Post subject: |
|
|
yes, I used the files you eMail.
i also deleted the views and created global views.
VIEWS looks good without needing to login.
CALENDAR still shows calendars and views. |
|
| Back to top |
|
 |
esoft_ian
Joined: 12 Sep 2005 Posts: 5268
|
Posted: Sat Apr 29, 2006 2:32 pm Post subject: |
|
|
Could you paste the line from my_calendar_picker.php that has:
$calendars_r = ...
please? |
|
| Back to top |
|
 |
omoriginals
Joined: 24 Feb 2006 Posts: 133
|
Posted: Sat Apr 29, 2006 2:58 pm Post subject: |
|
|
certainly.
$calendars_r = $_cal_user->access->get_cals_sel(0, " type = 0 "); |
|
| Back to top |
|
 |
|