Re: [xwiki-users] stylesheet override

2011-04-08 Thread Elena-Oana Tabaranu
Hi,

On 04/08/2011 02:38 AM, wojtek danilo wrote:
 Hi!
 I'm trying to override the css of my xwiki.
 I've been reading documents about making styleSheetExtensions (like
 MinimalStyleSheet Extension fro mhere:
 http://platform.xwiki.org/xwiki/bin/view/DevGuide/SkinExtensionsTutorial).
 I have to be doing something wrong because after creation StyleSheet
 extension like in this tutorial and setting use this extension to always
 nothing changes.
You can check if your styles have been included on the HTML source of 
the page. There should be a link like this in the head:

link  rel='stylesheet'type='text/css'href='/xwiki/bin/ssx/StyleSheet 
extension space/StyleSheet extension page'/

 additional I've seen that in Administration menu -  Look  feel -
 presentation I've got button that allow me cutomize current skin. after
 pressing it and sayin that I want to customize it I've got a lot of empty
 boxes (style, header, footer).
 Always when I'm trying to write there anything the whole css crash and the
 site looks ugly.
The Header and the Footer templates display parts of your page. They 
should not be used to add CSS rules, use the Style template instead:
@import microformats.css;
@import colibri.css;
/* add here your custom rules */

Oana
 Please could you write, what is the simplest method to override some
 elements of the css of xwiki?

 I will be very thankfull!
 Wojtek
 ___
 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] change registration behavior

2011-04-08 Thread Elena-Oana Tabaranu
Hi,

On 04/07/2011 06:18 PM, wojtek danilo wrote:
 Hi!
 Is it possible to change default autocompletion of username in tregistration
 window?

 So when I'm enterning the first name and real name then the username
 autocompletes to FirstnameLastname (uppercased).
 I want to change it to first letter of firstnaeme and lastname without
 uppercase and set it by default so users could not change this pattern.

 When I clicked to edit the filds I've found tht this autocompletion is made
 by javascript script prepareName(...)

 Where is this script? can I change it when I've got hosted xwiki on myxwiki?
 If not is there any method to change this behavior as I want?
This script is located in xwiki.js : http://your 
server/xwiki/bin/skin/resources/js/xwiki/xwiki.js
The best way to do it is to change the registration code on http://your 
server/xwiki/bin/view/XWiki/Registration and use your own javascript 
function instead of prepareName() when the focus event is fired:

#set($field =
   {'name' : 'xwikiname',
 'label' : $msg.get('core.register.username'),
 'params' : {
   'type' : 'text',
   'onfocus' : 'prepareName(document.forms.register);',
   'size' : '20'
 },
 'validate' : {
   'mandatory' : {
 'failureMessage' : 
$msg.get('xe.admin.registration.fieldMandatory')
   },
   'programmaticValidation' : {
 'code' : '#nameAvailable($request.get(xwikiname))',
 'failureMessage' : $msg.get('core.register.userAlreadyExists')
   }
 }
   })

Hope this helps,
Oana
 Thank you!
 Wojtek
 ___
 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] Calendar lost some functionality in 3.0

2011-04-05 Thread Elena-Oana Tabaranu
On 04/05/2011 05:11 AM, Lockie wrote:
 Hi all

 I'm in the process of starting from a fresh install in 3.0 after using 2.4
 for many months.

 I have however encountered a problem with the Edit link used for directly
 editing a calendar entry (which is an object generated when you add an event
 to the calendar). These entries appear in a list and with each one there is
 the Edit link mentioned above, as well as a Remove link.

 The Remove link removes the calendar entry fine, but in 3.0, the Edit
 link always goes to the very first calendar entry, called CalendarEvent 0.
 In my 2.4 installation though it correctly goes to the corresponding
 calendar entry.

 This is the section of code I think is at fault, note it's in 1.0 syntax.


 #foreach($event in $doc.getObjects(XWiki.CalendarEvent))



 1.1.1 $event.title.replaceAll('\n', )

 #if($hasedit)

 ( $doc.getURL( $msg.get(edit) ,

 $doc.getURL( $msg.get(delete) )

 #end

Hi,

Your code should look like this:

#foreach($event in $doc.getObjects(XWiki.CalendarEvent))
div class=vevent
1.1.1 span class=summary$event.title.replaceAll('\n', )/span 
#if($hasedit) (a href=$doc.getURL(edit, 
editor=objectamp;classname=XWiki.CalendarEventamp;nb=${event.number})$msg.get(edit)/a,
 
a href=$doc.getURL(objectremove, 
classname=XWiki.CalendarEventamp;classid=${event.number}amp;xredirect=$doc.getURL('view'))$msg.get(delete)/a)#end
...
#end

