Solutions offered for some issues

94 views
Skip to first unread message

Kevin

unread,
Jul 11, 2013, 2:42:31 PM7/11/13
to plansc...@googlegroups.com
I know Plans isn't used near as much as it used to be. However, I still find it to be the best calendar for a Boy Scout Troop. Version 8+ introduced a few, um, wrinkles. I've seen posts here about some of them, but usually no solution. I've done some hacking on the scripts over the last 3 years and also created a couple work-arounds that others might find useful or helpful.

Troop Numeral Display
As most know, this disappeared in Version 8.x. The option is available in plans_config.pl but the entry area in the Add Event dialogue doesn't show up. Here's your work-around. Create an iconset of your numerals. You'll need to find images of the numerals for your unit, combine them into one graphic (GIF), size and name them according to instructions in plans_config.pl (near the end of the file). Since my troop is Troop 53 my icon files are named "53_50x50.gif", etc. Then create the optgroup in plans_config.pl like so:
<menu name="Troop 53 Icons">
 <menuitem value="53">Troop Numerals</menuitem>
 <menuitem value="logo53">Troop Logo</menuitem>
</menu>
This will make your troop number icon show up on the icon select list in the Add Event dialogue.
You can see I also created an iconset for our troop logo. A benefit to this is that you get the "new" green on khaki numerals rather than the white on red ones included with Plans. This may not work very well for units with more than 3 digits. Yes this is a bit of a fiddle, and I won't tell you how/where to get your numeral images. Google or a scanner can be your friends here. ;)
Upload icons to the theme/icons/ folder. Upload the revised plans_config.pl file to your installation folder. Test and enjoy!

The Upcoming Events list that can be displayed on "normal" pages has an annoying dropdown list to select the calendar. For my troop's purposes it's useless as well as being somewhat ugly. Here's how to get rid of it:
Open upcoming_events.cgi
Around line 224 you'll find the following code:
<div>
p1

$list_html .=<<p1;
<select id="org" onchange="update_event_list()">
p1
foreach $cal_id (@calendars_to_show) {
$list_html .=<<p1;
<option value = "$cal_id">$calendars{$cal_id}{title}</option>
p1
}  
$list_html .=<<p1;
</select>
</div>
p1

Change the opening <div> tag to <div style="display:none;">
Voila, no more dropdown. I tried commenting out the code, I tried deleting it, but those only broke the script. I'm not real perl conversant so I don't know why that was. Anyway, this was really simple and easily reversible if you so desire.

Lastly, I never liked deploying the Upcoming Events list in an iframe. The other day I finally got around to doing something about it. To display it with a Server Side Include I hacked the upcoming_events.cgi file and modified the upcoming_events.css file. You can see one method of display at http://troop53.net/calendar/ . Actually, everything described in this post is viewable there.

I've bundled up the above files and included instructions for installation/implementation. Download from http://troop53.net/calendar/upcoming-events.zip

Hope this helps a few people. 

Kevin

MarkK

unread,
Jul 12, 2013, 10:34:45 AM7/12/13
to plansc...@googlegroups.com
Nice modifications.  Thanks for posting them.  I agree that Plans is one of the best calendars. 

Kevin

unread,
Aug 29, 2013, 7:31:56 PM8/29/13
to plansc...@googlegroups.com
Documentation for this "hack" has been updated to clarify a few things. Functionality hasn't changed. Call this "Version 1.000000001". :)

Also I should point out that the zip file linked in the OP is only 8kb, and updating Plans with these files only requires uploading 17kb (plus uploading the affected/changed web pages).

Kevin
Reply all
Reply to author
Forward
0 new messages