[xwiki-users] features for dealing with known comment spammers in XWiki?

2012-06-09 Thread Niels Mayer
This is  either a feature request or a request for discussing
solutions to the issue of known comment spammers against XWiki
installs.

There's known spammers like davycrokk...@hotmail.com (see
http://www.nielsmayer.com/bin/view/XWiki/DavyCrokkett ) which have to
be managed and curtailed for any XWiki install enabling comments.

During registration, it would it be nice to check sites like
http://www.stopforumspam.com/ and prevent registration emails from
going out to known comment spammers.

For example, the aforementioned spammer is listed at
http://www.stopforumspam.com/ipcheck/111.243.227.227
suggesting Current country of origin:Taiwan, Province of China

DateIP Address  UsernameEmail   
1-Jul-11 07:31  111.243.227.227 coseteene   davycrokk...@hotmail.com

30-Jun-11 18:29 111.243.227.227 Assusypesound   davycrokk...@hotmail.com

30-Jun-11 13:43 111.243.227.227 Impuppota   davycrokk...@hotmail.com

30-Jun-11 11:22 111.243.227.227 Biordaccoma davycrokk...@hotmail.com

30-Jun-11 07:01 111.243.227.227 rooviskitte davycrokk...@hotmail.com

29-Jun-11 23:59 109.230.222.175 Beethyemegree   davycrokk...@hotmail.com

29-Jun-11 22:49 111.243.227.227 Kneefshes   davycrokk...@hotmail.com

29-Jun-11 13:59 111.243.227.227 seltencarne davycrokk...@hotmail.com

29-Jun-11 13:31 111.243.227.227 inigneedync davycrokk...@hotmail.com

29-Jun-11 11:50 174.142.132.203 Beethyemegree   davycrokk...@hotmail.com

29-Jun-11 11:50 174.142.132.203 phorilmiplism   davycrokk...@hotmail.com

29-Jun-11 07:53 111.243.227.227 Agergeevame davycrokk...@hotmail.com

29-Jun-11 05:56 111.243.227.227 Atomnegmess davycrokk...@hotmail.com

29-Jun-11 05:50 111.243.227.227 Impuppota   davycrokk...@hotmail.com


It would also be interesting for such flagged users to return a list
of associated IP's (such as above) which could be blacklisted as well.

I guess the correct solution would be to use
http://extensions.xwiki.org/xwiki/bin/view/Extension/Social+Login but
then the spammers would just end up getting twitter, facebook or
foursquare logins and use those instead of hotmail accounts.

-- Niels
http://www.nielsmayer.com
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


[xwiki-users] using Jelastic to host xwiki 3.5

2012-03-21 Thread Niels Mayer
Comment I posted to
http://blog.jelastic.com/2012/02/21/how-to-deploy-xwiki-to-jelastic-cloud-step-by-step-tutorial/
stating a few additional steps needed for
http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Installation
.

Thanks for making this available. Jelastic is fantastic and your
description got me 99% of the way there….

However, after setting up Xwiki and starting tomcat, you also need to
upload,
via ‘bin/import/XWiki/XWikiPreferences’ , xwiki-enterprise-ui-all-3.5.xar .
However, uploading this large file into the “empty” Xwiki dies with an
error that suggests max_allowed_packet is too small.

http://platform.xwiki.org/xwiki/bin/view/AdminGuide/InstallationMySQL#HMySQLversionsolderthan5.0suggests
changing mysql config my.cnf file from 1M to 32M
‘max_allowed_packet’

“If an empty Xwiki starts with no errors, but you unable to upload the
default set of pages (XAR file) also try to increase “max_allowed_packet”
parameter as shown above. ”

So I changed my.cnf
max_allowed_packet = 32M

Then I restarted mysql while the Xwiki/tomcat instance was running.

Now I’m able to upload the XAR successfully, then import the default Xwiki
environment. After changing the default Xwiki ‘Admin’ password I now have a
working Xwiki instance http://nielsmayer.jelastic.servint.net/
..

I was also easily able to get domain forwarding with masking (
http://support.godaddy.com/help/422 ) seemingly out of the box as well:
http://trainspodder.com/

All pretty good for a few hours of highly interrupted work. Amazing
progress across-the-board both in XWiki and also easy cloud-deployment of
 the platform  Especially because I've been off doing
C++/QML/Javascript work using http://qt-project.org for
MeeGo/Harmattan/Symbian devices, e.g. http://voicetogoog.googlecode.com
http://mediatator.googlecode.com and haven't touched anything Java-related
in a while. (/me breathes sigh of relief I've not been seeing inscrutable
java backtraces all morning :-) )

-- Niels
http://nielsmayer.com

PS: For more info:on Jelastic:
https://blogs.oracle.com/theaquarium/entry/jelastic_leveraging_glassfish_cluster_architecture
http://www.devshed.com/c/a/Java/Jelastic-Java-PaaS-Availability-and-Pricing-Announced-42939/
http://javamomentum.be/2012/03/java-and-cloud-in-10-minutes-jelastic/
http://whyjava.wordpress.com/2012/03/05/say-hello-to-jelastic/
http://cloud.dzone.com/articles/build-cloud-jelastic-maven
http://blog.jelastic.com/2012/03/19/jelastic-holy-grail-of-java-hosting/
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


[xwiki-users] FYI -- Fedora tomcat6-6.0.26-3 config for security improvement makes OpenOffice server not startup

2010-11-02 Thread Niels Mayer
In case someone decides to follow the security improvement in Fedora's
Tomcat6 brought on by recent update to tomcat6-6.0.26-3 (
https://bugzilla.redhat.com/show_bug.cgi?id=640837 )  by changing
/etc/passwd 'tomcat' user to /sbin/nologin instead of /bin/sh ...

Making this change causes the openoffice server's startup (
xwiki/bin/view/XWiki/OfficeImporterAdmin ) to fail with message
Inadequate Privileges.

Changing back to original login-allowing ~tomcat entry in /etc/passwd
allows OOo server to startup correctly.
...
see also https://bugzilla.redhat.com/show_bug.cgi?id=574593
https://bugzilla.redhat.com/show_bug.cgi?id=605335
https://bugzilla.redhat.com/show_bug.cgi?id=586364

tomcat6-6.0.26-3.fc12 (FEDORA-2010-16248)
 Apache Servlet/JSP Engine, RI for Servlet 2.5/JSP 2.1 API

Update Information:

* Includes security fix for cve-2010-2227.
* Package updated to new upstream version tomcat-6.0.26
* commons-dbcp-tomcat5, commons-collections-tomcat5, and commons-pool-tomcat5
have been dropped in favor of commons-collections, commons-pool, and
commons-dbcp
* Directory permissions fixed
* tomcat user shell fixed


ChangeLog:

* Tue Oct 12 2010 David Knox dk...@redhat.com 0:6.0.26-3
- resolves: rhbz#641102
* Thu Oct  7 2010 David Knox dk...@redhat.com 0:6.0.26-1
- copied spec and patches from f13 to bring f12 up to date
- with all tomcat6 fedora.
* Mon Oct  4 2010 David Knox dk...@redhat.com 0:6.0.26-10
- ant-nodeps is breaking the build. Put ant-nodeps on the
- OPT_JAR_LIST
* Fri Oct  1 2010 David Knox dk...@rehat.com 0:6.0.26-9
- Resolves rhbz#575341 - Additionally created instances of Tomcat
- are broken
* Fri Jul  2 2010 David Knox dk...@rehat.com 0:6.0.26-8
- LSB initscript compliance
* Thu Jul  1 2010 David Knox dk...@redhat.com 0:6.0.26-7
- Made elspec the standard for elspec %post and %postun.
* Tue Jun 29 2010 David Knox dk...@redhat.com 0:6.0.26-6
- Completed package and file sections. Added el-spec. Fixed
- directory permission problems.
* Thu May  6 2010 David Knox dk...@redhat.com 0:6.0.26-5
- Working on 589145. Tomcat can't find java compiler for java.
* Thu Apr  8 2010 David Knox dk...@redhat.com 0:6.0.26-4
- Moved build-jar-repository to later in the install process.
* Tue Apr  6 2010 David Knox dk...@redhat.com 0:6.0.26-3
- Incremented the Release tag to 3 to avoid any confusion about which
- is the most recent
* Tue Apr  6 2010 David Knox dk...@redhat.com 0:6.0.26-1
- Solved packaging problems involving taglibs-standard
- Solved packaging problems involving jakarta-commons
- Corrected Requires(post) to Requires and checked companion BuildRequires
* Mon Mar 29 2010 David Knox dk...@redhat.com 0:6.0.26-2
- Update source to tomcat6.0.26
- Bugzilla 572357 - Please retest.
- OSGi manifests for servlet-api and jsp-api
* Fri Mar 26 2010 Mary Ellen Foster mefos...@gmail.com 0:6.0.24-2
- Add maven POMs and metadata
- Link tomcat6-juli into /usr/share/java/tomcat6
* Mon Mar  1 2010 Alexander Kurtakov akurt...@redhat.com 0:6.0.24-1
- Update to 6.0.24.
* Tue Dec 22 2009 Alexander Kurtakov akurt...@redhat.com 0:6.0.20-2
- Drop file requires on /usr/share/java/ecj.jar.

References:

  [ 1 ] Bug #612799 - CVE-2010-2227 tomcat: information leak vulnerability in
the handling of 'Transfer-Encoding' header
https://bugzilla.redhat.com/show_bug.cgi?id=612799


Niels
http://nielsmayer.com
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] R: R: R: Office Importer: Caused by: java.lang.IllegalStateException: invalid templateProfileDir [solved]

2010-09-30 Thread Niels Mayer
[attached message/solution to correct thread this time]

I solved a solved a similar problem running on Fedora Linux using its
standard  fedora-packaged Tomcat/httpd/openoffice and Sun's Java.  The
problem is that the error message is deceptive.

If you run the application directly, instead of from the admin panel,
and then click to see error message details, you'll see the actual
source of the error message. Perhaps yours is the same issue as what I
had: The openoffice server is having problems reading or not finding
some necessary config information buried in the directory. You have to
create a shadow-UID'd (same uid as 'tomcat' under which openoffice
runs different account/login/etc) user like I did at /home/OOo and
start the openoffice server once as a regular user. Once that's
done, it saves enough configuration information in the account that it
will then recognize the directory and start.

Details: http://nielsmayer.com/npm/XWiki24-OpenOffice.txt

hidden in page when executing directly as
http://xwiki/xwiki/bin/view/XWiki/OfficeImporterAdmin
 -- Caused by: java.lang.IllegalStateException: invalid
templateProfileDir: /home/OOo/.openoffice.org/3

fixing this required running 'oofice' out of user 'OOo' account, which
setup a giant new batch of config info...

Note my xwiki.properties points to the /home/OOo config info setup by
the first interactive run of openoffice.

1/WEB-INF/xwiki.properties.orig 2010-06-01 15:23:48.0 -0700
--- xe-231/WEB-INF/xwiki.properties 2010-06-07 20:16:34.181462173 -0700
***
*** 77,88 
 #-# [Since 1.8RC3]
 #-# Path to openoffice installation (serverType:0 only).
 #-# If no path is provided, a default value will be calculated based
on the operating environment.
! # openoffice.homePath=/opt/openoffice.org3/

 #-# [Since 1.8RC3]
 #-# Path to openoffice execution profile (serverType:0 only).
 #-# If no path is provided, a default value will be calculated based
on the operating environment.
! # openoffice.profilePath=/home/user/.openoffice.org/3

 #-# [Since 1.8RC3]
 #-# Maximum number of simultaneous conversion tasks to be handled by
a single openoffice process (serverType:0 only).
--- 77,88 
 #-# [Since 1.8RC3]
 #-# Path to openoffice installation (serverType:0 only).
 #-# If no path is provided, a default value will be calculated based
on the operating environment.
! openoffice.homePath=/usr/lib64/openoffice.org3/

 #-# [Since 1.8RC3]
 #-# Path to openoffice execution profile (serverType:0 only).
 #-# If no path is provided, a default value will be calculated based
on the operating environment.
! openoffice.profilePath=/home/OOo/.openoffice.org/3/

 #-# [Since 1.8RC3]
 #-# Maximum number of simultaneous conversion tasks to be handled by
a single openoffice process (serverType:0 only).

-- Niels
http://nielsmayer.com
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] OpenOffice Importer AdminSheet 'Inadequate priviledges'

2010-09-30 Thread Niels Mayer
Looks like I attached my response/solution to the wrong thread
regarding openoffice. Sorry for the confusion :-)

Niels
http://nielsmayer.com
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] OpenOffice Importer AdminSheet 'Inadequate priviledges'

2010-09-29 Thread Niels Mayer
On Wed, Sep 22, 2010 at 10:08 AM, afra a.froehl...@banklenz.de wrote:
 OpenOffice Import works fine on my windows machine. There is no problem with
 either an internal or externally managed instance. Still I cannot seem to
 get rid of the priviledges statement when trying to restart the server
 through the admin interface. I already tried saving the
 XWiki.OfficeImporterAdmin with and without programming rights but it still
 does not resolve the error whilst trying to use restart over the
 XWiki.AdminSheet. There is no talk of any 'Inadequate priviledges' when
 trying to restart the server directly in the XWiki.OfficeImporterAdmin page.
 This works fine and the logs state this as well.
 Is there something I'm overlooking here or is this a known bug?

I may have solved a similar problem running on Fedora Linux using its
standard  fedora-packaged Tomcat/httpd/openoffice and Sun's Java.  The
problem is that the error message is deceptive.

If you run the application directly, instead of from the admin panel,
and then click to see error message details, you'll see the actual
source of the error message. Perhaps yours is the same issue as what I
had: The openoffice server is having problems reading or not finding
some necessary config information buried in the directory. You have to
create a shadow-UID'd (same uid as 'tomcat' under which openoffice
runs different account/login/etc) user like I did at /home/OOo and
start the openoffice server once as a regular user. Once that's
done, it saves enough configuration information in the account that it
will then recognize the directory and start.

Details: http://nielsmayer.com/npm/XWiki24-OpenOffice.txt

hidden in page when executing directly as
http://xwiki/xwiki/bin/view/XWiki/OfficeImporterAdmin
 -- Caused by: java.lang.IllegalStateException: invalid
templateProfileDir: /home/OOo/.openoffice.org/3

fixing this required running 'oofice' out of user 'OOo' account, which
setup a giant new batch of config info...

Note my xwiki.properties points to the /home/OOo config info setup by
the first interactive run of openoffice.

1/WEB-INF/xwiki.properties.orig 2010-06-01 15:23:48.0 -0700
--- xe-231/WEB-INF/xwiki.properties 2010-06-07 20:16:34.181462173 -0700
***
*** 77,88 
  #-# [Since 1.8RC3]
  #-# Path to openoffice installation (serverType:0 only).
  #-# If no path is provided, a default value will be calculated based
on the operating environment.
! # openoffice.homePath=/opt/openoffice.org3/

  #-# [Since 1.8RC3]
  #-# Path to openoffice execution profile (serverType:0 only).
  #-# If no path is provided, a default value will be calculated based
on the operating environment.
! # openoffice.profilePath=/home/user/.openoffice.org/3

  #-# [Since 1.8RC3]
  #-# Maximum number of simultaneous conversion tasks to be handled by
a single openoffice process (serverType:0 only).
--- 77,88 
  #-# [Since 1.8RC3]
  #-# Path to openoffice installation (serverType:0 only).
  #-# If no path is provided, a default value will be calculated based
on the operating environment.
! openoffice.homePath=/usr/lib64/openoffice.org3/

  #-# [Since 1.8RC3]
  #-# Path to openoffice execution profile (serverType:0 only).
  #-# If no path is provided, a default value will be calculated based
on the operating environment.
! openoffice.profilePath=/home/OOo/.openoffice.org/3/

  #-# [Since 1.8RC3]
  #-# Maximum number of simultaneous conversion tasks to be handled by
a single openoffice process (serverType:0 only).

-- Niels
http://nielsmayer.com
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


[xwiki-users] xe 2.2.4: regression or operator error in OpenOffice server?

2010-04-01 Thread Niels Mayer
After upgrading to 2.2.4, I wanted to test the openoffice server. In the
root-wiki, in the openoffice admin app, I see my setup as from before (back
when it worked -- last time i tested was around 2.0):

Server type

Internally managed (local)

Server port

8100

Auto start

No

Server path

/usr/lib64/openoffice.org3/

Server profile

/home/OOo/.openoffice.org/3/

Server state

Not connected


When I select start server and click update, I get an error message
   Inadequate privileges.
despite being logged in as XWiki.Admin (root wiki admin w/ prog rights
granted).
No error messages in the logs related to this are noted.

The only clue I'm seeing is that openoffice itself is acting broken.
Previously, the '-headless' option worked, now, it doesn't:

gnulem-58-~ env DISPLAY='' ooffice -headless
/usr/lib64/openoffice.org3/program/soffice.bin X11 error: Can't open
display:
   Set DISPLAY environment variable, use -display option
   or check permissions of your X-Server
   (See man X resp. man xhost for details)

With DISPLAY defined, -headless works,  and the server can be launched,
except that servers don't normally have an X server associated with them.

I'm on Fedora 12: Linux gnulem 2.6.32.10-90.fc12.x86_64 #1 SMP Tue Mar 23
09:47:08 UTC 2010 x86_64 x86_64 x86_64 GNU/Linux.
I have the following OOo rpm's installed:

openoffice.org-graphicfilter-3.1.1-19.28.fc12.x86_64
openoffice.org-calc-core-3.1.1-19.28.fc12.x86_64
openoffice.org-draw-core-3.1.1-19.28.fc12.x86_64
openoffice.org-writer-3.1.1-19.28.fc12.x86_64
openoffice.org-brand-3.1.1-19.28.fc12.x86_64
openoffice.org-impress-3.1.1-19.28.fc12.x86_64
openoffice.org-ure-3.1.1-19.28.fc12.x86_64
openoffice.org-opensymbol-fonts-3.1.1-19.28.fc12.noarch
openoffice.org-writer-core-3.1.1-19.28.fc12.x86_64
openoffice.org-math-3.1.1-19.28.fc12.x86_64
openoffice.org-math-core-3.1.1-19.28.fc12.x86_64
openoffice.org-xsltfilter-3.1.1-19.28.fc12.x86_64
openoffice.org-presenter-screen-3.1.1-19.28.fc12.x86_64
openoffice.org-pdfimport-3.1.1-19.28.fc12.x86_64
openoffice.org-draw-3.1.1-19.28.fc12.x86_64
openoffice.org-calc-3.1.1-19.28.fc12.x86_64
openoffice.org-impress-core-3.1.1-19.28.fc12.x86_64
openoffice.org-core-3.1.1-19.28.fc12.x86_64
openoffice.org-langpack-en-3.1.1-19.28.fc12.x86_64


Hopefully, this error in Linux OpenOffice isn't causing an incorrect error
message from xwiki inadequate privileges. (bug?)

Anybody on Linux using OPenoffice 3.1.1 and have the openoffice server
working on Xwiki 2.2.4, in a multiwiki setup?

Thanks,

Niels
http://nielsmayer.com
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] [xwiki-devs] Important regression in 2.2.3 release !

2010-03-26 Thread Niels Mayer
 This bug prevents rights to be correctly saved unless you manually
 select either groups or users radio button first. See
 http://www.xwiki.org/xwiki/bin/view/Main/ReleaseNotesXWikiEnterprise223.

I saw that regression last night when upgrading from 2.1 to 2.2.3. There's
also two other regressions, which are potentially worse, since you could
lose access to the root-wiki Admin account (xwiki:XWiki.Admin). You then
have to change xwiki.cfg, login as superadmin to fix XWikiAllGroup and
XWikiAdminGroup , because names that were originally 'xwiki:XWiki.Admin
turned into xwiki:xwiki:XWiki.Admin which causes the user to lose
membership in the group.

Finally, the superadmin account itself has a regression. When you login to
that account, you get a warning saying the superadmin account email hasn't
been validated (I have email validation set on all accounts ... the bug is
that superadmin requires an exception for validation). I'm not sure if this
is related, but logging into the superadmin account puts Xwiki in a plain
HTML mode (No skin/javascript/etc), so most operations aren't possible.
Somehow I managed to navigate to administrative pages anyways, and got it
back to a state where things are working again.

In general, things are not acting stable -- i was able to get Xwiki out of
the state where logging in as Admin didn't give administrative (or even
edit) rights. And then after a reboot/restart, it went back to the old
behavior again, and I had to login as superadmin once more to fix things.
Now that I've caught the issue with xwiki:xwiki:XWiki... i'll be fixing
this in all subwikis and see whether the issue w/ losing all rights is
related to restarting or something else. I am sure I never entered
xwiki:xwiki: in any of the group documents --- something in XWiki after
2.1 ended up rewriting these values (??).

From #xwiki:


 (11:54:55 PM) NielsMayer: i think 2.2.3 still has a regression w/r/t Admin
user on root wiki (in virtual/multiwiki setup)... after you login as Admin
you get error messages all over Failed to execute macro: include ...
logging in as superadmin shows AllUsers and Admin users as correct.

(11:56:07 PM) NielsMayer: this was not in a fresh wiki install, but rather
an existing install upgrading from 2.10 to 2.2.3

(03/26/2010 12:02:38 AM) NielsMayer: turns out it was because XWikiAllGroup
and XWikiAdminGroup had xwiki:XWiki.Admin instead of XWiki.Admin ...

(12:02:48 AM) NielsMayer: next!.


Here's an example of one of the group documents with the odd prefixing bug:

XWikiAdminGroup


 Last modified by Xwiki Administrator on 2009/08/07 09:40


 Members


 Xwiki Administrator (xwiki:xwiki:XWiki.Admin)


Niels
http://nielsmayer.com
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] row was deleted by another transaction

2010-03-17 Thread Niels Mayer
On Mon, Mar 15, 2010 at 5:34 PM, Sergiu Dumitriu ser...@xwiki.com wrote:

 Theoretically, this bug was fixed (see
 http://jira.xwiki.org/jira/browse/XWIKI-299 ) by manually moving
 existing affected properties to the new correct type when a problematic
 class change occurs. Why does it continue to happen, beats me. I'll have
 to investigate again.


Note that the bug probably was fixed. Earlier  Paul wrote:

 with our XWiki 1.5 I encounter the following complaint at trying to

save the document of a user, even after a restart of the servlet

container:


Sergiu -- Thank you for the very interesting explanation of what's going on
under the hood!
Definitely added to my bookmarks.

-- Niels.
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] MySQL storage using MyISAM engine.

2010-01-16 Thread Niels Mayer
Given that the current implementation is innodb for now, one possibility to
consider, at least on some platforms is to use large pages for better OS
performance. (If anybody tries this, would love to hear your results.).

Wouldn't large pages solve some of the efficiency issues for documents using
lots of attachments?

http://lists.xwiki.org/pipermail/devs/2009-August/013849.html

 Has anybody tried enabling large page support in Mysql for Xwiki?


 Doesn't Xwiki make use of Large pages for document attachments and other

storage, and wouldn't this be useful for high-volume Xwiki based systems?

(Fedora Linux has this feature enabled by default.)


 The improvement? Applications that perform a lot of memory accesses may

obtain performance improvements by using large pages due to reduced

Translation Lookaside Buffer (TLB) misses.


 Is this worth doing? Would it improve performance (or are bottlenecks

elsewhere that make this tweak irrelevant)?


 


 http://dev.mysql.com/doc/refman/5.0/en/innodb-configuration.html

 -- http://dev.mysql.com/doc/refman/5.0/en/large-page-support.html


 7.5.9. Enabling Large Page Support


 Some hardware/operating system architectures support memory pages greater
 than the default (usually 4KB). The actual implementation of this support
 depends on the underlying hardware and operating system. Applications that
 perform a lot of memory accesses may obtain performance improvements by
 using large pages due to reduced Translation Lookaside Buffer (TLB) misses.


 In MySQL, large pages can be used by InnoDB, to allocate memory for its
 buffer pool and additional memory pool.


 Currently, MySQL supports only the Linux implementation of large page
 support (which is called HugeTLB in Linux).


 Before large pages can be used on Linux, the kernel must be enabled to
 support them and it is necessary to configure the HugeTLB memory pool. For
 reference, the HugeTBL API is documented in
 the Documentation/vm/hugetlbpage.txt file of your Linux sources.


 The kernel for some recent systems such as Red Hat Enterprise Linux appear
 to have the large pages feature enabled by default. To check whether this is
 true for your kernel, use the following command and look for output lines
 containing “huge”:


Since it's available in RHEL, it's also available in
fedora12http://fedoraproject.org/ mysql ,
but not used by Xwikis running on this mysql currently:

ROOT-31-~ cat /proc/meminfo | grep -i huge

HugePages_Total:   0

HugePages_Free:0

HugePages_Rsvd:0

HugePages_Surp:0

Hugepagesize:   2048 kB


-- Niels
http://nielsmayer.com
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] MySQL storage using MyISAM engine.

2010-01-16 Thread Niels Mayer
BTW a few more interesting links and excepts on this subject. Seems like if
one can devote a certain amount of RAM to Mysql, this could potentially be a
performace win for a larger Xwiki install:

http://www.basysadmin.com/procedures.html

 Configure mysql (InnoDB) to use hugepages. Hugepages are not swappable.
 [Ref]http://dev.mysql.com/doc/refman/5.1-maria/en/large-page-support.html
  
 [Ref]http://www.cyberciti.biz/tips/linux-hugetlbfs-and-mysql-performance.html


http://www.cyberciti.biz/files/linux-kernel/Documentation/vm/hugetlbpage.txt
http://docs.sun.com/source/mysql-refman-5.0/optimization.html

http://www.cyberciti.biz/tips/linux-hugetlbfs-and-mysql-performance.html

A

pplications that perform a lot of memory accesses (several GBs) may obtain
performance improvements by using large pages due to reduced Translation
Lookaside Buffer (TLB) misses. HugeTLBfs is memory management feature
offered in Linux kernel, which is valuable for applications that use a large
virtual address space. It is especially useful for database applications
such as MySQL, Oracle and others. Other server software that uses the
prefork or similar (e.g. Apache web server) model will also benefit.

The CPU's Translation Lookaside Buffer (TLB) is a small cache used for
storing virtual-to-physical mapping information. By using the TLB, a
translation can be performed without referencing the in-memory page table
entry that maps the virtual address. However, to keep translations as fast
as possible, the TLB is usually small. It is not uncommon for large memory
applications to exceed the mapping capacity of the TLB. Users can use the
huge page support in Linux kernel by either using the mmap system call or
standard SYSv shared memory system calls (shmget, shmat).

Only selected hardware and operating system support memory pages greater
than the default 4KB. The following configuration tested on RHEL 5.3 64 bit
using a stock kernel with tons of RAM and multiple CPUs.


-- Niels
http://nielsmayer.com
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Problem with fresh new 2.1.1 XEM install

2010-01-07 Thread Niels Mayer
On Thu, Jan 7, 2010 at 5:35 AM, Gaëtan GUYODO gaetan.guy...@lrb.aphp.fr
 wrote:

 I tried to force xwiki.url.protocol=https in xwiki.cfg, without results.
 I tried to create another wiki, same problem.
 I tried to add the full URL as alias, doesn't work !

 = I don't have any trouble accessing by
 http://localhost:8080/xwiki/wiki/xwiki
 but I can't acces the same wiki using external SSL URL
 https://mydomain/xwiki/wiki/xwiki


