Re: [xwiki-users] Hide (don't show) some macros in WYSIWYG insert macro menu

2011-04-07 Thread Marius Dumitru Florea
Hi Ramon,

The WYSIWYG editor takes the list of macros from the MacroManager and 
the MacroCategoryManager server side components. The editor doesn't 
filter the list of macros and AFAIK neither the MacroManager and 
MacroCategoryManager, so the only solution is to provide a custom 
implementation for these components that filter the macros based on your 
constraints. Here you can find the default implementations 
https://github.com/xwiki/xwiki-rendering/tree/master/xwiki-rendering-transformations/xwiki-rendering-transformation-macro/src/main/java/org/xwiki/rendering/internal/macro

Hope this helps,
Marius

On 04/07/2011 12:20 AM, Ramon Gomes Brandão - SERINT wrote:
 Hi XWiki Team,

 I would like to hide some macros from the user, in the list presented on the 
 WYSIWYG editor menu Insert Macro. How can I do that?

 The matter is only hiding some of them from the user, to prevent him/her to 
 select it to use on the page creation. Some of them are not familiar to my 
 users, and I would like to disable the possibility of use. How can I do 
 that?

 And also, is it possible to show those hidden ones only to the admin or the 
 admin group, or a specific group?

 I'm using XE 3.0

 Regards,

 Ramon Gomes Brandão

 ___
 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] Changing the link behind the logo

2011-04-07 Thread Wouter de Vos
Thanks Sergiu!
Exactly the code I was looking for, works flawlessly!

@Andreas: Your Ideas worked as well, but since I have various Spaces
and want that in all spaces the Logo links to the respective WebHome,
Sergius code was more what fits my needs, but thank you for your ideas
as well!

-Wouter


On 4/6/11, Sergiu Dumitriu ser...@xwiki.com wrote:
 On 04/06/2011 06:09 PM, Wouter de Vos wrote:
 Hi all,

 I uploaded my own logo.png in the header of my wiki, works great.
 Now I would like to change the link behind the logo, I want that it
 always points to the Webhome of the space the user is in, and I dont
 know how to do this. I allready changed some things in the global.vm
 of the skin, I can feel that I am almost there... But I need the code
 snippet for pointing towards the Webhome in the Space the user is in.

 $xwiki.getURL(${doc.space}.WebHome)

 --
 Sergiu Dumitriu
 http://purl.org/net/sergiu/
 ___
 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] stopping a page for non-editors

2011-04-07 Thread Raluca Stavro
Hello,

Indeed, #stop throws an exception on XWiki 3.0.
You should create an issue on Jira about the #stop problem. I don't really
know if this is caused by XWiki, or is strictly related to Velocity. This is
a regression from my point of view and it should be fixed.

Another solution for you would be to override contentview.vm and replace the
line:
$renderedContent

with:
#if(!$xwiki.getUser().isUserInGroup(XWiki.XWikiEditorsGroup))
  {{warning}}You don't have permission to view this document{{/warning}}
#else
  $renderedContent
#end

More info about how to override a template can be found here:
http://platform.xwiki.org/xwiki/bin/view/DevGuide/Skins#HD.OverridingtheSkincomponents.

Raluca.


On Tue, Apr 5, 2011 at 5:38 PM, China Sunrise china.sunr...@gmail.comwrote:

 Hi,
 I'm relatively new to xwiki. I have a few pages where dynamic tables had to
 be shown, and I'm using PHP quite heavily there. In a couple of pages, the
 content is supposed to be shown only if the user is in a specific group
 called 'XWikiEditorsGroup'. I didn't want to rely on xwiki's native
 single-page permissions as they looked a little cumbersome for what I
 needed, and preferred to control access via the page code itself. Up to
 xwiki 2.7, the following velocity section, which was the first section in
 the page, did the trick:

 {{velocity}}
 #set($user=$xwiki.getUser())
 #if(!$user.isUserInGroup(XWiki.XWikiEditorsGroup))
  {{warning}}You don't have permission to view this document{{/warning}}
  #stop
 #end
 {{/velocity}}

 However, after upgrading to xwiki 3.0, this code no longer works. From what
 I see, the issue appears to be related to velocity 1.7 and its different
 syntax for the #stop directive. I can't seem to find the right syntax
 though. As an alternative approach, I've also tried to relocate this access
 control logic into the PHP code that follows the above velocity section. To
 do that, I need to find a way to get the true/false value of
 $user.isUserInGroup(XWiki.XWikiEditorsGroup) in PHP, but so far haven't
 found a way to do that either and not sure how to pass the $user object and
 its isUserInGroup() method to the PHP part. I've even looked into doing
 this
 in groovy but no luck there either.

 Any advice will be appreciated...

 Thanks
 ___
 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] [myxwiki] new wiki request

