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

2009-03-18 Thread Remi

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!!

What you explain is not really what i want to do, even if its just an
example. Our goal for now, is to use xwiki for our website too, like 
http://www.xwiki.com http://www.xwiki.com , it seems not really difficult if
i have more documentation, but a real puzzle without.  


Niels Mayer wrote:
 
 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
 
 

-- 
View this message in context: 
http://n2.nabble.com/A-Real-tutorial-for-creating-Skins-and-Template-...-tp1333149p2496353.html
Sent from the XWiki- Users mailing list archive at Nabble.com.

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


Re: [xwiki-users] Translations cannot be fetched using XML/RPC interface

2009-03-18 Thread Florin Ciubotaru
Hi,

I recreated your scenario an published a basic XmlRpc proxy on this page:
- http://xoffice.xwiki.org/xwiki/bin/view/CodeBase/XmlRpcProxy

Getting the wiki content of a translated page seems to work fine. Here's 
how it can be used:

Page pageInfo = proxy.GetPage(token, Main.WebHome?language=fr);
String frenchContent = pageInfo.content;

The language parameter value must be a value present in the translations 
array.

Notes:
- The translations array contains all available translations for that 
page, except the default language of the page.
- The default language of the page is the default language of the wiki 
at the moment when the page is created. If ,in time, you change the 
wiki's default language, the page default language for the page will not 
change.
- If you need the rendered content you will need to make another call to 
this API method:

public String renderContent(String token, String space, String pageId, String 
content) throws Exception;

Please let me know of your progress

Thanks,
Florin Ciubotaru


Ari Oinas wrote:
 Ok, my setup is as follows:

 Xwiki Enterprise 1.71 installed on Apache Tomcat server (Win Xp Pro Sp3) and
 it's working fine.

 Im trying to create .NET Managed -application using C# (Visual Studio 2008)
 which connects to Xwiki and displays Xwiki content on a dialog. 
 Im using CookComputing.XmlRpc -library.

 So far I've managed to do the following:
 - Connect and login successfully to Xwiki
 - Fetch pagesummaries, pages and attachments from Xwiki and displayed them
 in Windows.Forms.WebBrowser component.

 I have created a space in Xwiki which holds the pages I want to show in my
 application. (Space name contains spaces, is this a problem?)

 I have created a page inside this space and also translated it to another
 language. This page is displayed properly in Xwiki web-client. Page is
 created using Xwiki 1.0 syntax.

 If I debug my program and inspect PageSummary -properties, I can see that
 there is a translation called en in translations array. 

 Best regards, 

 paristo


 -Original Message-
 From: users-boun...@xwiki.org [mailto:users-boun...@xwiki.org] On Behalf Of
 Fabio Mancinelli
 Sent: 17. maaliskuuta 2009 15:07
 To: XWiki Users
 Subject: Re: [xwiki-users] Translations cannot be fetched using XML/RPC
 interface


 On Mar 17, 2009, at 1:37 PM, Ari Oinas wrote:

   
 Hi,



 My problem is that I cannot fetch translated pages from Xwiki using  
 XML/RPC
 interface.



 I have tried it like this:

 xwikiInterface.getPage(iToken, Space.Page + ?language=en);

 but it returns the default page.

 
 Hi,

 could you tell me your exact setup?

 I tried with a multilanguage wiki and a Main.WebHome translated in fr  
 and it.

 rpc.getPage(Main.WebHome?language=en).getContent() - English
 rpc.getPage(Main.WebHome?language=it).getContent() - Italiano
 rpc.getPage(Main.WebHome?language=fr).getContent() - Français

 The available translations are accessible using the  
 Page.getTranslations()

 In the previous example, this call returns [it, fr] (Maybe here we  
 should explicitly add also the default translation)

 Let me know.

 Cheers,
 Fabio

 ___
 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

   

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


Re: [xwiki-users] class database list property should be empty when creating document

2009-03-18 Thread Sebastian Kannengiesser
Hi guys,