You can't run SSL on a random port, and HTTPS, bound to 443, is privileged
and requires a privileged process (that's why a high-number port like 8080
is used by default, it's a random, nonprivileged port). Since you don't want
to run java as a privileged process, but people trust apache to run this
way, you use a connector (
http://tomcat.apache.org/connectors-doc/reference/apache.html ) to bridge
between java and a secure SSL
front-end.

Although tomcat can do SSL, it's better and more secure to front tomcat with
Apache Httpd: use
mod_proxyhttp://httpd.apache.org/docs/2.0/mod/mod_proxy.htmland
mod_proxy_ajp http://httpd.apache.org/docs/2.2/mod/mod_proxy_ajp.html to
talk to tomcat, and mod_ssl http://www.modssl.org/ to handle SSL (helpful
security hint that is de rigueur for hospital and patient data: use
mod_auth_mysql http://modauthmysql.sourceforge.net/ and client-side
certificates http://www.modssl.org/docs/2.8/ssl_howto.html#ToC6 to prevent
any access from those without client certs... see fake basic auth concept
in http://www.modssl.org/docs/2.8/ssl_reference.html#SSLOptions ... if you
don't have a client-certificate access, you get redirected to the public
part of the web like in http://ipssources.net )

Quickndirty configuration hints:

LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
ProxyPass /xwiki/ ajp://127.0.0.1:8009/xwiki/

IfModule mod_proxy.c
ProxyRequests Off

## NPM: see
http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Performances#HModProxyAJPConfiguration
ProxyPreserveHost On
/IfModule

Niels
http://nielsmayer.com
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


[xwiki-users] how to prevent xwiki 2.X colibri skin from displaying db-name of virtual wiki host in top-menu

2009-12-31 Thread Niels Mayer
For some reason, I chose db-names for my virtual hosts that were
descriptive, but ugly and not meant to be seen in the UI.

Unfortunately, in Xwiki Enterprise 2.X, the new colibri skin exposes this
name e.g. host_xe_foo_dot_com on the left-hand-side top-menu.

As a quick hack to suppress this new feature, I cloned colibri into a new
skin exlibri (runner up names: NorwegianBlue and DeadParrot :-) ) and
changed colibri.css

ROOT-golem-85-.../java/xe-210 diff -c skins/exlibri/colibri.css.~1~
skins/exlibri/colibri.css
*** skins/exlibri/colibri.css.~1~ 2009-12-08 17:37:58.0 -0800
--- skins/exlibri/colibri.css 2009-12-31 13:55:51.082007773 -0800
***
*** 916,921 
--- 916,926 
text-transform: uppercase;
  }

+ /* NPM: get rid of annoying ServerHost name, leaving all other top-menus
the same */
+ div#tmWiki a.tme strong {
+   display: none;
+ }
+
  .actionmenu .hasIcon a.tme {
padding-left: 20px;
  }

Niels
http://nielsmayer.com
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Security best practices for Xwiki deployment and management

2009-12-24 Thread Niels Mayer
Adding to the list of potential security issues, Caleb DeLisle brought up an
interesting point in a different thread, regarding users granted programming
rights (which is not enabled for Xwiki users unless specifically granted via
Rights administration doc.):

Programming permission opens up a lot of security holes which are unsafe to
 give to subwiki admins Specifically this:
 http://jira.codehaus.org/browse/GROOVY-1875


It would be useful to get a discussion going on the security ramifications
of this issue for a singe-xwiki instance and also for a wiki-farm. Don't at
least some of the pages have to be installed with programming rights, such
as the OpenOffice import administration and the Task Manager? And how much
private information could be accessed in a compromised system, where someone
inappropriately gained control over one of these special documents with
programming rights? For example, could the private password fields of
XWiki.user documents be accessed, or is that separately gated by the
rights administration in Xwiki? What happens for the case where
authentication happens over LDAP? Does LDAP auth prevent inadvertent access
to password information in a system with a compromised page w/ programming
rights?

It would be useful to develop a set of Xwiki best-practices to prevent this
groovy bug from being a security issue with Xwiki. The underlying groovy bug
won't be addressed, apparently, till Groovy
2.0http://jira.codehaus.org/browse/GROOVY-3010,
and it's especially complicated because it's one of those bugs that's a
feature:

fix private field visibility

Michael Kebe http://secure/ViewProfile.jspa?name=michael.kebe added a
 comment - 02/Oct/09 03:55 AM

I just read Neal Ford's book The Productive Programmer. And in chapter 12
Meta-Programming he just picked this bug to show testing a private method
of Java with Groovy. Here is a quote:

 Technically, this is a bug in Groovy (that has been there since day one),
but it's so insanely useful, no one has bothered to fix it. And I hope they
never do. In any language with strong reflection capabilities, the private
keyword is not much more than documentation anyway: I can always use
reflection to get to it if the need arises.



There's a lively, deep. discussion on the issue,
http://jira.codehaus.org/browse/GROOVY-1875 which is apparently the top
issue for groovy in Jira:

Jim White /secure/ViewProfile.jspa?name=jimwhite added a comment - 24/Apr/08
11:00 AM

why don't you explain what we get from compiling private as package
private? As it is atm, the class is at last correct from a Java view.

Groovy currently destroys the Java class model by ignoring private scope. It
is a big enough leap for many enterprises to accept dynamic typing as a
change from standard Java static typing. But by making it impossible to have
safely operating API implementations this issue alone will make Groovy a
non-starter for many of them.

Since there is a simple fix, and IMHO should have been done this way from
the start rather than the hack against privacy, you need to defend why this
should not be fixed and ASAP.

[ 
Permalink/browse/GROOVY-1875?focusedCommentId=132503page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#action_132503
 | « Hide ]
Paul King /secure/ViewProfile.jspa?name=paulk added a comment - 24/Apr/08
11:28 AM - edited

It is interesting to look at Jira stats. Top (9 votes) and equal 2nd (8
votes) issues:

9BugGROOVY-1875  private fields and private 
methods
are not private
8   Improvement GROOVY-1591 Private Fields Are 
Accessible
From Other Classes
8   Bug GROOVY-1063 No access protection for 
private static fields


[ 
Permalink/browse/GROOVY-1875?focusedCommentId=132505page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#action_132505
 | « Hide ]
Jochen Theodorou /secure/ViewProfile.jspa?name=blackdrag added a comment
- 24/Apr/08 12:09 PM - edited

Jim you quoted my question, yet you don't answer it. Why is this? And I
don't see your easy fix. Ok, let us assume we make private fields in*Groovy
classes* package private, then why does this not violate the Java class
model? You can still access the fields, nothing has changed. What could be
done then is to avoid access to private fields in general, which would solve
the access problem for String for example.

But there are two drawbacks here.

For example I always thought that package private excludes the access from
subclasses, but they can access if they are in the same package. This means
if we replace private with package private, then the field becomes visible
where it was not visible before. This is incompatible to both Java and
Groovy. Is see that much more as a danger for the class model than being
able to access private. Because the ability of private as not being
inherited remains untouched in current Groovy.

making private package 

Re: [xwiki-users] Security best practices for Xwiki deployment and management

2009-12-19 Thread Niels Mayer
On Sat, Dec 19, 2009 at 5:49 AM, esdaniel xw...@esdaniel.com wrote:

 I asked Vincent if there was a security how-to / checklist page in the
 xwiki
 user guide and as such this does not yet exist.

 As security is such an important issue for public-facing sites, coupled
 with
 the fact that in order to help those who have to ensure they can carry out
 necessary due diligence on security before they are allowed to adopt
 solutions such as Xwiki, I'd like to request the help of the community to
 gather knowledge and best practices together.

 This thread is a request to gather information from experts and users alike
 to then create pages in the user guide that provide security guidance for
 administrators of public-facing Xwiki deployments


(1) Have the java-web-server (e.g. tomcat) only accessible on localhost:8080
such that server configuration requires special access beyond port 80/443
seen by outside world (e.g. SSH tunnel : ssh -x -L 8080:localhost:8080
u...@host.com cat). This also enables java to not run as superuser --
having the smallest amount of new things running with privileges is what
make sysadmins and security czars happy that they're not introducing new
untested technology and new security holes into their fortress.

(2) One of the well-understood parts of the sysadmin fortress is Apache
httpd. Therefore, front the Xwiki-based website with Apache HTTPD and use
mod_proxy_ajp to firewall the parts of the xwiki site you want exposed to
the outside world on public ports (80/443) -- e.g. to access /xwiki use
ProxyPass /xwiki/ajp://127.0.0.1:8009/xwiki/. With this in place you can
use Apache to SSL-wrap access to a java based site, and potentially add
further gating based on SSL-authentication (mod_ssl) and Apache basic auth
(e.g. like the 2-factor authentication I setup for
https://www.ipssources.com/ https://ipsssources.net ). You can also use
Apache configurations to further limit or disable access to any parts of the
wiki that aren't used or you don't want available to the public. E.g.
/xwiki/webdav/ and  /xwiki/admin/ might be limited to access from certain
IPs, or only using SSL, etc.

For additional level of protection (beyond Xwiki's auth gating users not
having admin rights), one may want to block outside access to URL's
like /xwiki/bin/export/XWiki/* to prevent access to hidden password data
even if something breaks, or someone accidentally gives the wrong users, or
guests admin or other rights that could compromise a xwiki based site.

(3) No passwords in the clear: Use aforementioned Apache httpd gating to
prevent access to /xwiki/bin/login/* unless user accessing via HTTPS.
Depending on the level of security desired, the session can then remain in
HTTPS entirely, or be redirected back to HTTP... It might be a good idea to
further gate destructive operations  (e.g. /xwiki/bin/admin/ ) so that
they require an SSL login. This would at least force admins to not transmit
the admin password for the site in the clear.

(4) xwiki.cfg, etc.
(i) change xwiki.authentication.validationKey and
xwiki.authentication.encryptionKey;
(ii) be sure xwiki.superadminpassword not set.

(5) Initial XAR import of xwiki-enterprise-wiki-*.xar or on each upgrade
importation:
(i) After installing XAR from upgrade be sure to skip install of XWiki.Admin
which will override the admin password you set for this user, setting it
back to default/public password.
(ii). Be sure to set a secure password for XWiki.Admin
(iii). Those having imported from older 1.X xwikis may want to check to make
sure XWiki.Admin doesn't have *XWiki.XWikiRights[1]* set with so that
nonexistent user 'WikiWiki' can edit the 'XWiki.Admin' user. This could
grant unexpected privileges to a wiki with open registration and no user
XWiki.WikiWiki existing already.
(iv) In
/xwiki/bin/admin/XWiki/XWikiPreferences?editor=globaladminsection=Rights
check Prevent unregistered users from editing pages, regardless of the page
or space rights

Niels
http://nielsmayer.com
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Google wave and Xwiki integration == solve comment issues in Xwiki?

2009-12-05 Thread Niels Mayer
Seems like there's a lot of overlap between Wave and things i've heard
talked about as Xwiki's post-2.0 plans... google seems to be putting some
additional weight behind Wave, or eliminating competitors:

AppJet announced the Google
acquisitionhttp://etherpad.com/ep/blog/posts/google-acquires-appjetFriday.
 The EtherPad team will continue its work on real-time collaboration by
 joining the Google Wave team, the site said.

AppJet offered free and premium versions of its service, which could import
 Microsoft Word documents, Web pages, PDFs, and plain text files, and let
 groups of people edit them collectively on what it called pad. A
 time-slider feature let people look back at earlier incarnations of a pad.

Google Wave has similarities. It's a sort of hybrid between instant
 messaging, wikis, and e-mail. Google Chief Executive Eric Schmidt sees
 Google Wave as the future of collaboration/8301-30685_3-10380917-264.html,
 in particular given its intrinsically networked nature and its real-time
 view of what collaborating people are up to.

That real-time collaboration is a thorny problem. It can be difficult to
 permit multiple people permission to edit the same document at the same time
 while ensuring one person's changes don't interfere with another's work. And
 showing simultaneous work complicates a service's user interface, too.

Google Docs--the online word processor, spreadsheet, and presentation
 services--also offers some simultaneous editing abilities. AppJet dings it
 in its EtherPad FAQ http://etherpad.com/ep/about/faq.

With Google Docs it takes about 5 to 15 seconds for a change to make its
 way from your keyboard to other people's screens, the site said. Imagine
 if whiteboards or telephones had this kind of delay!

Google Wave and Google Docs are perhaps the closest rivals to AppJet, but in
 the big picture, the rivalry is between cloud computing and the way most
 people use productivity software today, on their PCs. Notably, though,
 Microsoft is working on an online version of its dominant Office suite.

Current EtherPad users should brace themselves for the end of the service:
 If you are a user of the Free Edition or Professional Edition, you can
 continue to use and edit your existing pads until March 31, 2010. No new
 free public pads may be created. Your pads will no longer be accessible
 after March 31, 2010, at which time your pads and any associated personally
 identifiable information will be deleted, AppJet said.

That left one user, JavaScript programmer and jQuery project creator, John
 Resig, unhappy.

Super-lame that Etherpad is shutting down. We used it all the time for
 jQuery planning, Resig said in a 
 tweethttp://twitter.com/jeresig/statuses/6347156410 on
 Friday.
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


[xwiki-users] Google wave and Xwiki integration == solve comment issues in Xwiki?

2009-12-03 Thread Niels Mayer
I just got my Google
Wavehttp://mashable.com/2009/05/28/google-wave-guide/invite and have
been trying to understand how I can use it with my
Xwiki http://xwiki.org-based application (soon launching on
http://trainspodder.com see
example-screenhttp://nielsmayer.com/prototype-11-17-2009.jpg: my
interest in Wave is because my site, in google-parlance, is basically
a
wave for deep-linking/commenting/annotating/transcludingmashing streaming
audiovideo media).

One of the areas that I think Wave would help Xwiki-based applications (and
wikis/sites) is with Viral commenting so that Wave becomes a central place
for comments and conversations on web pages. As it socially networks
comments, this enables FOAFs to more easily find out about internet
conversations that might otherwise be hidden away on a website that nobody
knows about.. Thus, Wave provides a viral commenting mechanism for Xwiki
pages that is potentially superior to the other alternatives previously
available, e.g.
http://massol.myxwiki.org/xwiki/bin/view/Blog/AnonymousComments :

 XWiki Enterprise allows users to leave comments on pages. However in order
 to prevent spam on your public wiki instance you usually only want to allow
 registered users the right to add comments. Thus we need a solution that
 still allows guest users to leave comments while preventing spam.

  I'm proposing 2 solutions that I've both tried on this blog and that have
 worked well: Solution 1: create a special guest account that can be used
 transparently to leave comments. This can be achieved by creating a custom
 skin and tweaking the comments form Solution 2: integrate with an external
 comment web service such as IntenseDebate http://www.intensedebate.com/.
 This also requires a custom skin in order to override some templates.

It also solves the commenting issues in Xwiki that include (1) controlling
comment spam by forcing commenters to login with real Xwiki accounts to post
comments; (2) the lack of well-integrated and working right out of the box
captcha support in Xwiki to prevent comment spam w/o authentication/login;
(3) lack of out of the box OpenID support which would allow easy
authentication of public users wanting to leave comments; (4) users wanting
to leave comments constantly forgetting the accounts and passwords under
which they left comments, as well as not having a centralized place to
follow-up on comments they've left, or conversations they've been involved
in.

Wave seems to solve some of the problems, and might help side-step a lot of
others in Xwiki for example, why spend a huge amount of effort tightly
integrating OpenID or some other certificate/2FA/SSO-based auth system for
the class of wikis that comprise a small number of editors and site
maintainers, and a large number of commenters and public that you want to
authenticate, identify, and spam-control -- perhaps Xwiki's login/auth
system is perfectly adequate for this class of sites, but becomes
overwhelmed by logins and accounts that have been created automatically,
or just for the purpose of posting a single comment (if people even bother
to create an account to leave a comment...). Integrating Wave or
IntenseDebate http://www.intensedebate.com/ into Xwiki might give the user
experience desired, without the complexity

Yesterday, I posted the following to an Xwiki wave I started:
https://wave.google.com/wave/#restored:wave:googlewave.com!w%252Bedlc50w0Ghttps://wave.google.com/wave/#restored:wave:googlewave.com%21w%252Bedlc50w0G(please
join and lets try this thing out!!)

...

FYI, here are some ways Wave has been integrated into other platforms (note
MediaWiki integration, can it be leveraged for Xwiki?)

Taken from http://wave.google.com/help/wave/extensions.html

(1) MediaWiki integration:
My Wave wet 
dreamhttp://mediawikiwave.blogspot.com/2009/10/my-wave-wet-dream.html

I have been asked several times where I see Wave
https://wave.google.com/go. The last time I was asked where I see
Wave in 5 years time.. not
Internet years. What I did was look hard at Wave for what it does, and look
at Google http://google.com/ for the kind of things it has been doing.

For me, Wave is an environment where the functionality of e-mail, chat, wiki
comes together. What we have done in the
MediaWikiWavehttp://mediawikiwave.org/project is provide Wave with a
publishing back end. This is something that
MediaWiki http://mediawiki.org/ does really well. I expect that Wave will
continue to integrate parts of the puzzle that is computer software and
data.

Google is getting into operating systems with its Chrome
OShttp://googleblog.blogspot.com/2009/07/introducing-google-chrome-os.html.
Add to this Moore's law http://en.wikipedia.org/wiki/Moore%27s_law and in
five years time a computer with Chrome OS, with over a terabyte of storage
is not a wild idea at all.

When something like a terabyte is used for caching, I can imagine that this
cache is maintained by Wave. In this 

Re: [xwiki-users] Number of attachments on an XWiki page

2009-11-11 Thread Niels Mayer
Some WEB-INF/xwiki.cfg settings that might improve performance  w/r/t
attachments (note the uncommented portions):

...
#-# Whether the document recycle bin feature is activated or not
# xwiki.recyclebin=1
#-# Whether the attachment recycle bin feature is activated or not
storage.attachment.recyclebin=0
#-# Whether the document versioning feature is activated or not
# xwiki.store.versioning=1
#-# Whether the attachment versioning feature is activated or not
xwiki.store.attachment.versioning=0
#-# Whether the attachments should also be rolled back when a document is
reverted.
xwiki.store.rollbackattachmentwithdocuments=0
...

Corollary questions for the list:
(1) When these are set, do the issues raised by Guillaume still apply?
(2) Other than the obvious change of not having attachments change when
rolling back documents, are there any other
 side-effects or caveats in using the above custom settings for a Xwiki
instance?
(3) What about the same performance question, but regarding comments
attached to documents. Is the main performance  impact coming from the
total size of comments, or from the number of comment objects attached to
documents? (Of course comments are limited to 64K so the size issue is
somewhat self-limiting).

Niels
http://nielsmayer.com

PS: Ms Coleman --  Could you please disable your away mail reminder
program from bouncing to the list? Thanks.
[xwiki-users] AUTO: MaryEllen Coleman/Poughkeepsie/IBM is out of the
office. (returning 11/04/2009)
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Applications: MultiPage Export, Recruitment, Todo Macro

2009-10-21 Thread Niels Mayer
Thank you for these apps!

Ludovic Dubost
 http://svn.xwiki.org/svnroot/xwiki/sandbox/applications/

Since the apps now appear to all be serialized wiki-documents saved with
extension .xml in subversion, what about having a simple app-installer
which avoids the entire XAR process and allows more fine-grained subversion
updating of apps. In other words, as both the application code and
document reside in subversion, installing a new Xwiki app would be as
simple as loading a single-document containing meta information about the
app like it's subversion repo URL, app namedescription, and a manifest
listing any  files that need saving with special permissions. The app would
then consult the subversion URL and reconstruct documents in the appropriate
space(s) and permissions (per manifest). E.g. documents for the
recruitment app would be build directly from these:

   - 
Loading.xmlhttp://svn.xwiki.org/svnroot/xwiki/sandbox/applications/xwiki-application-recruitmentmanager/src/main/resources/Recruitment/Loading.xml
   - 
Settings.xmlhttp://svn.xwiki.org/svnroot/xwiki/sandbox/applications/xwiki-application-recruitmentmanager/src/main/resources/Recruitment/Settings.xml
   - 
WebHome.xmlhttp://svn.xwiki.org/svnroot/xwiki/sandbox/applications/xwiki-application-recruitmentmanager/src/main/resources/Recruitment/WebHome.xml


   - 
CandidateClass.xmlhttp://svn.xwiki.org/svnroot/xwiki/sandbox/applications/xwiki-application-recruitmentmanager/src/main/resources/RecruitmentCode/CandidateClass.xml
   - 
CandidateClassSheet.xmlhttp://svn.xwiki.org/svnroot/xwiki/sandbox/applications/xwiki-application-recruitmentmanager/src/main/resources/RecruitmentCode/CandidateClassSheet.xml
   - 
CandidateClassTemplate.xmlhttp://svn.xwiki.org/svnroot/xwiki/sandbox/applications/xwiki-application-recruitmentmanager/src/main/resources/RecruitmentCode/CandidateClassTemplate.xml
   - ...

Eventually,such a mechanism could entail some form of dependency-control on
updating apps, e.g. app-branches for different underlying xwiki versions;
when you upgrade to a new version of xwiki, any apps installed this way
would automatically update changed documents to their new version. Of
course, application authors would want to be able to go the other way,
saving out whole spaces/collections of documents into an external subversion
repository...

The app would, in groovy, via HTTP, read each subversion document into a
pipe, capturing a single document as XML in memory (groovy-java) and
write it to the database with set-content and save/save-with-prog-rights
Xwiki API's. As this would be done one XML file at a time, the maximum
memory explosion would be the size of the largest XML document (e.g.
translations doc) in the app, as opposed to the current situation. (Seems
like it would be easier to sidestep large xar export/import issues this way,
rather than trying to make XAR import export work via streaming). And of
course, if you ended up customizing an application-document on your server,
subversion would be used to merge any non-conflicting upgrades to the
document that might occur as the application is improved

Niels
http://nielsmayer.com
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Query Regarding Data Model

2009-10-02 Thread Niels Mayer
On Fri, Oct 2, 2009 at 11:30 AM, Eric Domeshek
domes...@stottlerhenke.comwrote:

 I'm starting to explore use of XWiki for a project where we want to
 provide a domain-specific semi-structured wiki which seems like it ought
 to be a good fit to XWiki's intended usage.


Yes, it is. Xwiki is the best thing to hit open source since Linux and Emacs
:-) .
Xwiki is Emacs for the Web. All it's missing is Clojure via JSR223 to get
the Lisp extension language...


  However, we're having a bit
 of trouble getting started understanding what can and can't easily be
 captured in the XWiki data model.  Specifically:

 1- What is the recommended way to specify object fields that contain
 references to other XWiki objects?


This is being discussed over on the dev list right now:
http://www.mail-archive.com/d...@xwiki.org/msg11295.html
http://osdir.com/ml/web.wiki.xwiki.user/2008-02/msg00135.html

[...] define the option lists is by using the fields: XWiki
Class Name, Id Field Name, Value Field Name and Parent Field Name. Using
those fields, the XWiki
platformhttp://osdir.com/ml/web.wiki.xwiki.user/2008-02/msg00135.html#
constructs
the following hql queries:

select idprop.value, valueprop.value, parentprop.value from
XWikiDocument doc, BaseObject obj, StringProperty idprop, StringProperty
valueprop, StringProperty parentprop.value where obj.name = doc.name and
obj.className = value entered in Class name and idprop.id.id = obj.id
and idprop.id.name = value entered in Id Field Name and
valueprop.id.id = obj.id and valueprop.id.name = value entered in Value
Field Name and parentprop.id.id = obj.id and parentprop.id.name =
value entered in Parent Field Name

So, it selects from objects of a given type (XWiki Class) 3 properties
(of storage type String, read bellow what this means). As a special
case, you can use doc.some doc property or obj.some object
property instead of property names, and the query is adapted
accordingly. In the case of DBList, only 2 columns are selected, as the
Parent property is not used/defined.

String storage type means:
- either a property of type String
- or a property of type StaticList, DBList or DBTreeList with
multipleSelect = false

If you want to use the DBTreeList, you must model your data so that they
will allow these kind of queries.



 2- What is the recommended way to specify object fields that
 contain references to non-XWiki plain old Java objects?


I'm going to let someone else answer what's recommended. This is one way:
http://code.xwiki.org/xwiki/bin/view/Modules/PropertiesModule


 3- Is there a standard way to define fields as holding
 ordered/unordered lists/sets of objects as opposed to single objects?


Check the multiple select option for List, DatabaseList or
DatabaseTreeList? in the class editor (see
/xwiki/bin/view/XWiki/XWikiClasses
and http://dev.xwiki.org/xwiki/bin/view/Drafts/DatabaseListProperties )


 4- Assuming we can define models that allow for these sorts of things, are
 there easy/standard ways to display such fields contents, as well as ways
 for end-users to specify fillers (e.g. list/tree pickers of existing objects
 of the desired type)?


Although not the Xwiki-officially-blessed technique, I like to use Exhibit
for this purpose:
http://simile-widgets.org/exhibit/
http://people.csail.mit.edu/dfhuynh/research/papers/www2007-exhibit.pdf

Some examples of my own using Xwiki:
http://nielsmayer.com/trainspodder-prototype.jpg (coming to the internets
real soon now)
http://nielsmayer.com/xwiki/bin/view/Exhibit/NPRpods3 (work in progress/old
code)
http://nielsmayer.com/xwiki/bin/view/Exhibit/Presidents4 (demo of Xwiki
integration)
http://nielsmayer.com/xwiki/bin/download/Exhibit/Presidents4/Presidents4Pkg.xar(source
including ExhibitjQuery Macros)

-- Niels
http://nielsmayer.com
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] xwiki 2.0 issues

2009-09-30 Thread Niels Mayer
On Tue, Sep 29, 2009 at 10:22 AM, Vincent Massol vinc...@massol.net wrote:

 See http://jira.xwiki.org/jira/browse/XWIKI-4417


I marked http://jira.xwiki.org/jira/browse/XE-376 as a duplicate of
http://jira.xwiki.org/jira/browse/XWIKI-4417 XE-376 duplicates/closes
http://jira.xwiki.org/jira/browse/XE-336 as well.

XE-376: characters entered as document title must be escaped or a cascade of
bugs occur.

Niels
http://nielsmayer.com
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] why hsqdb rather than h2?

2009-09-27 Thread Niels Mayer
On Sat, Sep 26, 2009 at 9:20 PM, Sergiu Dumitriu ser...@xwiki.com wrote:

 One nice feature I spotted: native support for clustering.


IMHO, given the many things Xwiki plans to do, and limited time and
resources, I don't think this would be worth a lot of effort unless it had
some bigger payoff. Seems like anybody wanting better performance would just
move to mysql and not use a java database at all.

However, in addition to the clustering scenario, one area where a different
native database might be useful would be for supporting Xwiki on cloud
platforms like google app engine.

Last time this was brought up
http://lists.xwiki.org/pipermail/users/2009-July/016817.html the issue was
Hibernate itself
 On Wed, Jul 22, 2009 at 12:07 PM, Ludovic Dubost ludovic at xwiki.org
wrote:
 I have a prototype of XWIki partially working with some changes on app
 engine http://xwiki1.appspot.com/bin/view/Main/

 I've made all the servlet / jvm part work as well as the cache subsystem.
 The main missing piece is a real storage with support for querying.

 Ludovic -- thanks for the reply. That looks quite promising. I guess the
 real storage issue is caused by this limitation:

http://groups.google.com/group/google-appengine-java/web/will-it-play-in-app-engine?pli=1
 You cannot currently use Hibernate directly. The differences between the
 App Engine datastore and SQL were too great to get the standard Hibernate
up
 and running under App Engine. App Engine does support JDO and JPA, so you
 may be able to convert your Hibernate code to use one of these ORM
 interfaces.

Also, with attachments stored in the db, large documents, or lots of
documents, what happens to memory size and performance with respect to
large result sets:

http://www.h2database.com/html/performance.html states

Version 1.1.114 (2009-06-01) was used for the test. For simpler operations,
 the performance of H2 is about the same as for HSQLDB. For more complex
 queries, the query optimizer is very important. However H2 is not very fast
 in every case, certain kind of queries may still be slow. One situation
 where is H2 is slow is large result sets, because they are buffered to disk
 if more than a certain number of records are returned. The advantage of
 buffering is, there is no limit on the result set size. The open/close time
 is almost fixed, because of the file locking protocol: the engine waits some
 time after opening a database to ensure the database files are not opened by
 another process.


-- Niels
http://nielsmayer.com
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Setting an object date property from a String.

2009-09-21 Thread Niels Mayer
On Mon, Sep 21, 2009 at 1:45 AM, Jean Couteau cout...@codelutin.com wrote:

 /* Groovy Class : Date parser#* */
 import java.text.DateFormat;
 import java.text.SimpleDateFormat;
 import java.util.Date;
 class DateParser {
  Date parse(toParse) {
def formatter = new SimpleDateFormat(dd/MM/);
return formatter.parse(toParse);
  }
 }


I did the same thing for a similar problem. You can also keep a copy of the
dateformatter on the groovy class, instead of recreating it each time... and
you might also want to consider setting the timezone to something
consistent, like GMT.

 import org.apache.commons.io.FileUtils

import java.text.SimpleDateFormat

import java.util.TimeZone

import java.lang.Double


 class My_Groovy {

  def   xwiki

  def   context

  def SimpleDateFormat  df


   void setObjects(param_xwiki, param_context) {

this.xwiki = param_xwiki

this.context = param_context

this.df = new SimpleDateFormat('HH:mm:ss.SSS');

this.df.setTimeZone(TimeZone.getTimeZone(GMT));

  }

...

  this.df.format( ... )

...

}


It's too bad there's no way of doing new SimpleDateFormat directly out of
velocity (or any kind of object creation). Then there would be no need for
the extra complication, and memory footprint, and loading times, all for a
very trivial use of groovy. It'd be nice if there was a generic way to
dynamically load a class out of velocity, call new on it, etc. This might
even obviate the need for many of Xwiki's simpler Java plugins that just
provide access to an existing Java  class as $class, and then let you call
static methods on that as $class.myStaticMethod().

Niels
http://nielsmayer.com
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Creating structured pages

2009-09-15 Thread Niels Mayer
On Mon, Sep 14, 2009 at 5:56 AM, Oana Tabaranu oana.tabar...@xwiki.com
 wrote:

 http://platform.xwiki.org/xwiki/bin/view/DevGuide/FAQTutorial


FYI -- One thing that might bite the newbie Xwiki programmer that starts
out with Xwiki 2.0. Most of the documents mentioned in the tutorial  that
help you create code are 1.0 based and expect to save documents in 1.0
format. In 2.0, the default document format changed to 2.0, but the various
scripts/documents implicitly assume 1.0 format.

To fix, re-save the documents automatically created by
XWikiClasseshttp://www.xwiki.org/xwiki/bin/view/XWiki/XWikiClasses?viewer=codeshowlinenumbers=0
, 
ClassSheethttp://www.xwiki.org/xwiki/bin/view/XWiki/ClassSheet?viewer=codeshowlinenumbers=0,
etc
as 1.0 format. The fact that they're initially in 1.0 syntax and marked as
2.0 causes lots of errors.

Question: For 2.0 final, will these end up being 2.0-based, or will there be
a bugfix to ensure they write out 1.0 documents? Perhaps the 1.0 API for
saving documents should automatically create 1.0 documents, and a new API
call can be used to save 2.0-based docs which would automatically create
2.0's. That way old code stays working, and new code stays 2.0.

Niels
http://nielsmayer.com
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Creating structured pages

2009-09-15 Thread Niels Mayer
On Tue, Sep 15, 2009 at 8:35 AM, Vincent Massol vinc...@massol.net wrote:

  Question: For 2.0 final, will these end up being 2.0-based,

 It's been 2.0-based since 2.0M3.


Sorry for the false alarm. I guess I need to upgrade some code ... Thanks
Vincent.
Niels
http://nielsmayer.com
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] [xwiki-devs] totally groovy! (using groovy SSH script to securely launch unix processes out of Xwiki)

