List Info

Thread: How do I make the FCKeditor the default editor for every user?




How do I make the FCKeditor the default editor for every user?
user name
2006-09-20 20:08:47
Maurits van Rees wrote:
> Alexander Limi, on 2006-09-20:
>> This only sets the default value, it doesn't
iterate through existing  
>> members, does it?
> 
> No it doesn't.  But the question was how to set the
default value so
> new users will have this as the default, so that's
okay. 
> 
> I don't have any code lying around for iterating
through all users for
> this.

I've got some. It's from before you joined Zest, Maurits


Below code is from an external method, it was placed as
'switchToKupu.py' inside a product's 'Extensions/'
directory. Ah, and of
course you should change kupu to fck: this was for moving
users from
Epoz to Kupu 


def switchToKupu(self):
    out = []
    # Collect members
    pm = self.portal_membership
    for memberId in pm.listMemberIds():
        member = pm.getMemberById(memberId)
        editor = member.getProperty('wysiwyg_editor',
None)
        if editor == 'Kupu':
            out.append('%s: Kupu already selected, leaving
alone' %
memberId)
        else:
            member.setMemberProperties({'wysiwyg_editor':
'Kupu'})
            out.append('%s: Kupu has been set' % memberId)
    return "\n".join(out)



Reinout

-- 
Reinout van Rees                       r.van.rees 
zestsoftware.nl
http://vanrees.org/weblog/
                  http://zestsoftware.nl/
"Military engineers build missiles. Civil engineers
build targets."


_______________________________________________
Setup mailing list
Setuplists.plone.org
http://
lists.plone.org/mailman/listinfo/setup
[1]

about | contact  Other archives ( Real Estate discussion Medical topics )