I got to pop up this issue once more as I need help with something
very related to it:

I just recognized, that the blank line that I need in my DBLists is
coming from the ClassTemplate that has an empty object on it.

My hibernate statement is the following:

select prop.value from BaseObject as obj, StringProperty as prop
where obj.className='XWiki.ServicesComponentClass' and
prop.id.id=obj.id and prop.id.name='name' order by prop.value

The empty line, I was all the time talking about was coming from the
Template of the class which had an empty property as its object was
empty. For some reason this did not work any more for the template of
my class itself (still not solved), but needed some other empty
object added to any document. So I got my empty line.

Now I want to change the query to this:

select doc.name from XWikiDocument doc, BaseObject as obj where
obj.className='XWiki.ServicesComponentClass' and doc.fullName=obj.name
order by doc.name

so actually returning me the document names of the specific class
instead of the 'name property as before.

Based on my assumption what is causing a blank line in the DBList
selection, how can I get a blank line in such a query, as this would
need a document without a name, which is of course not possible.

Many thanx for your suggestions,
Sebastian

On Wed, Mar 11, 2009 at 11:35 AM, Guillaume Lerouge guilla...@xwiki.com wrote:
 Hi Sebastian,

 I tried reproducing your issue but didn't succeed in doing so so far. When
 creating a class with only a DBList property, I can select either an item
 from the list or a blank line. The blank line is located at the very bottom
 of the list.

 One thing you might want to try is to re-create your class. To do so, go to
 another page and use the class editor to recreate a class with the same
 properties, same queries in your DBList properties etc..

 Then rename the page where your first class is and rename the page where
 your second class is to the name of your first class. In effet, your second
 class deifinition will take the place of the first one. With a little luck,
 recreating the class might fix your issue.

 Before renaming the second class to the name of the first one, try creating
 an object using it and see whether it allows you to have a blank select. If
 it does, rename it.

 Your objects won't be lost in the process. If it looks like they're broken
 at some point, that will be only because they lack the reference to their
 original class. In any case, you'll still be able to rename the first class
 to its original name to bring the wiki back to its current situation.

 Hope this helps,

 Guillaume

 On Wed, Mar 11, 2009 at 11:18 AM, Sebastian Kannengiesser 
 sebastian.kannengies...@gmail.com wrote:

 Hi,

 how can I check what happened to my class, that the blank row is
 missing now in new objects. It would be really nice if you could help
 me with this. I desperately need the DBList property to have nothing
 selected in the default state. Many, many thanx in advance.

 Cheers,
 Sebastian

 On Tue, Mar 10, 2009 at 4:20 PM, Sebastian Kannengiesser
 sebastian.kannengies...@gmail.com wrote:
  Hi,
 
  sorry guys for bumping this up again. But can you tell me, what
  possibly made the blank row in a database list property selection
  box disappear? I need it and it should be preselected, when creating a
  new document. I had this behaviour before and cannot tell, what made
  the blank row disappear. Any suggestion?
 
  Thanx,
  Sebastian
 
  On Tue, Mar 10, 2009 at 10:21 AM, Sebastian Kannengiesser
  sebastian.kannengies...@gmail.com wrote:
  Hi guys,
 
  thanx Sergiu for your reply. I create documents based on a class which
  defines database list properties.
  I did not change anything in that class between when the blank row
  in the selection box in inline editing mode was present and now where
  it disappeared for new documents. BTW, in this particular case I do
  not have multiselect enabled. The alphabetically first entry is
  selected as the blank row isn't there anymore. Any ideas? Help is
  desperately needed. Thanx for all input in advance.
 
  Cheers,
  Sebastian
 
  On Mon, Mar 9, 2009 at 4:11 PM, Sergiu Dumitriu ser...@xwiki.com
 wrote:
  Sebastian Kannengiesser wrote:
  Hi guys,
 
  I created a few days ago some documents based on my own class which
  has databse list properties. In the respective template fields, there
  was no entry selected when creating the document which is the
  behaviour I need. When I now create a document based on the same class
  the first entry is selected a priori and there is no way to deselect,
  i.e. have nothing selected, it. The old documents still have the
  ability to deselect the entry in inline editing mode. Can you guys
  please tell me, what might have happened here or could it be a bug? I
  dont't understand this apparently undeterministic behaviour. Many
  thanx in advance. BTW, this is in XWiki 1.7.2.
 
  Do you create documents based on a 