2009-08-12 Thread Niels Mayer
 is an executable script
implementing
the restricted shell used by tomcat-ssh-slave:
#!/bin/sh -noprofile
###
#
# File: sshslave-shell
# RCS:  $Header: $
# Description: Shell to allow execution of remote commands from a tomcat
server.
# For security purposes, this login is limited in commands it can
# perform, and runs as a separate user from the tomcat server, separating
# the ability to directly modify tomcat state from the functionality
provided
# by user tomcat-ssh-slave. This shell is run as the login shell (via
# /etc/passwd) for account tomcat-ssh-slave, which is accessed via SSH.
# The account is preferably a nonprivileged user account with pid500, Home
# directory /home/tomcat-ssh-slave must exist, with correct permisssions.
#   /home/tomcat-ssh-slave contains scripts referred to via
fully qualified
# filenames in this script. The directory would also store the accounts'
# .ssh settings, keys, etc. Secure, password-less access to the
tomcat-ssh-slave
# account can be achieved by having tomcat's SSH public identity
/usr/share/tomcat6/.ssh/id_dsa.pub
#installed as /home/tomcat-ssh-slave/.ssh/authorized_keys (and
keeping id_dsa secret)
# This would prevent use of tomcat-ssh-slave account from being used by
anything
# other than preauthorized accounts.
#
# Here's some example commands:
#
# ssh -x tomcat-ssh-sl...@127.0.0.1 cleanlog
# ssh -x tomcat-ssh-sl...@127.0.0.1 getlog
# ssh -x tomcat-ssh-sl...@127.0.0.1 setdbglvl 'INFO'
# ssh -x tomcat-ssh-sl...@127.0.0.1 getdbglvl
# ssh -x tomcat-ssh-sl...@127.0.0.1 tomcat-restart
# ssh -x tomcat-ssh-sl...@127.0.0.1 apache-restart
# ssh -x tomcat-ssh-sl...@127.0.0.1 tomcat-start
# ssh -x tomcat-ssh-sl...@127.0.0.1 apache-start
# ssh -x tomcat-ssh-sl...@127.0.0.1 top
# ssh -x tomcat-ssh-sl...@127.0.0.1 ps
# ssh -x tomcat-ssh-sl...@127.0.0.1 df
# ssh -x tomcat-ssh-sl...@127.0.0.1 free
# ssh -x tomcat-ssh-sl...@127.0.0.1 reboot
# Author:   Niels P. Mayer
# Created:  Monday 8/10/2009
# Modified:
# Language: Shell-script
# Package:  N/A
# Status:   Production
#
# (C) Copyright 2009, Niels Mayer, all rights reserved.
#
###

# make sure nothing funny goes on
PATH=/bin:/usr/bin

# make sure they rsh or ssh in with a single command
if [ -z $1 ] || [ $1 != -c ]
then
   echo You must use ssh -c to access this account
   exit 1
else
   shift
   SSHSLAVE_COMMAND=$@
fi

# only let them run specific commands, eg.
# ssh -x tomcat-ssh-sl...@127.0.0.1 cleanlog
# ssh -x tomcat-ssh-sl...@127.0.0.1 getlog
# ssh -x tomcat-ssh-sl...@127.0.0.1 setdbglvl 'INFO'
# ssh -x tomcat-ssh-sl...@127.0.0.1 getdbglvl
# ssh -x tomcat-ssh-sl...@127.0.0.1 tomcat-restart
# ssh -x tomcat-ssh-sl...@127.0.0.1 apache-restart
# ssh -x tomcat-ssh-sl...@127.0.0.1 tomcat-start
# ssh -x tomcat-ssh-sl...@127.0.0.1 apache-start
# ssh -x tomcat-ssh-sl...@127.0.0.1 top
# ssh -x tomcat-ssh-sl...@127.0.0.1 ps
# ssh -x tomcat-ssh-sl...@127.0.0.1 df
# ssh -x tomcat-ssh-sl...@127.0.0.1 free
# ssh -x tomcat-ssh-sl...@127.0.0.1 reboot

case ${SSHSLAVE_COMMAND} in
cleanlog | \
getlog | \
getdbglvl | \
tomcat-restart | \
apache-restart | \
tomcat-start | \
apache-start | \
top | \
ps | \
df | \
free | \
reboot  \
) #single argument commands -- exact match to SSHSLAVE_COMMAND
exec /home/tomcat-ssh-slave/bin/${SSHSLAVE_COMMAND}
;;
setdbglvl* ) #e.g., setdbglvl 'INFO' ... multiple argument command.
Beware command injection.
exec `echo /home/tomcat-ssh-slave/bin/${SSHSLAVE_COMMAND} | cut -f1 -d `
`echo ${SSHSLAVE_COMMAND} | cut -f2- -d `
;;
* ) #disallow anything else
exec echo You are not authorized to do that.
;;
esac
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Users not displayed

2009-08-11 Thread Niels Mayer
Christian Ribeaud christian.ribe...@canoo.com:
 Thanks a lot, Niels. Really. I got it now. But this is really cumbersome!
And when using the administration panel,
 I always get empty panels: rights, users, groups,... (only the number of
items is displayed).

One more thought on this issue: if you have upgraded your Xwiki, be sure to
issue a shift-reload command in your browser on the home page, and probably
on any important administrative pages. The bug we're seeing could becoming
from two different possible sources: (1) New upgrade XAR overwriting
system-specific configurations present in XWiki.XWikiAdminGroup,
XWiki/.WikiAllGroup, XWiki.XWikiPreferences;
(2) New upgrade WAR containing new javascript code, but same-path as
previous javascript code that resides in browser cache. The new WAR was
expecting to talk to the new javascript, but instead, talks to the old
javascript. On browsers like Mozilla/FireFox, errors like calling
nonexistent javascript functions happen without the end-user noticing,
unless special steps are taken to see if javascript errors are happening. If
the latter scenario happened, it could have  left your Xwiki in a half
updated state because the application never got the expected response from
Javascript. (The bug would then be the  lack of defensive programming on
the part of Xwiki to detect this situation ...)

It is entirely possible that the initial add-user and edit-groups bugs
that cause these administrative features to break happened with old
javascript in the browser coming from a previous version of Xwiki. This is
not an Xwiki problem, it is a Web problem. Ultimately, it's something that's
entirely in the control of the person running the website, and not really
something that Xwiki can control (other than the defensive programming
bit).
You might see this issue more often in Xwiki because the team is doing
software development the right way which means continuous improvement,
continuous revisions, regular releases, and lots of users testing and using
the software in every possible unexpected situation, etc. Microsoft's
release infrequently, and badly approach means users only get to see these
kinds of compatibility problems on each new service pack or browser upgrade,
and that's at best once every few years. With the furious pace of Xwiki
development, we can end up seeing this bug every few months, and that's just
fine by me. Shift-reload is your friend.

So if you're having problems in this regard, it is in no way Xwiki''s fault
-- just change your sites sub-domain name, or the path to Xwiki documents --
and you'd implicitly fix this problem for this or any web software on each
upgrade. If the web-site doesn't want users to see this problem, one can
easily add a revision number in the path to the javascript libs so that
the browser will automatically load the new revision (the path changed,
nothing in cache) as opposed to using the one in the cache. (This might
actually be a good bit of defensive programming for Xwiki -- add a
revision code to the path of any javascript lib referenced in the browser,
and then just have xwiki do the path-rewriting magic to verify incoming
requests are for the correct revision code, and serve up correct files out
of xe-WAR/resources/js ).
This is also a world where my BANK's website doesn't work on any current
browser I use day-to-day
(FireFox 3.5.3 on x86_64 Linux, Chrome on Windows) and pops up errors all
over the place when using my current up-to-date IE 8. Which means we're
doing financial transactions underpinned by something as flaky as IE's
Javascript. So really, in comparison, the kind of problems we see in Xwiki
are minor in comparison. Furthermore, the architect and original designer
has joined this thread, so he'll probably have it fixed in 5 minutes once
we've actually done our part of the open source social contract and have
helped better characterize the problem. No need to wait a year for Microsoft
to deliver a new service pack here in Xwiki land

Finally, Xwiki is open enough, both at the software level, and even at the
data level with everything is a wiki doc that we can actually diagnose and
fix these problems ourselves. You think you'd have been so quick to do the
same kind of fix I suggested for Xwiki using, by analogy,  Microsoft's
registry editor ??

 I thought that this open-source application would be in a better shape.

Xwiki is in great shape. It is undergoing a massive transformation at this
time, typical of 1.0-2.0 transitions. Fundamentally, Xwiki is an amazing
application and there's really no competition for it. (
http://blog.asyd.net/2008/12/xwiki-cest-decidemment-magique/ (C'est vrai!),
http://www.opensolaris.org/os/community/web/restructuring/wiki_eval_x/
http://madplanet.com/xwiki/bin/view/Blog/Rough+Diamond ) You do not
necessarily need to be running the latest and greatest revision unless
you're ready to deal with the latest and greatest issues. This wisdom
doesn't just apply for Xwiki... it's 

[xwiki-users] totally groovy! (using groovy SSH script to securely launch unix processes out of Xwiki)

2009-08-11 Thread Niels Mayer
 been generated.

1. *TODO:* remove password from user tomcat-ssh-slave ('!!' in passwd field
of /etc/shadow) password not needed for login
2. *TODO:* alternately, is there a local customization to ensure certs only
used for login to the account? I know this can be done globally in
/etc/ssh/sshd_config: PasswordAuthentication no and PermitEmptyPasswords
no
3. *TODO:* for user tomcat-ssh-slave, integrate limited command processing
by replacing /bin/sh as login shell with /usr/local/bin/tomcat-ssh-shell (or
equiv):

#!/bin/sh -noprofile
###
#
# File: sshslave-shell
# RCS:  $Header: $
# Description: Shell to allow execution of remote commands from a tomcat
server.
# For security purposes, this login is limited in commands it can
# perform, and runs as a separate user from the tomcat server, separating
# the ability to directly modify tomcat state from the functionality
provided
# by user tomcat-ssh-slave. This shell is run as the login shell (via
# /etc/passwd) for account tomcat-ssh-slave, which is accessed via SSH.
# The account is preferably a nonprivileged user account with pid500, Home
# directory /home/tomcat-ssh-slave must exist, with correct permisssions.
#   /home/tomcat-ssh-slave contains scripts referred to via
fully qualified
# filenames in this script. The directory would also store the accounts'
# .ssh settings, keys, etc. Secure, password-less access to the
tomcat-ssh-slave
# account can be achieved by having tomcat's SSH public identity
/usr/share/tomcat6/.ssh/id_dsa.pub
#installed as /home/tomcat-ssh-slave/.ssh/authorized_keys (and
keeping id_dsa secret)
# This would prevent use of tomcat-ssh-slave account from being used by
anything
# other than preauthorized accounts.
#
# Here's some example commands:
#
# ssh -x tomcat-ssh-sl...@127.0.0.1 cleanlog
# ssh -x tomcat-ssh-sl...@127.0.0.1 getlog
# ssh -x tomcat-ssh-sl...@127.0.0.1 setdbglvl 'INFO'
# ssh -x tomcat-ssh-sl...@127.0.0.1 getdbglvl
# ssh -x tomcat-ssh-sl...@127.0.0.1 tomcat-restart
# ssh -x tomcat-ssh-sl...@127.0.0.1 apache-restart
# ssh -x tomcat-ssh-sl...@127.0.0.1 tomcat-start
# ssh -x tomcat-ssh-sl...@127.0.0.1 apache-start
# ssh -x tomcat-ssh-sl...@127.0.0.1 top
# ssh -x tomcat-ssh-sl...@127.0.0.1 ps
# ssh -x tomcat-ssh-sl...@127.0.0.1 df
# ssh -x tomcat-ssh-sl...@127.0.0.1 free
# ssh -x tomcat-ssh-sl...@127.0.0.1 reboot
# Author:   Niels P. Mayer
# Created:  Monday 8/10/2009
# Modified:
# Language: Shell-script
# Package:  N/A
# Status:   Production
#
# (C) Copyright 2009, Niels Mayer, all rights reserved.
#
###

# make sure nothing funny goes on
PATH=/bin:/usr/bin

# make sure they rsh or ssh in with a single command
if [ -z $1 ] || [ $1 != -c ]
then
   echo You must use ssh -c to access this account
   exit 1
else
   shift
   SSHSLAVE_COMMAND=$@
fi

# only let them run specific commands, eg.
# ssh -x tomcat-ssh-sl...@127.0.0.1 cleanlog
# ssh -x tomcat-ssh-sl...@127.0.0.1 getlog
# ssh -x tomcat-ssh-sl...@127.0.0.1 setdbglvl 'INFO'
# ssh -x tomcat-ssh-sl...@127.0.0.1 getdbglvl
# ssh -x tomcat-ssh-sl...@127.0.0.1 tomcat-restart
# ssh -x tomcat-ssh-sl...@127.0.0.1 apache-restart
# ssh -x tomcat-ssh-sl...@127.0.0.1 tomcat-start
# ssh -x tomcat-ssh-sl...@127.0.0.1 apache-start
# ssh -x tomcat-ssh-sl...@127.0.0.1 top
# ssh -x tomcat-ssh-sl...@127.0.0.1 ps
# ssh -x tomcat-ssh-sl...@127.0.0.1 df
# ssh -x tomcat-ssh-sl...@127.0.0.1 free
# ssh -x tomcat-ssh-sl...@127.0.0.1 reboot

case ${SSHSLAVE_COMMAND} in
cleanlog \
getlog \
getdbglvl \
tomcat-restart \
apache-restart \
tomcat-start \
apache-start \
top \
ps \
df \
free \
reboot \
) #single argument commands -- exact match to SSHSLAVE_COMMAND
exec /home/tomcat-ssh-slave/${SSHSLAVE_COMMAND}
;;

setdbglvl* \ #e.g., setdbglvl 'INFO' ... multiple argument command.
Beware command injection.
)
exec `echo /home/tomcat-ssh-slave/${SSHSLAVE_COMMAND} | cut -f1 -d `
`echo ${SSHSLAVE_COMMAND} | cut -f2- -d `
;;
* )
exec echo You are not authorized to do that.
;;
esac



Niels
http://nielsmayer.com
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] totally groovy! (using groovy SSH script to securely launch unix processes out of Xwiki)

2009-08-11 Thread Niels Mayer
I forgot to include the Groovy script itself that does all the heavy-lifting
in my previous mail - see Groovy.SshHelperClass below. Also, there's a much
better way of calling this groovy sshHelper class out of a single groovy
invocation in a 2.0 document. Groovy directly outputs wikitext, the renderer
takes care of the rest.

 Use Groovy Script run server processes and display result 

