Is it possible to put an attached file at one page, and from another page link to that file?
Example, we attach the file File.xml to the page Main.Files
And then on the page Main.List we want to include a link to the File.xml file?
Ludovic,
Thanks for your enthusiastic (and quick!) response. It's certainly a
start, though it will only work for XWiki's documentation. That's okay,
if it turns out to be quicker and easier to drive it from the XWiki
database; solving the immediate problem is the most important for the
moment.
But it would be much more generally useful if you could just point a
template at any arbitrary javadoc site, with a CVS or other source link
optional, and at each place where javadoc comments would be displayed by
the standard doclet, insert an HTML element that included the wiki
document, if it existed, or a create link if it didn't. Simple style
options could let the user choose whether to append or overlay the wiki
page on existing comments, or (possibly) even to embed them,
highlighted. In this way, the hand-copying of the original javadoc
comments would be unnecessary, and it might even provide a nice easy
means for the owners of the sources to retrofit the better ones into the
repository.
Whichever way is easier (and/or faster) to do it for Xwiki will be the
best for now; I was just wondering if it would be any harder to craft
the more general solution, and you might get more helpers than for
something that only works for one set of APIs.
BTW, I have this problem often, as do all the males in my family:
because my surname, Thomas, is also a very common first name (probably
more so than as a surname), I'm often referred to by it, or by "Tom".
No offense taken, of course; I have corrected it, and made what I
thought would be a link to my profile page, but the create link appeared
instead. Does xwiki.org not automatically create a profile page for
every user? I followed it to get a permission-denied page, so maybe I
just can't edit it, but my name appears as a normal link in the "Hello"
section. I thought that if a page existed, the create link wouldn't
appear...
brain[sic]
Claudio:
Thanks for that link! Jsourcery also has something similar, but I think
that their approach uses a custom version of javadoc, which is, I think,
where doclets come in. This would only work, again, where you actually
had access to a source archive, and I think they actually generate and
store their pages.
Another interesting facet is the ability to link to other javadoc sites;
XWiki's API javadoc doesn't link classes from externally packages, which
is not a major problem, but a small one. If an undefined reference came
up, the ability to point to its home would be helpful.
It may be that just using Jdocs would be faster, since they already have
a solution; what do you think? It's not really what I'd like to see,
which would be an almost-transparent pasting of user-edited content as
though it were in the original sources. But this is worlds better than
nothing.
Another idea would use the JDOM API, which could be used in a very
robust server-side solution that could do all that I've thought of here
and probably things I've never even dreamed of.
brain[sic]
-----Original Message-----
From: Claudio Miranda [mailto:claudio@claudius.com.br]
Sent: Thursday, March 16, 2006 11:53 AM
To: xwiki-users(a)objectweb.org
Subject: Re: [xwiki-users] IDEA: API Documentation wiki
Probably JDocs, already to the job of make comments on javadocs.
check it out: http://www.jdocs.com
[]s
Claudio
I am quite pumped on XWiki, but the lack of documentation is driving my co-workers bats (I'm already thoroughly nuts, so it doesn't bother me, except when I've got a deadline threatened by not knowing how to do something).
Ludovic and Jérémi and other tireless souls are suffering with development and support, apparently, and can't get the docs updated, even though some better documentation would at least ease the support burden. Certainly, this mailing list is a major benefit, but searching the archives is a daunting task, since one needs not only to formulate a good query but also to search each and every one of a large number of monthly archives separately (from that perspective, probably a better indexer - one that would allow searching the entire archive at once - would be very helpful. Or, perhaps I misunderstand and there's already a better way? Please comment, someone, if that's the case).
However, the idea that popped into my head early on this bright St. Louis Thursday morning was: What are the possibilities of Wikifying the API Javadoc pages? In this way, those of us who gain understanding of a particular part can share our hard-bought wisdom, lightening the load for everyone else.
I have not delved into the uses of doclet technology, but it appears to me that a doclet could format its output as a wiki page could allow the wiki activity to take place as a supplement to the core javadoc output, which remains read-only.
Further, if the javadoc output provides sufficient versioning information, successive versions of a package, class, or interface could continue to use the wiki annotations until someone noted that the new version changed something that was documented. Perhaps a scheme that recorded the version of a page that was current when the edit or comment is made would be all that was needed, so that whatever version of the javadoc was being explored, the versions of the wiki annotations valid for that version would be displayed. Using date information might be simpler, but it would be more useful to be able to tie a document version to a javadoc file version, because annotations made when a later version was current might have been valid with earlier versions, and a simple date scheme would not allow viewers of those versions to benefit from things documented later.
So an XWiki template or templates could be made that would filter the Javadoc output, modifying the external javadoc-generated links to retrieve wiki pages named for the documented entities, and displaying any annotations associated with the specific entities. If Velocity isn't up to the job as-is, then (if I understand correctly) a plugin to its rendering engine could explore the DOM model and inject the wiki annotations appropriately. Another way to do it would be to write Javascript so the browser could do the work, which would probably be simpler and save bandwidth on individual page sends, but lose the benefits of server caching.
The above approach would probably be instead of a doclet, which I think would take the opposite approach and drive the wiki formatting from the javadoc content. This would have the advantage of not needing any plugins or special wiki pages (maybe) and would probably be easier to accomplish but might tend to wrest control of navigation from XWiki in inconvenient ways.
At any rate, the idea of making the wiki annotations independent of the javadoc pages is a major design goal and could permit anyone anywhere to put up a wiki that allowed annotating any javadoc repository, regardless of whether they controlled its content.
I've discussed this far too much for one mail message, especially for one who little understands what he's talking about. If there is interest, should we put up a page on xwiki.org to develop the requirements and design? Or has someone already thought of this and it's already available?
brain[sic]
-----Original Message-----
From: Erwan Arzur [mailto:earzur@gmail.com]
Sent: Thursday, March 16, 2006 3:27 AM
To: xwiki-users(a)objectweb.org
Subject: Re: [xwiki-users] Hs_err_pid XWiki 0.9.840 + tomcat 5.5.9 + vm1.5.0_06
Hey Leonard,
yes i'm taking care of xwiki.com. Yes recently it has been a real PITA, most of the instability problem were due to comment spammers hitting us hard. Since last saturday we are running mod_security on our frontend servers and i do not have to check every hour if one of those assholes took us down again ! what a relief !
(take care with the latest gotroot rules for mod_security, our apache ate all available memory then had to be killed - blacklist.conf is too big, i don't use it anymore)
I'll check the system requirement route, but we don't experience VM crashes very often.
One hint about your particular VM crash. As every thread appears to be locked when it happens, it seems to be garbage collecting related, and i'd investigate tuning the new generation and related stuff. I've got this already on my TODO list and will let you know the outcome.
I posted a note about this on my weblog
(http://www.arzur.net/index.php?English) where i suggest every spammers taken to courts should pay a check to the OSS anti-spam project of his choice. Another way of financing OSS. Most of the good tools in this field are open source anyway. SpamAssassin, SpamBayes, mod_security, gotroot.com ... come to mind.
Erwan
On 3/15/06, Leonard Lin <leonard.lin(a)unic.com> wrote:
> Hi Yoav
>
> Thanks a lot for your hint.
> As far as i have seen the problems stated on the sun-website are
> concerning Old kernels or older glibc
>
> We use
> Kernel: 2.6.9-11.ELsmp
> glibc: 2.3.4
>
> Though the following link seems to me heading into a similiar
> direction:
> http://forum.java.sun.com/thread.jspa?threadID=643360&start=0&tstart=0
>
> regards
>
> -----Original Message-----
> From: Yoav Shapira [mailto:yoavs@computer.org]
> Sent: Mittwoch, 15. März 2006 14:47
> To: xwiki-users(a)objectweb.org
> Subject: Re: [xwiki-users] Hs_err_pid XWiki 0.9.840 + tomcat 5.5.9 +
> vm1.5.0_06
>
> Hola,
> As someone with Tomcat (though not XWiki) experience, 99% of the time
> these SIGSEGV faults result from a problem with the JVM installation
> missing required OS patches. Start at
> http://java.sun.com/j2se/1.5.0/install.html, pick the edition you're
> installing, and click on the Linux Notes link from the resulting page
> for required patch levels for things like glibc. I hope that helps,
>
> Yoav
>
> On 3/15/06, jeremi joslin <jeremi23(a)gmail.com> wrote:
> > On 3/15/06, Leonard Lin <leonard.lin(a)unic.com> wrote:
> > > Hi
> > >
> > > Are you running xwiki.com on a virtualized system such as VMWare?
> > > One of our programmers suggested, that it might have something to
> > > do with VMWare (in our case) because of the SIGSEGV issued,
> > > Pointing to either errornous implementation in javaVM or failing
> > > Hardware.
> >
> > No, xwiki.com is running on 3 real computers under Debian Sarge. For
> > the rest, i don't know.
> >
> > Jeremi
> > --
> > Blog: http://www.jeremi.info
> > LinkedIn: https://www.linkedin.com/profile?viewProfile=&key=1437724
> > Project Manager XWiki: http://www.xwiki.org
> > skype: jeremi23 -- msn et gtalk : jeremi23(a)gmail.com
> >
> >
> > --
> > You receive this message as a subscriber of the
> > xwiki-users(a)objectweb.org mailing list. To unsubscribe:
> > mailto:xwiki-users-unsubscribe@objectweb.org
> > For general help: mailto:sympa@objectweb.org?subject=help
> > ObjectWeb mailing lists service home page:
> > http://www.objectweb.org/wws
> >
> >
> >
>
>
> --
> Yoav Shapira
> Nimalex LLC
> 1 Mifflin Place, Suite 310
> Cambridge, MA, USA
> yoavs(a)computer.org / www.yoavshapira.com
>
>
>
>
>
> --
> You receive this message as a subscriber of the
> xwiki-users(a)objectweb.org mailing list. To unsubscribe:
> mailto:xwiki-users-unsubscribe@objectweb.org
> For general help: mailto:sympa@objectweb.org?subject=help
> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>
>
>
Hi Yoav
Thanks a lot for your hint.
As far as i have seen the problems stated on the sun-website are concerning
Old kernels or older glibc
We use
Kernel: 2.6.9-11.ELsmp
glibc: 2.3.4
Though the following link seems to me heading into a similiar direction:
http://forum.java.sun.com/thread.jspa?threadID=643360&start=0&tstart=0
regards
-----Original Message-----
From: Yoav Shapira [mailto:yoavs@computer.org]
Sent: Mittwoch, 15. März 2006 14:47
To: xwiki-users(a)objectweb.org
Subject: Re: [xwiki-users] Hs_err_pid XWiki 0.9.840 + tomcat 5.5.9 + vm1.5.0_06
Hola,
As someone with Tomcat (though not XWiki) experience, 99% of the time these SIGSEGV faults result from a problem with the JVM installation missing required OS patches. Start at http://java.sun.com/j2se/1.5.0/install.html, pick the edition you're installing, and click on the Linux Notes link from the resulting page for required patch levels for things like glibc. I hope that helps,
Yoav
On 3/15/06, jeremi joslin <jeremi23(a)gmail.com> wrote:
> On 3/15/06, Leonard Lin <leonard.lin(a)unic.com> wrote:
> > Hi
> >
> > Are you running xwiki.com on a virtualized system such as VMWare?
> > One of our programmers suggested, that it might have something to do
> > with VMWare (in our case) because of the SIGSEGV issued, Pointing to
> > either errornous implementation in javaVM or failing Hardware.
>
> No, xwiki.com is running on 3 real computers under Debian Sarge.
> For the rest, i don't know.
>
> Jeremi
> --
> Blog: http://www.jeremi.info
> LinkedIn: https://www.linkedin.com/profile?viewProfile=&key=1437724
> Project Manager XWiki: http://www.xwiki.org
> skype: jeremi23 -- msn et gtalk : jeremi23(a)gmail.com
>
>
> --
> You receive this message as a subscriber of the xwiki-users(a)objectweb.org mailing list.
> To unsubscribe: mailto:xwiki-users-unsubscribe@objectweb.org
> For general help: mailto:sympa@objectweb.org?subject=help
> ObjectWeb mailing lists service home page:
> http://www.objectweb.org/wws
>
>
>
--
Yoav Shapira
Nimalex LLC
1 Mifflin Place, Suite 310
Cambridge, MA, USA
yoavs(a)computer.org / www.yoavshapira.com
Whenever i try to register a new user the following message keeps popping up:
"An error occured during the registration process (-1)."
I can't seem to fix this, but i searched the archive and found that someone had the same thing previously, but there was no fix in the thread.
Anyone can shed some light on this?
Robin,
Thanks for the solution - it is exactly what I need - I was struggling with the object <-> property relationship.
I'd like to encourage one of the XWiki gurus to spent a bit of time on some Javadoc, and object and data models. I'm sure it would make XWiki a lot more attractive to current and prospective users.
Thanks, John
-----Original Message-----
From: Robin Fernandes [mailto:rewbs.soal@gmail.com]
Sent: Thursday, 16 March 2006 11:46 AM
To: xwiki-users(a)objectweb.org
Subject: Re: [xwiki-users] List member login ID and real name by group?
Hi,
Try this:
{table}
group|wikiname|real name
#set($sql = "select obj.name,prop.value from BaseObject obj, StringProperty prop where obj.className='XWiki.XWikiGroups' and obj.name!='XWiki.XWikiGroupTemplate' and prop.name='member' and obj.id=prop.id.id order by obj.name") #foreach ($row in $xwiki.search($sql)) #foreach ($item in $row) ##does anyone know a better way of extracting multiple fields from an sql result?
#if ($velocityCount==1)
#set($group=$item)
#elseif ($velocityCount==2)
#set($member=$item)
#end
#end
#set($memberDoc=$xwiki.getDocument($member))
#if ($member != "") ##ignore blank fields
$group | $member | $!memberDoc.get("first_name") $!memberDoc.get("last_name") #end #end {table}
Should create a table sorted by group with the columns:
group / wiki ID / first_name last_name
I'm sure there are many other (better, less verbose) ways of doing it, but with this method:
. The sql query gets the name of all XWiki.XWikiGroups objects and the value of their 'member' property (note: each XWikiGroups object in fact represents just one member) (also note: the name of the group object corresponds to the name of the document in which that object
lives)
. The value of the member property corresponds to the user's wiki name, which also happens to be the user's document name.
. The user's document contains the user's object. We can therefore use a call to 'get' on the document to get the user's object properties (e.g. first_name and last_name).
The API is quite useful (though it needs some more documentation):
http://build.xpertnet.biz/doc/api/com/xpn/xwiki/api/Api.html
And studying the classes in the XWiki class editor to discover the properties is very helpful too; make sure you use the real property names and not the "pretty names" though.
Hope this helps,
Robin.
On 15/03/06, Turner, John <John.Turner3(a)team.telstra.com> wrote:
> Jérémi,
>
> Thanks for your suggestion.
>
> ## This code shows a list of Users.
> #set($sql = ", BaseObject as obj where obj.name=doc.fullName and
> obj.className='XWiki.XWikiUsers'")
> #foreach ($item in $xwiki.searchDocuments($sql)) #set($itemdoc =
> $xwiki.getDocument($item)) #set($obj =
> $itemdoc.getObject("XWiki.XWikiUsers"))
> * $obj.name: $obj.first_name $obj.last_name #end
>
> The above code gives me a list of Users. How do I get a list that shows Groups, and for each Group the Members that belong to the Group? I don't understand the XWiki object or data model. Once I've got a Group, as per the following code, how do I get a list of Members that belong to the Group?
>
> ## This code shows a list of Groups.
> #set($sql2 = ", BaseObject as obj where obj.name=doc.fullName and
> obj.className='XWiki.XWikiGroups'")
> #foreach ($item in $xwiki.searchDocuments($sql2)) #set($itemdoc =
> $xwiki.getDocument($item))
> * $itemdoc.name
> #end
>
> Thanks, John
>
> -----Original Message-----
> From: jeremi joslin [mailto:jeremi23@gmail.com]
> Sent: Thursday, 16 March 2006 9:26 AM
> To: xwiki-users(a)objectweb.org
> Subject: Re: [xwiki-users] List member login ID and real name by group?
>
> On 3/16/06, Turner, John <John.Turner3(a)team.telstra.com> wrote:
> > Dear All,
> >
> > We use login IDs that are not very meaningful. I'd like to create a
> > page that lists the login ID and real name of each member by group
> > to help with administration. I can see how to get the groups, for example:
> >
> > #set($sqlGrp = ", BaseObject as obj where obj.name=doc.fullName and
> > obj.className='XWiki.XWikiGroups'")
> > #foreach ($item in $xwiki.searchDocuments($sqlGrp)) #set($itemdoc =
> > $xwiki.getDocument($item))
> > Group: $itemdoc.name <br/>
> > #end
> >
> > How do I access the members for a given group?
> >
> > Thanks, John
>
> Hi,
> maybe something like this is what you want :
>
> #set($sqlGrp = ", BaseObject as obj where obj.name=doc.fullName and
> obj.className='XWiki.XWikiUsers'")
> #foreach ($item in $xwiki.searchDocuments($sqlGrp)) #set($itemdoc =
> $xwiki.getDocument($item)) #set($obj =
> $itemdoc.getObject("XWiki.XWikiUsers"))
> user: $obj.fullName $obj.name<br/>
> #end
>
> Jérémi
>
> --
> Blog: http://www.jeremi.info
> LinkedIn: https://www.linkedin.com/profile?viewProfile=&key=1437724
> Project Manager XWiki: http://www.xwiki.org
> skype: jeremi23 -- msn et gtalk : jeremi23(a)gmail.com
>
>
>
>
> --
> You receive this message as a subscriber of the xwiki-users(a)objectweb.org mailing list.
> To unsubscribe: mailto:xwiki-users-unsubscribe@objectweb.org
> For general help: mailto:sympa@objectweb.org?subject=help
> ObjectWeb mailing lists service home page:
> http://www.objectweb.org/wws
>
>
>
Jérémi,
Thanks for your suggestion.
## This code shows a list of Users.
#set($sql = ", BaseObject as obj where obj.name=doc.fullName and obj.className='XWiki.XWikiUsers'")
#foreach ($item in $xwiki.searchDocuments($sql))
#set($itemdoc = $xwiki.getDocument($item))
#set($obj = $itemdoc.getObject("XWiki.XWikiUsers"))
* $obj.name: $obj.first_name $obj.last_name
#end
The above code gives me a list of Users. How do I get a list that shows Groups, and for each Group the Members that belong to the Group? I don't understand the XWiki object or data model. Once I've got a Group, as per the following code, how do I get a list of Members that belong to the Group?
## This code shows a list of Groups.
#set($sql2 = ", BaseObject as obj where obj.name=doc.fullName and obj.className='XWiki.XWikiGroups'")
#foreach ($item in $xwiki.searchDocuments($sql2))
#set($itemdoc = $xwiki.getDocument($item))
* $itemdoc.name
#end
Thanks, John
-----Original Message-----
From: jeremi joslin [mailto:jeremi23@gmail.com]
Sent: Thursday, 16 March 2006 9:26 AM
To: xwiki-users(a)objectweb.org
Subject: Re: [xwiki-users] List member login ID and real name by group?
On 3/16/06, Turner, John <John.Turner3(a)team.telstra.com> wrote:
> Dear All,
>
> We use login IDs that are not very meaningful. I'd like to create a
> page that lists the login ID and real name of each member by group to
> help with administration. I can see how to get the groups, for example:
>
> #set($sqlGrp = ", BaseObject as obj where obj.name=doc.fullName and
> obj.className='XWiki.XWikiGroups'")
> #foreach ($item in $xwiki.searchDocuments($sqlGrp)) #set($itemdoc =
> $xwiki.getDocument($item))
> Group: $itemdoc.name <br/>
> #end
>
> How do I access the members for a given group?
>
> Thanks, John
Hi,
maybe something like this is what you want :
#set($sqlGrp = ", BaseObject as obj where obj.name=doc.fullName and
obj.className='XWiki.XWikiUsers'")
#foreach ($item in $xwiki.searchDocuments($sqlGrp)) #set($itemdoc = $xwiki.getDocument($item)) #set($obj = $itemdoc.getObject("XWiki.XWikiUsers"))
user: $obj.fullName $obj.name<br/>
#end
Jérémi
--
Blog: http://www.jeremi.info
LinkedIn: https://www.linkedin.com/profile?viewProfile=&key=1437724
Project Manager XWiki: http://www.xwiki.org
skype: jeremi23 -- msn et gtalk : jeremi23(a)gmail.com
Dear All,
We use login IDs that are not very meaningful. I'd like to create a
page that lists the login ID and real name of each member by group to
help with administration. I can see how to get the groups, for example:
#set($sqlGrp = ", BaseObject as obj where obj.name=doc.fullName and
obj.className='XWiki.XWikiGroups'")
#foreach ($item in $xwiki.searchDocuments($sqlGrp))
#set($itemdoc = $xwiki.getDocument($item))
Group: $itemdoc.name <br/>
#end
How do I access the members for a given group?
Thanks, John
---
John Turner
NDSD Development (Dialog IT)
Email: John.Turner.2(a)team.telstra.com
Ph: (07) 3887 4574
An enhancement that I made to the default Main.AllDocs page illustrates
how to do what you ask, which is to modify the sorting order of items.
It's done by composing a modification to the SQL string passed to
xwiki.searchDocuments(). There is, to the best of my knowledge, no
documentation on how exactly this string affects the database query
inside the search, but generally it looks like it gets parsed into
clauses that are inserted and/or merged into the default query at
syntactically appropriate places. In your case, a simple "order by"
clause would appear to be all that's needed, and of course if the status
field doesn't sort in the order you want it to appear in, you have to
give them sequence numbers or something similar.
The "order by" field is passed to the doc by a parameter named "ordby",
and the page provides links that invoke it with popular values.
By the way, I do have a project management page that does something very
similar, with a table of projects containing links to plan documents and
status, priority and other fields, plus a link to a status page that
sucks journal entries from the plan docs, displaying the same table but
with internal links to the latest journal entries for that project.
I've been intending to add the ordering feature to it, but since it's in
the bells-and-whistles category from my boss's point of view, I haven't
got to that. Of course, you are probably not doing the
xwiki.searchDocuments (although that's certainly one way of doing it),
but I believe there's a similar facility in the doc.getObjects method.
----------------------------------------------------------
#set ($ordby = $request.getParameter("ordby")) ##
#if (!$ordby)
#set ($ordby = "doc.web, doc.name")
#end
#set ($sql = "$where order by $ordby")
1 All Documents of this Wiki
Order by:
[Document Name>$doc.fullName?ordby=doc.web,doc.name]
[Creator>$doc.fullName?ordby=doc.creator]
[Last Author>$doc.fullName?ordby=doc.author]
[Date>$doc.fullName?ordby=doc.date desc]
#foreach ($item in $xwiki.searchDocuments($sql))
## display each item, keeping track of the status and displaying it
when it's different
#end
------------------------------------------------------------
brain[sic]
-----Original Message-----
From: jjanssen(a)nl.swets.com [mailto:jjanssen@nl.swets.com]
Sent: Tuesday, March 14, 2006 12:14 AM
To: xwiki-users(a)objectweb.org
Subject: [xwiki-users] Sorted object list
Hello,
I've got a generic question. In my wiki I'm using many sorted lists. But
there must be a smarter way of creating these lists then what I'm doing
now. Currently I'm doing the following:
Form 1 used to fill out object of type Project, with several attributes
such as the project name and status. On a overview page I want to order
the projects by name based on their status. This will create something
like:
- active:
- project1
- project4
- closed:
- project2
- project5
- deprecated:
- project3
In which all the projects are links to the pages of the projects,
containing all the project information.
Has anybody any idea of a smart way of doing this. Currently I'm looping
through all project objects for every possible status. This is way too
much overhead.
Thanks,
Joep
Hello,
I've got a generic question. In my wiki I'm using many sorted lists. But there must be a smarter way of creating these lists then what I'm doing now. Currently I'm doing the following:
Form 1 used to fill out object of type Project, with several attributes such as the project name and status. On a overview page I want to order the projects by name based on their status. This will create something like:
- active:
- project1
- project4
- closed:
- project2
- project5
- deprecated:
- project3
In which all the projects are links to the pages of the projects, containing all the project information.
Has anybody any idea of a smart way of doing this. Currently I'm looping through all project objects for every possible status. This is way too much overhead.
Thanks,
Joep
It turns the cause of the problem was on my side. When attachments
were working again I happened to be using IE - and after switching
back to Firefox, it was broken again.
After binary chopping through my Firefox extensions, the culprit was
pretty obvious: the prefetch option in Fasterfox was causing the page
to be saved twice, the second time with no attachments. :)
Regards,
Robin
On 13/03/06, jeremi joslin <jeremi23(a)gmail.com> wrote:
> On 3/14/06, Robin Fernandes <rewbs.soal(a)gmail.com> wrote:
> > Looks like this was a temporary glitch. I re-attached the two images
> > on the openmpt wiki yesterday and they are still there now.
> >
> > Thanks,
> > Robin
> Ok,
> sorry, i was busy i didn't try.
> cool
>
> Jérémi
>
> --
> Blog: http://www.jeremi.info
> LinkedIn: https://www.linkedin.com/profile?viewProfile=&key=1437724
> Project Manager XWiki: http://www.xwiki.org
> skype: jeremi23 -- msn et gtalk : jeremi23(a)gmail.com
>
>
> --
> You receive this message as a subscriber of the xwiki-users(a)objectweb.org mailing list.
> To unsubscribe: mailto:xwiki-users-unsubscribe@objectweb.org
> For general help: mailto:sympa@objectweb.org?subject=help
> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>
>
>
Thanks. I'm still baffled, and this is another solution that requires
programmer access to the wiki, but at this point, some solution is
better than no solution. I've even considered throwing in some
JavaScript code to do it.
It has been suggested by a co-worker that the java.util.Calendar class
has the date arithmetic needed, but I don't know how to instantiate a
class that isn't part of, or returned from a method on, an XWiki object,
and I don't see any that do that.
brain[sic]
-----Original Message-----
From: Mark Robinson [mailto:mark.robinson@hk.tntfreight.com]
Sent: Friday, March 10, 2006 7:01 PM
To: xwiki-users(a)objectweb.org
Subject: Re: [xwiki-users] Dates (was: Long arithmetic...?)
Typical. I missed a brace off the if statement.
Sorry if you just cut and pasted the wrong answer.
Cheers,
Mark.
CORRECTION BELOW
Hi Brian.
I am not sure about with Velocity but you should be able to do this
easily with a Groovy script.
It basically is Java without the braces and type declarations so it is
very powerful. Apologies if I have it wrong below but I have only
started playing with it a few days ago.
Try something like this below in your page.
<%
def today = new Date()
println today
if(testitem < (today - 7))
{
println "This is more than a week old"
}
else
{
println "This is less than a week old"
}
%>
If someone who knows Groovy well can correct that for you it might be a
solution.
Hope it helps.
Cheers,
Mark
On 11 Mar 2006, at 1:19 AM, THOMAS, BRIAN M ((SBCSI)) wrote:
It troubles me that no one has had an answer to this so far.
I tried asking roughly the same question of the velocity-users list and
was told that a new version of Velocity now does arithmetic with
non-integer numbers, but two things make that problematic: first, I
have limited access to the server to install software; second, I can't
believe that no one in all of XWiki's lifetime has ever tried to do any
date calculations, such as the difference of two dates, or
adding/subtracting intervals.
Isn't there an easier way to do this? All I want to do is decide
whether something's a week old.
brain[sic]
-----Original Message-----
From: THOMAS, BRIAN M (SBCSI)
Sent: Friday, March 03, 2006 5:18 PM
To: xwiki-users(a)objectweb.org
Subject: [xwiki-users] Long arithmetic...?
It seems that a Velocity #set directive fails when the RHS involves any
arithmetic operation with long integers.
Specifically, I just wanted to determine the difference between two
dates, thus:
#set ($age = $xwiki.currentDate.time -
$obj.xWikiObject.getDateValue("donedate").time)
I confirmed that I got credible results from both of the operands by
printing them, and I could assign either of them to another variable
name, but setting $age to the result of any arithmetic operation with
any of them always gave "$age" as the formatted result.
This shouldn't be this hard, should it?
brain[sic]
--
You receive this message as a subscriber of the
xwiki-users(a)objectweb.org mailing list.
To unsubscribe: mailto:xwiki-users-unsubscribe@objectweb.org
For general help: mailto:sympa@objectweb.org?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Hi,
I've been working mostly on an individual xwiki installation until
now, and just started playing with the free hosted virtual wiki
service on wiki.com - it's very cool. :)
However, I'm trying to attach some small image files (<20k) to my
wikis, and the attachments disappear shortly after seemingly attaching
correctly. I do not get any error messages or warnings - the
attachments just go away.
Could this be related to the maintenance that occurred this weekend?
Or perhaps is there an attachment restriction on the free wikis?
The wikis are loa.xwiki.com and openmpt.xwiki.com.
Regards,
Robin.
Hi all,
The docstats table doesn't seem to maintain counts for attachments
with v0.9.840.
Is there a way to get attachment download counts?
Regards,
Robin
Is it possible to only allow certain types of files to be attached? Can you
show the user an error when they try to upload a .doc file, but allow .jpg
files?
Thanks,
--Craig
It troubles me that no one has had an answer to this so far.
I tried asking roughly the same question of the velocity-users list and
was told that a new version of Velocity now does arithmetic with
non-integer numbers, but two things make that problematic: first, I
have limited access to the server to install software; second, I can't
believe that no one in all of XWiki's lifetime has ever tried to do any
date calculations, such as the difference of two dates, or
adding/subtracting intervals.
Isn't there an easier way to do this? All I want to do is decide
whether something's a week old.
brain[sic]
-----Original Message-----
From: THOMAS, BRIAN M (SBCSI)
Sent: Friday, March 03, 2006 5:18 PM
To: xwiki-users(a)objectweb.org
Subject: [xwiki-users] Long arithmetic...?
It seems that a Velocity #set directive fails when the RHS involves any
arithmetic operation with long integers.
Specifically, I just wanted to determine the difference between two
dates, thus:
#set ($age = $xwiki.currentDate.time -
$obj.xWikiObject.getDateValue("donedate").time)
I confirmed that I got credible results from both of the operands by
printing them, and I could assign either of them to another variable
name, but setting $age to the result of any arithmetic operation with
any of them always gave "$age" as the formatted result.
This shouldn't be this hard, should it?
brain[sic]
I've attempted to install xwiki faithfully according to the
instructions, but alas it does not work.
Debian
linux 2.6.15
Tomcat 5.0.30-9
Java(TM) 2 Runtime Environment, Standard Edition (build Blackdown-1.4.2-rc1)
Can anyone help interpret these errors?
INFO: Installing web application at context path /xwiki from URL file:/var/lib/tomcat5/webapps/xwiki
Mar 9, 2006 4:02:00 PM org.apache.catalina.core.StandardContext processTlds
SEVERE: Error reading tld listeners javax.servlet.ServletException: Exception processing TLD at resource path /WEB-INF/struts-logic.tld in context /xwiki
javax.servlet.ServletException: Exception processing TLD at resource path /WEB-INF/struts-logic.tld in context /xwiki
at org.apache.catalina.startup.TldConfig.tldScanTld(TldConfig.java:549)
at org.apache.catalina.startup.TldConfig.execute(TldConfig.java:301)
at org.apache.catalina.core.StandardContext.processTlds(StandardContext.java:4412)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4266)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:823)
at org.apache.catalina.core.ContainerBase.access$0(ContainerBase.java:811)
at org.apache.catalina.core.ContainerBase$PrivilegedAddChild.run(ContainerBase.java:143)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:805)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:595)
at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:277)
at org.apache.catalina.core.StandardHost.install(StandardHost.java:832)
at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:625)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:431)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:983)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:349)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1091)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:789)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478)
at org.apache.catalina.core.StandardService.start(StandardService.java:480)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:2313)
at org.apache.catalina.startup.Catalina.start(Catalina.java:556)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:287)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425)
Mar 9, 2006 4:02:00 PM org.apache.commons.digester.Digester endElement
SEVERE: End event threw exception
org.apache.commons.logging.LogConfigurationException: java.lang.NoClassDefFoundError (Caused by java.lang.NoClassDefFoundError)
at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:538)
at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:235)
at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:209)
at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:351)
at org.apache.commons.beanutils.ConvertUtilsBean.<init>(ConvertUtilsBean.java:130)
at org.apache.commons.beanutils.BeanUtilsBean.<init>(BeanUtilsBean.java:110)
at org.apache.commons.beanutils.BeanUtilsBean$1.initialValue(BeanUtilsBean.java:68)
at org.apache.commons.beanutils.ContextClassLoaderLocal.get(ContextClassLoaderLocal.java:80)
at org.apache.commons.beanutils.BeanUtilsBean.getInstance(BeanUtilsBean.java:78)
at org.apache.commons.beanutils.ConvertUtilsBean.getInstance(ConvertUtilsBean.java:115)
at org.apache.commons.beanutils.ConvertUtils.convert(ConvertUtils.java:217)
at org.apache.commons.digester.CallMethodRule.end(CallMethodRule.java:561)
at org.apache.commons.digester.Rule.end(Rule.java:230)
at org.apache.commons.digester.Digester.endElement(Digester.java:1163)
at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.commons.digester.Digester.parse(Digester.java:1680)
at org.apache.catalina.startup.ContextConfig.defaultConfig(ContextConfig.java:517)
at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:626)
at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:216)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4270)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:823)
at org.apache.catalina.core.ContainerBase.access$0(ContainerBase.java:811)
at org.apache.catalina.core.ContainerBase$PrivilegedAddChild.run(ContainerBase.java:143)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:805)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:595)
at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:277)
at org.apache.catalina.core.StandardHost.install(StandardHost.java:832)
at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:625)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:431)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:983)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:349)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1091)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:789)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478)
at org.apache.catalina.core.StandardService.start(StandardService.java:480)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:2313)
at org.apache.catalina.startup.Catalina.start(Catalina.java:556)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:287)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425)
Caused by: java.lang.NoClassDefFoundError
at org.apache.log4j.Logger.getLogger(Logger.java:85)
at org.apache.commons.logging.impl.Log4JLogger.getLogger(Log4JLogger.java:229)
at org.apache.commons.logging.impl.Log4JLogger.<init>(Log4JLogger.java:65)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:529)
... 53 more
Mar 9, 2006 4:02:00 PM org.apache.catalina.startup.ContextConfig defaultConfig
SEVERE: Parse error in default web.xml
org.apache.commons.logging.LogConfigurationException: java.lang.NoClassDefFoundError (Caused by java.lang.NoClassDefFoundError)
at org.apache.commons.digester.Digester.createSAXException(Digester.java:2952)
at org.apache.commons.digester.Digester.createSAXException(Digester.java:2978)
at org.apache.commons.digester.Digester.endElement(Digester.java:1166)
at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.commons.digester.Digester.parse(Digester.java:1680)
at org.apache.catalina.startup.ContextConfig.defaultConfig(ContextConfig.java:517)
at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:626)
at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:216)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4270)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:823)
at org.apache.catalina.core.ContainerBase.access$0(ContainerBase.java:811)
at org.apache.catalina.core.ContainerBase$PrivilegedAddChild.run(ContainerBase.java:143)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:805)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:595)
at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:277)
at org.apache.catalina.core.StandardHost.install(StandardHost.java:832)
at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:625)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:431)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:983)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:349)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1091)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:789)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478)
at org.apache.catalina.core.StandardService.start(StandardService.java:480)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:2313)
at org.apache.catalina.startup.Catalina.start(Catalina.java:556)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:287)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425)
Mar 9, 2006 4:02:00 PM org.apache.catalina.startup.ContextConfig defaultConfig
SEVERE: Occurred at line 348 column 46
Mar 9, 2006 4:02:00 PM org.apache.catalina.startup.ContextConfig start
SEVERE: Marking this application unavailable due to previous error(s)
Mar 9, 2006 4:02:00 PM org.apache.catalina.core.StandardContext start
SEVERE: Error getConfigured
Mar 9, 2006 4:02:00 PM org.apache.catalina.core.StandardContext start
SEVERE: Context startup failed due to previous errors
Mar 9, 2006 4:02:00 PM org.apache.catalina.core.StandardHostDeployer install
INFO: Installing web application at context path from URL file:/var/lib/tomcat5/webapps/ROOT
Mar 9, 2006 4:02:00 PM org.apache.catalina.core.StandardHostDeployer install
INFO: Installing web application at context path /servlets-examples from URL file:/var/lib/tomcat5/webapps/servlets-examples
Mar 9, 2006 4:02:00 PM org.apache.catalina.core.StandardHostDeployer install
INFO: Installing web application at context path /jsp-examples from URL file:/var/lib/tomcat5/webapps/jsp-examples
Mar 9, 2006 4:02:01 PM org.apache.catalina.core.StandardHostDeployer install
INFO: Installing web application at context path /webdav from URL file:/var/lib/tomcat5/webapps/webdav
Mar 9, 2006 4:02:01 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8180
Mar 9, 2006 4:02:01 PM org.apache.jk.common.ChannelSocket init
INFO: JK2: ajp13 listening on /0.0.0.0:8009
Mar 9, 2006 4:02:01 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=10/63 config=/var/lib/tomcat5/conf/jk2.properties
Mar 9, 2006 4:02:01 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 8548 ms