[xwiki-users] Tag API doc

2009-03-18 Thread Ajdin Brandic
HI

Is there a way of filtering tags using the new TagCloud?  

1. I want to create a filter to display tags based on space name.
2. I want to create a filter to display tags based on a value in doc
class property (ie. Show tags where doc property topic=education).

Is there any documentation on tag API (I seen there is stuff like
$xwiki.tag.getTags()) ?

Thanks

Ajdin
 
 


NOTICE

This message and any files transmitted with it is intended for the addressee 
only and may contain information that is confidential or privileged. 
Unauthorised use is strictly prohibited. If you are not the addressee, you 
should not read, copy, disclose or otherwise use this message, except for the 
purpose of delivery to the addressee. 

Any views or opinions expressed within this e-mail are those of the author and 
do not necessarily represent those of Coventry University.
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] class database list property should be empty when creating document

2009-03-18 Thread Guillaume Lerouge
Hi Sebastian,

On Wed, Mar 18, 2009 at 2:14 PM, Sebastian Kannengiesser 
sebastian.kannengies...@gmail.com wrote:

 Hi guys,

 I got to pop up this issue once more as I need help with something
 very related to it:

 I just recognized, that the blank line that I need in my DBLists is
 coming from the ClassTemplate that has an empty object on it.

 My hibernate statement is the following:

 select prop.value from BaseObject as obj, StringProperty as prop
 where obj.className='XWiki.ServicesComponentClass' and
 prop.id.id=obj.id and prop.id.name='name' order by prop.value

 The empty line, I was all the time talking about was coming from the
 Template of the class which had an empty property as its object was
 empty. For some reason this did not work any more for the template of
 my class itself (still not solved), but needed some other empty
 object added to any document. So I got my empty line.

 Now I want to change the query to this:

 select doc.name from XWikiDocument doc, BaseObject as obj where
 obj.className='XWiki.ServicesComponentClass' and doc.fullName=obj.name
 order by doc.name

 so actually returning me the document names of the specific class
 instead of the 'name property as before.

 Based on my assumption what is causing a blank line in the DBList
 selection, how can I get a blank line in such a query, as this would
 need a document without a name, which is of course not possible.