2011-04-07 Thread Thomas Mortagne
Hi,

On Mon, Mar 28, 2011 at 22:02, Laurent laurent.lach...@wanadoo.fr wrote:
 Hello,

 Oups, in my previous mail, I forgot my wish for the server name, here it
 is  : wasali.
 I would like to use xwiki for my personal website about african music. I
 will share music sheets and other stuff with some of my friends.

 My xwiki user name is : llacheny

You can access your now wiki on http://wasali.myxwiki.org

Sorry for the delay.


 Cheers,

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




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


Re: [xwiki-users] FW: [myxwiki] new wiki request

2011-04-07 Thread Thomas Mortagne
Your can access your new wiki on http://sls.myxwiki.org

Sorry for the delay.

On Wed, Mar 30, 2011 at 15:22, Alex Sassmannshausen
alex.sassmannshau...@suffolk.gov.uk wrote:
 Hello,

 I never received any response regarding my request for a community wiki. Are 
 these still being set up? Is this list the right place to send these requests 
 to?

 Best wishes,

 Alex Sassmannshausen

 Enquiry Officer SLD
 -Original Message-
 From: users-boun...@xwiki.org [mailto:users-boun...@xwiki.org] On Behalf Of 
 Alex Sassmannshausen
 Sent: 25 March 2011 17:24
 To: 'users@xwiki.org'
 Subject: [xwiki-users] [myxwiki] new wiki request

 Dear Sir/Madam,

 I would like to request a wiki for our project.

 I'm writing as an enquiry officer with Suffolk Libraries.

 We are currently researching the feasability of maintaining staff handbooks 
 and library procedures in the form of a wiki. This would allow us to 
 instantly share the handbook with all who need it. It would also facilitate 
 internal and public discussion of the way we run our libraries and what are 
 the best ways to deal with issues as they come up.

 We also feel there is scope for fostering co-operation between public 
 libraries in general through this project - again by facilitating debate and 
 the sharing of technical know-how.

 We are attracted to xwiki because of its LGPL license and would be very 
 interested in running our wiki on your servers for the duration of this pilot.

 My username is AlexSassmannshausen. The server name we are hoping for is 
 either sls.myxwiki.org or suffolklibs.myxwiki.org (depending on whether the 
 first is already taken).

 Please let me know if you have any further questions or requirements prior to 
 creating the wiki for us.

 With Regards,

 Alex Sassmannshausen
 Suffolk libraries direct
 County Library
 Northgate Street
 IPSWICH
 IP1 3DE
 01473 584563

 www.suffolk.gov.uk/sldhttp://www.suffolk.gov.uk/sld

 mailto: h...@suffolklibraries.co.ukmailto:h...@suffolklibraries.co.uk

 Have your say on the future of Suffolk's libraries: 
 www.suffolk.gov.uk/librariesconsultation2011http://www.suffolk.gov.uk/librariesconsultation2011

 Follow us on Twitterblocked::https://twitter.com/SuffolkLibrary

 We now offer pre-overdue alerts by sms text message or email - please ask for 
 further details if you are interested.

 Our website enables you to renew your loans, make reservations and search our 
 catalogue. It includes a link to our new free eBook service.





 Emails sent to and from this organisation will be monitored in accordance
 with the law to ensure compliance with policies and to minimise any
 security risks.
 The information contained in this email or any of its attachments may
 be privileged or confidential and is intended for the exclusive use of
 the addressee. Any unauthorised use may be unlawful. If you receive
 this email by mistake, please advise the sender immediately by using
 the reply facility in your email software.
 ___
 users mailing list
 users@xwiki.org
 http://lists.xwiki.org/mailman/listinfo/users




 Emails sent to and from this organisation will be monitored in accordance
 with the law to ensure compliance with policies and to minimise any
 security risks.
 The information contained in this email or any of its attachments may
 be privileged or confidential and is intended for the exclusive use of
 the addressee. Any unauthorised use may be unlawful. If you receive
 this email by mistake, please advise the sender immediately by using
 the reply facility in your email software.

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




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