See [[SshHelperClass?viewer=code]], [[
http://blog.asyd.net/2008/12/xwiki-cest-decidemment-magique/]]

{{groovy}}
println  Call parseGroovyFromPage('Groovy.SshHelperClass') 
  def sshHelper = xwiki.parseGroovyFromPage(Groovy.SshHelperClass)
  sshHelper.openSession(127.0.0.1, 22, tomcat-ssh-slave,
/usr/share/tomcat6/.ssh/id_dsa, )
println  Output from 'uname -a' 
println ## + sshHelper.runCommand(uname -a) + ##
println  Output from 'free' 
println ## + sshHelper.runCommand(free) + ##
println  Output from 'ps -l U tomcat-ssh-slave U tomcat U apache' 
println ## + sshHelper.runCommand(ps -l h U tomcat-ssh-slave U tomcat U
apache) + ##
println  Output from 'df -H' 
println ## + sshHelper.runCommand(df -H) + ##
println  Output from 'top -b -n 1' 
println ## + sshHelper.runCommand(top -b -n 1) + ##
println  Close the connection and exit tomcat-ssh-slave shell 
  sshHelper.close()
{{/groovy}}

However, the Groovy.SshHelperClass script must be saved as a 1.0 document in
order to call it at the top level via:
xwiki.parseGroovyFromPage(Groovy.SshHelperClass). Is there a 2.0 syntax
that works with parseGroovyFromPage()?

Groovy.SshHelperClass in xwiki/1.0 format  (with special comment hacks per
http://platform.xwiki.org/xwiki/bin/view/DevGuide/GroovyClassHelloWorldTutorial):
...
/* Groovy Class for [SshHelperTest], orig [
http://blog.asyd.net/wp-content/uploads/2008/12/sshhelper.groovy] #* */
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import com.trilead.ssh2.Connection;
import com.trilead.ssh2.Session;
import com.trilead.ssh2.StreamGobbler;

/**
 *
 * @author asyd, modified by NielsMayer
 */
class SshHelper {
def connection
def session

void openSession(hostname, port, username, identityfile, password) {
def identityIOFile = new File(identityfile)
this.connection = new Connection(hostname, Integer.parseInt(port))
this.connection.connect()
if (!connection.authenticateWithPublicKey(username, identityIOFile,
password)) {
println Authentication failed!
}
}

String runCommand(command) {
this.session = connection.openSession()
this.session.execCommand(command)
def stdoutStream = new StreamGobbler(this.session.getStdout())
def stdoutReader = new BufferedReader(new
InputStreamReader(stdoutStream))
def lineout = 
def stdoutOutput = 
while ((lineout = stdoutReader.readLine()) != null) {
stdoutOutput += (lineout + \n)
}
this.session.close()
this.session = null
return stdoutOutput
}

void close() {
if (this.session != null) {
this.session.close()
}
this.connection.close()
}
/* *# */
...

-- Niels
http://nielsmayer.com
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] totally groovy! (using groovy SSH script to securely launch unix processes out of Xwiki)

2009-08-11 Thread Niels Mayer
Of course, one can forgo the 1.0 document and calling parseGroovyFromPage(),
and just put the class directly inside one's 2.0 groovy script and call new
SshHelper(). Of course, this still doesn't solve the problem of wanting to
reuse groovy classes across multiple documents, while wanting to use Xwiki
documents for the groovy code for easier development. Thus I still seek a
2.0-compatible version of parseGroovyFromPage('Groovy.SshHelperClass')...
Here's the all-in-one version of the previous
SSH/groovy/run-a-unix-process-out-of-a-webpage example


 Standalone version of SshHelperTest 

See also [[HowtoSetupUserTomcatSshSlave]] [[SshHelperTest]] [[
http://blog.asyd.net/2008/12/xwiki-cest-decidemment-magique/]]

{{groovy}}
/* orig [http://blog.asyd.net/wp-content/uploads/2008/12/sshhelper.groovy]
#* */
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import com.trilead.ssh2.Connection;
import com.trilead.ssh2.Session;
import com.trilead.ssh2.StreamGobbler;

/**
 *
 * @author asyd, modified by NielsMayer
 */
class SshHelper {
def connection
def session

void openSession(hostname, port, username, identityfile, password) {
def identityIOFile = new File(identityfile)
this.connection = new Connection(hostname, Integer.parseInt(port))
this.connection.connect()
if (!connection.authenticateWithPublicKey(username, identityIOFile,
password)) {
println Authentication failed!
}
}

String runCommand(command) {
this.session = connection.openSession()
this.session.execCommand(command)
def stdoutStream = new StreamGobbler(this.session.getStdout())
def stdoutReader = new BufferedReader(new
InputStreamReader(stdoutStream))
def lineout = 
def stdoutOutput = 
while ((lineout = stdoutReader.readLine()) != null) {
stdoutOutput += (lineout + \n)
}
this.session.close()
this.session = null
return stdoutOutput
}

void close() {
if (this.session != null) {
this.session.close()
}
this.connection.close()
}
}

/*
 * Using class above, open an SSH connection to tomcat-ssh-slave
 * using user tomcat6's private key created via 'ssh-keygen -t dsa'
 * while logged in as ~tomcat6
 */
def sshHelper = new SshHelper();
sshHelper.openSession(127.0.0.1, 22, tomcat-ssh-slave,
  /usr/share/tomcat6/.ssh/id_dsa, )

println  Output from 'uname -a' 
println ## + sshHelper.runCommand(uname -a) + ##
println  Output from 'free' 
println ## + sshHelper.runCommand(free) + ##
println  Output from 'ps -l U tomcat-ssh-slave U tomcat U apache' 
println ## + sshHelper.runCommand(ps -l h U tomcat-ssh-slave U tomcat U
apache) + ##
println  Output from 'df -H' 
println ## + sshHelper.runCommand(df -H) + ##
println  Output from 'top -b -n 1' 
println ## + sshHelper.runCommand(top -b -n 1) + ##
println  Close the connection and exit tomcat-ssh-slave shell 

sshHelper.close()
/* *# */
{{/groovy}}

-- Niels
http://nielsmayer.com
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Users not displayed

2009-08-10 Thread Niels Mayer

 many thanks for your answer. However I am not sure I understood everything.
 What I actually would like to know is what should I do to solve this
 critical problem? How should I edit the
 http://xwiki:8080/xwiki/bin/edit/XWiki/XWikiAllGroup?editor=object for
 instance?


First, browse /xwiki/bin/view/XWiki/XWikiAllGroup if this doesn't have all
the registered users of your wiki listed, then they will not have privilege
to do much of anything on the wiki. This can happen, for example, if you
overwrite your original XWikiAllGroup file with the one from the XAR at
import-time. If that happens, or if  XWikiAdminGroup is similarly
overwritten or damaged, then additional administrators won't be granted that
privilege.

Hand editing of the objects associated with these documents may be necessary
if the above happens,. Hand editing is also necessitated by the new bug that
occurs from add user or add member to group causing
/xwiki/bin/view/XWiki/XWikiAllGroup and
/xwiki/bin/view/XWiki/XWikiAdminGroup to not list the associated users. I
guess this must be a regression introduced into 1.9 as 1.8 didn't have this
problem, and also had a different implementation and appearance for viewing
XWikiAllGroup and XWikiAdminGroup.

To hand-edit these documents, as 'Admin', select document menu Edit-Object.
In the object editor, note that each object is displayed in an accordion
with each object
heading looking like XWiki.XWikiGroups[11] (1.8) or Objects of type
XWiki.XWikiGroups...XWikiGroups 6: XWiki.NielsMayer (2.0). Fully expand the
accordions to see the contents of the objects you want to verify and edit.

On each of these group-documents (e.g. XWiki.XWikiAdminGroup,
XWiki.XWikiAllGroup), there are multiple object instances of
XWiki.XWikiGroups, each having a single Member field; that field contains
a single valid XWiki user. Verify that the document referenced as the user,
e.g. XWiki.NielsMayer exists and has appropriate rights for each user
listed as Member. Delete any XWiki.XWikiGroups instances that don't
correspond to  a real user on your wiki; use the Add Object panel on the
right to add new instances of XWiki.XWikiGroups to the group docs for any
users not listed. (You don't need to
delete an invalid member and separately add a valid one, just change the
invalid document in the member field to a valid one).

Finally, go to Administration-Rights and make sure the group documents you
just hand edited have appropriate rights, e.g. Wiki.XWikiAdminGroup should
probably have Edit Delete and Admin checked; XWiki.XWikiAllGroup
should probably  have View and Comment selected.  This might be needed
if you overwrote XWiki.XWikiPreferences in importing the new XAR. On the
other hand, sometimes you might need to overwrite XWiki.XWikiPreferences
(e.g. in upgrading Xwiki across big revision changes).
It's probably a good idea to allow XWiki.XWikiPreferences to get overwritten
across big Xwiki revision changes, just re-do Administration- General,
Presentation, Registration, Programming and Rights*.*
One helpful tip is to use your browser's form-field autocompletion features
to save the contents of the fields of the old wiki by re-saving General,
Presentation, Registration, Programming and Rights prior to upgrading the
wiki. After upgrading, use your browser's memory of prior form fileds to
reinsert the appropriate prior form-field contents back into the form,  and
re-save.
*
*It would be a nice addition to XWiki to have some kind of merging tool on
import. This would allow updating of system documents with new features or
bugfixes, while giving the wiki administrator bettter control over
customizations made in the wiki. Something like
http://n2.nabble.com/import-administration-enhancement-feature-request-td2488744.html
* ...

***Niels
http://nielsmayer.com



___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Users not displayed

2009-08-09 Thread Niels Mayer
On Fri, Aug 7, 2009 at 11:32 PM, Christian Ribeaud 
christian.ribe...@canoo.com wrote:

 Because the mailing list does not seem to accept attached images, here
 the link
 to the screenshot:

   http://www.ribeaud.ch/tmp/xwiki.png


I believe this problem can be fixed by hand editing the Objects of type
XWiki.XWikiGroups
in http://xwiki:8080/xwiki/bin/edit/XWiki/XWikiAllGroup?editor=object then
redisplaying http://xwiki:8080/xwiki/bin/view/XWiki/XWikiAllGroup ; in a
virtual wiki setup, you may need to do something similar to explicitly set
xwiki:XWiki.Admin for each
http://vhost:8080/xwiki/bin/edit/XWiki/XWikiAdminGroup?editor=object
prior to calling http://xwiki:8080/xwiki/bin/view/XWiki/XWikiAdminGroup, .
This needs some explanation: since you don't necessarily want the local
 vhost:XWiki.Admin shadowing the root  xwiki:XWiki.Admin (the one with
programming rights), you  don't want the v-host to have a local
XWiki.Admin user at all. So if you do this, you'll see additional breakage
until the correct root xwiki:XWiki.Admin' user is pointed in the vhost for
both XWikiAllGroup and XWikiAdminGroup. If you got these from the latest
XAR, you'll probably want to do some hand-editing in a virtual-wiki setup if
you hit this issue.

Related to the above issue, if you've imported your vhost wiki as the
local vhost:XWiki.Admin (which you'd have picked up unless you
explicitly excluded in loading the XAR into the v-host), you probably want
to re-import the XAR  logged in as xwiki:XWiki.Admin (the root user with
programming rights set). Otherwise any scripts that expected programming
rights in the XAR will silently fail in the virttual-host, even though they
work on the root. OpenOffice Server Administration (
http://xwiki:8080/xwiki/bin/admin/XWiki/XWikiPreferences?editor=globaladminsection=XWiki.OfficeImporterAdmin)
 is a potential casualty of this kind of installation mistake; so is
http://xwiki:8080/xwiki/bin/view/Main/AllDocs?view=attachments (works on
root host, shows up empty on any virtual host). The underlying issue is
that on a v-host, a document that might need programming rights is only
saved as local XWiki.Admin user w/o programming rights; for example
http://xwiki:8080/xwiki/bin/edit/Main/AllDocs?editor=wiki and its four
included documents --
 XWiki.AllAttachments, XWiki.Tableview, XWiki.Treeview, XWiki.OrphanedPages
-- are all saved as local XWiki.Admin. However, only
http://xwiki:8080/xwiki/bin/view/XWiki/AllAttachments has the problem of
displaying empty on a virtual host.

I'm assuming that since you're seeing this new users behavior, you're
using the recent 2.0M2 release?
Here's my initial observations of the same issue you raised posted to the
devs list:

FYI, http://www.mail-archive.com/d...@xwiki.org/msg09995.html

Re: [xwiki-devs] [ANN] XWiki Enterprise 2.0 Milestone 2 released


 Niels Mayer

Mon, 03 Aug 2009 22:21:35 -0700


 A few more problems, which i consider more major than previous first

impression issues:

On the main host of a v-hosted setup:


 (1) Using administration users panel, add a user.

As soon as user is added, no entries in users panel display. Subsequent

return to this panel continues

to show no users. The added user is created, however, and other user logins

still work. However, no subsequent

editing or browsing of users in user panel is possible.


 (2) In administration groups panel, go to a group , e.g. XWikiAdminGroup

and add the new user to that

group. As soon as this is done, all the users in the group list disappear,

yet the lightbox popup remains up.

Subsequent browsing of a group where new members added shows an emtpy list

of users, just like in the above

users panel.


 (3) the lightbox popup out of Groups-XWikiAdminGroup has a cancel button

that is nearly invisible, and partially overlaps other buttons (the

forw/back pager, which needn't display if only one page of users in list).

This is in firefox 3.0.12 on Fedora 10 Linux.


 -- Niels

http://nielsmayer.com


 PS: I shift-reloaded the pages with issues a few times to make sure it

wasn't caused by the browser caching an old javascript file..


 PPS: I wouldn't have been adding users had I not just recently extracted my

head from a dark and fetid orifice, in attempting to get programming

rights on a muli-vhost-wiki... fortunately I happened to catch

http://jira.xwiki.org/jira/browse/XWIKI-4066 out of the corner of my eye :


  For example, when the backup pack xwiki-enterprise-wiki-n.n.xar is used
 as

 a template or imported into a virtual sub-wiki and since local user

 XWiki.Admin is used as authors of most pages, those don't receive

 programming rights, because only global user may have these rights. For
 most

 pages, this has no concequence, but a few ones don't work properly. For

 example XWiki.AllAttachementsResults, which use non-priviledged API does
 not

 work in a virtual wiki, without being resaved by a global user having

 programming rights first.



 Isn't this the cause

[xwiki-users] yay for google chrome and Xwiki

2009-07-10 Thread Niels Mayer
Windows users can rejoice -- http://www.google.com/chrome -- Because they
work nicely together. Much faster/smoother. Unfortunately, to get it on
linux, you have to switch to google's
linuxhttp://news.cnet.com/8301-17939_109-10281744-2.html?tag=newsLeadStoriesArea.1.
I didn't realize chrome was worth bothering with until I understood all the
announcements, which is what got me to switch. (I still use Firefox on Linux
(via X protocol) to run firebug)... I think IE won't be able to
So far, the biggest new feature I get, other than blazing fast javascript,
 is that text boxes (e.g. comment panels, object-editor panels, etc) are
resizeable. (If it's in an accordion like in the object editor, you have
to collapse/reexpand to get the sizing correct if you make the window larger
than it's original display.)

Niels
http://nielsmayer.com
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


[xwiki-users] how to add a calculator to a xwiki-based site in one minute

2009-06-10 Thread Niels Mayer
Jonathan --

See  http://nielsmayer.com/xwiki/bin/view/Sandbox/Calc and
http://nielsmayer.com/xwiki/bin/view/Sandbox/Calc?viewer=code (
http://nielsmayer.com/xwiki/bin/download/Sandbox/Calc/Sandbox.Calc.xar )

The above took about 1 minute to do, basically cutting and pasting the code
as-is from the article below into a new document, adding one line at the
beginning to get it to include the Javascript I pasted into
XWiki.JavaScriptExtension[0] in the object editor and that's it). Let me
know if you want help getting this example running on
http://jonathanmayer.info (you're going to need to see me do the
JavaScriptExtension trick at least once )... from there, you can add new
functions or whatever to learn about javascript programming on the web.

http://www.maconstateit.net/Tutorials/JSDHTML/JSDHTML09/jsdhtml09-05.htm

A Simple Calculator

Use of buttons to create a simple JavaScript calculator is demonstrated
below. The Calculator button opens the calculator in a ModelessDialog
window that remains on top while providing access to the underlying Web
page. The layout below shows the same calculator with a Formula textbox
that is normally hidden but is revealed here to show the calculations that
take place behind the scenes.

  JavaScript CalculatorFormula: *Figure 9-34.* A simple
JavaScript calculator.

The XHTML code and button event handlers are shown below. The calculator is
formatted inside a table to control its layout.

table border=7
tr
  td colspan=4 style=font-family:comic sans ms; text-align:center;
  color:white; background-color:gray; font-size:9pt
JavaScript Calculator
  /td
/tr
tr
  td colspan=3input id=Answer type=text style=width:100px;
text-align:right/td
  tdinput type=button style=width:30px value==
onclick=EnterEqual()/td
/tr
tr
  tdinput type=button style=width:30px value=1
onclick=EnterNumber(this.value)/td
  tdinput type=button style=width:30px value=2
onclick=EnterNumber(this.value)/td
  tdinput type=button style=width:30px value=3
onclick=EnterNumber(this.value)/td
  tdinput type=button style=width:30px value=+
onclick=EnterOperator(this.value)/td
/tr
tr
  tdinput type=button style=width:30px value=4
onclick=EnterNumber(this.value)/td
  tdinput type=button style=width:30px value=5
onclick=EnterNumber(this.value)/td
  tdinput type=button style=width:30px value=6
onclick=EnterNumber(this.value)/td
  tdinput type=button style=width:30px value=-
onclick=EnterOperator(this.value)/td
/tr
tr
  tdinput type=button style=width:30px value=7
onclick=EnterNumber(this.value)/td
  tdinput type=button style=width:30px value=8
onclick=EnterNumber(this.value)/td
  tdinput type=button style=width:30px value=9
onclick=EnterNumber(this.value)/td
  tdinput type=button style=width:30px value=*
onclick=EnterOperator(this.value)/td
/tr
tr
  tdinput type=button style=width:30px value=C
onclick=EnterClear()/td
  tdinput type=button style=width:30px value=0
onclick=EnterNumber(this.value)/td
  tdinput type=button style=width:30px value=.
onclick=EnterNumber(this.value)/td
  tdinput type=button style=width:30px value=/
onclick=EnterOperator(this.value)/td
/tr
/table
input id=Formula type=hidden/

*Listing 9-22.* Code to format and style the calculator.

Notice the final input id=Formula type=hidden/ field. The
type=hidden attribute creates a standard textbox that is hidden from view.
In the example above, this control is given the attribute type=text in
order to make it visible so you can see the formulas being created by the
button clicks.

Four functions are called by the buttons. All of the number keys call
function EnterNumber(), passing the number value of the button; the
arithmetic operator keys call function EnterOperator(), passing the operator
symbol; the = key calls function EnterEqual(); and the C key calls
function EnterClear().

script type=text/javascript
var op = false;
var eq = false;

function EnterNumber(Number)
{
  if (op == false) {
document.getElementById(Formula).value += Number;
document.getElementById(Answer).value += Number; }
  else {
document.getElementById(Answer).value = Number;
op = false;
if (eq == true) {
  document.getElementById(Formula).value = Number;
  eq = false; }
else {
  document.getElementById(Formula).value += Number;
}
  }
}

function EnterOperator(Operator)
{
  if (document.getElementById(Formula).value != ) {
document.getElementById(Answer).value =
  eval(document.getElementById(Formula).value);
document.getElementById(Formula).value =
  eval(document.getElementById(Formula).value) + Operator;
op = true;
eq = false;
  }
}

function EnterEqual()
{
  if (document.getElementById(Formula).value != ) {
document.getElementById(Answer).value =
  eval(document.getElementById(Formula).value);
document.getElementById(Formula).value =
  eval(document.getElementById(Formula).value);
op = true;
eq = true;
  }
}

function EnterClear()
{
  

Re: [xwiki-users] [VOTE] Creating complex lists with the new WYSIWYG editor

2009-05-14 Thread Niels Mayer
On Thu, May 14, 2009 at 2:01 AM, Marius Dumitru Florea 
mariusdumitru.flo...@xwiki.com wrote:


 For the first outcome I think we all agree that the user has to press
 Shift+Enter. For the second and third outcomes I see two options:

 A) Enter for 2 and CTRL/META+Enter for 3
 B) Enter for 3 and CTRL/META+Enter for 2
 (if you see any other options please step up)


Sounds like wikimacs (wiki+emacs) :-)

What about using a multiple-repeated enters. Kind of like a keyboard
equivalent of a double, triple click, with some visual way of suggesting
what level upwards in the DOM the return will create the next element (e.g
a box insertion caret like for drag-drop operations):

* a single enter in a list adds a paragraph or br within the current
element. It does not create a new list or table entry.

* double-enter, creates a new li tr etc (depending on if you're in a
table, list etc) within the current table/list.

* triple-enter, creates a new li tr p or br  as the next element
outside of the current list/table etc. (if in a nested table/list, it'll
correctly add the next element)

 ...

-- Niels
http://nielsmayer.com

PS: I got to deal with all these fun issues back in ~1995 when i designed
WWWeasel (reviewed at an early WWW conf
herehttp://nielsmayer.com/L27933-1529TMP.pdf
)
http://nielsmayer.com/wwweasel/node26.htmlhttp://nielsmayer.com/wwweasel/node26.html#SECTION00051000
http://nielsmayer.com/wwweasel/node27.html
It is very helpful for the user to be able to see what's going on
structurally at the same time as you're editing in WYSIWYG If you can
graphically depict where in the DOM structure the return is pointing, at
what level of scope, then it's a lot less confusing to the user.
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


[xwiki-users] increasing low size-limit on XWiki.JavaScriptExtension[] data in object-editor ?

2009-05-11 Thread Niels Mayer
In 1.8, if too much data is entered in a doc's ?editor=object
fieldXWiki.JavaScriptExtension[] (say
a big chunk of JSON on the order of 97783 bytes) you can no longer save
without getting an underlying error. This appears related to the following:
com.xpn.xwiki.objects.LargeStringProperty --
com.mysql.jdbc.MysqlDataTruncation:
Data truncation: Data too long for column 'XWL_VALUE' at row 1

How can this be changed to allow for a larger limit on entries? Fortunately,
http://nielsmayer.com/xwiki/bin/view/Exhibit/Presidents3 ( src
http://nielsmayer.com/xwiki/bin/download/Exhibit/Presidents3/Exhibit.Presidents3.xar)
has entries small enough, but as you grow the amount of Javascript data you
hold in a XWiki.JavaScriptExtension you eventually get a failure like this:

A problem occured while trying to process your request. Please contact the
 webmaster if this happens again.

 Detailed information:

 Error number 3201 in 3: Exception while saving document Exhibit.pods
 Wrapped Exception: could not update: 
 [com.xpn.xwiki.objects.LargeStringProperty#component[id,name]{id=-2025184002, 
 name=code}]
 com.xpn.xwiki.XWikiException: Error number 3201 in 3: Exception while saving 
 document Exhibit.pods
 Wrapped Exception: could not update: 
 [com.xpn.xwiki.objects.LargeStringProperty#component[id,name]{id=-2025184002, 
 name=code}]
   at 
 com.xpn.xwiki.store.XWikiHibernateStore.saveXWikiDoc(XWikiHibernateStore.java:595)
   at 
 com.xpn.xwiki.store.XWikiCacheStore.saveXWikiDoc(XWikiCacheStore.java:135)
   at 
 com.xpn.xwiki.store.XWikiCacheStore.saveXWikiDoc(XWikiCacheStore.java:128)
   at com.xpn.xwiki.XWiki.saveDocument(XWiki.java:1282)
   at com.xpn.xwiki.web.SaveAction.save(SaveAction.java:176)
   at 
 com.xpn.xwiki.web.SaveAndContinueAction.action(SaveAndContinueAction.java:64)
   at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:215)
   at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:115)
   at 
 org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
   at 
 org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
   at 
 org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
   at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)

 ...

 Wrapped Exception:

 com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column 
 'XWL_VALUE' at row 1
   at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2983)
   at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1631)
   at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1723)
   at com.mysql.jdbc.Connection.execSQL(Connection.java:3256)
   at 
 com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1313)
   at 
 com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1585)
   at 
 com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1500)
   at 
 com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1485)
   at 
 org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:101)
   at 
 org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:101)
   at 
 org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2412)
   at 
 org.hibernate.persister.entity.AbstractEntityPersister.updateOrInsert(AbstractEntityPersister.java:2312)
   at 
 org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2612)
   at 
 org.hibernate.action.EntityUpdateAction.execute(EntityUpdateAction.java:96)
   at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:279)
   at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:263)
   at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:168)
   at 
 org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:298)
   at 
 org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
   at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000)
   at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:338)
   at 
 org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:106)
   at 
 com.xpn.xwiki.store.XWikiHibernateBaseStore.endTransaction(XWikiHibernateBaseStore.java:866)
   at 
 com.xpn.xwiki.store.XWikiHibernateBaseStore.endTransaction(XWikiHibernateBaseStore.java:837)
   at 
 com.xpn.xwiki.store.XWikiHibernateStore.saveXWikiDoc(XWikiHibernateStore.java:585)
   at 
 com.xpn.xwiki.store.XWikiCacheStore.saveXWikiDoc(XWikiCacheStore.java:135)
   at 
 com.xpn.xwiki.store.XWikiCacheStore.saveXWikiDoc(XWikiCacheStore.java:128)
   at com.xpn.xwiki.XWiki.saveDocument(XWiki.java:1282)
   at 

Re: [xwiki-users] Xwiki+Simile Exhibit integration // request for help w/ portability issue

2009-05-09 Thread Niels Mayer
On Wed, May 6, 2009 at 11:25 AM, Niels Mayer nielsma...@gmail.com
wrotehttp://n2.nabble.com/Xwiki%2BSimile-Exhibit-integrationrequest-for-help-w--portability-issue-td2823091.html
:

 Here's my example of Xwiki/Exhibit integration:
 http://nielsmayer.com/xwiki/bin/view/Exhibit/Presidents


I now have an improved version
http://nielsmayer.com/xwiki/bin/view/Exhibit/Presidents2

The main advantage of this version is that it should function standalone
without installing the Simile widgets locally. Unlike Presidents which
uses a local, modified copy of the Exhibit trunk, Presidents2 loads from
api.simile-widgets.org .

*Attached, *the 35K Xar (Zip/Jar format) containing the standalone demo,
comprising three documents: Exhibit.Presidents2 and data-files
Exhibit.PresidentsSchemaJSON and Exhibit.PresidentsJSON. You should be able
to import these into your xwiki installation and get a working demo of
Exhibit. (note that since the javascript in Exhibit.Presidents2's object
XWiki.JavaScriptExtension[2] loads external javascript, the server and the
clients accessing must be connected to the network for this to work).

*Resolved*, one issue:

 One last remaining hack is that I put the following in the headers

 link rel=exhibit/data type=application/json
 href=$xwiki.getURL(Exhibit.PresidentsSchemaJSON,view,xpage=plain) /
 link rel=exhibit/data type=application/json
 href=$xwiki.getURL(Exhibit.PresidentsJSON,view,xpage=plain) /

 via the Exhibit space's HTTP Meta Information administration setting
 ...


This is replaced with some JavaScript residing in
XWiki.JavaScriptExtension[0]:

insertExhibitDataLink(window.document,
/xwiki/bin/view/Exhibit/PresidentsSchemaJSON?xpage=plain);
insertExhibitDataLink(window.document,
/xwiki/bin/view/Exhibit/PresidentsJSON?xpage=plain);

(Next version, Presidents3, will replace loading these two extra javascript
files and instead put the javascript data directly into
XWiki.JavaScriptExtension[0], replacing insertExhibitDataLink() calls.)

*Unresolved*, the IE portability issue, an Exhibit bug? Help??

In IE, after the simile busy-spinner has popped up indicating a successful
 load of Exhibit, the following errors happen, causing three successive
 dialog boxes:
 (1) Caught exception: ColorCoder: Error processing configuration of coder
 Details: 'firstChild.nodeValue' is null or not an object
 (2) Caught exception: undefined
 Details: 'firstChild.nodeValue' is null or not an object
 (3) IE error: Line 1831, char 52, Error: object expected


Note that this issue is independent of trunk versus stable versions of
Exhibit.
http://nielsmayer.com/xwiki/bin/view/Exhibit/Presidents uses a local copy of
trunk
http://nielsmayer.com/xwiki/bin/view/Exhibit/Presidents2 uses
api.simile-widgets.org
Both have the same problem with a null dereference from 
node.firstChild.nodeValue.trim(), which occurs in
api/scripts/ui/coders/color-coder.js functionExhibit.ColorCoder.createFromDOM():

 try {
 var node = configElmt.firstChild;
 while (node != null) {
 if (node.nodeType == 1) {
 coder._addEntry(
 Exhibit.getAttribute(node, case),
 node.firstChild.nodeValue.trim(),
 Exhibit.getAttribute(node, color));
 }
 node = node.nextSibling;
 }
 } catch (e) {
 SimileAjax.Debug.exception(e, ColorCoder: Error processing
 configuration of coder);
 }


Niels
http://nielsmayer.com
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Xwiki+Simile Exhibit integration // request for help w/ portability issue

2009-05-09 Thread Niels Mayer
On Sat, May 9, 2009 at 10:04 AM, David Huynh dfhu...@alum.mit.edu wrote:

 Looking at the HTML source, I see
div ex:role=coder ex:coderClass=Color
 id=party-colors
span ex:color=redRepublican/span
span ex:color=blueDemocratic/spanp/
span ex:case=others  ex:color=#aaaOther
 parties/span
span ex:case=mixed   ex:color=#eeeMany
 parties/span
span ex:case=missing ex:color=#444No party/span
/div
 I think the p/ is causing problem. Could you remove it and see if that
 helps?


That was exactly the problem! Thank you so much, as that's one I would have
never spotted myself!

FYI, here's what happened: Since I just cut/paste the HTML from view-source
on the presidents example on simile-widgets.org, the newlines got
interpreted as paragraphs by the wiki-engine in Xwiki. So, I removed the
extra newline in Exhibit.Presidents2, and it now works in IE! This is a
gotcha I frequently hit in Xwiki, although I find the ability to mashup
HTML and wikitext in an active document quite useful.

Now both the standalone
http://nielsmayer.com/xwiki/bin/view/Exhibit/Presidents2
and locally-hosted-exhibit
http://nielsmayer.com/xwiki/bin/view/Exhibit/Presidents
work in IE! Thanks again and also thanks for Exhibit which is just all
around great!

The updated XAR (zip format) of Presidents2 example is here:
http://nielsmayer.com/xwiki/bin/download/Exhibit/Presidents2/Exhibit.PresidentsPkg.xar
  Length Date   TimeName
    
94080  05-09-09 10:30   Exhibit/Presidents2.xml
 2226  05-09-09 10:30   Exhibit/PresidentsSchemaJSON.xml
29379  05-09-09 10:30   Exhibit/PresidentsJSON.xml
  544  05-09-09 10:30   package.xml
    ---
   126229   4 files

Niels
http://nielsmayer.com

PS: After sending the announcement yesterday, I realized there was one issue
that makes this example not quite standalone. Exhibit.PresidentsPkg.xar
contains a hard-coded google-maps key that you receive when registering your
site http://code.google.com/apis/maps/signup.html. You'll need to change
gmapkey setting in object XWiki.JavaScriptExtension[2] on document
Exhibit.Presidents2:

  params: { bundle: true, authenticated: false, autoCreate: false, safe:
 false, gmapkey: , views: timeline,map }

Until this is changed, you'll get a dialog box from google saying you need
to register. When you click away the dialog box, it should load the
interface even if not correctly registered.

PPS: What does this Exhibit parameter setting do, and what is the correct
value:
namespace:  http://simile.mit.edu/2006/11/exhibit#;,
(also in object XWiki.JavaScriptExtension[2] on document
Exhibit.Presidents2)
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Xwiki+Simile Exhibit integration // request for help w/ portability issue

2009-05-09 Thread Niels Mayer
FYI, a third version of the same example --
http://nielsmayer.com/xwiki/bin/view/Exhibit/Presidents3 --  this time, the
JSON data resides directly in the document Presidents3 object
XWiki.JavaScriptExtension[0] and the code to load it into the exhibit
database is in object XWiki.JavaScriptExtension[1] ... Unlike the previous
example, there's no separate documents containing the exhibit data
Exhibit.PresidentsSchemaJSONhttp://nielsmayer.com/xwiki/bin/view/Exhibit/PresidentsSchemaJSON?xpage=plainand
Exhibit.PresidentsJSONhttp://nielsmayer.com/xwiki/bin/view/Exhibit/PresidentsJSON?xpage=plainthat
get loaded by Exhibit from the browser. All data and custom javascript
reside in the standalone document which means it loads more quickly, with
less updating in the browser, and less server hits.

(compare performance to
http://nielsmayer.com/xwiki/bin/view/Exhibit/Presidents2 )

The source code is in the standalone example XAR (zip) file is at
http://nielsmayer.com/xwiki/bin/download/Exhibit/Presidents3/Exhibit.Presidents3.xar

In order to get rid of the google-maps warning popup, you will need to get
your own google maps key http://code.google.com/apis/maps/signup.html and
replace the gmapkey set in object XWiki.JavaScriptExtension[2]:

  params: { bundle: true, authenticated: false, autoCreate: false, safe:
 false, gmapkey:  , views: timeline,map }


Now that I've figured out how to get a standard example working correctly in
ExhibitXwiki, it's time to take the techniques I developed for
Presidents3 and  apply it to my own applications.

Niels
http://nielsmayer.com
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] XWiki diagram linking

2009-05-07 Thread Niels Mayer
On Thu, May 7, 2009 at 4:24 AM, Vincent Massol vinc...@massol.net wrote:

 Well we have a mindmap automatic generic in the code zone and Niels
 has done something with the Simile Timeline too for navigating by date.


Simile Timeline example apps w/ Xwiki:
http://nielsmayer.com/xwiki/bin/view/Timeline/TL2
http://nielsmayer.com/xwiki/bin/view/Timeline/NprTimeline
http://nielsmayer.com/xwiki/bin/view/Timeline/CoolMusicPodcasts

Also worth looking at, Simile's Exhibit:
http://simile-widgets.org/exhibit/

Exhibit can be integrated in to Xwiki:
http://groups.google.com/group/simile-widgets/browse_thread/thread/d9667ce6c16b061e?pli=1

In exhibit, you can navigate by all sorts of things, and it's up to you to
create the data and relationships so that this can happen automatically.  It
has the following plugins, some of which may do what you need.

drwxr-xr-x 4 root root 4096 2009-05-05 11:34 calendar/
 drwxr-xr-x 5 root root 4096 2009-05-05 11:34 chart/
 drwxr-xr-x 5 root root 4096 2009-05-05 11:34 curate/
 drwxr-xr-x 5 root root 4096 2009-05-05 11:34 editing/
 drwxr-xr-x 3 root root 4096 2009-05-05 11:34 freebase/
 drwxr-xr-x 5 root root 4096 2009-05-05 12:16 map/
 drwxr-xr-x 5 root root 4096 2009-05-05 11:34 time/
 drwxr-xr-x 5 root root 4096 2009-05-05 11:34 timeplot/


In the example http://nielsmayer.com/xwiki/bin/view/Exhibit/Presidents the
map and time plugins are used. (warning, doesn't work in IE yet due to
Exhibit bug in this particular rev).

See also
http://nielsmayer.com/xwiki/bin/view/Todo/MakeCoolUMLdiagramsOnTheWeb

Niels
http://nielsmayer.com
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


[xwiki-users] Xwiki+Simile Exhibit integration // request for help w/ portability issue

2009-05-06 Thread Niels Mayer
Although I was previously able to do a hack integration with Simile's
Exhibit and Xwiki, it was too heinous to actually live with. A cleaner
solution, using Xwiki's skin extensions for stylesheets and javascript now
works. The clean solution required hosting my own copy of Exhibit based on
checking out from the trunk the latest copy of Exhibit. Hosting my own
copy of Exhibit seems to be problematic, as the version of Exhibit I checked
out from svn/trunk has issues such as (1) a non-working minified jquery that
needed to be replaced w/ original, and (2) portability issue on IE (see
below) on which I need help/advice.

Here's my example of Xwiki/Exhibit integration:
http://nielsmayer.com/xwiki/bin/view/Exhibit/Presidents
Here's the original example from which above was derived:
http://simile-widgets.org/exhibit/examples/presidents/presidents.html

Xwiki Source Code:
Presidentshttp://nielsmayer.com/xwiki/bin/view/Exhibit/Presidents?viewer=code
Data used by example:
PresidentsSchemaJSONhttp://nielsmayer.com/xwiki/bin/view/Exhibit/PresidentsSchemaJSON?xpage=plain,
PresidentsJSONhttp://nielsmayer.com/xwiki/bin/view/Exhibit/PresidentsJSON?xpage=plain

Attached, because there's no easy way to view these, the contents of
XWiki.StyleSheetExtension[0] and XWiki.JavaScriptExtension[0] -- these are
objects attached to the underlying Xwiki document
http://nielsmayer.com/xwiki/bin/view/Exhibit/Presidents which cause the
appropriate magic to happen in the header via calls to
$xwiki.ssx.use($doc.fullName) and $xwiki.jsx.use($doc.fullName).

It's all explained in the preamble for
http://nielsmayer.com/xwiki/bin/view/Exhibit/Presidents?viewer=code :

 ## Note that to get this whole thing working requires jquery NOT FROM
 EXHIBIT SVN TRUNK
 ##( http://nielsmayer.com/js/exhibit/api/scripts/jquery-1.3.2.min.js )
 ## Instead, preload
 http://nielsmayer.com/xwiki/resources/js/exhibit/api/scripts/jquery-1.3.2.min.js
 ## for details see
 http://nielsmayer.com/xwiki/resources/js/exhibit/api/scripts/jquery-1.3.2.min.js.README
 $xwiki.jsfx.use(js/exhibit/api/scripts/jquery-1.3.2.min.js)##
 ## Note that
 http://nielsmayer.com/xwiki/resources/js/exhibit/api/exhibit-api.jsdifferent
 ## to trunk  http://nielsmayer.com/js/exhibit/api/exhibit-api.js
 $xwiki.jsfx.use(js/exhibit/api/exhibit-api.js)##
 ## though
 http://nielsmayer.com/xwiki/resources/js/Simile/Exhibit/webapp/styles.cssworks
  the line below does not:
 ##$xwiki.ssfx.use(js/simile/Exhibit/webapp/styles.css)##same loaded from
 XWiki.StyleSheetExtension[0] via ssx.use.
 $xwiki.ssx.use($doc.fullName)##
 $xwiki.jsx.use($doc.fullName)##