You can make a test and print the ${event.number} inside the #foreach to 
see if the value is correct. I have tested with 3.0 and the links seem ok.

Oana
 Somehow the $event.number is always 0 and not the actual number of the
 entry. It could be related to the Velocity engine getting upgraded to 7.1? I
 tried copying parts of the Remove section since that is getting the link
 to the entry correct, but it always goes to the very first entry, number 0.

 I really need this functionality because it's much easier for users to edit
 an entry individually then sifting through the objects that eventually grow
 to a big number. It's preventing me from moving to 3.0, so any help would be
 greatly appreciated.

 Thanks

 -
 
 Lockie
 --
 View this message in 
 context:http://xwiki.475771.n2.nabble.com/Calendar-lost-some-functionality-in-3-0-tp6240869p6240869.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

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


Re: [xwiki-users] Modalbox

2011-04-05 Thread Elena-Oana Tabaranu
Hi,

On 04/05/2011 05:25 PM, afrey wrote:
 Was anyone able to load an url in a Modalbox? How do you do that? Like, for
 example, when clicking on a button, display http://www.google.com; in the
 Modalbox. Is that possible?

Do you mean an iframe or an anchor that opens http://www.google.com?

Oana
 I tried the following, and it's not displaying anything. What am I doing
 wrong?

 {{velocity}}
 #set($ok = $xwiki.jsfx.use(js/scriptaculous/scriptaculous.js))
 #set($ok = $xwiki.jsx.use(XWiki.ModalBox))
 #set($ok = $xwiki.ssx.use(XWiki.ModalBox))

 {{html}}
 Google
 {{/html}}

 {{/velocity}}

 --
 View this message in context: 
 http://xwiki.475771.n2.nabble.com/Modalbox-tp6242462p6242462.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

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


Re: [xwiki-users] Show Lucene Search Results in same Space

2011-04-01 Thread Elena-Oana Tabaranu
Hi,

You can send the space parameter so that the search results are 
displayed for the current space. Updating the search form under the 
#globallinks section on the global.vm template should do the trick:
input type=hidden name=space value=$doc.space/
You can also take a look at 
http://platform.xwiki.org/xwiki/bin/view/DevGuide/Skins#HD.OverridingtheSkincomponents
 
on how to override templates in the skin.

Hope this helps,
Oana

On 04/01/2011 04:35 PM, Wouter de Vos wrote:
 Hi All,

 I am testing around with the Lucene Search, all works well, one problem 
 remains:

 I search in Space A. My search results however, are shown in the Main
 Wiki Page. This has a different look and feel, and since I do not want
 to have confused users, I would like to display the search results in
 the same Space as where the User was was in when he-she started the
 search. I am guessing its only a one line change in some form, but I
 cant seem to find it, I hope someone can help me out..

 Thanks in advance,

 Wouter
 ___
 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] Tooltip macro not working after upgrade to 3.0RC1

2011-03-30 Thread Elena-Oana Tabaranu
Hi,

Edit the macro code on http://your 
server/xwiki/bin/edit/XWiki/Tooltip?editor=object and try replacing 
$xcontext.macro.content with ${xcontext.macro.content}

Hope this helps,
Oana