Re: [xwiki-users] [myxwiki] new wiki request

2011-04-07 Thread Thomas Mortagne
You can access your new wiki on http://blackbox.myxwiki.org

Enjoy !

On Wed, Apr 6, 2011 at 14:31, wojtek danilo wojtek.danilo@gmail.com wrote:
 Hi!
 I would like to set Xwiki for a students informatic project. This will be an
 mid-size application for graphics processing.
 My username is wdanilo and I would like to set wiki on address :
 blackbox.myxwiki.org

 Thank you very much!
 Wojtek
 ___
 users mailing list
 users@xwiki.org
 http://lists.xwiki.org/mailman/listinfo/users




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


Re: [xwiki-users] Hide (don't show) some macros in WYSIWYG insert macro menu

2011-04-07 Thread Thomas Mortagne
Maybe putting theses macro is a scary macro category like System
would be enough for user to not use them in your case ?

On Thu, Apr 7, 2011 at 10:05, Marius Dumitru Florea
mariusdumitru.flo...@xwiki.com wrote:
 Hi Ramon,

 The WYSIWYG editor takes the list of macros from the MacroManager and
 the MacroCategoryManager server side components. The editor doesn't
 filter the list of macros and AFAIK neither the MacroManager and
 MacroCategoryManager, so the only solution is to provide a custom
 implementation for these components that filter the macros based on your
 constraints. Here you can find the default implementations
 https://github.com/xwiki/xwiki-rendering/tree/master/xwiki-rendering-transformations/xwiki-rendering-transformation-macro/src/main/java/org/xwiki/rendering/internal/macro

 Hope this helps,
 Marius

 On 04/07/2011 12:20 AM, Ramon Gomes Brandão - SERINT wrote:
 Hi XWiki Team,

 I would like to hide some macros from the user, in the list presented on the 
 WYSIWYG editor menu Insert Macro. How can I do that?

 The matter is only hiding some of them from the user, to prevent him/her to 
 select it to use on the page creation. Some of them are not familiar to my 
 users, and I would like to disable the possibility of use. How can I do 
 that?

 And also, is it possible to show those hidden ones only to the admin or the 
 admin group, or a specific group?

 I'm using XE 3.0

 Regards,

 Ramon Gomes Brandão

 ___
 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




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


[xwiki-users] copy/rename page problem

2011-04-07 Thread Marcus Kretzschmar
Hello,

is there any way to copy a page (within one wiki) without the
source-space-link?

Example:
If you copy or rename a page sourcespace:page to destspace:page2 and
then go to destspace:page2  you will see a sourcespace:page2 link. It
should be destspace:page2!

If you navigate an click on sourcespace you will switch to sourcespace.
(if you don´t have access to sourcespace you will get an error)


We want to  build up a wiki where a user has no write access to common
spaces and has no access to other users. The user  inserts pages in his own
space. A moderator should move the user-page to a common page if the page is
ok.
This behaviour I described  with the copy/rename makes problems ;-)

Any suggestions?

(Xwiki 3) 

--
View this message in context: 
http://xwiki.475771.n2.nabble.com/copy-rename-page-problem-tp6249507p6249507.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] copy/rename page problem

2011-04-07 Thread Marius Dumitru Florea
On 04/07/2011 02:04 PM, Marcus Kretzschmar wrote:
 Hello,

 is there any way to copy a page (within one wiki) without the
 source-space-link?

 Example:

 If you copy or rename a page sourcespace:page to destspace:page2 and