ISSUE AND REQUEST FOR HELP:

In IE, after the simile busy-spinner has popped up indicating a successful
load of Exhibit, the following errors happen, causing three successive
dialog boxes:

(1) Caught exception: ColorCoder: Error processing configuration of coder
Details: 'firstChild.nodeValue' is null or not an object

(2) Caught exception: undefined
Details: 'firstChild.nodeValue' is null or not an object

(3) IE error: Line 1831, char 52, Error: object expected

Suggestions on which version of Exhibit or Simile-Ajax-API to use in
order to get rid of this error would be appreciated. It is interesting to
note that the trunk version of the same example
http://trunk.simile-widgets.org/exhibit/examples/presidents/presidents.htmlworks
fine in IE.

Is this the same issue noted previously:
http://www.mail-archive.com/simile-widg...@googlegroups.com/msg00385.html
http://www.mail-archive.com/simile-widg...@googlegroups.com/msg00391.html
http://www.mail-archive.com/simile-widg...@googlegroups.com/msg00846.html???
--

TODO:

One last remaining hack is that I put the following in the headers

 link rel=exhibit/data type=application/json
 href=$xwiki.getURL(Exhibit.PresidentsSchemaJSON,view,xpage=plain) /
 link rel=exhibit/data type=application/json
 href=$xwiki.getURL(Exhibit.PresidentsJSON,view,xpage=plain) /

via the Exhibit space's HTTP Meta Information administration setting (
http://nielsmayer.com/xwiki/bin/admin/Exhibit/WebPreferences?editor=spaceadminsection=Presentationspace=Exhibit).
I would like to figure out a way to set these values directly in
javascript inside the document itself (or inside additional instances of
XWiki.JavaScriptExtension) rather than having them read as external json
files, e.g. http://www.mail-archive.com/gene...@simile.mit.edu/msg02434.html
http://www.nabble.com/JSON-created-locally-td17507332.html
http://www.patrickgmj.net/node/161

-- Niels.
http://nielsmayer.com
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Problem with HSQLDB Database please Help!!

2009-05-05 Thread Niels Mayer
On Tue, May 5, 2009 at 3:40 AM, Remi remi.pierr...@conseiltechno.comwrote:

   see in error message several lines with Cannot create
 PoolableConnectionFactory (Out of Memory) or Caused by:
 java.sql.SQLException: Out of Memory, but i need real help to understand
 and fix my problem.


(0) Restart your container. And relaunch. Check to see if this error is
still there:

 Wrapped Exception:  com.xpn.xwiki.XWikiException: Error number 0 in 3:
 Exception while hibernate execute Wrapped Exception: Could not create a
 DBCP
 pool. There is an error in the hibernate configuration file, please review

If so, beg for additional assistance on list...  (Does this error arise from
an out of memory condition or indicate  version mismatch between db and
software?).

Independently of that, eliminate out of memory error from possibilities:

(1) Increase the memory on your java process. I've been running a vhosted
1.8 system happily for over a month now, nonstop, with the following
settings (YMMV, I'm running two large apps in tomcat):

tomcat2040  0.5 60.2 1835160 1230408 ? Sl   Apr03 267:28
/usr/java/default/bin/java -server -Xms160m -Xmx1024m -XX:PermSize=160m
-XX:MaxPermSize=320m -Djavax.servlet.request.encoding=UTF-8
-Dfile.encoding=UTF-8 -DjavaEncoding=UTF-8 -Djava.awt.headless=true ...

Note the gargantuan 1.2g process size... but it just keeps running... It
always eventually reaches it's 1.2g (-Xmx1024m) limit but doesn't give out
of memory errors.

(2) Check on additional customizations as needed. Increase fixed limits in
your SQL connector, or in the db it itself? For example with
MySQLhttp://platform.xwiki.org/xwiki/bin/view/AdminGuide/InstallationMySQLyou
need to increase: -- max_allowed_packet=32M ...

(3) Look into logs more carefully, and run some of the queries that are
failing directly into your database. Potentially related, issues with large
attachments:
http://n2.nabble.com/Bug-%3A-unable-to-delete-attached-files-in-virtual-wikis-tp2434930p2440147.htmland
http://n2.nabble.com/Hibernate-exception-when-trying-to-delete-attachment-tp2503343p2504053.html

(4) Consult http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Performances
for additional tips on Process size, turning off Monitoring, changing cache
size, etc.

Niels
http://nielsmayer.com
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Proposal: box macro with show/hide parameter

2009-05-05 Thread Niels Mayer

 Quick proposal - would it be possible to enhance the box macro so that it
 includes two extra (optional) parameters:
  hideable=[true/false]
  initial=[show/hide]


How about the Foobar collapsible titlebar, morphed from Curriki:
 http://nielsmayer.com/xwiki/bin/view/Macros/Foobar?viewer=code
 http://nielsmayer.com/xwiki/bin/view/Macros/FoobarCSS?viewer=code

Example usage of the Foobar:
http://nielsmayer.com/xwiki/bin/view/Timeline/NprTimeline

#includeMacros(Macros.Foobar)
#beginsectionandshow(National Public Radio Podcasts, , , red, false)
    hideable content goes here ...
 #endsection()

To change so that the content is shown by default, change last parameter to
true.
Or use #beginsection(National Public Radio Podcasts, , , red). Note
that
only certain colors in the color parameter are supported by the CSS. The
parameters  for the link and its url which are placed near the
expand/collapse icon --  doesn't work that well, so I leave it empty with 
.

TODO: Remove separate document 'FoobarCSS' and remove the  link to it in
'Foobar'. Replace with a call to $xwiki.ssx.use($doc.fullName) in the
Macro/document Foobar. Add contents of 'FoobarCSS' as text value to
instance of object XWiki.StyleSheetExtension .
(Question: if I want to have multiple separate instances
XWiki.StyleSheetExtension[0], XWiki.StyleSheetExtension[1] .,,, How would
these be accessed, individually, via $xwiki.ssx.use() or equivalent call?)

Niels
http://nielsmayer.com
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] [xwiki-devs] app: browse/listen to 60+ National Public Radio Podcasts in Pre2.4 Simile Timeline

2009-04-26 Thread Niels Mayer
On Fri, Apr 24, 2009 at 8:42 PM, Dennis Coonich
dennis.coon...@comcast.netwrote:

Amazing - was just looking into embedding applets into xwiki for
 streaming media from local or remote sources.  You beat me to it.  I
 would still like to integrate homegrown java ee applets, jsf and other
 java technologies.  Can you point me to some good reference material?  I
 teach java swing and java ee courses but have not looked at all into the
 depths of xwiki's framework(s).

Again - amazing work.


Thanks! That was sort of the demo/proof-of-concept version... i'm working
on an update that should be more useful, and with 500+ NPR feeds including
affiliate stations, a better selection/search mechanism using Exhibit ( e.g.
http://simile-widgets.org/exhibit/examples/presidents/presidents.html ),
etc.

Wr/t your applet question, here's what I've found, and why I didn't bother
with applets:  Bottom line: applets cause problems and user complaints.
Flash doesn't.

For example: there's potential  issues with IE  Java,  if you use JMF in
your applet (
http://java.sun.com/javase/technologies/desktop/media/jmf/2.1.1/guide/JMFApp-Applet.html),
then you need to specially install the JMF jar on your browser (
http://java.sun.com/javase/technologies/desktop/media/jmf/2.1.1/jmfdiagnostics.html).
The lack of an easy one click means of install (like w/ flash) to
get
JMF and Java installed multiplatform and consistently -- is a showstopper.

At least for windows and IE, there's the JMF Windows Performance Pack:

 Microsoft IE with the JMF Windows Performance Pack and you still see this
 message, then its possible that you don't have the latest Microsoft Java VM
 for IE installed. Please visit http://www.microsoft.com/java and install
 the latest Java VM for your browser.


http://www.flumotion.net/cortado/ is sort of typical with what happens with
video and applets. The page for the applet states to look at
http://www.flumotion.com site to see the applet in action. And yet, all the
video playing on the company's site is now done with flash and they're no
longer using the applet.

If you get anything working and integrated with Xwiki for media applets,
please share. The more the merrier.

What would be best is to have an overarching smart mechanism for detecting
media playback capabilities, and determining the most optimal strategy
dynamically based on client platform/plugins and media type/quality of
streaming media for display.

On Apr 10 I alluded to this in a message integrating media streaming with
xwiki? (was Re: [xwiki-devs] Problems with scripting) (
http://www.mail-archive.com/d...@xwiki.org/msg08533.html )

It would be nice to have a truly abstract streaming media macro that would
 implement the same generic API for streaming media within Xwiki. The macro
 would determine at run-time, whether the browser is enabled with specific
 plugins needed to display a specific media type (such as the VLC moz
 plugin); if not available, the macro would dynamically switch-in the
 flash-based equivalent for people using IE or who don't want to install the
 VLC moz plugin. For example given a mp4, the macro would first attempt to
 use VLC, on failure it might try the platform's browser-embeddable media
 presenter if media-compatible (e.g. MS windows media), and would finally try
 a generic flash player such as the Jeroen JW Wijering players (
 http://www.longtailvideo.com/players/ ).


Due to the near ubiquitous installation of Itunes/Quicktime on most
mac/windows systems -- the ability to automatically detect Quicktime plugin
presence in the browser and determine if media is compatible would be a
great feature to have in this abstract/smart streaming macro

-- Niels
http://nielsmayer.com
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


[xwiki-users] app: browse/listen to 60+ National Public Radio Podcasts in Pre2.4 Simile Timeline

2009-04-21 Thread Niels Mayer
http://nielsmayer.com/xwiki/bin/view/Timeline/NprTimeline

xwiki (html+wikitext+velocity+javascript) code:
 http://nielsmayer.com/xwiki/bin/view/Timeline/NprTimeline?viewer=code
see also
  http://nielsmayer.com/xwiki/bin/view/Timeline/MP3Feed2TL?viewer=code
  http://nielsmayer.com/xwiki/bin/view/Macros/JW-Player?viewer=code
  http://nielsmayer.com/xwiki/bin/view/Macros/Foobar?viewer=code

Niels
http://nielsmayer.com

PS: I'd love to get feedback if this app doesn't work for you; or if it
fails to load or display... and if so, what platform/browser/etc. Also, if
you don't have Flash to play podcast audio (or its not available on your
iphone) do you have java applets available, or http://silverlight.net ?
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] How to navigate user pages as tree structure from main page?

2009-04-14 Thread Niels Mayer
I mentioned the curriki tooltips issue because you noted performance issues
in waiting for certain actions in curriki's navigation. Ludovic gave the
example
http://www.curriki.org/xwiki/bin/view/Coll_curriki/RefineyourSearchforLearningResources?bc=;Coll_curriki.CurrikiHelp;Coll_curriki.HowtoSearchBrowseCurriki_0--
note the extensive use of tooltips on each item as you hover over
them
in the navigation. IMHO, this is the reason for the perfomance issues:

You noted:

 1. The noticeable lag between clicking on a tree link and the next level
 opening. My internet connection isnt *that* slow and I'd guess even at
 intranet speeds it would still be noticeable. Taking a guess maybe the page
 needs to have the tree/toc preloaded/cached to avoid this lag or some other
 approach, but the pregnant pause waiting for the toc/tree part of the screen
 to redraw is somewhat disconcerting.


The point of my message was to point out  that some of the widgetry you were
looking at might perform differently in a different environment that doesn't
burden the browser with as much work. Because of the particular tooltips
approach used, JavaScript and the user's  browser can be a potential
performance bottleneck.

A generalized imlementation of the navigation Ludovic pointed out might want
to skip some of these performance bottlenecks, rather than replicating them.
Or solve the issue by coming up with an incremental approach for tooltips.
For example, using the hover timeout to fetch and compute the individual
toolktip HTML for the item one's mouse is over, as opposed to having to
precompute all the tooltips each time you expand a level in the navigation.

Regarding your navigation needs, have you considered using (or modifying)
Main.Dashboard or Main.SpaceIndex? The code snippet I put in the WebHome
page of most spaces created on my site comes from Main.SpaceIndex, (usage
example: /xwiki/bin/view/Main/SpaceIndex?space=Main ).

Additionally, the code in Main.Dashboard indicates it can be used on a
per-space basis:

## This dashboard can be used for both wikis (Main.WebHome)
## and spaces (*.WebHome).
##
#set($isSpaceDashboard = false)
#if($doc.space != Main)
#set($isSpaceDashboard = true)
#end

However, it sounds lke you're looking for something closer to
Panels.Navigation, Panels.Spaces.
or Panels.SpaceDocs ...

Niels
http://nielsmayer.com



On Tue, Apr 14, 2009 at 2:36 AM, Manfred manonin...@gmail.com wrote:

 Hi Niels,

 Thanks for the extensive exposition on tooltips and breadcrumbs. Will
 concede the technical aspects are a bit whoa for me, but I'm confident the
 Xwiki developers will know what you're on about ;-)

 Initial discussion topic was around ways to improve / provide a
 hierarchical page navigation tree, AFAIK no mention was made of tooltips -
 so that functionality may not even be on the agenda for Xwiki or I don't
 know at least. Its just that one of the developers mentioned an example page
 using Curriki to illustrate a point, so I gave some feedback round that.

 I then visited said page and the tree navigation structure of it I quite
 like, it was the other 'features' that irritated me, so I put in my 0.03 in
 case the xwiki developers were thinking of doing something similar, so that
 they at least have 1 user input of hopefully what not to do.

 I'm sure your input will be valuable to them as well,

 I did look at your xwiki site and I see how you've done it - the first page
 of the space you have created a TOC for the docs in it, it appears. Of
 course that works, but what I was asking for was an xwiki generated space
 aware, tree like hierarchical nested wiki page navigation structure to this
 which fits in the navigation, recently modified, etc area of the xwiki
 browser page rather than me needing to occupy the space page with a TOC or
 provide hyperlinks elsewhere, etc.

 Cheers
 ___
 users mailing list
 users@xwiki.org
 http://lists.xwiki.org/mailman/listinfo/users

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] How to navigate user pages as tree structure from main page?

2009-04-11 Thread Niels Mayer
sorry, i spaz'd and accidentally sent the previous message before I finished
composing or spellchecking... here's what I intended to send. (oops)

On Thu, Apr 9, 2009 at 12:28 AM, Manfred manonin...@gmail.com wrote:

 Yes the hierarchical design used by Curriki would work for me, the layout
 is fine, but the implementation is a bit disconcerting, so if there is a way
 to work round the negative UI issues...

 The aspects that I find are disconcerting and would be disorienting or
 frustrating for users with the example Curriki page is:

 1. The noticeable lag between clicking on a tree link and the next level
 opening. My internet connection isnt *that* slow and I'd guess even at
 intranet speeds it would still be noticeable. Taking a guess maybe the page
 needs to have the tree/toc preloaded/cached to avoid this lag or some other
 approach, but the pregnant pause waiting for the toc/tree part of the screen
 to redraw is somewhat disconcerting.

 2. Also the links themselves - one appears to need to click on a very
 specific location to get the link to open to the next level (and you know as
 well as I do that some users have trouble controlling their mice) - i.e. the
 little arrow, but if one clicks on the folder icon it also opens albeit
 slower, but if one goes a little bit further then one sees a popup tooltip
 obscuring the text and when one clicks on the text it goes to that linked
 page. Really its not immediately clear to a user what to click on to get the
 tree to open - if it works like Windoze (file) explorer then its probably an
 approach familiar to most GUI users. If you intend to implement tooltips IMO
 definitely include an option to disable them because power/frequent wiki
 users will get irritated by them quickly.


I wonder if the lag in you're seeing in Curriki is caused by the tooltips.
The curriki tooltip implementation walks the entire DOM for a given document
in order to find items that require tooltips. This becomes a problem with
long documents, or documents that contain lots of HTML but hide much of it
via Javascript. The issue is that tooltips are computed for the entire
document only after the entire document is loaded into the browser. This
pretty much wrecks the incremental page display that distinguished modern
browsers from early implementations like netscape. The lack of incremental
display puts an outrageous strain on a Curriki user's browser and makes page
display exceptionally slow: (1) tooltips and tooltip text are generated for
parts of a document that are not visible via javascript (e.g. hide/show,
collapse/expand/etc); (2) tooltips and tooltip text are generated for the
entire document at load-time, even if the majority of the document is
scrolled off screen; (3) even if a user never uses tooltips, the actual
text/html content of all the tooktips for a given document are loaded  into
the browser via javascript invoked by adding $xwiki.addTooltipJS()  to the
end of a document.

Although a significant amount of extra tooltip data is added to the browser
on each curriki page, the slowdown is not caused by transferring the extra
tooltip data to the browser. Rather, it is entirely caused by how slowly the
browser walks the entire DOM of the given document in order to find the
tooltips, as well as the time to dynamically generate the tooltip HTML for
the entire document (in javascript).

It difficult to characterize the O(n) performance degradation on document
length caused by curriki tooltips, as it ultimately depends on the structure
and complexity of the document DOM that must be walked, the size of the
total tooltips added per page, etc. The problem is especially bad if the DOM
is generated from a database query of unscoped length. You won't see the
page until the last of the query is dislayed, even if incremental results
are available right away.

Regarding the breadcrumbs, i think that it introduces more problems than it
solves. The curriki breadcrumbs are perhaps helpful for purely static
documents. For documents containing forms or any amount of nonstatic UI,
there can be issues with the tooltips allowing going back even in cases
where it may be inappropriate. For example, when forms submission brings you
to another document -- for example as you click next proceeding through
a multi-page wizard where each next brings you to a new  document:
 startdoc---(select WizA)-- WizA --(next)--- WizB --(next)--- WizC
--(next)--- ...

Would the breadcrumb for WizC look like startdoc-WizA-WizB-WizC  or
startdoc-WizC ?? In a wizard you may not want to allow the user to go
back via the breadcrumbs, just through the next/prev entries in the
wizard.

Also, why is revamping Xwiki's breadcrumbs being given priority? I can think
of a long list of improvements and bugfixes that would be preferable,
including one that would IMHO help out curriki and many Xwiki users a lot
more than something trivial like breadcrumbs -- streaming attachment
uploading (unllimited size attachments w/o 

Re: [xwiki-users] How to navigate user pages as tree structure from main page?

2009-04-10 Thread Niels Mayer
On Thu, Apr 9, 2009 at 12:28 AM, Manfred manonin...@gmail.com wrote:

 Yes the hierarchical design used by Curriki would work for me, the layout
 is fine, but the implementation is a bit disconcerting, so if there is a way
 to work round the negative UI issues...

 The aspects that I find are disconcerting and would be disorienting or
 frustrating for users with the example Curriki page is:

 1. The noticeable lag between clicking on a tree link and the next level
 opening. My internet connection isnt *that* slow and I'd guess even at
 intranet speeds it would still be noticeable. Taking a guess maybe the page
 needs to have the tree/toc preloaded/cached to avoid this lag or some other
 approach, but the pregnant pause waiting for the toc/tree part of the screen
 to redraw is somewhat disconcerting.

 2. Also the links themselves - one appears to need to click on a very
 specific location to get the link to open to the next level (and you know as
 well as I do that some users have trouble controlling their mice) - i.e. the
 little arrow, but if one clicks on the folder icon it also opens albeit
 slower, but if one goes a little bit further then one sees a popup tooltip
 obscuring the text and when one clicks on the text it goes to that linked
 page. Really its not immediately clear to a user what to click on to get the
 tree to open - if it works like Windoze (file) explorer then its probably an
 approach familiar to most GUI users. If you intend to implement tooltips IMO
 definitely include an option to disable them because power/frequent wiki
 users will get irritated by them quickly.


I wonder if the lag in you're seeing in Curriki is caused by the tooltips.
The curriki tooltip implementation walks the entire DOM for a given document
in order to find items that require tooltips. This becomes a problem with
long documents, or documents that contain lots of HTML but hide much of it
via Javascript. The issue is that tooltips are computed for the entire
document only after the entire document is loaded into the browser. This
pretty much wrecks the incremental page display that distinguished modern
browsers from early implementations like netscape. The lack of incremental
display puts an outrageous strain on a Curriki user's browser and makes page
display exceptionally slow: (1) tooltips and tooltip text are generated for
parts of a document that are not visible via javascript (e.g. hide/show,
collapse/expand/etc); (2) tooltips and tooltip text are generated for the
entire document at load-time, even if the majority of the document is
scrolled off screen; (3) even if a user never uses tooltips, the actual
text/html content of all the tooktips for a given document are loaded  into
the browser via javascript invoked by adding $xwiki.addTooltipJS()  to the
end of a document.

ALthough a significant amount of extra tooltip data is added to the browser
on each curriki page, the slowdown is not caused by transferring the extra
tooltip data to the browser. Rather, it is entirly caused by how slowly the
browser walks the entire DOM of the given document in order to find the
tooltips, as well as the time to dynamicaly generate the tooltip HTML for
the entire document.

It difficult to characterize the O(n) performance degradation on document
length caused by curriki tooltips, as it ultimately depends on the structure
and complexity of the document DOM that must be walked, the size of the
total tooltips added per page. The problem is especially bad if the DOM is
generated from a database query of unscoped length. You won't see the page
until the last of the query is dislayed, even if incremental results are
available right away.

Regarding the breadcrumbs, i think that it introduces more problems than it
solves. The curriki breadcrumbs are perhaps helpful for purely static
documents. FOr documents containining forms or any amount of nonstatic UI,
there can be issues with the tooltips allowing going back even in cases
where it may be inappropriate. For example, when forms submission brings you
to another document -- for example as you click next proceeding through
a multi-page wizard where each next brings you to a new
document:
 startdoc---(select WizA)-- WizA --(next)--- WizB --(next)--- WizC
--(next)--- ... would the breadcrumb for WizC look like
startdoc-WizA-WizB-WizC  or startdoc-WizC ??
And
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


[xwiki-users] requesting consistent application of XWIKI-2149 for feed URLs: ?xpage=rdf - ?xpage=plain

2009-04-02 Thread Niels Mayer
A few weeks ago, Marius Dumitru
Floreahttp://jira.xwiki.org/jira/secure/ViewProfile.jspa?name=mfloreaposted
this helpful hint in response to my question
http://n2.nabble.com/support-for-google-sitemaps-and-webmaster-tools--%28and-why-do-xwiki-RDF%27s-give-%22unsupported-file-format%22-%29-tp2468754p2489940.htmlsuggesting
I look at
http://jira.xwiki.org/jira/browse/XWIKI-2149?focusedCommentId=25334page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#action_25334and
http://svn.xwiki.org/svnroot/xwiki/platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/plugin/feed/FeedPluginApi.java

FYI, it turns out this issue is also the source of bugs that might occur in
a few places in the 1.8 final XAR, including the search-document's
search-feed URL, for example:

http://jira.xwiki.org/jira/browse/XE-400

The following issue has been reopened. *Author:* Niels Mayer,
 http://nielsmayer.comhttp://jira.xwiki.org/jira/secure/ViewProfile.jspa?name=nielsmayer
 *Date:* 02/Apr/09 18:50
 *Comment:*
 I have updated all my sites to 1.8 final and the problem persists. This
 lists exactly what has been updated in the 1.8 final XAR:
 http://morgellonswiki.info/xwiki/bin/view/XWiki/Import

 For example, in
 http://morgellonswiki.info/xwiki/bin/view/Main/WebSearch?text=lymex=0y=0
 note that you go to the URL
 http://morgellonswiki.info/xwiki/bin/view/Main/WebSearchRss?xpage=rdftext=lyme
 when you click the URL button.

 In my browser (firefox 3.0.8) that link displays as an XML file.

 By doing
 http://morgellonswiki.info/xwiki/bin/view/Main/WebSearchRss?xpage=plaintext=lyme

 It displays correctly as other feeds do. In addition to my browser, other
 sites also get errors from using the xpage=rdf form of the feed URL.

 I believe the issue here, and it doesn't just occur in this one place, but
 occurs in numerous places across Xwiki, is that the format for feed URL's
 has changed. Yet many of the documents in the 1.8 Xar still have not been
 converted to the new feed format:


 http://xwiki.markmail.org/message/54t4i2qt6cnnod7l?q=%5Bxwiki-devs%5D+%5BProposal%5D+new+%22/plain/

 Yesterday I've applied Marius's
XWIKI-2149http://jira.xwiki.org/jira/browse/XWIKI-2149patch Extend
the FeedPlugin to allow the creation of RSS/Atom feeds from
any source. New RSS urls with this revamped mechanism are of the type
/xwiki/bin/view/Space/DocRss?xpage=plain (while the current way is
/xwiki/bin/view/Space/DocRss?xpage=rdf). I propose we add an action that
return the plain.vm velocity template as entry point to render the
document, and map a new /feed/ action to it. This would allow us for
example to have a blog feed URL like this : /xwiki/bin/feed/Main/BlogRss
when the blog will actually use this new mechanism for its feed. I would
also like to map an action with a more generic name to it, like /plain/.
xpage=plain is for example used when we create pseudo-REST web services
(for example, all the AJAX/gridview features in XE do use URLs of that
type). I believe it would be nice to have in the service request URL only
parameters linked to the actual service. Thus I would propose we have
something like /xwiki/bin/plain/XWiki/MyService?myparam1=myvalue...

.
Unlike search, the tags document displays an rdf style feed which does
display correctly in Firefox:
http://morgellonswiki.info/xwiki/bin/view/Main/Tags?action=viewTagtag=Lyme
displays RSS Feed link
http://morgellonswiki.info/xwiki/bin/view/Main/TagsRss?xpage=rdftag=Lyme
  [ Show » http://jira.xwiki.org/jira/browse/XE-400 ]
 Niels Mayer, 
http://nielsmayer.comhttp://jira.xwiki.org/jira/secure/ViewProfile.jspa?name=nielsmayeradded
a comment - 02/Apr/09
19:07 Unlike search, the tags document displays an rdf style feed which
does display correctly in Firefox:
http://morgellonswiki.info/xwiki/bin/view/Main/Tags?action=viewTagtag=Lymedisplays
RSS Feed link
http://morgellonswiki.info/xwiki/bin/view/Main/TagsRss?xpage=rdftag=Lyme


Niels
http://nielsmayer.com
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


[xwiki-users] Consider for GSOC idea: import administration enhancement/feature request ??

2009-04-02 Thread Niels Mayer
Not for me... but for some enterprising GSOC applicant: Seems like this
could be a good and achievable closed-end project that doesn't involve
complicated multi-system integration (and multi-points of failure), just
some new xwiki code based on examples already written. Code that IMHO would
be very useful:

On Mon, Mar 16, 2009 at 3:02 PM, Niels Mayer nielsma...@gmail.com wrote:

 In addition to selecting a xar and allowing a user to check to allow the
 xar's content to blindly overwrite the previous entry;  add a third option
 merge.

 When merge is selected, for that selected document, the diffs between the
 uploaded-xar and the current db are presented in a mergediff-in-browser
 style, allowing selection of  original content from the db versus xar.
 clicking ok then collapses the diff and remembers the choices taken.

 When the user has either selected the xar files they want to import
 directly, or used the mergediff tool above to select the contents of the new
 file, they click import and it's done. Note that the mergediff files,
 create a new version, unlike the overwrite done by the current selected
 checkboxes in the import tool.

 Niels
 http://nielsmayer.com


___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Programming rights in virtual wiki

2009-03-28 Thread Niels Mayer
On Fri, Mar 27, 2009 at 5:07 PM, hel-o h...@hel.at wrote:

 don't know if thats another use case but at the moment i cant copy pages in
 the virtual wiki. It works in the main wiki and i tried in the virtual wiki
 with the global user and the local user. When i copy a page sucess message
 appears, but when i click the link for the new page, the page does not
 exist.


http://jira.xwiki.org/jira/browse/XE-374
Actions-Copy of document doesn't work, but claims successNiels
http://nielsmayer.com
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] FYI -- a timeline display of all podcast feeds from KCRW

2009-03-27 Thread Niels Mayer
In a similar vein, Timeline views of Twitter, Youtube, Google News, and
Wikipedia Changes...
http://morgellonswiki.info/xwiki/bin/view/Timeline/FeedsOfInterest

code:
http://morgellonswiki.info/xwiki/bin/view/Timeline/FeedsOfInterest?raw=1
http://morgellonswiki.info/xwiki/bin/view/Timeline/Feed2TL?raw=1

Niels
http://nielsmayer.com

2009/3/25 Niels Mayer nielsma...@gmail.com

 FYI: http://nielsmayer.com/xwiki/bin/view/Timeline/KcrwTimeline (displays
 all podcasts from http://kcrw.org )
 code:
 http://nielsmayer.com/xwiki/bin/view/Timeline/KcrwTimeline?viewer=code

 http://nielsmayer.com/xwiki/bin/view/Timeline/Feeds2TL?viewer=code

 Niels
 http://nielsmayer.com


___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


[xwiki-users] FYI -- a timeline display of all podcast feeds from KCRW

2009-03-25 Thread Niels Mayer
FYI: http://nielsmayer.com/xwiki/bin/view/Timeline/KcrwTimeline (displays
all podcasts from http://kcrw.org )
code: http://nielsmayer.com/xwiki/bin/view/Timeline/KcrwTimeline?viewer=code
 http://nielsmayer.com/xwiki/bin/view/Timeline/Feeds2TL?viewer=code

Niels
http://nielsmayer.com
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] panel viewable by unregistered guest?

2009-03-20 Thread Niels Mayer
If you make all spaces (including panels) not viewable by unregistered
users, then the panels won't be viewable by unregistered users.

As 'Admin' go to /xwiki/bin/view/Main/SpaceIndex?space=Panels ; use the
Rights action to make world-viewable the specific panels your unregistered
users will see. You'll see a groups and users radio button. Select
users to edit the unregistered user's rights.

Niels
http://nielsmayer.com



On Fri, Mar 20, 2009 at 11:20 AM, Cristina Williams crist...@isi.eduwrote:

 Hi,

 I'm new to Xwiki and am using an Xwiki Enterprise 1.7.2 with multiple
 spaces. I just migrated this wiki from another organization that was
 using version 1.4.2 (in case that makes a difference in my question).
 Environment: apache centos 5.2/tomcat 6/mysql 5.1 - I searched mailing
 lists, google and xwiki site but found no leads yet.

 The migration went well and now I've added a new public space. The
 wiki as a whole denies all rights except 'Register' for unregistered
 users. But the new space grants 'View' access to unregistered users.

 View access is working fine *except* none of the panels appear for
 unregistered users and I wanted at least one to show by default - the
 one that lists all the pages in the space. how can I let unregistered
 users see this without logging in?

 Thanks,
 Cris
 ___
 users mailing list
 users@xwiki.org
 http://lists.xwiki.org/mailman/listinfo/users

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] A Real tutorial for creating Skins and Template ...

2009-03-18 Thread Niels Mayer
On Wed, Mar 18, 2009 at 3:29 AM, Remi remi.pierr...@conseiltechno.comwrote:

 Thanks for you help, i doesn't know this technique but i do same thing (i
 think) overriding stylesheets by the Xwiki.XWikiSkins class...

 When i say from scratch i heard in darkness with firebug without knowing
 the tree of stylesheets and their roles. I would love to have a map of 
 XWikiskins / toucan / albatross skin , perhaps because i'm not the real
 developper's profile, and because i think it could help me to save lot of
 time!!