On 03/29/2011 06:52 PM, coldserenity wrote:
 Hello,

 Environment: XWiki iteratively upgraded 2.2 -  2.3 -  2.4 -  2.6 -
 3.0RC1 (there might have been minor version upgrade in-between)
 After having upgraded to XWiki 3.0RC1, Tooltip macro (
 http://extensions.xwiki.org/xwiki/bin/view/Extension/Tooltip+Macro ) stopped
 working throwing the error shown below.
 I've checked several other macros - they still work.
 Should I log a bug in Jira for the macro or this can be fixed somehow?



 Failed to execute the [velocity] macro
 org.xwiki.rendering.macro.MacroExecutionException: Failed to evaluate
 Velocity Macro for content [(%class=tooltipHint
 #if($!xcontext.macro.params.display-icon == false) withoutIcon#end
 $!hintStyles%)#if($!xcontext.macro.params.id !=
 )(%class=tooltipLabelId hidden%)$!xcontext.macro.params.id#else{{html
 clean=false}}$!xcontext.macro.params.label{{/html}}#end(%class=tooltip
 hidden $!tooltipStyles %)$xcontext.macro.content(%class=tooltipEvent
 hidden%)$tooltipEvent]
  at
 org.xwiki.rendering.internal.macro.velocity.VelocityMacro.evaluateString(VelocityMacro.java:124)
  at
 org.xwiki.rendering.internal.macro.velocity.VelocityMacro.evaluateString(VelocityMacro.java:47)
  at
 org.xwiki.rendering.macro.script.AbstractScriptMacro.evaluateBlock(AbstractScriptMacro.java:303)
  at
 org.xwiki.rendering.macro.script.AbstractScriptMacro.execute(AbstractScriptMacro.java:199)
  at
 org.xwiki.rendering.macro.script.AbstractScriptMacro.execute(AbstractScriptMacro.java:57)
  at
 org.xwiki.rendering.internal.transformation.macro.MacroTransformation.transformOnce(MacroTransformation.java:184)
  at
 org.xwiki.rendering.internal.transformation.macro.MacroTransformation.transform(MacroTransformation.java:129)
  at
 org.xwiki.rendering.internal.macro.wikibridge.DefaultWikiMacro.execute(DefaultWikiMacro.java:213)
  at
 org.xwiki.rendering.internal.macro.wikibridge.DefaultWikiMacro.execute(DefaultWikiMacro.java:57)
  at
 org.xwiki.rendering.internal.transformation.macro.MacroTransformation.transformOnce(MacroTransformation.java:184)
  at
 org.xwiki.rendering.internal.transformation.macro.MacroTransformation.transform(MacroTransformation.java:129)
  at
 org.xwiki.rendering.internal.transformation.DefaultTransformationManager.performTransformations(DefaultTransformationManager.java:72)
  at
 com.xpn.xwiki.doc.XWikiDocument.performSyntaxConversion(XWikiDocument.java:7605)
  at
 com.xpn.xwiki.doc.XWikiDocument.performSyntaxConversion(XWikiDocument.java:7554)
  at
 com.xpn.xwiki.doc.XWikiDocument.getRenderedContent(XWikiDocument.java:836)
  at
 com.xpn.xwiki.doc.XWikiDocument.getRenderedContent(XWikiDocument.java:785)
  at
 com.xpn.xwiki.doc.XWikiDocument.getRenderedContent(XWikiDocument.java:879)
  at com.xpn.xwiki.api.Document.getRenderedContent(Document.java:556)
  at sun.reflect.GeneratedMethodAccessor530.invoke(Unknown Source)
  at
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  at java.lang.reflect.Method.invoke(Method.java:597)
  at
 org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.doInvoke(UberspectImpl.java:395)
  at
 org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:384)
  at
 org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:173)
  at
 org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:280)
  at
 org.apache.velocity.runtime.parser.node.ASTReference.value(ASTReference.java:567)
  at
 org.apache.velocity.runtime.parser.node.ASTExpression.value(ASTExpression.java:71)
  at
 org.apache.velocity.runtime.parser.node.ASTSetDirective.render(ASTSetDirective.java:142)
  at
 org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:72)
  at
 org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:342)
  at
 org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:106)
  at
 org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:342)
  at
 org.xwiki.velocity.internal.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:188)
  at
 org.xwiki.velocity.internal.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:153)
  at
 com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate(XWikiVelocityRenderer.java:116)
  at com.xpn.xwiki.XWiki.evaluateTemplate(XWiki.java:1890)
  at com.xpn.xwiki.XWiki.parseTemplate(XWiki.java:1828)
  at com.xpn.xwiki.api.XWiki.parseTemplate(XWiki.java:848)
  at sun.reflect.GeneratedMethodAccessor284.invoke(Unknown Source)
  at
 

Re: [xwiki-users] CSS customization and themes

