Subject: Developers of Sympa
List archive
- From: Adam Bernstein <address@concealed>
- To: address@concealed
- Subject: [sympa-dev] Easy change, big difference
- Date: Wed, 06 Jul 2005 16:58:01 -0700
Now that I've (almost) merged all of our changes with the latest Sympa
(5.1b from CVS last week), I am submitting this change that is very
simple but makes a big difference in the usability of Sympa. With a
simple patch to wwsympa.fcgi, very minor changes to main.tt2 and
style.css, and one new Web template, you can have the subscriber's
groups always listed in a box on the left-hand side, instead of on a
separate page -- see attached .gif. This box is displayed instead of
the list_menu whenever the list variable is not defined.
The change is actually much easier in the new version, partly because of
the better interface and partly because I'm a little smarter now than I
was 2 years ago. I'm using the which_info parameter that you were
already creating, except I had to add to it in wwsympa.fcgi because it
was only showing memberships, not owners/moderators.
So here's the patches:
1. Resize the menu box slightly by increasing "180px" and "190px" to
"240px" and "250px" in style.css (there may be a cleaner way to do
this).
2. Add one line to main.tt2 -- diff attached. I also moved one line,
putting the language selector above the menu box, because if the user
has many groups, the list will be long and the language selector will
now be very far down the page. (For the same reason, I also moved the
"Search lists" button and "RSS News" buttons to the top of the
categories listing in home.tt2, but I had trouble with this and I'm sure
you can do it more easily and better than I did.)
3. Remove the "Your subscriptions" line from login.tt2, as it is now
unnecessary.
3. Add one code block of 14 lines to wwsympa.fcgi -- diff attached.
4. Create the new template your_lists.tt2, attached.
I very much hope this change can make into 5.1 before it's released.
Thanks!
adam
Attachment:
newsympa.gif
Description: GIF image
*** /home/sympa/bin/etc/web_tt2/main.tt2 Wed Jun 29 15:29:15 2005 --- main.tt2 Wed Jul 6 13:39:00 2005 *************** *** 64,71 **** <div id="Menus"><!-- Start Menus --> [% PROCESS login_menu.tt2 %] - [% PROCESS list_menu.tt2 IF list %] [% PROCESS setlang.tt2 %] </div><!-- End div Menus --> <div id="Stretcher"> <!-- <span id="toggleMenu" title="A javascript could hidde or show the meneu" class="smalltext info printNone toggleNone">toggle menu</span><br /> --> <br /> --- 64,72 ---- <div id="Menus"><!-- Start Menus --> [% PROCESS login_menu.tt2 %] [% PROCESS setlang.tt2 %] + [% PROCESS list_menu.tt2 IF list %] + [% PROCESS your_lists.tt2 IF !list %] </div><!-- End div Menus --> <div id="Stretcher"> <!-- <span id="toggleMenu" title="A javascript could hidde or show the meneu" class="smalltext info printNone toggleNone">toggle menu</span><br /> --> <br />
*** wwsympa.fcgi Wed Jul 6 16:28:13 2005 --- wwsympa.fcgi.mod Wed Jul 6 16:42:19 2005 *************** *** 933,938 **** --- 933,956 ---- $param->{'which_info'}{$l}{'host'} = $list->{'admin'}{'host'}; $param->{'which_info'}{$l}{'info'} = 1; } + #---customization: + foreach my $l (@{$param->{'get_which_owner'}}) { + my $list = new List ($l); + $param->{'which_info'}{$l}{'subject'} = $list->{'admin'}{'subject'}; + $param->{'which_info'}{$l}{'host'} = $list->{'admin'}{'host'}; + $param->{'which_info'}{$l}{'info'} = 1; + $param->{'which_info'}{$l}{'admin'} = 1; + } + foreach my $l (@{$param->{'get_which_editor'}}) { + my $list = new List ($l); + $param->{'which_info'}{$l}{'subject'} = $list->{'admin'}{'subject'}; + $param->{'which_info'}{$l}{'host'} = $list->{'admin'}{'host'}; + $param->{'which_info'}{$l}{'info'} = 1; + $param->{'which_info'}{$l}{'admin'} = 1; + } + #---end + } + } ## Set cookies unless client use https authentication if ($param->{'user'}{'email'}) {
-
[sympa-dev] Easy change, big difference,
Adam Bernstein, 07/07/2005
- [sympa-dev] Re: Easy change, big difference, Adam Bernstein, 07/07/2005
- Re: [sympa-dev] Easy change, big difference, Adam Bernstein, 07/17/2005
Archive powered by MHonArc 2.6.19+.