I think the difference between my hack suggestion and the one in
http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Skins is that my
approach is simpler, less prone to leaving you with an unreadable site if
you make a mistake, and more immune to changes in the underlying skin as you
upgrade XWiki versions.

The problem with developing from scratch is that you have to develop from
scratch... I prefer standing on the shoulders of giants, and if you take a
look at the CSS involved in xwiki, you need to stand on the shoulders of
giants...
:-) But just like we don't go off creating new organisms from scratch, we
modify existing one's DNA, the same goes for software. It also doesn't help
that there's no formal way of defining, enforcing, or testing the semantics
occurring between DOM/CSS and javascript and velocity... other than poking
at it in different browsers and looking at how it behaves under the
microscope of 'firebug.'

Also, my hack can be done interactively by editing a xwiki document
containing the css data, whereas the correct approach requires editing
XWikiSkins in the class editor, or the installation of a skin either as
files at the apache level (assuming you front your xwiki with httpd), or
into the servlet container itself requiring a relaunch for each iteration of
what is supposed to be rapid prototyping.  My hack enables rapid
prototyping, but is less efficient as it requires all the overhead of an
extra xwiki document (the override css file) getting created or loaded from
the cache for each page.

There's no question that if you're building http://idiva.com or
http://www.bestventes.com then my hack is not the way to go. However, it
might be the way to make incremental changes to the existing CSS before
rolling the changes back into the skin and pushing out a new release.

One question is could the overriding approach suggested by my hack be
integrated directly into Admin-Presentation by having an wiki-specific area
in which CSS overrides reside. From there, some of the more common
customizations (e.g. changing the header-image and dimensions, changing the
background fill/color/pixmap, transparency on/off, etc) could be done in the
web-GUI by a wiki-owner, rather than becoming a sysadmin task.

FYI, here's the approach suggested  in the documentation:

To start, the best is to copy-paste the original content and make a slight
 modification.

 If you want to derive your skin from another skin, you should write the
 name of the skin to derive in the baseskin textfield at the bottom of the
 page.

 It is possible to modify the other templates. To do so you need to edit the
 XWiki.XWikiSkins class using the Class Editor (
 http://yourserver/xwiki/bin/edit/XWiki/XWikiSkins?xpage=editclasshttp://%3cyourserver%3e/xwiki/bin/edit/XWiki/XWikiSkins?xpage=editclass)
 and add a TextArea field that has the name of the template (for instance if
 you want to modify viewheader.vm which takes care of the action bar at the
 top, you need to create a TextArea field named viewheader.vm)

 Once you have make some modifications, you can test your skin by adding the
 skin=Main.MySkinPage at the end of the URL. For example if you are
 creating a skin on yourserver, you can test the skin on the Home Page at
 http://yourserver/xwiki/bin/view/Main/WebHome?skin=Main.MySkinPagehttp://%3cyourserver%3e/xwiki/bin/view/Main/WebHome?skin=Main.MySkinPage

 Finally, when you are really happy with your skin, you can apply the skin
 to the whole wiki or to a space by modifying the skin field in the XWiki
 or Web Preferences. You should also modify the default and alternative
 styles (If you haven't created alternative styles, put 'style.css' in both
 fields)

Niels
http://nielsmayer.com
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] A Real tutorial for creating Skins and Template ...

2009-03-17 Thread Niels Mayer
On Tue, Mar 17, 2009 at 10:49 AM, Remi remi.pierr...@conseiltechno.comwrote:

 It's very very difficult to understand css and vm architecture of  toucan
 skin from scratch..


I don't know if it's worth understanding from scratch.

What about understanding it from firebug, in firefox, on a working xwiki
page. This includes changing the stylesheet live to make it look like you
want it to. Once you've got some things working, figure out how to make your
settings work as !override forms in a standalone CSS file.

Then just go to Administrate Wiki-Presentation, andadd the following to
HTTP Meta Information:

link rel=stylesheet
href=$xwiki.getURL(Macros.MyStyleOverride,view,xpage=plain)
type=text/css /

The above will override for the whole site. To be safe, I suggest trying out
stylesheet override changes on a specific space where you can do experiments
w/o messing up the site for everybody else.  This is done by using
Administrate Space-Presentation-HTTP Meta Information

Once you've decided the location, create a stylesheet as a document called
for example, Macros.MyStyleOverride

 $response.setContentType(text/css)
 {pre}

/* place all overrides to default stylesheet here */
 /* example: .rssfeed
 {border:0px!important;padding:0px!important;width:100%!important;} */
 {/pre}

(suggest starting out with an empty Macros.MyStyleOverride then adding new
styles individually, and shift-reloading to force all the stylesheets to
reload on each test).

Of course I haven't tried the above yet, other than for a different example
that uses the same technique/hack but locally rather than globally... but I
plan to do this some more soon.
.

Date: Mon, 16 Mar 2009 18:04:07 -0700
Subject: generalizing Radeox RSS:FEED macro in Xwiki
From: Niels Mayer nielsma...@gmail.com
To: XWiki Users users@xwiki.org

(1) Create a stylesheet
http://nielsmayer.com/xwiki/bin/view/Macros/styledRSS?xpage=plain
Which is a document
http://nielsmayer.com/xwiki/bin/view/Macros/styledRSS?viewer=code with
following wikicode:

 $response.setContentType(text/css)
 {pre}
 .rssfeed {border:0px!important;padding:0px!important;width:100%!important;}
 {/pre}


(2) Refer to that stylesheet wherever you want/need the RSS:FEED macro to
appear sized to the container displaying it, e.g. to make a Panel display
feed contents:

link rel=stylesheet
 href=$xwiki.getURL(Macros.styledRSS,view,xpage=plain)
 type=text/css /
 #panelheader('Twitter Lyme')
 {rss:feed=
 http://search.twitter.com/search.atom?q=Lyme+Disease|count=5|img=false|full=false|search=true
 }
 #panelfooter()


The results:
http://morgellonswiki.info/xwiki/bin/view/Panels/Twitter+Lyme
http://morgellonswiki.info/xwiki/bin/view/Panels/Twitter+Morgellons
http://morgellonswiki.info/xwiki/bin/view/Panels/Google+News+Lyme
http://morgellonswiki.info/xwiki/bin/view/Panels/Google+News+Morgellons

(3) You can change the way your feed presents in your XWiki user page, e.g.
http://nielsmayer.com/xwiki/bin/view/XWiki/NielsMayer
is done by placing the following in the Description field of the User
document:

link rel=stylesheet
 href=$xwiki.getURL(Macros.styledRSS,view,xpage=plain)
 type=text/css /
 {rss:feed=
 http://nielsmayer.com/roller/NielsMayer/feed/entries/rss|count=50|img=true|full=false|search=true
 }


(4) Using the same stylesheet hack along with documented information on the
radeox RSS macro ( http://code.xwiki.org/xwiki/bin/view/Macros/RssMacro )
one can assemble numerous feeds in one page, fully expanded, with space for
images, etc: http://morgellonswiki.info/xwiki/bin/view/Main/FeedsOfInterest

.

Niels
http://nielsmayer.com
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


[xwiki-users] import administration enhancement/feature request

2009-03-16 Thread Niels Mayer
In addition to selecting a xar and allowing a user to check to allow the
xar's content to blindly overwrite the previous entry;  add a third option
merge.

When merge is selected, for that selected document, the diffs between the
uploaded-xar and the current db are presented in a mergediff-in-browser
style, allowing selection of  original content from the db versus xar.
clicking ok then collapses the diff and remembers the choices taken.

When the user has either selected the xar files they want to import
directly, or used the mergediff tool above to select the contents of the new
file, they click import and it's done. Note that the mergediff files,
create a new version, unlike the overwrite done by the current selected
checkboxes in the import tool.

Niels
http://nielsmayer.com
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] [xwiki-devs] support for google sitemaps and webmaster tools? (and why do xwiki RDF's give unsupported file format?)

2009-03-16 Thread Niels Mayer
Partially answering my own question... there is some support for Sitemaps in
XWiki
http://code.xwiki.org/xwiki/bin/view/Snippets/XmlSitemapGeneratorSnippet

The above might not even be necessary since google builds sitemaps out of
RSS fedds as well. However, they are not working with XWiki's RSS, only with
another application's Atom format feed.

I have three working XWiki feeds per my firefox browser:
http://nielsmayer.com/xwiki/bin/view/Blog/GlobalBlogRss?xpage=plain
http://nielsmayer.com/xwiki/bin/view/Main/TagsRss?xpage=plain
http://nielsmayer.com/xwiki/bin/view/Main/WebRss?xpage=plain

Yet when given to Google Webmaster
toolshttps://www.google.com/webmasters/tools/docs/en/about.html,
these feeds turn up errors, even though I corrected the encoding of the
files to UTF8 (see prev message):

roller/NielsMayer/feed/entries/atom
 Atom Feed Mar 14, 2009 OK 32
 xwiki/bin/view/Blog/GlobalBlogRss?xpage=plain
 -- 16 hours ago Errors --
 xwiki/bin/view/Main/TagsRss?xpage=plain
 -- Mar 14, 2009 Errors --
 xwiki/bin/view/Main/WebRss?xpage=plain
 -- 12 hours ago Errors --


The specific error continues to be:

 - *Unsupported file format*
 Your Sitemap does not appear to be in a supported format. Please ensure it
 meets our Sitemap guidelines and resubmit. 
 Helphttp://www.google.com/support/webmasters/bin/answer.py?answer=35738hl=en
  [image:
 Help]


Any further suggestions??

Is there a way to get XWiki to output 'atom' instead of 'RSS'? Perhaps
google will accept atom-based feeds but not RSS? The docs indicate it
handles RSS feeds.

Niels
http://nielsmayer.com
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


[xwiki-users] support for google sitemaps and webmaster tools? (and why do xwiki RDF's give unsupported file format?)

2009-03-12 Thread Niels Mayer
Has anybody figured out a way to get xwiki to generate a Google sitemap as
an alternative to RSS feeds? (see
http://www.google.com/webmasters/tools/docs/en/protocol.html ). Also, video
sitemaps (
http://www.google.com/support/webmasters/bin/answer.py?answer=80472cbid=sw9kur0v6z6jsrc=cblev=topic)
would be useful to index xwiki attachments and media on media search
engines ( http://video.google.com/ ). Video sitemaps are predicated on MRSS:

*Using an mRSS feed as a Video Sitemap* back to
tophttp://www.google.com/support/webmasters/bin/answer.py?answer=80472cbid=sw9kur0v6z6jsrc=cblev=topic#Top

Google supports mRSS http://search.yahoo.com/mrss, an RSS module that
supplements the element capabilities of RSS
2.0http://cyber.law.harvard.edu/rss/rss.htmlto allow for more robust
media syndication. If you publish an mRSS feed for
the video content on your site, you can submit the feed's URL as a Sitemap.
For detailed information on creating an mRSS feed, including samples and
best practices, please see the Media RSS
specificationhttp://search.yahoo.com/mrss.
Google also supports RSS 2.0 using enclosures tags for video content and
thumbnail urls.

**Sitemaps seem to use their own protocol:

 *XML Sitemap Format*

 The Sitemap Protocol format consists of XML tags. All data values in a
 Sitemap must be 
 entity-escapedhttps://www.google.com/webmasters/tools/docs/en/protocol.html#escaped.
 The file itself must be UTF-8 encoded.

 A sample Sitemap that contains just one URL and uses all optional tags is
 shown below. The optional tags are in italics.

 ?xml version=1.0 encoding=UTF-8?
 urlset 
 https://www.google.com/webmasters/tools/docs/en/protocol.html#urlsetdef 
 xmlns=http://www.sitemaps.org/schemas/sitemap/0.9;
url 
 https://www.google.com/webmasters/tools/docs/en/protocol.html#urldef
 loc 
 https://www.google.com/webmasters/tools/docs/en/protocol.html#locdefhttp://www.example.com//loc
*lastmod 
 https://www.google.com/webmasters/tools/docs/en/protocol.html#lastmoddef2005-01-01/lastmod
 changefreq 
 https://www.google.com/webmasters/tools/docs/en/protocol.html#changefreqdefmonthly/changefreq
 priority 
 https://www.google.com/webmasters/tools/docs/en/protocol.html#prioritydef0.8/priority*
/url
 /urlset

 The Sitemap must:

- Begin with an opening urlset tag and end with a closing /urlsettag.
- Include a url entry for each URL as a parent XML tag.
- Include a loc child entry for each url parent tag.


Niels
http://nielsmayer.com

PS: google sitemap support sounds like a good entry-level GSOC project. :-)
Probably just a big hack to existing code in Main.WebRss?xpage=rdf and
Main.BlogRss?xpage=rdf. Probably a 1 day project for someone that knows
how

PPS: why does http://nielsmayer.com/xwiki/bin/view/Main/WebRss?xpage=rdfwork
in many places, display correctly in firefox 3, but when used to
generate a sitemap in google webmaster tools, it fails. (Meanwhile roller
blogger's RSS feed succeeds):

roller/NielsMayer/feed/entries/atom
Atom Feed 5 hours ago OK 32  xwiki/bin/view/Main/BlogRss?xpage=rdf
-- 5 hours ago Errors --  xwiki/bin/view/Main/WebRss?xpage=rdf
-- 5 hours ago Errors

The reported problem coming from xwiki's xpage=rdf feeds:

*Unsupported file format*
 Your Sitemap does not appear to be in a supported format. Please ensure it
 meets our Sitemap guidelines and resubmit. 
 Helphttp://www.google.com/support/webmasters/bin/answer.py?answer=35738hl=en
  [image:
 Help]

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] X11 needed on the server?

2009-03-11 Thread Niels Mayer
On Wed, Mar 11, 2009 at 7:03 AM, Paul Libbrecht p...@activemath.org wrote:

 we are fighting with a spurious error occurring in our system:
 ...

 where basically it seems that an X11 connection is wished even though
 there's none (on a SuSE linux with a Sun Java).
 What is the normal way in Java (and on my tomcat) to avoid X11
 connections and still get some image services (such as getWidth) ??


You'll note in
http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Performances#Memory
(and also my response in
http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Performances#comments )
the need for an additional flag for the JVM on Un*x/Linux systems

-Djava.awt.headless=true
(e.g. /usr/java/default/bin/java -server -Xms160m -Xmx1024m
-XX:PermSize=160m -XX:MaxPermSize=320m -Djava.awt.headless=true
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
-Djava.util.logging.config.file=...)

Add this flag, and some of the Java imaging routines stop needlessly
requesting an X server.
But on second though, this may not be so needless ...

This very well could be the source of numerous scaling bugs with images and
in the document converter and PDF/RTF export. The whole reason why imaging
routines would be asking for the X server in the first place is to get the
DPI of the display. On linux systems, that information is either defaulted,
or explicitly and correctly set based on the actual display and monitor size
you are using. I believe the -Djava.awt.headless=true setting allows these
imaging routines to work but with a wrong-default DPI for the display
they expect to display to.

To solve, additional env-variables or properties need to be passed-in with a
correct default DPI, such as 100x100. Or even better, do-it-right and figure
out a way to get the web-browser to report the actual DPI of the user's
system that will ultimately be displaying the image.

For more info on potentially related scaling issues, see:
http://jira.xwiki.org/jira/browse/XWIKI-2556
http://jira.xwiki.org/jira/browse/XWIKI-3216?focusedCommentId=37483page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#action_37483
http://jira.xwiki.org/jira/browse/XWIKI-3216?focusedCommentId=37513page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#action_37513
http://jira.xwiki.org/jira/browse/XWIKI-3216?focusedCommentId=37538page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#action_37538

Niels
http://nielsmayer.com
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] X11 needed on the server?

2009-03-11 Thread Niels Mayer
FYI, for more on image scaling issues associated with Linux headless
operation of Sun Java, as related specifically to the xwiki openoffice
converter, see:

http://jira.xwiki.org/jira/browse/XWIKI-3216?focusedCommentId=37483page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#action_37483

 Niels Mayer, 
 http://nielsmayer.comhttp://jira.xwiki.org/jira/secure/ViewProfile.jspa?name=nielsmayeradded
  a comment - 18/Feb/09
 00:09

You might want to check on some missing environment variables or missed
setup options.

I believe OpenOffice is thinking at the wrong DPI ... since it doesn't
actually have a display from which to get a real DPI measurement.

Google says others have had these sorts of problems:
http://www.mail-archive.com/debian-openoff...@lists.debian.org/msg07491.html
And this
http://www.hippocms.org/display/CMS/How+to+configure+the+File+Import+Servicesuggests
option rescaleBitmaps may be needed for correct handling of
resolution independence.

Since we can't really know the end-resolution for importing an office
document, it's more reasonable to set it at a standard value for today's
display's, e.g. 100DPI. ... What is basically needed is to synthesize the
following X server setting normally in ~/.Xresources because this is
probably where OOo gets it's DPI value: Xft.dpi: 100

If I am correct with my conjecture, the following explains in more detail (
http://www.hippocms.org/display/CMS/How+to+configure+the+File+Import+Service)
..

When you upload a document you can specify three additional parameters by
suffixing them to the URL using standard URL parameter syntax:

   - rescaleBitmaps of type boolean. This parameter defaults to false.

Normally bitmaps are extracted as is. This could lead to bitmaps that are
smaller or larger than they appear in the document. By setting this
parameter to true, the bitmaps will be rescaled to the size specified in the
document using the dots per inch (DPI) specified by dpiForBitmaps.

   - convertWmfsToBitmaps of type boolean. This parameter default to false.

Some files contain images in the Windows Meta Files format. These files
cannot be used as is for web pages. By setting this parameter to true the
Windows Meta Files will be converted to bitmaps. The DPI specified by
dpiForBitmaps is used to determine the size of the bitmap to produce.

   - dpiForBitmaps of type integer. This parameter defaults to 96.

The DPI to use for rescaling bitmaps and converting Windows Meta Files to
bitmaps. This parameter is only applicable if one of the options above is
enabled.

Note that no error will be returned if invalid values are passed for the
parameters. Instead the default values will be used.

  [ Show 
»http://jira.xwiki.org/jira/browse/XWIKI-3216?focusedCommentId=37483page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#action_37483]
 Niels Mayer, 
http://nielsmayer.comhttp://jira.xwiki.org/jira/secure/ViewProfile.jspa?name=nielsmayeradded
a comment - 18/Feb/09
00:09 You might want to check on some missing environment variables or
missed setup options. I believe OpenOffice is thinking at the wrong DPI
... since it doesn't actually have a display from which to get a real DPI
measurement. Google says others have had these sorts of problems:
http://www.mail-archive.com/debian-openoff...@lists.debian.org/msg07491.htmlAnd
this
http://www.hippocms.org/display/CMS/How+to+configure+the+File+Import+Servicesuggests
option rescaleBitmaps may be needed for correct handling of
resolution independence. Since we can't really know the end-resolution for
importing an office document, it's more reasonable to set it at a standard
value for today's display's, e.g. 100DPI. ... What is basically needed is to
synthesize the following X server setting normally in ~/.Xresources
because this is probably where OOo gets it's DPI value: Xft.dpi: 100 If I
am correct with my conjecture, the following explains in more detail (
http://www.hippocms.org/display/CMS/How+to+configure+the+File+Import+Service)
.. When you upload a document you can specify three
additional parameters by suffixing them to the URL using standard URL
parameter syntax:

   - rescaleBitmaps of type boolean. This parameter defaults to false.

Normally bitmaps are extracted as is. This could lead to bitmaps that are
smaller or larger than they appear in the document. By setting this
parameter to true, the bitmaps will be rescaled to the size specified in the
document using the dots per inch (DPI) specified by dpiForBitmaps.

   - convertWmfsToBitmaps of type boolean. This parameter default to false.

Some files contain images in the Windows Meta Files format. These files
cannot be used as is for web pages. By setting this parameter to true the
Windows Meta Files will be converted to bitmaps. The DPI specified by
dpiForBitmaps is used to determine the size of the bitmap to produce.

   - dpiForBitmaps of type integer. This parameter defaults to 96.

The DPI

Re: [xwiki-users] groovy web service

2009-03-11 Thread Niels Mayer
I'm not sure if this is directly related, but it might be. I had some weird
issues with unexpected wikifrobbing (basically acting as if the {pre} wasn't
there) of my json data that happened to contain HTML strings:
   http://nielsmayer.com/xwiki/bin/view/Timeline/YTTL-Mock-JSON?xpage=plain
that required me to do some oddball things in the code to prevent said
wikifrobbing:
   http://nielsmayer.com/xwiki/bin/view/Timeline/YTTL-Mock-JSON?viewer=code

I got sick of messing with JSON and now i just create the objects in
javascript directly, which is the way it needed to be done in the first
place for efficiency-sake.

It's possible something unexpected and similar is happening with your json
data. It might be a good idea to look at the JSON request/response in
firebug and see if your data is as expected.

Niels
http://nielsmayer.com

PS: Rhodopsins http://en.wikipedia.org/wiki/Rhodopsin are cool. :-)

On Wed, Mar 11, 2009 at 8:35 AM, Dan Svoboda dsvob...@structbio.pitt.eduwrote:

 I'm implementing some Ajax to change page content using a web service,
 and I'm stumped.

 Here's the web service code:

 %
   response.setContentType(application/x-json)

   def success = Successful Ajax Web Service call!
 %
 {
  rdoc: %=success%
 }

 Here's the javascript Ajax call:

 !-- AJAX Web Service Call --
script type=text/javascript
   function getRenderedDoc() {
   window.alert(Function Called);
 new Ajax.Request(
 // Here we make the asynchronous call to our previously
 created web service.
 // Note that we are using the XWiki API from velocity to
 compute the exact URL we want to hit.
 // This is possible since the entire page will be evaluated
 by the velocity engine before being sent to
 // the client from which this javascript function will be
 executed.
 // We precise the number of entries we want to retrieve using
 the limit parameter. The second parameter,
 // xpage=plain is mandatory, this force XWiki to render the
 called document with the plain.vm velocity
 // template, thus not returning the whole skin. If we forget
 this parameter, we will not receive a valid JSON
 // and our client will not work.
 /1.8/bin/view/Main/WebService?xpage=plain,
 {
   method: 'get',
   onSuccess: function(transport) {
// first, we evaluate the JSON result to make it
 manipulable as javascript objects
var res = eval( '(' + transport.responseText + ')' );

var rendcontent = res.rdoc;
var rdiv = document.getElementById(div_Space_Rhodopsin);
while( rdiv.childNodes.length = 1 ) {
  rdiv.removeChild( rdiv.firstChild );
}

var pTag = document.createElement(p);
pTag.innerHTML = rendcontent;
rdiv.appendChild(pTag);
}
} );
   }
 /script
 I call the function from an anchor tag: a
 href=javascript:getRenderedDoc()Test Ajax/a

 The alert is displayed, but I'm not seeing any update on my page. All
 of the DOM manipulations have been independently verified with text
 literals outside of the Ajax.Request.

 Thanks.

 Dan Svoboda

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] [xwiki-devs] SMTP authentications

2009-03-10 Thread Niels Mayer
On Tue, Mar 10, 2009 at 2:53 AM, Lilianne E. Blaze 
lilia...@lilianne-blaze.net wrote:

 And before someone says it's open source and I should stop bitching and
 submit a patch - I _did_ submit a patch months ago :/


Is this the patch:
http://www.lilianne-blaze.net/temp_downloads/xwiki-mailsender%20patch%20v3/
Have you submitted it as an enhancement at http://jira.xwiki.org/ adding
your patches as attachment? Does this patch work with 1.8RC2?

IMHO, there's so much going on at Xwiki.org JIRA is the only reasonable way
they can get a handle on all the enhancements, fixes, bugs and figure out a
roadmap to include them in future releases.

Also, I was thinking, until your patch gets integrated, it might be simpler
to let XWiki talk unauthenticated to SMTP bound only to localhost (not
public): Then have sendmail/exim/qmail running locally, listening to inbound
smtp connections. The localhost mail daemon would then relay messages from
localhost to an authenticated external SMTP server (e.g.. gmail) by
customizing the local mail sending daemon to jump through whatever hoops is
needed. e.g. TLS, auth, passwords, etc. That way xwiki can concentrate on
being a wiki, and let the vagaries of connecting to different mail daemons
be a system administration task for whoever is admining the server.

Perhaps that is the logic behind not including more elaborate mail-sending
functionality in XWiki -- it can be handled by an external program
However, I must agree that authenticated email is pretty much the defacto
standard and that XWiki needs to support this directly in the future.

Also, you said:

 registration mails still go via deprecated  XWiki.sendMessage, which is
 using Apache Commons SMTPClient (made  obsolete by JavaMail ages ago) and
 has no support for  username/password  and extra properties.


This seems to contradict Sergiu's statement from a previous mail:

The mailsender plugin uses JavaMail as the internal mail sender. Reading  a
 bit about the SSL/TLS support in it, I found that basically what you  need
 to do is define mail.smtp.starttls.enable=true.


 http://java.sun.com/products/javamail/javadocs/com/sun/mail/smtp
 /package-summary.html
 also lists mail.smtp.ssl.protocols and mail.smtp.ssl.ciphersuites as
 SSL-related properties.

 Also, in order to be able to use secure sockets, the JSSE library must
 be present in the classpath (I think it is with standard JDKs), and the
 host must be able to accept the server's certificate.

 About the configuration part, the mailsender uses the
 javamail_extra_props property in your global XWikiPreferences as a
 standard .properties file (you will need to define it in the
 XWikiPreferences class, as a TextArea property).

 So, basically what you need to do is:

 1. Edit the XWiki.XWikiPreferences class and add a TextArea property
 named javamail_extra_props
 2. Edit the XWiki.XWikiPreferences object and enter in it:
 mail.smtp.starttls.enable=true
 3. Find out what else needs to be done on the JVM side to make TLS work.


So which approach will work best?
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Bug : unable to delete attached files in virtualwikis

2009-03-09 Thread Niels Mayer
Christophe --

Thanks for testing this. Your confirmation suggests I will follow your lead.
Unfortunately, I only noticed the xwiki.cfg options that control this after
i deleted them directly from the database in SQL:

Here are the xwiki.cfg settings I'm using to achieve this:
#-# Whether the document recycle bin feature is activated or not
# xwiki.recyclebin=1
#-# Whether the attachment recycle bin feature is activated or not
storage.attachment.recyclebin=0
#-# Whether the document versioning feature is activated or not
# xwiki.store.versioning=1
#-# Whether the attachment versioning feature is activated or not
xwiki.store.attachment.versioning=0
#-# Whether the attachments should also be rolled back when a document is
reverted.
xwiki.store.rollbackattachmentwithdocuments=0

It appears that  xwiki.cfg setting xwiki.store.attachment.versioning.hint=void
is redundant with xwiki.store.attachment.versioning=0

Question for all: Is the latter the preferable way of turning off attachment
versionining?

Niels
http://nielsmayer.com

PS: doesn't it make sense to avoid such problems in the future and bypass
the recycle bin for deleted attachments. Alternately, some kind of heuristic
could be employed, as the default, e.g. the recylcle-bin is used to hold
deleted attachments, except when the attachments exceed a certain size, say
1Mb. In that case the user is warned of permanent deletion and can ok it
away.
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] RTF-Export (1.8RC2)

2009-03-09 Thread Niels Mayer
On Mon, Mar 9, 2009 at 1:16 PM, hel-o h...@hel.at wrote:

 since sometime my rtf-Export doesn't work anymore. First i could make an
 export but i couldn't open the document. Now (updated to 1.8RC2) i only get
 the following error. 21:11:38,464 [
 http://xwiki.jbk-net.com/xwiki/bin/export/GettingStarted/WebHome?format=rtf]
 [http-8180-Processor20] ERROR datatypes.LengthBase - getBaseLength called
 without context


I also get a slew of similar messages and also some additional ones, all
related to RTF exports triggered by search engines:

2009-03-09 08:43:02,686 [/xwiki/bin/export/Photos/WebHome?format=rtf]
[TP-Processor26] WARN  fo.FONode - Warning(18/62): fo:table,
table-layout=auto is currently not supported by FOP
2009-03-09 08:43:02,692 [/xwiki/bin/export/Photos/WebHome?format=rtf]
[TP-Processor26] ERROR fo.PropertyList - Ignoring property:
column-width=proportional-column-width(1) (null:18:62:
proportional-column-width() function may only be used when fo:table has
table-layout=fixed.; property:'column-width')
2009-03-09 08:43:02,693 [/xwiki/bin/export/Photos/WebHome?format=rtf]
[TP-Processor26] ERROR fo.PropertyList- Ignoring property:
column-width=proportional-column-width(1) (null:18:62:
proportional-column-width() function may only be used when fo:table has
table-layout=fixed.; property:'column-width')
2009-03-09 08:43:02,693 [/xwiki/bin/export/Photos/WebHome?format=rtf]
[TP-Processor26] ERROR fo.PropertyList - Ignoring property:
column-width=proportional-column-width(1) (null:18:62:
proportional-column-width() function may only be used when fo:table has
table-layout=fixed.; property:'column-width')
2009-03-09 08:43:02,693 [/xwiki/bin/export/Photos/WebHome?format=rtf]
[TP-Processor26] ERROR fo.PropertyList - Ignoring property:
column-width=proportional-column-width(1) (null:18:62:
proportional-column-width() function may only be used when fo:table has
table-layout=fixed.; property:'column-width')
2009-03-09 08:43:05,923 [/xwiki/bin/export/Blog/WebHome?format=rtf]
[TP-Processor9] ERROR datatypes.LengthBase - getBaseLength called without
context
2009-03-09 08:43:05,923 [/xwiki/bin/export/Blog/WebHome?format=rtf]
[TP-Processor9] ERROR datatypes.LengthBase - getBaseLength called without
context
2009-03-09 08:43:05,924 [/xwiki/bin/export/Blog/WebHome?format=rtf]
[TP-Processor9] ERROR datatypes.LengthBase - getBaseLength called without
context
2009-03-09 08:43:05,924 [/xwiki/bin/export/Blog/WebHome?format=rtf]
[TP-Processor9] ERROR datatypes.LengthBase - getBaseLength called without
context
2009-03-09 08:43:05,924 [/xwiki/bin/export/Blog/WebHome?format=rtf]
[TP-Processor9] ERROR datatypes.LengthBase - getBaseLength called without
context
2009-03-09 08:43:05,925 [/xwiki/bin/export/Blog/WebHome?format=rtf]
[TP-Processor9] ERROR datatypes.LengthBase - getBaseLength called without
context
2009-03-09 08:43:05,931 [/xwiki/bin/export/Blog/WebHome?format=rtf]
[TP-Processor9] ERROR datatypes.LengthBase - getBaseLength called without
context
2009-03-09 08:43:05,932 [/xwiki/bin/export/Blog/WebHome?format=rtf]
[TP-Processor9] ERROR datatypes.LengthBase - getBaseLength called without
context

Last time I tried tracking this down, I noticed errors complaining about a
missing directory .fop so I created it:
  drwxrwxr-x  2 tomcat tomcat_users 4096 2009-01-20 13:18 .fop/

And have found it populated with the same file ever since (and a whole
different set of error messages, like the ones seen above):
  /usr/java/.fop:
  total 28
  drwxr-xr-x 34 root   root  4096 2009-03-06 12:41 ../
  -rw-rw-r--  1 tomcat tomcat_users 15893 2009-01-20 16:29 fop-fonts.cache
  drwxrwxr-x  2 tomcat tomcat_users  4096 2009-01-20 13:18 ./

Adding /usr/java/.fop prevented errors like this on exporting PDF's (and
perhaps RTF's too?)

2009-01-20 16:28:44,732 [/xwiki/bin/export/Main/WebHome?format=pdf]
[TP-Processor19] WARN  web.XWikiAction - Uncaught exception: Error number
11015 in 11: Exception while exporting
Wrapped Exception: Error number 12002 in 12: Exception while exporting PDF
Wrapped Exception: /usr/java/.fop/fop-fonts.cache (No such file or
directory)
com.xpn.xwiki.XWikiException: Error number 11015 in 11: Exception while
exporting
Wrapped Exception: Error number 12002 in 12: Exception while exporting PDF
Wrapped Exception: /usr/java/.fop/fop-fonts.cache (No such file or
directory)
at com.xpn.xwiki.web.ExportAction.render(ExportAction.java:64)
at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:216)
at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:115)
at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
at 

Re: [xwiki-users] Stats module configuration

2009-03-08 Thread Niels Mayer
what about logging out and then back in. Or even shift-reloading a page
you've previously visited. Sometimes there's caching issues

(also sometimes there's caching in xwiki too... how do changes like this
propagate through the cache, or is there a way of forcing the xwiki cache to
clear?)

Niels
http://nielsmayer.com
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Need HQL query for date comparison

2009-03-07 Thread Niels Mayer
I had problems with HQL statements containing parentheses used to help
humans see the logic more easily, but not needed by the logic itself. When I
removed the parentheses and changed the equation to take advantage of
built-in operator precedence...  then it worked.

I'm not saying that is the problem or whether it's an issue with date
comparisons like the use of $xwiki.getDate() is in a date subtraction, or
whether it is missing quotes since the velocity substitutions happen at a
different time thant he HQL evaluation

However, since the problem area is similar to what happened when I had extra
parentheses, perhaps try replacing ($xwiki.getDate() -
doc.contentUpdateDate)  15
with $xwiki.getDate()-doc.contentUpdateDate15 ???

For example, the following only worked if I remove all parentheses around
the inequality comparisons:
#set($hqlQuery = , XWikiRCSNodeInfo as ni where doc.id=ni.id.docId and
ni.id.version2=1 and doc.space'XWiki' and doc.space'Main' and
doc.space'Panels' group by doc.space, doc.name order by max(ni.date)
desc)

(output: http://nielsmayer.com/xwiki/bin/view/Timeline/ChangesList?xpage=rdf
code: http://nielsmayer.com/xwiki/bin/view/Timeline/ChangesList?viewer=code
app using: http://nielsmayer.com/xwiki/bin/view/Timeline/TL2 )

Is this parenthesis behavior a bug? Or is there some special escaping needed
for HQL parentheses?

Niels
http://nielsmayer.com



On Fri, Mar 6, 2009 at 8:18 AM, MaryEllen Coleman m...@us.ibm.com wrote:

 Hello! I need an HQL query that does the following:
Last modified date should be less than 15 days from today

 This is what I've tried:
#set($sql = , BaseObject as obj, $proptype as prop where
 obj.className='${ISDclassname}' and obj.id=prop.id.id and
 prop.name='${viewby}' and doc.fullName=obj.name and
 doc.fullName!='${ISDclasstemplate}' and ($xwiki.getDate() -
 doc.contentUpdateDate)  15 order by prop.value)

 But I'm getting an error on the and ($xwiki.getDate() -
 doc.contentUpdateDate)  15 statement.  What should I write instead?

 Mary Ellen Coleman


 ___
 users mailing list
 users@xwiki.org
 http://lists.xwiki.org/mailman/listinfo/users

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Bug : unable to delete attached files in virtual wikis

2009-03-07 Thread Niels Mayer
I had a similar problem, with attachments not being deletable, which also
prevented the document itself from being deleted. Unfortunately, this also
suggested an additional issue arising with attachments. If a user makes
large attachments to their user-document, e.g. XWiki.MyName then even in a
closed wiki that only allows users to edit their own user document, they
can cause a denial of service attack through large attachments. In other
words, even if the wiki is setup so that regular registered XWikiAllGroup
users don't have write access to any directory, just comment-access to
documents; they'll still have write access to their own XWiki.MyName
document created through registration... and that means they'll be able to
add attachments even when you think they couldn't. The Rights
adminstration checkbox Prevent unregistered users from editing pages,
regardless of the page or space rights doesn't prevent attachments from
being added to user's own pages.

Anyways, I ended up solving the blowups and OOM errors by deleting the
attachments directly in the database:

mysql select XWA_ID,XWA_DOC_ID,XWA_FILENAME,XWA_SIZE,XWA_AUTHOR from
xwikiattachment where XWA_AUTHOR='XWiki.JG';

| XWA_ID  | XWA_DOC_ID | XWA_FILENAME | XWA_SIZE | XWA_AUTHOR|
|  1185703559 |  168880978 | foo.pdf  |  9817587 | XWiki.JG  |
|  -352107721 |  168880978 | bar.pdf  | 13049680 | XWiki.JG  |
|  1527849923 |  168880978 | baz.pdf  |  293 | XWiki.JG  |
| -2073884056 |  168880978 | frop.pdf |  5904061 | XWiki.JG  |
|  1039500510 |  168880978 | schlop.pdf   |  4440028 | XWiki.JG  |
|   942569068 |  168880978 | plop.pdf | 14033466 | XWiki.JG  |
|  1363529635 |  168880978 | schnops.pdf  |0 | XWiki.JG  |
| -1054875919 |  168880978 | hops.jpg | 3081 | XWiki.JG  |

8 rows in set (0.00 sec)

mysql delete from xwikiattachment where XWA_AUTHOR='XWiki.JG';
Query OK, 8 rows affected (0.00 sec)

Someone please tell me if this is not the right way to fix such issues...

As afterthought, I realized that setting
xwiki.store.attachment.versioning.hint=void in xwiki.cfg might prevent xwiki
from reading/diffing and attempting to version a large attachment. Doing so
could certainly make it run out of memory, and changing this option might
prevent the bug?:

#-# The attachment versioning storage. Use 'void' to disable attachment
versioning.
# xwiki.store.attachment.versioning.hint=default

Also, perhaps by not sending deleted attachments to the recycle bin, it
won't need to be copied anywhere, and therefore there'll not be any memory
to run out copying a giant attachment through java (assuming that's what
happens on delete).

#-# The attachment recycle bin storage.
# xwiki.store.attachment.recyclebin.hint=default

Niels
http://nielsmayer.com

PS: perhaps the defaults for xwiki.store.attachment.versioning.hint and
xwiki.store.attachment.recyclebin.hint need to be changed?


On Fri, Mar 6, 2009 at 2:37 AM, PERINAUD Christophe 
christophe.perin...@kbl-bank.com wrote:

 Hello (again)

 All is ok in the main wiki but in a virtual wiki i can't delete an attached
 file of a page. After the confirmation message i got :

 A problem occured while trying to service your request. Please contact the
 support if this happens again.

 Detailed information:

Error number 0 in 3: Exception while hibernate execute
 Wrapped Exception: could not get next sequence value
 com.xpn.xwiki.XWikiException: Error number 0 in 3: Exception while
 hibernate execute
 Wrapped Exception: could not get next sequence value
at
 com.xpn.xwiki.store.XWikiHibernateBaseStore.execute(XWikiHibernateBaseStore.java:1052)
at
 com.xpn.xwiki.store.XWikiHibernateBaseStore.executeWrite(XWikiHibernateBaseStore.java:1098)
at
 com.xpn.xwiki.store.hibernate.HibernateAttachmentRecycleBinStore.saveToRecycleBin(HibernateAttachmentRecycleBinStore.java:83)
at
 com.xpn.xwiki.doc.XWikiDocument.deleteAttachment(XWikiDocument.java:2799)
at
 com.xpn.xwiki.doc.XWikiDocument.deleteAttachment(XWikiDocument.java:2782)
at
 com.xpn.xwiki.web.DeleteAttachmentAction.action(DeleteAttachmentAction.java:72)
at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:215)
at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:115)
at
 org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