You mean sourcespace.page to destspace.page2 because . is used to 
separate the page name from the space name.

 then go to destspace:page2  you will see a sourcespace:page2 link. It

Where do you see this link? In the page content?

Hope this helps,
Marius

 should be destspace:page2!

 If you navigate an click on sourcespace you will switch to sourcespace.
 (if you don´t have access to sourcespace you will get an error)


 We want to  build up a wiki where a user has no write access to common
 spaces and has no access to other users. The user  inserts pages in his own
 space. A moderator should move the user-page to a common page if the page is
 ok.
 This behaviour I described  with the copy/rename makes problems ;-)

 Any suggestions?

 (Xwiki 3)

 --
 View this message in context: 
 http://xwiki.475771.n2.nabble.com/copy-rename-page-problem-tp6249507p6249507.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] copy/rename page problem

2011-04-07 Thread Marcus Kretzschmar
yes, with . ;-)

The link is displayed in the left upper corner where you can navigate 

http://xwiki.475771.n2.nabble.com/file/n6249917/Wiki_Link.png 

I'm in Space Modul BM but will get a Link

User TU  NeueSeite

The page is copied from Space User TU. After copy the link should be
Modul BM, noch User TU

Best,

Marcus

--
View this message in context: 
http://xwiki.475771.n2.nabble.com/copy-rename-page-problem-tp6249507p6249917.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] copy/rename page problem

2011-04-07 Thread Marius Dumitru Florea
Hi Marcus,

On 04/07/2011 04:02 PM, Marcus Kretzschmar wrote:
 yes, with . ;-)

 The link is displayed in the left upper corner where you can navigate


 http://xwiki.475771.n2.nabble.com/file/n6249917/Wiki_Link.png

That is the page breadcrumb (used for navigation) and it's based on 
parent-child relation. Each page can have a parent page. The breadcrumb 
is the path from the current page to the root, following the 
parent-child relation.


 I'm in Space Modul BM but will get a Link

 User TU  NeueSeite

 The page is copied from Space User TU. After copy the link should be
 Modul BM, noch User TU

The reason is simple: the parent field is not modified when you copy or 
rename a page. This is the most accepted behaviour. You don't always 
want to change the parent when you copy or rename a page.

Now, if you specify the parent relative to the current space, it will be 
resolved relative to the target page when you copy or rename. For 
instance, if you set the parent to just WebHome (notice that the space 
is not specified in the parent name) it will be resolved as 
CurrentSpace.WebHome. After you copy the page it will be resolved as 
TargetSpace.WebHome.

Hope this helps,
Marius


 Best,

 Marcus

 --
 View this message in context: 
 http://xwiki.475771.n2.nabble.com/copy-rename-page-problem-tp6249507p6249917.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] copy/rename page problem

2011-04-07 Thread Marcus Kretzschmar
Hello Marius,

perhaps a silly question, but how do I set just the parent? 
If I copy/rename the page I have only the chance to specify a destination

http://xwiki.475771.n2.nabble.com/file/n6250312/copypage.png 

There is no option. I googled but found only some ALTER statements? Do you
have some code? Or is there any (hidden) feature I cannot find?


Marcus

--
View this message in context: 
http://xwiki.475771.n2.nabble.com/copy-rename-page-problem-tp6249507p6250312.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] copy/rename page problem

2011-04-07 Thread Marius Dumitru Florea
On 04/07/2011 05:51 PM, Marcus Kretzschmar wrote:
 Hello Marius,


 perhaps a silly question, but how do I set just the parent?

You can set the parent from the Wiki or WYSIWYG edit mode. Just edit the 
page and click on the tree icon above the title field. If you have an 
older version of XWiki then you should have a panel on the right of the 
edit area which contains a filed for the parent.

Hope this helps,
Marius

 If I copy/rename the page I have only the chance to specify a destination

 http://xwiki.475771.n2.nabble.com/file/n6250312/copypage.png

 There is no option. I googled but found only some ALTER statements? Do you
 have some code? Or is there any (hidden) feature I cannot find?


 Marcus

 --
 View this message in context: 
 http://xwiki.475771.n2.nabble.com/copy-rename-page-problem-tp6249507p6250312.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