2011-03-23 Thread Elena-Oana Tabaranu
Hello,

You can try including the colorThemeInit template at the beginning of 
your style sheet extension:
#template('colorThemeInit.vm')

Hope this helps,
Oana

On 03/23/2011 01:13 PM, Andreas Hahn wrote:
 Hi again,

 in my ongoing efforts in customizing the appearance of the pages of my
 wiki I've followed the steps of the skin extension tutorial:
 http://platform.xwiki.org/xwiki/bin/view/DevGuide/SkinExtensionsTutorial

 I've created a StyleSheetExtension and selected 'Use this extension'
 'Always on the wiki' and it works as expected.

 However I've started to replace fix color settings by references to the
 themes settings
 e.g. $theme.borderColor ... $theme.titleColor
 and also I've checked 'Parse content' 'Yes' and disabled caching this
 doesn't work.
 Velocity statements seem not to be processed or I am referring to
 invalid property names.
 (I have been trying the ones from /templates/colorThemeInit.vm)

 What am I doing wrong here ?

 In the example the page is laoded on demand with
 $xwiki.jsx.use(XWiki.MyFirstStylesheetExtension)

 so I would assume there should be a document named
 MyFirstStylesheetExtension in XWiki space (or maybe some other space).
 Thats not the case for my own instance of
 XWiki.MyFirstStylesheetExtension that I've added.
 Shouldn't I be able to find the instance as a document somewhere in the
 spaces ?

 Thanks for your support

 Andreas
 ___
 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 can I get the name and last name from the current user in a different variables?

2010-08-26 Thread Elena-Oana Tabaranu
Hi,

You can use the following code snippet:
$!xwiki.getUserName($context.user, $first_name, false)
$!xwiki.getUserName($context.user, $last_name, false)
I hope this helps,
Oana

abrante wrote:
 How can I get the name and last name from the current user in a different
 variables?
 Until now I obtain the current user with $context.user but I need the name
 separated from the last name.
 Thanks

   

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


Re: [xwiki-users] Ratings Application

2010-08-23 Thread Elena-Oana Tabaranu
Hi,

You can find the ratings in the xwiki contrib repository:
http://svn.xwiki.org/svnroot/xwiki/contrib/sandbox/xwiki-plugin-ratings/
http://svn.xwiki.org/svnroot/xwiki/contrib/sandbox/xwiki-application-ratings/

To build the plugin jar use mvn clean install in the trunk folder.  The 
next step is to copy the jar to the lib folder of your wiki.
Build the application xar with mvn clean install and import the xar into 
your wiki.
This code should help you get started:

{{include document=XWiki.RatingsMacros/}}
{{velocity}}
$xwiki.ssx.use(XWiki.Ratings)##
$xwiki.jsx.use(XWiki.Ratings)##

==Full Ratings==

#displayFullRating($doc)

==Small Ratings==

#displaySmallRating($doc)

{{/velocity}}

I have tested with XWiki Enterprise 2.4 and I think the Javascript code 
needs to be updated because of the changes made on the top menu in the 
latest versions of XWiki.

Hope this helps,
Oana


Zuzana Zapletalova wrote:
 Hello,
 does anybody use Ratings Application? It is still a sandbox application but I 
 think it works. Can you give me a help how to implement this application to 
 xWiki? 

 Thanks, Zuzana.
 ___
 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] Page Loading Optimization

2009-11-06 Thread Elena-Oana Tabaranu
Hi Thibaut,

Some useful Web Performance resources:
1) Steve Souders, /High Performance Web Sites: Essential Knowledge for 
Front-End Engineers/: 
http://www.amazon.com/High-Performance-Web-Sites-Essential/dp/0596529309/ref=pd_sim_b_1
Presentation of the 14 original rules upon which YSlow! was build on. 
Since then, a lot of new rules were added to YSlow! and Steve Souders 
moved from Yahoo! to Google and started working on Page Speed 
http://code.google.com/speed/page-speed/index.html
2) volume 2 /Even Faster Web Sites: Performance Best Practices for Web 
Developers/ by Steve Souders just came out: 
http://www.amazon.com/Even-Faster-Web-Sites-Performance/dp/0596522304/ref=sr_1_1?ie=UTF8s=booksqid=1257500156sr=8-1
Another 14 rules and tips  which focus a mainly on Javascript 
optimization techniques.
3) http://www.stevesouders.com/blog/