at
 org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
at
 org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
at
 org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:596)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at
 org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:428)
at
 org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:830)
   

Re: [xwiki-users] SMTP authentications

2009-03-07 Thread Niels Mayer

 fromSergiu Dumitriu ser...@xwiki.com
 reply-toXWiki Developers d...@xwiki.org
 toXWiki Developers d...@xwiki.org
 dateTue, Jan 13, 2009 at 6:49 PM
 subjectRe: [xwiki-devs] Issue with authenticated SMTP servers for Admin
 Email setting in Xwiki

 Niels Mayer wrote:
  If I want to use smtp.gmail.com as my Admin Email preference set in
 
 http://localhost:8080/xwiki/bin/admin/XWiki/XWikiPreferences?editor=globaladminsection=General
 ;
  the editor doesn't have the required fields or capabilities to provide
  authenticated SMTP required by Gmail and numerous other mail providers
 per
  http://mail.google.com/support/bin/answer.py?hl=enanswer=13287../support/bin/answer.py?hl=enanswer=13287::
 
 

 The mailsender plugin uses JavaMail as the internal mail sender. Reading
 a bit about the SSL/TLS support in it, I found that basically what you
 need to do is define mail.smtp.starttls.enable=true.

 http://java.sun.com/products/javamail/javadocs/com/sun/mail/smtp
 /package-summary.html
 also lists mail.smtp.ssl.protocols and mail.smtp.ssl.ciphersuites as
 SSL-related properties.

 Also, in order to be able to use secure sockets, the JSSE library must
 be present in the classpath (I think it is with standard JDKs), and the
 host must be able to accept the server's certificate.

 About the configuration part, the mailsender uses the
 javamail_extra_props property in your global XWikiPreferences as a
 standard .properties file (you will need to define it in the
 XWikiPreferences class, as a TextArea property).

 So, basically what you need to do is:

 1. Edit the XWiki.XWikiPreferences class and add a TextArea property
 named javamail_extra_props
 2. Edit the XWiki.XWikiPreferences object and enter in it:
 mail.smtp.starttls.enable=true
 3. Find out what else needs to be done on the JVM side to make TLS work.

 --
 Sergiu Dumitriu
 http://purl.org/net/sergiu/

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Killer App for xwiki

2009-03-05 Thread Niels Mayer
For a static PPT file, the office importer seems to do reports quite
nicely already:
http://nielsmayer.com/xwiki/bin/view/Sandbox/Spreadsheet

Niels
http://nielsmayer.com



On Thu, Mar 5, 2009 at 4:42 AM, r...@gradsoft.com.ua wrote:


 Just yet another idea, if somemody collect ones:

  I time from time thinking about embedding JasperReports in xwiki to
 receive
 analog of Crystal Reports

 ___
 users mailing list
 users@xwiki.org
 http://lists.xwiki.org/mailman/listinfo/users

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Help with balloon styled tooltips

2009-02-28 Thread Niels Mayer
Take a look at:
http://platform.xwiki.org/xwiki/bin/download/DevGuide/API/xwiki-core-1.8-rc-1-javadoc.zip/com/xpn/xwiki/api/XWiki.html

 java.lang.String
*addTooltiphttp://platform.xwiki.org/xwiki/bin/download/DevGuide/API/xwiki%2Dcore%2D1.8%2Drc%2D1%2Djavadoc.zip/com/xpn/xwiki/api/XWiki.html#addTooltip%28java.lang.String,%20java.lang.String%29
*(java.lang.String html, java.lang.String message)
  Inserts a tooltip using toolTip.js   java.lang.String
*addTooltiphttp://platform.xwiki.org/xwiki/bin/download/DevGuide/API/xwiki%2Dcore%2D1.8%2Drc%2D1%2Djavadoc.zip/com/xpn/xwiki/api/XWiki.html#addTooltip%28java.lang.String,%20java.lang.String,%20java.lang.String%29
*(java.lang.String html, java.lang.String message, java.lang.String params)
  Inserts a tooltip using toolTip.js   java.lang.String *
addTooltipJShttp://platform.xwiki.org/xwiki/bin/download/DevGuide/API/xwiki%2Dcore%2D1.8%2Drc%2D1%2Djavadoc.zip/com/xpn/xwiki/api/XWiki.html#addTooltipJS%28%29
*()
  Inserts the tooltip Javascript
Also, see http://curriki.org for an example of a site using tooltips, e.g.
note the popups over the document names in
http://www.curriki.org/xwiki/bin/view/Search/#o%3As%3Ds%253Aresource%5Ef%3Do%253Aresource%253Do%25253Asubjectparent%25253Ds%2525253AFW_masterFramework.Science%25255Esubject%25253Ds%2525253AFW_masterFramework.Science%25255Ecategory%25253Ds%2525253A%25255Elevel%25253Ds%2525253A%25255Elanguage%25253Ds%2525253A%25255Ereview%25253Ds%2525253A%25255Eictprfx%25253Ds%2525253A%25255Eict%25253Ds%2525253A%25255Especial%25253Ds%2525253A%255Egroup%253Do%25253Asubjectparent%25253Ds%2525253A%25255Esubject%25253Ds%2525253A%25255Elevel%25253Ds%2525253A%25255Elanguage%25253Ds%2525253A%25255Epolicy%25253Ds%2525253A%255Emember%253Do%25253Asubjectparent%25253Ds%2525253A%25255Esubject%25253Ds%2525253A%25255Emember_type%25253Ds%2525253A%25255Ecountry%25253Ds%2525253A%255Eblog%253Do%25253A%255Ecurriki%253Do%25253A%5Ep%3Do%253Aresource%253Do%25253Ac%25253Dn%2525253A0%25255Es%25253Dn%2525253A25%255Egroup%253Do%25253Ac%25253Dn%2525253A0%25255Es%25253Dn%2525253A25%255Emember%253Do%25253Ac%25253Dn%2525253A0%25255Es%25253Dn%2525253A25%255Eblog%253Do%25253Ac%25253Dn%2525253A0%25255Es%25253Dn%2525253A25%255Ecurriki%253Do%25253Ac%25253Dn%2525253A0%25255Es%25253Dn%2525253A25%5Et%3Ds%253Asearch-resource-tab%5Ea%3Do%253Aresource%253Do%25253Aa%25253Db%2525253A1

Warning -- there is a potentially significant performance penalty for adding
tooltips. For one, even if you don't need to display any tooltip text (or
it's from a long document and might never be displayed as it's scrolled off
screen), it's all loaded into the browser.

Niels
http://nielsmayer.com



On Sat, Feb 28, 2009 at 8:29 AM, Dilipkumar Jadhav 
jadhav.dilipku...@gmail.com wrote:

 Hello friends,
 I am here to request help on embedding a balloon styled tooltip in our
 XWiki instance.
 I have had a fair amount of success in embedding various third party
 javascript libraries, however, the ones that depend on jquery do not
 seem to work through XWiki.
 I did go through an article which guides us through creating tooltips
 and custom validations in forms. Our requirement, however, is to have
 a balloon styled tooltip that can hold images, text (generally info)
 about the link that the user is about to visit if s/he were to click
 on it. Our users are having a hard time navigating the pages since
 they move from page to page assuming that the next page that they are
 about to visit is the one where they will find their answers.
 It is also not possible to load the current page with too much info
 about the links that they are about to visit (as this will lead to
 cluttered pages).
 Could someone be kind enough to guide me through embedding a tooltip
 that pops-up when the user hovers the mouse over a link. Or maybe
 there is plugin for it already which i might have missed.
 Thank you for your time and interest friends.
 ___
 users mailing list
 users@xwiki.org
 http://lists.xwiki.org/mailman/listinfo/users

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Problem with a 1.8 RC1 install

2009-02-24 Thread Niels Mayer
Is this a virtual hosted setup?

It's probably getting all it's users/skin etc from the main wiki-db, and
therefore the empty vhost is not listed in the Dashboard, etc. On top of
this, there's the additional surprise of the global users from the main
Wiki shadowing the local users of the local wiki, so perhaps you were able
to login using your global account?  (FYI, I don't think this is a good
feature of virtual-wikis and should be optional, and perhaps off by
default to prevent surprises).

In the case of http://testapplis.xwiki.com/xwiki/bin/view/Main/Dashboard
It shows the following spaces created -- Spaces: Blog Sandbox Main -- but no
WebHome's for them, therefore no documents?

When I registered, it created a document that shows up in AllDocs
http://testapplis.xwiki.com/xwiki/bin/view/XWiki/NielsMayer
And when I created a document, it showed up in
http://testapplis.xwiki.com/xwiki/bin/view/Main/SpaceIndex?space=Sandbox
Therefore I bet it's getting the Sandbox.Webhome from the main wiki.

If there was a pre-existing wiki behind this setup, perhaps you need to note
the installation document which mentions explicitly that you must name any
virtualwiki databases:

div class=warningmessagespan class=messagetypeWarning: /spanIf you
 're running in a multiwiki setup you'll also need to define the property
 ttxwiki.store.migration.databases=all/tt to your ttxwiki.cfg/tt file
 or explicitly name all databases to be migrated as in
 ttxwiki.store.migration.databases=db1,db2,.../tt./divp/You may also
 want to span class=wikilinka
 href=/xwiki/bin/view/Main/Downloadimport the default wiki XAR/a/span
 in order to benefit from improvements listed above.p/div
 class=warningmessagespan class=messagetypeWarning: /spanAlways make
 sure you compare your ttxwiki.cfg/tt file with the newest version  since
 some configuration parameters were added. Of note, you should add tt
 xwiki.store.migration=1/tt so that XWiki will attempt to automatically mig
 rate your current database to the new schema. Make sure you backup your Data
 base before doing anything./divp/


Niels
http://nielsmayer.com



On Tue, Feb 24, 2009 at 4:25 AM, Thomas Eveilleau tho...@xwiki.com wrote:

 Hello,

 Yesterday we tried to install a 1.8 RC1 on a serv to test some new
 features but we had some blocker issues : no users listed in the admin
 page, no groups listed in the admin page, not any document listed in the
 WhatsNew etc.

 We first thought that it was a JS issue, but a :

 #set ($sql = where 1=1)
 #set ($list = $xwiki.searchDocuments($sql))
 {pre}
 $list
 {/pre}

 returned an empty list.

 Here is the description of the install :
 - We used a Debian Lenny 5.0 template (with Tomcat 6.0.18  Java
 1.6.0_12 pre-packaged)
 - We downloaded the .war file on

 http://maven.xwiki.org/releases/com/xpn/xwiki/products/xwiki-enterprise-web/1.8-rc-1/
 - We installed Mysql with the debian package (5.0.51a-24 version)
 - We installed  configured the XE in UTF-8
 - We used the standard hibernate conf (just added UTF-8 conf)
 - We kept the standard xwiki.cfg (+UTF8 elements)
 - We imported the xwiki-enterprise-wiki-1.8-rc-1 xar  (found on XWiki.org)
 - We tested with different mysql-java-connector (current version : 5.0.7)

 The install is available here (if you want to check it)
 http://testapplis.xwiki.com/
 The Whats New page here :
 http://testapplis.xwiki.com/xwiki/bin/view/Main/WhatsNew

 Have you got any idea of the problem ?

 Thanks,
 Thomas
 ___
 users mailing list
 users@xwiki.org
 http://lists.xwiki.org/mailman/listinfo/users

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] organize vote with XWiki

2009-02-22 Thread Niels Mayer
The Polls app does support adding new topics/votes/etc easily, and is a nice
merging of a poll into a wiki-document.

The only annoying thing is that it requires edit privs in the Polls space
where the code exists, or at least in the space holding the the polls. This
is because the Polls space is the default location for the poll documents to
be created.

It would be nice if it was an option to hide the voting record (it displays
who voted for what). It also allows people to change their vote up till the
end of the polling period, which should be an option as well.

If you wanted to poll people without having them registerlogin (or expose
their vote), you'd need to make the  Polls space publicly writable by
using Rights to edit XWikiPreferences specifically for the Polls space,
selecting users option, and selecting edit for Unregistered Users.