[xwiki-users] change registration behavior

2011-04-07 Thread wojtek danilo
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?

Thank you!
Wojtek
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Error running XWiki Enterprise Manager on WebLogic 9.2

2011-04-07 Thread balmu
Any updates in this issue. I  am getting the same error with WLS 9.2 + Oracle
11g.

Any help is appreciated.

Bala

--
View this message in context: 
http://xwiki.475771.n2.nabble.com/Error-running-XWiki-Enterprise-Manager-on-WebLogic-9-2-tp3007021p6250634.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] stopping a page for non-editors

2011-04-07 Thread Eduard Moraru
Hi China :),

On 04/05/2011 05:38 PM, China Sunrise wrote:
 Hi,
 I'm relatively new to xwiki. I have a few pages where dynamic tables had to
 be shown, and I'm using PHP quite heavily there. In a couple of pages, the
 content is supposed to be shown only if the user is in a specific group
 called 'XWikiEditorsGroup'. I didn't want to rely on xwiki's native
 single-page permissions as they looked a little cumbersome for what I
 needed, and preferred to control access via the page code itself. Up to
 xwiki 2.7, the following velocity section, which was the first section in
 the page, did the trick:

 {{velocity}}
 #set($user=$xwiki.getUser())
 #if(!$user.isUserInGroup(XWiki.XWikiEditorsGroup))
{{warning}}You don't have permission to view this document{{/warning}}
#stop
 #end
 {{/velocity}}
I don`t know how the PHP macro(?) works, but why don`t you do something 
like:

{{velocity}}
#set($user=$xwiki.getUser())
#if(!$user.isUserInGroup(XWiki.XWikiEditorsGroup))
   {{warning}}You don't have permission to view this document{{/warning}}
#else
   {{php}}
 do some php here.
   {{/php}}
#end
{{/velocity}}


If you can nest the php macro into the velocity one, you are good to go 
and the code does not use velocity-dependent tricks.

P.S.: On the other hand, I do recommend using XWiki's rights system. If 
you want to assign rights to multiple pages at once, do it at space 
level. You could also create a 'protected' space where you put all your 
protected pages that should be visible only to group X (so that you 
manage rights from a single -- space level -- point to avoid page level 
management).

Hope this helps,
Eduard
 However, after upgrading to xwiki 3.0, this code no longer works. From what
 I see, the issue appears to be related to velocity 1.7 and its different
 syntax for the #stop directive. I can't seem to find the right syntax
 though. As an alternative approach, I've also tried to relocate this access
 control logic into the PHP code that follows the above velocity section. To
 do that, I need to find a way to get the true/false value of
 $user.isUserInGroup(XWiki.XWikiEditorsGroup) in PHP, but so far haven't
 found a way to do that either and not sure how to pass the $user object and
 its isUserInGroup() method to the PHP part. I've even looked into doing this
 in groovy but no luck there either.

 Any advice will be appreciated...

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


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


[xwiki-users] Set a Maintenance Start Page

2011-04-07 Thread Ramon Gomes Brandão - SERINT
Hi All, 

Sorry, this might be a silly question, but let's go: How can I set a temporary 
start page on XE, or redirect all requests to a specific page in running time? 
My need: during the migration from 2.4.3 to 3.0 I'm planning to do in the next 
few days, I would like that all users (except the admin) that try to access the 
wiki (the login page or whichever other one) be faced with a The system is 
being updated and will be available at ETA bla bla bla. Our production 
server doesn't use apache, but direct on JBoss. Until users view the 
maintenance page, I'm working behind the scenes performing the imports and skin 
preparation etc. 

Thanks in advance for your help. 

Regards, 

Ramon Gomes Brandão


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


Re: [xwiki-users] stopping a page for non-editors

