Obsolete
NeilStevens: This page is obsolete as a user list. See User List for the real thing.
List of User Pages
ElanorGamgee: I thought this would be an interesting page. Is there a way to add to the homepage template a suggestion to add their links here? If not I can try to keep it updated if there's interest.
NeilStevens: Funny, when I saw you add the link on Wiki Suggestions, I assumed you were going to ask me to install the user list macro that's available from the MacroMarket.
ElanorGamgee: I would have if I had known about it. But this will work in the meantime, no?
NeilStevens: Sure... it'll just serve as a reminder to me to get that macro installed!
MassimilianoMarangio: Homepages should contain the CategoryHomepage wiki tag. They are automatically listed in the CategoryHomepage page, together with a few other help pages.
MayLith: Idea: Add ToME forum nicknames (if/when applicable) after the wiki name, to aid us in recognizing one another.
NeilStevens: Go read up a few lines. this page is going to be replaced. Put permanent information that people want to share on their homepages.
MayLith: Ah, cool.
ReenenLaurie: Another search to the MacroMarket found this (I haven't the foggiest idea whether these things will work or not, I just copied it here for ease...):
1 """
2 MoinMoin macro to create a list of current users
3 UserList.py
4 ark 06/13/04 0.1
5
6 ***********
7 by Antti Kuntsi <antti@kuntsi.com>
8 As far as the author is concerned, this code is released to the public
9 domain, but some restrictions in the MoinMoin COPYING file may apply. Ask a
10 lawyer.
11 _parse_arguments -method from ImageLink.py by jkk
12 ***********
13 This code has not been tested exhaustively. Use at your own risk.
14 This code opens the userdict.pickle, and if it gets corrupted, you have a
15 problem. You have been warned.
16 The multiple column support has not been tested, but is assumed to be
17 working.
18 ***********
19
20 This macro displays a list of currently known users.
21
22 Usage:
23 [[UserList]]
24 [[UserList(column1, column2, ...)]]
25
26 Demo. Try pasting the above examples into a MoinMoin sandbox page.
27
28
29 """
30
31
32 import string, pickle, time
33 from math import ceil
34 from MoinMoin import wikiutil, config
35
36 def sorted_users(users):
37 usernames=users.keys()
38 usernames.sort()
39 for username in usernames:
40 usertime = time.localtime(float(users[username].split(".")[0]))
41 yield username, usertime
42
43 def execute(macro, args):
44 '''handle the UserList Macro. return the generated display HTML
45 ark 06/13/04'''
46 # parse the arguments
47 if args==None:
48 args = ''
49 parseargs = _parse_arguments(args, ',', '"')
50 columnlist=[]
51 if len(parseargs)>0:
52 columnlist=filter(None, [name.strip() for name in parseargs])
53
54 result = [macro.formatter.paragraph(0)]
55 userdict = pickle.load(file(config.data_dir+"/user/userdict.pickle"))
56
57 if not userdict:
58 return
59
60 userlist = sorted_users(userdict)
61
62 if columnlist:
63 columnsize=int(ceil(len(userdict)/float(len(columnlist))))
64
65 initials = []
66 initial=''
67 currentcount=0
68 for name, creationtime in userlist:
69 if initial != name[0]:
70 initial=name[0]
71 initials.append(initial)
72 if currentcount:
73 result.append(macro.formatter.bullet_list(0))
74 if columnlist and (currentcount > columnsize or currentcount == 0):
75 newcolumn=columnlist.pop(0)
76 if currentcount:
77 result.append(macro.formatter.rawHTML('</div>'))
78 result.append(macro.formatter.rawHTML('<div id="%s">'%newcolumn))
79 result.append(macro.formatter.anchordef(initial))
80 result.append(macro.formatter.heading(2, name[0]))
81 result.append(macro.formatter.bullet_list(1))
82 result.append(macro.formatter.listitem(1))
83 name = macro.formatter.pagelink(name, name)
84 result.append("%s -- %s"%(name, time.strftime(config.date_fmt, creationtime)))
85 result.append(macro.formatter.listitem(0))
86 currentcount+=1
87
88 result.append(macro.formatter.bullet_list(0))
89 if parseargs:
90 result.append(macro.formatter.rawHTML('</div>'))
91 while columnlist:
92 result.append(macro.formatter.rawHTML('<div id="%s"> </div>'%columnlist.pop(0)))
93 anchorlinks = "".join([macro.formatter.anchorlink(a, a) for a in initials])
94 result.append(macro.formatter.paragraph(1))
95 result.append(macro.formatter.rawHTML('<br clear="both">'))
96 result.insert(0, anchorlinks)
97 result.append(anchorlinks)
98 return "\n".join(result)
99
100
101 def _parse_arguments(argstring, delimchar=',', quotechar='"'):
102 '''parse argstring into separate arguments originally separated by delimchar.
103 occurrences of delimchar found within quotechars are ignored.
104 This parser is not particularly elegant. Improvements are welcome.
105 jjk 03/28/01'''
106 # replace delimiters not in quotes with a special delimiter
107 delim2 = chr(0)
108 inquote = 0
109 for i1 in range(len(argstring)):
110 cchar = argstring[i1]
111 if cchar==quotechar:
112 inquote = not inquote
113 elif (not inquote) and cchar==delimchar:
114 argstring = argstring[:i1] + delim2 + argstring[i1+1:]
115 # split the argument string on the special delimiter, and remove external quotes
116 args = string.split(argstring, delim2)
117 for i1 in range(len(args)):
118 arg = args[i1]
119 if arg[:1]==quotechar and arg[-1:]==quotechar:
120 args[i1] = arg[1:-1]
121 return args
ReenenLaurie: Speaking about the starshine theme... eish, the python code looks totally unreadable if you use those tags.
NeilStevens: Obviously that supplied site look wasn't tested very well when the Moin people shipped it.
ToME Wiki