A different Space could be used to hold the polls, (which is good, you
wouldn't want unregistered users editing the Polls templates/code/etc),
but I don't believe that space is selected by default in the Polls.WebHome
option-menu for selecting the location for the new poll to reside. This will
need to be documented or edited to hard-code a specific publicly-alterable
space, although this is an admin or poll-taker's issue. If unregistered
users can edit a particular space containing Polls in order to enter a vote,
wouldn't they also be able to edit the polls themselves?

What's the right way of resolving this issue for XWiki apps?

I guess making each public polll-document world editable, rather than
making the entire space world-editable makes the most sense. However, in
that case, a nonregistered user could still manually enter the bin/edit
rather than bin/view URL and edit the poll data. If anybody has suggestions
on the correct way to handle security issues and have a working Polls app,
I'm interested.

The polls app contains the following docs, fyi: Polls.WebHome
Polls.CreatePoll Polls.PollEditSheet Polls.PollMetaClass
Polls.PollOptionClass Polls.PollSheet Polls.PollTemplate Polls.PollViewSheet
Polls.PollVoteClass .

-- Niels
http://nielsmayer.com

On Fri, Feb 20, 2009 at 4:46 AM, Vincent Massol vinc...@massol.net wrote:


 On Feb 20, 2009, at 1:21 PM, pkernevez wrote:

 
  Hi,
 
  We are using XWiki for the  http://jugl.ch JUGL  .
  We want that all users would be able to add new subjects and vote on
  already
  purpose subjects.
  At this time we are using doodles, it works fine for the votes but all
  participants can't add new subject to the list.
  Is there a better way using XWiki and its plugins for our meeting
  organisation ?

 Maybe the poll application would help:
 http://code.xwiki.org/xwiki/bin/view/Applications/PollsApplication

 I don't know if it supports adding new topics on the fly but it
 wouldn't be hard to improve it to do so I think.

 Check at the end of that page there's a link to polldaddy too.
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Tutorial XWiki

2009-02-11 Thread Niels Mayer
On Tue, Feb 10, 2009 at 4:42 PM, Frans Thamura fr...@meruvian.org wrote:

 hi all

 i am seeking free tutorial for newbies to start XWiki, anyone can give
 me recommendation


These might be helpful:

http://www.ante.lv/xwiki/bin/download/Training.XWiki/WebHome/LearnXWiki1.ppt
http://www.ante.lv/xwiki/bin/view/Training.XWiki/

-- Niels
http://nielsmayer.com
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Is there any kind of structured data input plugin

2009-02-11 Thread Niels Mayer
Niels
http://nielsmayer.com



On Wed, Feb 11, 2009 at 4:54 AM, Hernández Cuchí, Francisco Ricardo


 Is there any way to use structured data input and view in XWiki? I've seen
 some pages that have it, but I don't know an easy way to implement it. I has
 to be something simple, like in excel or a shared excel where you can copy
 paste from the office suite.

 I think that normal tables could handle it, but when I copy paste from
 excel the table is no more editable.

 Another option is a table where you can edit rows somehow.


It would be a pretty cool business app to have an wiki-oriented spreadsheet
that can be edited like a wiki, and version-controlled like a wiki. But
you'd probably not want to have to program your spreadsheet with velocity
macros :-)

It would probably be a lot harder to implement than taking an existing
spreadsheet widget in javascript and figuring out how to plug that into
Xwiki, e.g.:
http://www.google.com/ig/directory?url=hosting.gmodules.com/ig/gadgets/file/107522617710775425917/Panorama-Analytics.xml
http://www.google.com/ig/directory?url=www.google.com/ig/modules/table.xml
http://www.google.com/ig/directory?url=www.google.com/ig/modules/simple-table.xml

-- Niels
http://nielsmayer.com
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Database information about xwiki

2009-02-11 Thread Niels Mayer
 On Wed, Feb 11, 2009 at 2:11 AM, Hervé Agnoux 
herve.agn...@diaam-informatique.com wrote:

  See perhaps
 http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Database+Administration
 and the out of date schema at
 http://platform.xwiki.org/xwiki/bin/view/DevGuide/DatabaseSchema


I've found it useful to use http://www.quest.com/toad-for-mysql/ to explore
the database created by Xwiki I use Toad by setting up an SSH tunnel (
\cygwin\bin\ssh.exe -L 3306:localhost:3306  u...@server.com echo '^C to
quit' ; exec cat  /dev/null ) from the windows box running Toad-for-Mysql
to the Linux machine running Tomcat  the Mysql db (which is bound only to
localhost for security reasons).

http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Database+Administrationrecommends
http://www.dbvis.com/products/dbvis/download/install.jsp -- is it worth
setting up and learning this new tool over toad?? How would I use it
remotely via a tunnel (firewalls, security, etc)?

Speaking of databases, does anybody see anything wrong with the
database-surgery I had to perform -- see
http://nielsmayer.com/whatididtopoorsql.txt --  apparently I was allowed to
create documents with embedded '.' or '/' characters which ultimately were
misinterpreted when given as a URL -- thus leaving me with documents I could
neither delete nor rename (let alone access). It is probably a bug to allow
such names to be entered w/o validation.

--Niels
http://nielsmayer.com
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] MIT Simile Widgets (spiffy JS Timeline/Timeplot/Timegrid) for Xwiki?

2009-02-06 Thread Niels Mayer
(1) check to see whether the affected tables and queries in the timeline
example are
actually *in* your database and that the schema hasn't changed (any xwiki
experts feel free to
chime in on whether this is or isn't the problem -- tho I'm pretty sure that
doc.space was in 1.3...).

... and if it's not a db  schema issue ...

(2) It also might be a variant of the problem i found with inappropriate
characters in documents, spaces and subject/titles thereof.
Your error is:

 RCSNode Info as ni where doc.id=ni.id.doc Id and ni.id.version2=1 group by
 doc.space, doc.name order by max(ni.date) 
 desc?http://xgmx.environmentalchange.net/xwiki/bin/edit/select+distinct+doc.web%2C+doc.name%2C+max%28ni.date%29+from+XWikiDocument+as+doc+%2C+XWikiRCSNodeInfo+as+ni+where+doc.id%3Dni.id.docId+and+ni.id.version2%3D1+group+by+doc.space%2C+doc.name+order+by+max%28ni/date%29+desc?parent=Timeline.ChangesListWrapped
  Exception: could not resolve property: space of:
 com.xpn.xwiki.doc.XWikiDocument web, doc.name, max(ni.date) from
 com.xpn.xwiki.doc.XWiki Document as doc , com.xpn.xwiki.doc.rcs.XWiki
 RCSNode Info as ni where doc.id=ni.id.doc Id and ni.id.version2=1 group by
 doc.space, doc.name order by max(ni.date) 
 desc?http://xgmx.environmentalchange.net/xwiki/bin/edit/select+distinct+doc.web%2C+doc.name%2C+max%28ni.date%29+from+com.xpn.xwiki.doc.XWikiDocument+as+doc+%2C+com.xpn.xwiki.doc.rcs.XWikiRCSNodeInfo+as+ni+where+doc.id%3Dni.id.docId+and+ni.id.version2%3D1+group+by+doc.space%2C+doc.name+order+by+max%28ni/date%29+desc?parent=Timeline.ChangesList@
  Timeline.ChangesList
 17,45?http://xgmx.environmentalchange.net/xwiki/bin/edit/Timeline/17%2C45?parent=Timeline.ChangesList

From:

 Error number 4001 in 4: Error while parsing velocity page
 Timeline.ChangesList Wrapped Exception: Invocation of method
 'searchDocuments' in class com.xpn.xwiki.api.XWiki threw exception
 com.xpn.xwiki.XWikiException: Error number 3223 in 3: Exception while
 searching documents with SQL
 http://xgmx.environmentalchange.net/xwiki/bin/view/Timeline/ChangesListweb,
 doc.name, max(ni.date) from XWiki Document as doc , XWiki RCSNode Info as ni
 where doc.id=ni.id.doc Id and ni.id.version2=1 group by doc.space, doc.name
 order by max(ni.date) 
 desc?http://xgmx.environmentalchange.net/xwiki/bin/edit/select+distinct+doc.web%2C+doc.name%2C+max%28ni.date%29+from+XWikiDocument+as+doc+%2C+XWikiRCSNodeInfo+as+ni+where+doc.id%3Dni.id.docId+and+ni.id.version2%3D1+group+by+doc.space%2C+doc.name+order+by+max%28ni/date%29+desc?parent=Timeline.ChangesList


Do any of your spaces (or document names) have inappropriate characters,
like `` ' '' or ``  '

For some reason these don't necessarily get noticed (to the point of
creating problems that pop up backtraces),  until you run the timeline:
http://jira.xwiki.org/jira/browse/XE-376 ( characters entered as document
title must be escaped or a cascade of bugs occur ). Edit/save the offending
document even fixes em -- with lossage of all characters after first '  '

And all it takes is one document with one such character to make the
Timeline blow up. The extra quotes could be in some innocent document made
years ago... but if you accidentally quoted a phrase in a subject
somewhere it triggers the error. Solution: use two single quotes, e.g.
``quoted a phrase'' ...

I'm Stating #2 on remote chance my intuituion on this is correct. I didn't
spend much time looking at your site to find such docs, etc...just got the
error backtrace and noticed the oddness of it.

Niels
http://nielsmayer.com

On Fri, Feb 6, 2009 at 1:41 AM, [Ricardo Rodriguez] Your EPEC Network ICT
Team webmas...@environmentalchange.net wrote:

 Yeap, I did that, restarted Tomcat (just in case!) and saved the page as
 admin.

 Here the error:

 http://xgmx.environmentalchange.net/xwiki/bin/view/Timeline/ChangesList

 Any input will be welcome!


___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] MIT Simile Widgets (spiffy JS Timeline/Timeplot/Timegrid) for Xwiki?

2009-02-05 Thread Niels Mayer
On Thu, Feb 5, 2009 at 3:08 PM, [Ricardo Rodriguez] Your EPEC Network ICT
Team webmas...@environmentalchange.net wrote:

 Please, must I expect that the timeline snippet or the modifications
 proposed by Niels work fine in a 1.3.8295 XWiki Enterprise. Sorry, I now
 that I must update this server...


Did you remember to  do this:
...
script src=http://simile.mit.edu/timeline/api/timeline-api.js;
type=text/javascript/script

At the bottom of the HTTP Meta Information field in *Administration*  *
Presentation*.
..

-- Niels
http://nielsmayer.com
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Admin pages...

2009-01-31 Thread Niels Mayer
One more solution still is to hide the regular Index from any regular
users of the
system, replacing the URL in the panel/navbar with a specific and narrow
index to one or more spaces, e.g. hardcode the following in place of
existing UI access links to Index
$xwiki.getURL(Main.SpaceIndex, view, space=theworkplace)

Alternately, you can create a single page containing multiple indexes (w/
the 3 lines taken from Main.SpaceIndex):

By adding multiple sequences of these three lines in a custom index document
for your organization, you can provide easy access to the specific places
you want.

For each space you want an index presented, use the code below to create
an index of one space (for multiple, change to doc.space='theworkplace' or
doc.space='...' etc)

#set ($sql = where doc.space='theworkplace' order by doc.name asc)
#set ($list = $xwiki.searchDocuments($sql))
#includeInContext(XWiki.Results)

Niels
http://nielsmayer.com

PS: i think it would be useful if each space's  'WebHome' was automatically
created and had the above three lines already preinstalled, with doc.space
set to the current space of the WebHome...


On Sat, Jan 31, 2009 at 1:57 AM, Vincent Massol vinc...@massol.net wrote:

 Hi there,

 On Jan 30, 2009, at 9:43 PM, bretteua wrote:

 
  Is there any way to hide admin type pages from users?  What I mean
  is that
  when I go to an index or search results, not only does all of the user
  created pages/content show up, but so does all of the admin pages
  and pages
  related to the structure of the XWiki platform.  Given that some of
  my XWiki
  users are not savvy programming types, I want to avoid them even
  being able
  to see these pages.  They tend to distract and confuse.
 
  Is there a way to have only end user created content appear in
  searches,
  what's new and index pages?

 There are several ways:

 1) exclude them from the search. We already do that for several pages.
 For example if you go to
 http://localhost:8080/xwiki/bin/edit/XWiki/WebSearchCode
  you'll see this line:
  #set ($excludedWebs = doc.space'XWiki' and doc.space'Admin' and
 doc.space'Panels' and doc.name'WebPreferences' and)

 2) Mark the pages as hidden. This is a new feature we've added in
 1.8M1. We need to mark ourselves those technical pages as hidden in
 the default XE XAR. Especially since there's no UI to do that right
 now. Also note that this is a temporary hack while we work on the new
 model. If you really want to mark a page as hidden you can edit that
 page in wiki mode, type the following 2 lines, hit preview and then
 cancel:

 $doc.document.setHidden(true)
 $doc.save()

 3) However the best solution is to move your hidden pages to the XWiki
 space since that space is a technical space that doesn't appear in
 search results as is show in 1). We normally do that for pages that we
 consider shouldn't appear in search results. Let us know if we missed
 some pages that should be hidden.

 Thanks
 -Vincent
 ___
 users mailing list
 users@xwiki.org
 http://lists.xwiki.org/mailman/listinfo/users

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


[xwiki-users] MIT Simile Widgets (spiffy JS Timeline/Timeplot/Timegrid) for Xwiki?

2009-01-22 Thread Niels Mayer
Has anybody integrated any of MIT's open source Project Simile (
http://code.google.com/p/simile-widgets/ ) JS widgetry into Xwiki? For
example their http://simile.mit.edu/timeline/
http://simile.mit.edu/timeplot/ or http://simile.mit.edu/timegrid/ ??

This has been discussed previously on these lists:
http://markmail.org/message/bds6fein6w4ftqot#query:MIT%20Simile%20Xwiki+page:1+mid:55peh7tm5z2vjoyd+state:results
http://markmail.org/message/bds6fein6w4ftqot#query:MIT%20Simile%20Xwiki+page:1+mid:xu5d32bukkmtdldx+state:results
http://markmail.org/message/bds6fein6w4ftqot#query:MIT%20Simile%20Xwiki+page:1+mid:hefinq3w652jrkiy+state:results
http://markmail.org/message/bds6fein6w4ftqot#query:MIT%20Simile%20Xwiki+page:1+mid:yd4a3nb2mk6e3fdu+state:results
http://markmail.org/message/bds6fein6w4ftqot#query:MIT%20Simile%20Xwiki+page:1+mid:nt5t5e27ccykrnx4+state:results

Unfortunately, all the emails mention example links that no longer exist, so
there's no obvious Xwiki examples providing Simile widgetry in Xwiki ...

FYI, Other environments have integrated some of the MIT functionality:
http://drupal.org/project/timeline
http://drupal.org/project/exhibit
http://simile.mit.edu/wiki/Wibbit

Niels
http://nielsmayer.com
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] how to generate pages.

2009-01-09 Thread Niels Mayer
On Fri, Jan 9, 2009 at 4:27 AM, Robert Munro rrmu...@gmail.com wrote:
What would be the best way to generate pages using xwiki?

One way of generating pages is using velocity, in which case you may find
the following links of interest:
Velocity User 
Guide.pdfhttp://www.weather.gov/ost/SEC/AE/Site_Migration/Velocity%20User%20Guide.pdf(
http://www.weather.gov/ost/SEC/AE/Site_Migration/Velocity%20User%20Guide.pdf)
Jakarta 
Velocity.pdfhttp://henning.schmiedehausen.org/velocity/Jakarta%20Velocity.pdf(
http://henning.schmiedehausen.org/velocity/Jakarta%20Velocity.pdf )
http://mire.environmentalchange.net/~webmaster/images/velocity-subsystem.pnghttp://mire.environmentalchange.net/%7Ewebmaster/images/velocity-subsystem.png--[image:
http://mire.environmentalchange.net/~webmaster/images/velocity-subsystem.png]

Regarding standard headers, footers, etc see examples in various xwiki based
sites. Perhaps use 'view source' to get a browsers-eye overview of the
generated HTML, and also which skin-file defining layoutstyle . On
http://xwiki.org, note, for example:

link href=/xwiki/bin/skin/XWiki/NewOrgSkin/style.css
rel=stylesheet type=text/css /
...
div id=headerglobal class=layoutsection
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Concurrent users

2008-11-10 Thread Niels Mayer
On Mon, Nov 10, 2008 at 4:20 AM, eggenheimer [EMAIL PROTECTED] wrote:

 Yes I guess sessions would probably be the best way to distinguish between
 different computers in this case. I don't know much java or the way xwiki is
 structured - can anyone point me in the right direction?


And now, for something completely different...

For reasons of security/configuration/etc, I typically front Java-based
web-apps with apache, and then redirect to Java via mod_proxy_ajp w/
ProxyPass /xwiki/  ajp://127.0.0.1:8009/xwiki/

Given such a configuration, I would consider looking into an external
apache authentication and access control module that can provide you with
the necessary limitations. One possibility is to use an external login
mechanism in apache which generates a random number ID via cookie; for any
subsequent accesses to the protected access URL, that ID/cookie which must
be present before
redirecting to xwiki via mod_proxy_ajp. This per-user cookie ID would be
cleared if the given user logs out (via associated external login
mechanism), and no other logins would be allowed until the
'latest-login-cookie' was cleared. Only incoming requests presenting the
specific cookie/ID associated with the user will be passed on to
mod_proxy_ajp and in-turn, java and Xwiki.

http://www.frogdot.org/mod_auth_mda/ is a good module to accomplish such
tasks:

-- http://www.frogdot.org/logintools/pab/scheme1.gif


This approach wouldn't care about IP address per-se. The user could start
the transaction on a laptop plugged in to one network, disconnect, and
continue on a different one. On the other hand, if the user walked over to a
different computer, and didn't logout his last session, he couldn't log back
in w/o either going back to his old computer and logging out, or requesting
an administrator override.

Niels
http://nielsmayer.com
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Feedback needed: Blog terminology

2008-11-09 Thread Niels Mayer
On Fri, Nov 7, 2008 at 10:21 AM, Sergiu Dumitriu

 What is the best term:
 1. blog post

*25,500,000* for
*bloghttp://www.google.com/url?q=http://www.answers.com/blogr=67sa=Xoi=dictct=Dcd=1ei=t3UXSfXiGpGYsAOQzu2GCwsig2=Q_fk3U_tHVALpps6Dc2UHwusg=AFQjCNF81GIf8iauSCuK6nt8SfrVGyoeAQ
posthttp://www.google.com/url?q=http://www.answers.com/postr=67sa=Xoi=dictct=Dcd=2ei=t3UXSfXiGpGYsAOQzu2GCwsig2=eUL1Jb-0SwV04dISQDTHUwusg=AFQjCNFrpeBFiZgd6ePOVcrHgj7Gt2KJgA
*.

 2. blog entry


*110,000,000* for
*bloghttp://www.google.com/url?q=http://www.answers.com/blogr=67sa=Xoi=dictct=Dcd=1ei=93UXSaSBG6CSsQO0xPiNCwsig2=rKlOBTuWzqui7zFfA8tERgusg=AFQjCNGBLgC6McpTI4rCyW3S-78VM_H0zw
entryhttp://www.google.com/url?q=http://www.answers.com/entryr=67sa=Xoi=dictct=Dcd=2ei=93UXSaSBG6CSsQO0xPiNCwsig2=3L7IsCNcnNdcaHC_Rm2bgAusg=AFQjCNEPU_b76Tm7sx4e5G0es4up8ExRmg
*.


 3. blog article

*8,540,000* for
*bloghttp://www.google.com/url?q=http://www.answers.com/blogr=67sa=Xoi=dictct=Dcd=1ei=TnYXSa3eFqCSsQO0xPiNCwsig2=MZFVj0FlvTVK17fSU_KlCgusg=AFQjCNEbzNgl_wL4z1CfM0Q7beNjC_QUog
articlehttp://www.google.com/url?q=http://www.answers.com/articler=67sa=Xoi=dictct=Dcd=2ei=TnYXSa3eFqCSsQO0xPiNCwsig2=pnth9KCZ91-5XAH7ywIH3wusg=AFQjCNG2G3DfTibaMn-PqnAYaDYeWqZoWA
*.

Therefore, in the google popular election, please note that blog entry
gets the most votes. This is despite claims by blog article  that blog
entry pals around with linguists and once performed acts of declension.

Niels
http://nielsmayer.com
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Query field in XWiki.WatchListClass object

2008-10-03 Thread Niels Mayer
On Fri, Oct 3, 2008 at 8:22 AM, Arnaud bourree [EMAIL PROTECTED]wrote:

 So, I take a look on objects attached to my page and I see that there is
 third way to subscribe: QUERY.

 But I found nothing about what QUERY should look like!


Is that what this is about --
http://www.xwiki.org/xwiki/bin/view/Main/ReleaseNotesXWikiEnterprise16#H3PlatformImprovements???

More about the language in XWQL design
pagehttp://dev.xwiki.org/xwiki/bin/view/Design/XWikiQueryLanguage.
 The Main syntax and a translator to HQL are implemented. It currently
 requires programming rights to use in scripts. The current XWQL syntax is
 not the final one. We'd like some feedback to improve it. The language will
 fully replace current $xwiki.search methods in XE 1.7. The XWQL language
 is accessible via the Query Manager. Example: 
 $xwiki.xWiki.store.queryManager.createQuery('from
 doc.object(XWiki.XWikiUsers) as user', 'xwql').execute().


-- 
Niels
http://nielsmayer.com
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Visual Editor Chinese garbled! An urgent need expert help to resolve!

2008-07-15 Thread Niels Mayer
If this is similar to an issue i had with the tiny_mce wysiwyg, you might be
able to prevent garbling of links by overriding
convertURL() rather than encodeURI(), e.g.

/*
 * HACK: Tell TinyMCE to leave-alone the URL's ... they are fine as-is.. as
relative links
 * during edit in AssetTemp/xxx, and as permanent links in
$wysi_publishSpace on save
 */
tinyMCE.convertURL = function(url, node, on_save) { return url; };

You also need to make sure to use relative URL's for wikimarkup based images
and links. I had problems with fully qualified URLs when using wikimarkup
for images or links. HTML A or IMG can successfully work w/ fully-qualified
links in the WYSIWYG.

(See http://n2.nabble.com/Video-Macro-not-working---td510273.html#a528186for
details)

On Tue, Jul 15, 2008 at 6:12 PM, xiaoyao1118 [EMAIL PROTECTED]
wrote:


 HI

 We use xwiki process, ie in the browser now can not solve a visual
 (wysiwyg) Editor garbled coding problem firefox under no problems!

 We deployment environment:
 Os: windowsXp
   jdk: 1.5.0_08
   tomcat: 5.5
   xwiki: xwiki-enterprise-web-1.5-SNAPSHOT.war

 Comcat under the webapp deployed to the
 xwiki-enterprise-web-1.5-SNAPSHOT.war
 Generation xwiki-enterprise-web-1.5-SNAPSHOT directory of directories for
 amending xwiki

 Chinese international set of process:
 Light settings:
 http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Encoding
 The reference in the directory xwiki set to amend the corresponding
 documents

 Tomcat restart the use of super-user login
 In General  Language --- default language is set to zh also set to zh -
 Save

 In Wiki Preferences  import  accordingly. Xar documents

 Chinese pages normal

 The editorial page editor of the use of visual (sysiwyg)
  Steps see Annex process.jpg

 Garbled after we revised the link.js in insertLink () of the code


   if (wikiTabElm! = null   wikiTabElm.className == current) (
 var href = document.forms [0]. wiki_page.value;
 var space = document.forms [0]. wiki_space.value;
 var wikitext = document.forms [0]. wiki_text.value;
 var target = document.forms [0]. wiki_target.value;
 tinyMCE.themes [ 'wikieditor']. insertLink (href, target, wikitext,
 space, , dummy, );

 )
 To amend the href encodeURI this can be resolved preview and preservation
 issues garbled

 When you click 'Save and continue to edit' after garbled still exist! Ask
 how to solve the above problem «urgent! Thanks!



-- 
Niels
http://nielsmayer.com
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Import problem

2008-05-19 Thread Niels Mayer
On Sun, May 18, 2008 at 11:46 PM, [EMAIL PROTECTED] wrote:
 I attached a XAR file to upload and when I select the file to import, it
doesn't shows any documents. But when I attached and selected a TODO
application, it shows all documents of TODO. Why it is so? How can I
import my XAR file? Can any one help?

I had similar problems, perhaps. You should check your tomcat logs as to the
nature of this problem, because I'd imagine it's the same sort of uncaught
exception issue I found.

In general, I think the import code needs to be more carefully checked for
exceptions. When they occur, failure shouldn't be silent via uncaught
exception, rather, an error dialog needs to be presented.

(here's my notes on this issue... btw. the solution was to delete the
packages.xml file and force it to rebuild the file before creating the XAR.
It was a maven error (i think) in my case, that caused this. or perhaps it's
a bug that maven was supposed to delete the file first but didn't).

--
PROBLEM   * import the xar files from the preferences

ISSUE after uploading a xar file in
http://./import/XWiki/Import?editor=importspace=XWikihttp://nielsmayer.com/curriki/bin/import/XWiki/Import?editor=importspace=XWiki
 clicking on it does nothing, and prevents further imporing of the XAR file,
issuing the following error:

13:48:52,163 [
http://./bin/import/XWiki/Import?action=getPackageInfosname=wiki.xarxpage=plain_=http://nielsmayer.com/curriki/bin/import/XWiki/Import?action=getPackageInfosname=curriki-wiki.xarxpage=plain_=]
[http-127.0.0.1-8080-Processor2] WARN  web.XWikiAction -
Uncaught exception: Error number 11015 in 11: Exception while importing
Wrapped Exception: Error number 0 in 5: Package: document Demo.WECCooley
does not exist in package definition
com.xpn.xwiki.XWikiException: Error number 11015 in 11: Exception while
importing
Wrapped Exception: Error number 0 in 5: Package: document Demo.WECCooley
does not exist in package definition

In
web/target/war/work/com.xpn.xwiki.platform/xwiki-web-standard/templates/importinline.vm
note a href=javascript:void() title=$msg.get(choosethispackage)
onclick=selectPackage('$attach.filename'); return
false;#packName($attach.filename)/a

The call with the error from the logs action=getPackageInfos is in
/usr/java/curriki/trunk/web/target/war/work/com.xpn.xwiki.platform/xwiki-web-standard/skins/albatross/import.js
function selectPackage(name)
{
var str = input type=\hidden\ name=\name\ value=\ +  name +  \
/;
$('importDocName').innerHTML = str;
var pars = action=getPackageInfosname=+name+xpage=plain;
var myAjax = new Ajax.XWikiRequest( XWiki, Import, {method: 'get',
parameters: pars, onComplete: showPackageInfos} , import);
}

According to http://www.mail-archive.com/[EMAIL PROTECTED]/msg01237.html this
error is related to missing entries like Demo.WECCooley in
wiki/src/main/resources/package.xml ...


___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


[xwiki-users] UI issue with highlighting of horizontal tabs

2008-03-01 Thread Niels Mayer
Just wanted to note a UI annoyance. I'm not sure where this bug actually
belongs otherwise I'd file it...
As in, I'm not sure if it's an underlying UI issue, a skin issue, or
specific to a particular page/class/panel.

I'm running 1.3-rc-1.8082 on tomcat 5.5 (don't ask, i'm slow, it works), x64
fedora 7 w/ latest patches, Sun AMD64 java 1.6...
Viewing on windows in firefox 2.0.0.12 (localhost tunnel'd to linux box via
\cygwin\bin\ssh.exe -L 80:localhost:80 -L 443:localhost:443 -L
3306:localhost:33
06 -L 8080:localhost:8080 [EMAIL PROTECTED] echo '^C to quit' ; exec cat 
/dev/null ).

(0) I blanked the database and loaded the complete XAR associated with
1.3rc1. I'm using the default installed skin,
XWiki.DefaultSkin which has toucan base-skin.

(1) I login as Admin and click Administration --
http://localhost:8080/xwiki/bin/admin/XWiki/XWikiPreferences

(2) The horizontal tabs highlight, as I mouse-over them, and I click as soon
as they highlight, thinking it's a button ... and nothing
happens. It's only when one mouses-over the text that the mouse-sprite
changes to indicate the tab is actually clickable.

Resolution:quick fix for this is to not have the horizontal tab highlight
on mouseover (therefore seeming less like a button).
Instead it should highlight on selection.
Given what the highlighting should signify in this situation -- the
currently selected tab -- the existing behavior of highlighting on mouseover
is probably a bug,

Highlighting on mouseover makes the user think the tab is a button that is
showing it is active. You click anywhere within the area
of that button, expecting it to work. In reality, the only signal of
activity' should be the mouse-sprite changing on mouse-over of the text in
the tab.

-- Niels
http://nielsmayer.com

PS: other tabs, such as the Choose editor vertical tabs at
http://localhost:8080/xwiki/bin/edit/XWiki/DefaultSkin?editor=object
do the right thing it's just the horizontal tabs that exhibit the odd
highlighting behavior.
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users