2011-04-07 Thread China Sunrise
Hi,
Thanks for all the responses. Here are some results after testing the
suggestions:
* When I simply remove the #stop directive, I no longer get exceptions, but
also I don't get the page to block. Without the #stop, the velocity part
simply ends and it continues to the PHP part with no interruption and so the
page is shown normally. This solution is therefore not going to work in this
case.
* Nesting a PHP script inside a velocity script is not accepted, so this
solution will also not work here.
* I could use the native page access control, but it's somewhat of an
overhead as the pages in question are in different spaces and I would need
to go page by page to set the proper permissions. I realize that this may be
the more correct approach but it still appears to be easier for me to do
it at the code level - sort of 'do once and never worry about anything
else later'.

Anyway, following Raluca's advice I've opened a minor JIRA XE-887 about the
#stop excepetion issue, and what I ended up doing for now is the following,
which simply redirects to an error page. For my current needs this is good
enough, and eventually when the #stop directive will be supported again I'll
shift back to it.

{{velocity}}
#set($user=$xwiki.getUser())
#if(!$user.isUserInGroup(XWiki.XWikiEditorsGroup))
  {{warning}}You don't have permission to view this document{{/warning}}
  $response.sendRedirect($xwiki.getURL(MyMain.NoAccess))
#end
{{/velocity}}

Thanks again for all the help!



On Thu, Apr 7, 2011 at 1:59 PM, Eduard Moraru eduard.mor...@xwiki.comwrote:

 Hi China :),

 On 04/05/2011 05:38 PM, China Sunrise wrote:
  Hi,
  I'm relatively new to xwiki. I have a few pages where dynamic tables had
 to
  be shown, and I'm using PHP quite heavily there. In a couple of pages,
 the
  content is supposed to be shown only if the user is in a specific group
  called 'XWikiEditorsGroup'. I didn't want to rely on xwiki's native
  single-page permissions as they looked a little cumbersome for what I
  needed, and preferred to control access via the page code itself. Up to
  xwiki 2.7, the following velocity section, which was the first section in
  the page, did the trick:
 
  {{velocity}}
  #set($user=$xwiki.getUser())
  #if(!$user.isUserInGroup(XWiki.XWikiEditorsGroup))
 {{warning}}You don't have permission to view this document{{/warning}}
 #stop
  #end
  {{/velocity}}
 I don`t know how the PHP macro(?) works, but why don`t you do something
 like:

 {{velocity}}
 #set($user=$xwiki.getUser())
 #if(!$user.isUserInGroup(XWiki.XWikiEditorsGroup))
   {{warning}}You don't have permission to view this document{{/warning}}
 #else
   {{php}}
 do some php here.
   {{/php}}
 #end
 {{/velocity}}


 If you can nest the php macro into the velocity one, you are good to go
 and the code does not use velocity-dependent tricks.

 P.S.: On the other hand, I do recommend using XWiki's rights system. If
 you want to assign rights to multiple pages at once, do it at space
 level. You could also create a 'protected' space where you put all your
 protected pages that should be visible only to group X (so that you
 manage rights from a single -- space level -- point to avoid page level
 management).

 Hope this helps,
 Eduard
  However, after upgrading to xwiki 3.0, this code no longer works. From
 what
  I see, the issue appears to be related to velocity 1.7 and its different
  syntax for the #stop directive. I can't seem to find the right syntax
  though. As an alternative approach, I've also tried to relocate this
 access
  control logic into the PHP code that follows the above velocity section.
 To
  do that, I need to find a way to get the true/false value of
  $user.isUserInGroup(XWiki.XWikiEditorsGroup) in PHP, but so far
 haven't
  found a way to do that either and not sure how to pass the $user object
 and
  its isUserInGroup() method to the PHP part. I've even looked into doing
 this
  in groovy but no luck there either.
 
  Any advice will be appreciated...
 
  Thanks
   ___
  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


[xwiki-users] New Pages Immediately Orphaned?

2011-04-07 Thread Travis Riggs
When I try to create a new page via WYSIWYG or Source editor, then click
Save  View, I see a link with a question mark beside it.  (All of this is
the normal, so far)  When I click on that link to create the page, the bread
crumbs at the top of the page show the previous page as the parent.  When I
save that newly created page, whether I add any other content to the new
page or not, the page shows as an orphan.  The bread crumbs at the top
disappear and point back to the root of the space.  The Information tab
shows no parent information.