Well, actually you can kinda do it. The workaround I'm suggesting here is
ugly, but it might work.
Create a page which name is only + (Say, .../xwiki/bin/view/XWiki/+ ),
then add an object from your class to the page.
I think it will return a blank document name, thus a blank line in your
select box.
Guillaume


 Many thanx for your suggestions,
 Sebastian

 On Wed, Mar 11, 2009 at 11:35 AM, Guillaume Lerouge guilla...@xwiki.com
 wrote:
  Hi Sebastian,
 
  I tried reproducing your issue but didn't succeed in doing so so far.
 When
  creating a class with only a DBList property, I can select either an item
  from the list or a blank line. The blank line is located at the very
 bottom
  of the list.
 
  One thing you might want to try is to re-create your class. To do so, go
 to
  another page and use the class editor to recreate a class with the same
  properties, same queries in your DBList properties etc..
 
  Then rename the page where your first class is and rename the page where
  your second class is to the name of your first class. In effet, your
 second
  class deifinition will take the place of the first one. With a little
 luck,
  recreating the class might fix your issue.
 
  Before renaming the second class to the name of the first one, try
 creating
  an object using it and see whether it allows you to have a blank select.
 If
  it does, rename it.
 
  Your objects won't be lost in the process. If it looks like they're
 broken
  at some point, that will be only because they lack the reference to their
  original class. In any case, you'll still be able to rename the first
 class
  to its original name to bring the wiki back to its current situation.
 
  Hope this helps,
 
  Guillaume
 
  On Wed, Mar 11, 2009 at 11:18 AM, Sebastian Kannengiesser 
  sebastian.kannengies...@gmail.com wrote:
 
  Hi,
 
  how can I check what happened to my class, that the blank row is
  missing now in new objects. It would be really nice if you could help
  me with this. I desperately need the DBList property to have nothing
  selected in the default state. Many, many thanx in advance.
 
  Cheers,
  Sebastian
 
  On Tue, Mar 10, 2009 at 4:20 PM, Sebastian Kannengiesser
  sebastian.kannengies...@gmail.com wrote:
   Hi,
  
   sorry guys for bumping this up again. But can you tell me, what
   possibly made the blank row in a database list property selection
   box disappear? I need it and it should be preselected, when creating a
   new document. I had this behaviour before and cannot tell, what made
   the blank row disappear. Any suggestion?
  
   Thanx,
   Sebastian
  
   On Tue, Mar 10, 2009 at 10:21 AM, Sebastian Kannengiesser
   sebastian.kannengies...@gmail.com wrote:
   Hi guys,
  
   thanx Sergiu for your reply. I create documents based on a class
 which
   defines database list properties.
   I did not change anything in that class between when the blank row
   in the selection box in inline editing mode was present and now where
   it disappeared for new documents. BTW, in this particular case I do
   not have multiselect enabled. The alphabetically first entry is
   selected as the blank row isn't there anymore. Any ideas? Help is
   desperately needed. Thanx for all input in advance.
  
   Cheers,
   Sebastian
  
   On Mon, Mar 9, 2009 at 4:11 PM, Sergiu Dumitriu ser...@xwiki.com
  wrote:
   Sebastian Kannengiesser wrote:
   Hi guys,
  
   I created a few days ago some documents based on my own class which
   has databse list properties. In the respective template fields,
 there
   was no entry selected when 

Re: [xwiki-users] class database list property should be empty when creating document

2009-03-18 Thread Sebastian Kannengiesser
Hi Guillaume,

this indeed is ugly ;-), but it does the trick. :) Thanx.

Isn't there a way, as I'm not to familiar with sql and hql to get an
empty line from my result. So like selecting what I select in my query
and additionally pseudoselect NULL or something? If something like
this can be done in HQL, I would be interrested in how to do it.

Thanx again,
Sebastian