Oana

Thibaut Camberlin wrote:
 Hi all,

 Page Loading time is a very important criteria when developing a web site.
 According to a recent
 surveyhttp://www.webdesignerwall.com/general/users-place-more-weight-on-design/more
 than half people would drive away from a site with slow loading pages.

 There are several interesting issues that could be implemented to
 substantially improve page loading time in XWiki.

 Number one is aggreation of CSS and JS files in order to reduce HTTP
 requests. (For info, we have a total of 25 external CSS and JS files on a
 basic XWiki install when in the best world we would have just 2 - 1 CSS and
 1 JS)

 Someone interrested in working on this with me ?

   

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


Re: [xwiki-users] First contact question

2009-11-04 Thread Elena-Oana Tabaranu
Hi,
coriscow wrote:
 Hi all!

 I have to make a project for college and, as a first thought, I think that
 an application wiki would fit perfectlly as a basis for it. Therefore, I
 have spent the last two days going over all the documentation I've found.
 However, I'm still not sure if I will be able to use xwiki to fullfil my
 needs. Those are:

 - there has to be four types of documents: public, protected (shared among a
 workgroup members), private and shareable (a private page whose owner can
 share with some contacts)
   
XWiki allows you to control all access permissions for users and groups 
at a fine grained level: 
http://platform.xwiki.org/xwiki/bin/view/Features/RightsManagement
 - some panels or even panel contents should depend on group policies
   
When  creating a panel you should set the rights at page level: if he 
is  part of a certain group, the panel will be displayed.
 - every user should be able to personalize some of its panels contents,
 order, visibility, etc
   
This is a bit tricky because in XWiki a user does not have his own 
space. As a consequence, by default you share your settings (including 
the display of the panels) with the other users which have the same 
rights as you. To personalize the content of a panel you could:
1. Create a panel which can be viewed/edited only by you.
2. Add a check in the panel you want to customize to display some 
content when you are the logged in user.
 - can a page be added/edited only through a form like page (some users with
 programming rights design the form through class/object/wiki/wysiwyg/inline
 modes so others can fill the contents easily without being able to modify
 the form definition)
   
This sounds like a XWiki Application. This tutorial will help you get 
started: http://platform.xwiki.org/xwiki/bin/view/DevGuide/FAQTutorial
 - can a panel be used as a toolbar menu? (I think the answer to this one is
 skining, right?)

   
You can indeed change the look and feel for any panel in XWiki. 
Although, if you want to add for example, a horizontal menu in the 
header or footer, you should override instead one of the velocity 
templates from the skin. You can find out more about the skin 
customization at: http://dev.xwiki.org/xwiki/bin/view/Drafts/XWikiNewSkin

Hope this helps,
Oana
 Can it be done without involving me writting a XWiki 3.0 version?? If so,
 any trace would be highly appreciated.

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


Re: [xwiki-users] Grid/LiveTable edit restrictions

2009-11-02 Thread Elena-Oana Tabaranu
Radek Rekas wrote:
 Hi,

 I'd like to use the Grid/LiveTable components to list data and create links 
 to edit pages for that data. I would also like to add restrictions so that 
 only users who created that data can edit it.
   
Hi,

You can display easily your wiki pages using the live table and 
configure the data source to match your needs.
My suggestion would be to modify the creation step for any wiki page 
that you want to list in your live table. Just attach an 
XWiki.XWikiRights object and set the edit rights only for the current 
user(which is also the document creator) when creating the new page.
You can find a useful code snippet here: 
http://code.xwiki.org/xwiki/bin/view/Snippets/SettingRightsSnippet

Hope this helps,
Oana
 From my understanding it is not possible to restrict edits for individual 
 xwiki class objects to only users who created that object (along with an 
 administrator user) as edit permissions can only be set at the page level and 
 not at the individual object level.

 The solution I was thinking about was to create a new page for each record 
 then restrict edit permissions at the page level.

 This would however require me to aggregate all of the xwiki class objects on 
 a single page so that they could be used with the grid/LiveTable component. I 
 can't however see a way of doing this. Is this possible or is there a better 
 way of doing this?

 Thanks in advance,

 Radek
 ___
 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