If I try to edit that page and manually enter the parent using the little
pencil parent edit button, I enter the name of the parent page (which
xwiki seems to recognize), but when I save it, the page is still orphaned.

What's the deal?  Any ideas?

I'm running XWiki Enterprise 2.7.1.34853 on Ubuntu lucid 64-bit.  My local
computer is also running Ubuntu lucid 64-bit.  I've tried using Firefox and
Chrome, but both behave the same way.

Any help would be appreciated.

Thanks,

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


[xwiki-users] GSoC: AJAX Form Editor

2011-04-07 Thread ankur gupta
Hello,
I am Ankur gupta 3rd year student from  Delhi,India...I m from computer
science field and interested to apply for  AJAX Form Editor project.. I
have
HTML, PHP , JavaScript, jQuery,CSS ,AJAX , C/C++ and JAVA  background.I have
developed a multiuser facebook look alike chat application
 and done various projects related to web development.

I have gone through the xwiki form features.. I think in this project that
we can provide users various form types for examples textfield,checkbox etc
and some new ones
such as suggests box ,date picker,live table..and give users a chance to set
various features of every form type.Users can also set the theme of the form
and set the
default value for a type and mark the field as the required one..and we can
also provide users a side by side view of the actual form..

Users can set the validations of the form type and set the validation
messages which would appear on wrong entry and they can change the size of
the fields..They can also
make customizable forms according to their requirements in which we will
provide various elements that users can use.

Thanks,
Ankur Gupta

-- 
Ankur Gupta
3rd year
Computer Science
Delhi Technological University


-- 
Ankur Gupta
3rd year
Delhi Technological University
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] New Pages Immediately Orphaned?

2011-04-07 Thread Wouter de Vos
Hi Travis,

Look at the source code of your main document, the one that shows the
little questionmark.
Here you gave the new page allready a name, and a title.
If the closing  after the title are double, like , you get this behaviour.
Just remove one and it should work

Hope this works,

Wouter


On 4/7/11, Travis Riggs tri...@lexmark.com wrote:
 When I try to create a new page via WYSIWYG or Source editor, then click
 Save  View, I see a link with a question mark beside it.  (All of this is
 the normal, so far)  When I click on that link to create the page, the bread
 crumbs at the top of the page show the previous page as the parent.  When I
 save that newly created page, whether I add any other content to the new
 page or not, the page shows as an orphan.  The bread crumbs at the top
 disappear and point back to the root of the space.  The Information tab
 shows no parent information.

 If I try to edit that page and manually enter the parent using the little
 pencil parent edit button, I enter the name of the parent page (which
 xwiki seems to recognize), but when I save it, the page is still orphaned.

 What's the deal?  Any ideas?

 I'm running XWiki Enterprise 2.7.1.34853 on Ubuntu lucid 64-bit.  My local
 computer is also running Ubuntu lucid 64-bit.  I've tried using Firefox and
 Chrome, but both behave the same way.

 Any help would be appreciated.

 Thanks,

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

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


[xwiki-users] stylesheet override

2011-04-07 Thread wojtek danilo
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.

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.

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


Re: [xwiki-users] stylesheet override

2011-04-07 Thread Lockie
Hi Wojtek

The way I do it is load up the skin's CSS file(default located at C:\Program
Files\XWiki Enterprise\webapps\xwiki\skins\colibri\colibri.css) in Notepad++
and add my changes to the bottom of it, then save it and check how it looks
in the browser. Style Sheet Extensions I only use on individual pages that
need to look different, because having any extension marked as always on
this wiki means it loads every time you load a page which slows load times
in general. 

If you aren't seeing any changes with your extensions, maybe make sure you
refresh the page a few times after you save it. Also using a browser that
supports extensions (like firefox or chrome) and getting the Firebug
extension is extremely helpful for determining what divs you should be
styling.

Hope that helps


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


-

Lockie
--
View this message in context: 
http://xwiki.475771.n2.nabble.com/stylesheet-override-tp6251952p6252381.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