On Wed, Mar 18, 2009 at 2:44 PM, Guillaume Lerouge guilla...@xwiki.com wrote:
 Hi Sebastian,

 On Wed, Mar 18, 2009 at 2:14 PM, Sebastian Kannengiesser 
 sebastian.kannengies...@gmail.com wrote:

 Hi guys,

 I got to pop up this issue once more as I need help with something
 very related to it:

 I just recognized, that the blank line that I need in my DBLists is
 coming from the ClassTemplate that has an empty object on it.

 My hibernate statement is the following:

 select prop.value from BaseObject as obj, StringProperty as prop
 where obj.className='XWiki.ServicesComponentClass' and
 prop.id.id=obj.id and prop.id.name='name' order by prop.value

 The empty line, I was all the time talking about was coming from the
 Template of the class which had an empty property as its object was
 empty. For some reason this did not work any more for the template of
 my class itself (still not solved), but needed some other empty
 object added to any document. So I got my empty line.

 Now I want to change the query to this:

 select doc.name from XWikiDocument doc, BaseObject as obj where
 obj.className='XWiki.ServicesComponentClass' and doc.fullName=obj.name
 order by doc.name

 so actually returning me the document names of the specific class
 instead of the 'name property as before.

 Based on my assumption what is causing a blank line in the DBList
 selection, how can I get a blank line in such a query, as this would
 need a document without a name, which is of course not possible.

 Well, actually you can kinda do it. The workaround I'm suggesting here is
 ugly, but it might work.
 Create a page which name is only + (Say, .../xwiki/bin/view/XWiki/+ ),
 then add an object from your class to the page.
 I think it will return a blank document name, thus a blank line in your
 select box.
 Guillaume


 Many thanx for your suggestions,
 Sebastian

 On Wed, Mar 11, 2009 at 11:35 AM, Guillaume Lerouge guilla...@xwiki.com
 wrote:
  Hi Sebastian,
 
  I tried reproducing your issue but didn't succeed in doing so so far.
 When
  creating a class with only a DBList property, I can select either an item
  from the list or a blank line. The blank line is located at the very
 bottom
  of the list.
 
  One thing you might want to try is to re-create your class. To do so, go
 to
  another page and use the class editor to recreate a class with the same
  properties, same queries in your DBList properties etc..
 
  Then rename the page where your first class is and rename the page where
  your second class is to the name of your first class. In effet, your
 second
  class deifinition will take the place of the first one. With a little
 luck,
  recreating the class might fix your issue.
 
  Before renaming the second class to the name of the first one, try
 creating
  an object using it and see whether it allows you to have a blank select.
 If
  it does, rename it.
 
  Your objects won't be lost in the process. If it looks like they're
 broken
  at some point, that will be only because they lack the reference to their
  original class. In any case, you'll still be able to rename the first
 class
  to its original name to bring the wiki back to its current situation.
 
  Hope this helps,
 
  Guillaume
 
  On Wed, Mar 11, 2009 at 11:18 AM, Sebastian Kannengiesser 
  sebastian.kannengies...@gmail.com wrote:
 
  Hi,
 
  how can I check what happened to my class, that the blank row is
  missing now in new objects. It would be really nice if you could help
  me with this. I desperately need the DBList property to have nothing
  selected in the default state. Many, many thanx in advance.
 
  Cheers,
  Sebastian
 
  On Tue, Mar 10, 2009 at 4:20 PM, Sebastian Kannengiesser
  sebastian.kannengies...@gmail.com wrote:
   Hi,
  
   sorry guys for bumping this up again. But can you tell me, what
   possibly made the blank row in a database list property selection
   box disappear? I need it and it should be preselected, when creating a
   new document. I had this behaviour before and cannot tell, what made
   the blank row disappear. Any suggestion?
  
   Thanx,
   Sebastian
  
   On Tue, Mar 10, 2009 at 10:21 AM, Sebastian Kannengiesser
   sebastian.kannengies...@gmail.com wrote:
   Hi guys,
  
   thanx Sergiu for your reply. I create documents based on a class
 which
   defines database list properties.
   I did not change anything in that class between when the blank row
   in the selection box in inline editing mode was present and now where
   it disappeared for new documents. BTW, in this particular case I do
   not have multiselect enabled. The alphabetically first entry 

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] class database list property should be empty when creating document

2009-03-18 Thread Sergiu Dumitriu
Sebastian Kannengiesser wrote:
 Isn't there a way, as I'm not to familiar with sql and hql to get an
 empty line from my result. So like selecting what I select in my query
 and additionally pseudoselect NULL or something? If something like
 this can be done in HQL, I would be interrested in how to do it.

This is usually accomplished with UNION clauses in standard SQL. 
Unfortunately HQL does not support it. So the ugly hack provided by 
Guillaume is the only solution I know.
-- 
Sergiu Dumitriu
http://purl.org/net/sergiu/
___
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 Remi

i'm ok with your hack, i tested it and his approach is effectivly more
intuitive. But I have no problem with the method, my original question was
just to know if a better tutorial was done since the time of Vincent Massol
and Sergiu Dumitriu-2 was talking about above in this topic.

I think it was a good idea, even if exist hack and others solutions in
darkness of course, that we are oblige to use without.

About my from scratch expression, it don't fit. I don't want to reinvent
the wheel, and rewrite all existing and certainly very good code present in
xwiki and skins. I just want to understand it and his map.

I had found in another old topic definitions of css files and their roles,
but its fit of very old version and lot of files seems obsolete today..


Niels Mayer wrote:
 
 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