Re: [xwiki-users] Linking

2012-02-03 Thread Marius Dumitru Florea
Hi Richard,

On Thu, Feb 2, 2012 at 4:57 PM, goldring, richard
richard.goldr...@uk.thalesgroup.com wrote:

 Hi,

 Does anyone know which macros I might need to edit to update to add a new
 menu option in the WYSIWYG editor to the Link menu say called Link to file
 and then display a Link To File dialog pane with a browser to allow a user
 to browse to a file on a network drive and select in and then insert a link
 to the file in the wiki page?

You have to work with the WYSIWYG editor code in order to extend the
link menu and add a new link wizard. You can find the code here
https://github.com/xwiki/xwiki-platform/tree/master/xwiki-platform-core/xwiki-platform-wysiwyg
, so you have to clone the xwiki-platform Git repository. The WYSIWYG
editor is written in Google WebToolkit (Java code with a bit of
JavaScript) which is compiled to JavaScript.

I've started a while ago to write a WYSIWYG editor plugin that allows
you to create a link to an Alfresco file. I believe this plugin can be
modified to take the tree file structure from the file system /
network drive instead of the Alfresco REST service. If you're
interested and you think you have the skill to modify it, I can
publish by code on a feature branch of xwiki-platform on GitHub.

Hope this helps,
Marius



 Thanks.

 Regards,

 Richard

 -Original Message-
 From: users-boun...@xwiki.org [mailto:users-boun...@xwiki.org] On Behalf Of
 mohit gupta
 Sent: 02 February 2012 11:36
 To: XWiki Users
 Subject: Re: [xwiki-users] How to customize the default skin and default
 stylesheet?

 Thanks for providing clarity and pointing to these documents.

 On Thu, Feb 2, 2012 at 4:29 PM, Guillaume Lerouge guilla...@xwiki.com
 wrote:
 Hi Mohit,

 I'm not sure how you expect a Wordpress template to work with XWiki.

 By the way, did you read the following documents?

   - http://platform.xwiki.org/xwiki/bin/view/Features/Skins
   - http://platform.xwiki.org/xwiki/bin/view/DevGuide/Skins

 Guillaume

 On Thu, Feb 2, 2012 at 11:30 AM, mohit gupta motgu...@gmail.com wrote:

 Hi Guilaume,

 sorry i am not getting how and where to to add new skin and template.

 here is what i did  to change the default skin:-

 1)Create a new page named as MyAppSkin under xwiki space.Inside that
 page i added the template under attachment section.Like i downloaded
 the template  Free WordPress 2.x Themes from  site
 http://www.templatemonster.com/free-templates.php and then gave the
 name as XWiki.MyAppSkin in the Skin field of the presentation section
 of the administration.
 But it did not have any impact.


 2)similary i am not sure where to add my customize MyApp.css in wiki.

 On Thu, Feb 2, 2012 at 1:07 PM, Guillaume Lerouge
 guilla...@xwiki.com
 wrote:
  Hi Mohit,
 
  you can override both of those by adding a XWiki.XWikiSkins object
  in a document and adding the name of that document in the Skin
  field of the presentation section of the administration.
 
  Guillaume
 
  On Thu, Feb 2, 2012 at 8:19 AM, mohit gupta motgu...@gmail.com wrote:
 
  Under the presentation section of look and feel, i see  skin as
  XWiki.DefaultSkin and DEFAULT STYLESHEET as style.css.
  If i want to replace both of these with my customized skin and
  stylesheet, how should i go about this?
  where should i put my both these new docs?
  ___
  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

 ___
 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
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] WYSIWYG on demand

2012-02-03 Thread Marius Dumitru Florea
Hi Aaron,

On Wed, Feb 1, 2012 at 10:26 PM, Ashtar Communications
ashtarcommunicati...@gmail.com wrote:
 Does anyone have a working example of loading the WYSIWYG editor
 on-demand with velocity? Would love to see how you implemented
 it...I'm having some trouble with porting the code on the xwiki site.

You mean 
http://extensions.xwiki.org/xwiki/bin/view/Extension/WYSIWYG+Editor+Module#HLoadondemandandshowsourcetext
doesn't work? Maybe I can help.

Marius


 Thanks,

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


Re: [xwiki-users] How to restrict the search visibilty of wiki user?

2012-02-03 Thread mohit gupta
Thanks paul for taking time out to reply on this.

 I am using the lucene search which is default search in xwiki. As you
suggested
read the users of the groups the user is allowed to see, then expand
this into a disjunction of owners query, i agree on logic.But i am not
getting under which java class i should make a change for this. It
would be very helpful to give some idea about impacted class and
corresponding method.

here is my requirement, if logged in user name  is MyAppUser then i
want him to do search on users belonging to MyAppUserAdminGroup and
MyAppUserGeneralgroup but admin user should be able to search every
user in wiki. basically user name + AdminGroup/Generalgroup.I want to
do it for just restrict the users visibility in serach textbox
otherwise i want to keep search functionality intact.

Is there a way i can do these in velocity macro file of
MainSpace.WebHomePage  with user logged in as admin(who has
programming rights) or any other tweaking in configuration.

Let me know if it requires more information.Thanks for your patience again.

On Fri, Feb 3, 2012 at 1:02 PM, Paul Libbrecht p...@hoplahup.net wrote:
 Mohit,

 I am not sure which search you are using but the normal way to do this is to 
 use query expansion. Basically:
 - take the existing search system let it parse the query (including 
 parameters)
 - combine the query with a mandatory addition that includes the rights
  (that'd mean: read the users of the groups the user is allowed to see, then 
 expand this into a disjunction of owners query)

 Does it make sense?

 Please provide more details on your setup if I should formulate code 
 suggestion.
 Note that appending the query-string is likely to be a very fragile solution 
 (but is often made sadly).
 Do not worry on the amount of terms ofyour query, Lucene supports thousands 
 of terms without problems.

 paul


 Le 3 févr. 2012 à 07:58, mohit gupta a écrit :

 Hi All,

 I asked the below query log time before  but have not got any inputs.
 I would be grateful if you folks have any idea about below
 configuration.  let me know if it is possible to configure this kind
 of feature in xwiki in any version?

 i want to give rights in a way so that the users in a certain group
 should be able search the users of a certain group.
 For example i have 3 groups G1,G2,G3 . G1 contains user U1,G2 contains
 user U2 and G3 contains user U3. Now i want to give the the group 1
 users rights in a way so that they should be able to search the G1 and
 G2 users only but not G3 users.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] XWiki Enterprise 3.0.36132 - upgrade to 3.4 ?

2012-02-03 Thread Ari
Hi.

I have XWiki Enterprise 3.0.36132 and would like to upgrade to latest
version. I have tried to upgrade directly to 3.4 but as it produced
error message I tried to upgrade in steps..

Upgrade to 3.1.1 was ok, no db migration was needed and installed the
.xar without problems. Then upgrade to 3.2.1 produced the following:


Servlet.service() for servlet [action] in context with path [/xwiki]
threw exception [com.xpn.xwiki.XWikiException: Error number 3 in 0:
Could not initialize main XWiki context
Wrapped Exception: Error number 3201 in 3: Exception while saving
document xwiki:XWiki.XWikiUsers
Wrapped Exception: Error number 3211 in 3: Exception while updating
archive XWiki.XWikiUsers
Wrapped Exception: Error number 0 in 3: Exception while hibernate execute
Wrapped Exception: could not load an entity:
[com.xpn.xwiki.doc.rcs.XWikiRCSNodeContent#component[docId,version1,version2]{docId=495778886,
version2=1, version1=2}]] with root cause
com.xpn.xwiki.XWikiException: Error number 3 in 0: Could not initialize
main XWiki context
Wrapped Exception: Error number 3201 in 3: Exception while saving
document xwiki:XWiki.XWikiUsers
Wrapped Exception: Error number 3211 in 3: Exception while updating
archive XWiki.XWikiUsers
Wrapped Exception: Error number 0 in 3: Exception while hibernate execute
Wrapped Exception: could not load an entity:
[com.xpn.xwiki.doc.rcs.XWikiRCSNodeContent#component[docId,version1,version2]{docId=495778886,
version2=1, version1=2}]
at com.xpn.xwiki.XWiki.getMainXWiki(XWiki.java:422)
at com.xpn.xwiki.XWiki.getXWiki(XWiki.java:491)
at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:136)
at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:116)
-

the hibernate configuration is


-
!DOCTYPE hibernate-configuration PUBLIC
  -//Hibernate/Hibernate Configuration DTD//EN
  http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd;
hibernate-configuration
  session-factory


property name=show_sqlfalse/property
property name=use_outer_jointrue/property

property name=dbcp.defaultAutoCommitfalse/property
property name=dbcp.maxActive50/property
property name=dbcp.maxIdle5/property
property name=dbcp.maxWait3/property
property name=dbcp.whenExhaustedAction1/property
property name=dbcp.ps.whenExhaustedAction1/property
property name=dbcp.ps.maxActive20/property
property name=dbcp.ps.maxWait12/property
property name=dbcp.ps.maxIdle20/property
property name=jdbc.use_scrollable_resultsetfalse/property


property name=connection.useUnicodetrue/property
property name=connection.characterEncodingUTF-8/property


property
name=connection.urljdbc:postgresql://10.10.1.134/xwiki/property
property name=connection.usernamexwiki/property
property name=connection.password/property
property
name=connection.driver_classorg.postgresql.Driver/property
property
name=dialectorg.hibernate.dialect.PostgreSQLDialect/property
property
name=connection.provider_classcom.xpn.xwiki.store.DBCPConnectionProvider/property

property name=connection.pool_size2/property
property name=statement_cache.size2/property
mapping resource=xwiki.hbm.xml/
mapping resource=feeds.hbm.xml/
mapping resource=activitystream.hbm.xml/

  /session-factory
/hibernate-configuration
-

Any help would be appreciated..

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


Re: [xwiki-users] XWiki Enterprise 3.0.36132 - upgrade to 3.4 ?

2012-02-03 Thread Ari
On 03.02.2012 14:50, Ari wrote:
 I have XWiki Enterprise 3.0.36132 and would like to upgrade to latest
 version. I have tried to upgrade directly to 3.4 but as it produced
 error message I tried to upgrade in steps..
 
 Upgrade to 3.1.1 was ok, no db migration was needed and installed the
 .xar without problems. Then upgrade to 3.2.1 produced the following:

Tried to upgrade to 3.3.1 with the following:

com.xpn.xwiki.XWikiException: Error number 0 in 3: Exception while
hibernate execute
Wrapped Exception: could not load an entity:
[com.xpn.xwiki.doc.rcs.XWikiRCSNodeContent#component[docId,version1,version2]{docId=495778886,
version2=1, version1=2}]
at
com.xpn.xwiki.store.XWikiHibernateBaseStore.execute(XWikiHibernateBaseStore.java:1110)
at
com.xpn.xwiki.store.XWikiHibernateBaseStore.executeRead(XWikiHibernateBaseStore.java:1140)
at
com.xpn.xwiki.store.XWikiHibernateVersioningStore.loadRCSNodeContent(XWikiHibernateVersioningStore.java:298)
at
com.xpn.xwiki.doc.rcs.XWikiRCSNodeInfo.getContent(XWikiRCSNodeInfo.java:175)
at
com.xpn.xwiki.doc.XWikiDocumentArchive.makePatch(XWikiDocumentArchive.java:138)
at
com.xpn.xwiki.doc.XWikiDocumentArchive.updateArchive(XWikiDocumentArchive.java:254)
at
com.xpn.xwiki.store.XWikiHibernateVersioningStore.updateXWikiDocArchive(XWikiHibernateVersioningStore.java:254)
at
com.xpn.xwiki.store.XWikiHibernateStore.saveXWikiDoc(XWikiHibernateStore.java:483)
at
com.xpn.xwiki.store.XWikiCacheStore.saveXWikiDoc(XWikiCacheStore.java:174)
at
com.xpn.xwiki.store.XWikiCacheStore.saveXWikiDoc(XWikiCacheStore.java:167)
at com.xpn.xwiki.XWiki.saveDocument(XWiki.java:1403)
at com.xpn.xwiki.XWiki.saveDocument(XWiki.java:1359)
at com.xpn.xwiki.XWiki.saveDocument(XWiki.java:1354)
at com.xpn.xwiki.XWiki.getUserClass(XWiki.java:3075)
at com.xpn.xwiki.XWiki.initializeMandatoryClasses(XWiki.java:840)
at com.xpn.xwiki.XWiki.initXWiki(XWiki.java:814)
at com.xpn.xwiki.XWiki.init(XWiki.java:740)
at com.xpn.xwiki.XWiki.getMainXWiki(XWiki.java:402)
at com.xpn.xwiki.XWiki.getXWiki(XWiki.java:488)
at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:136)
at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:116)
at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
at
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at com.xpn.xwiki.web.ActionFilter.doFilter(ActionFilter.java:128)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at
org.xwiki.wysiwyg.server.filter.ConversionFilter.doFilter(ConversionFilter.java:144)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at
com.xpn.xwiki.plugin.webdav.XWikiDavFilter.doFilter(XWikiDavFilter.java:68)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at
org.xwiki.container.servlet.filters.internal.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:217)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at
org.xwiki.container.servlet.filters.internal.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:109)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
at

Re: [xwiki-users] Linking

2012-02-03 Thread Hamster
+1

I think this should be part of the Link WYSIWYG editor!

I don't have the knowledge to modify the source-code, but I do the advantage
to modify the source-code (or implement a copy). We have developed several
ClickOnce Applications for internal company use, which accept
URL-parameters. I would love to extend the Link menu, so people can choose
Link to ClickOnceApp, supply the URL-parameter(s) and XWiki will generate
the correct link!

Is there a step-by-step tutorial on how to modify the WYSIWYG-editor??? (I
know, whishful thinking!)

--
View this message in context: 
http://xwiki.475771.n2.nabble.com/Linking-tp7247202p7250922.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] WYSIWYG on demand

2012-02-03 Thread Ashtar Communications
Marius,

Thank you for the reply.

The using velocity macros example doesn't work for me at all:
http://extensions.xwiki.org/xwiki/bin/view/Extension/WYSIWYG+Editor+Module#HLoadondemandusingvelocitymacros

I get an error on the line:
#wysiwyg_inputProperty($editedDocument $editedProperty $parameters)

The show source text example also doesn't work for me:
http://extensions.xwiki.org/xwiki/bin/view/Extension/WYSIWYG+Editor+Module#HLoadondemandandshowsourcetext

when I click the Load Editor button it just gets stuck displaying
the loading animation, but the editor never finishes loading.

The edit in place example works for me for a single object:
http://extensions.xwiki.org/xwiki/bin/view/Extension/WYSIWYG+Editor+Module#HEditin-placeanobjectproperty

Unfortunately, I can't seem to figure out how to adapt this code for
multiple objects/editors on a single page. I have pages with a large
number of objects, and I need to be able to edit any of them
on-demand. I'm pretty sure that I need to modify the function below to
loop through all objects on the page to add an edit button linked to
the appropriate div ID.

// Insert the edit icons and set the action for the cancel buttons.
document.observe('xwiki:dom:loaded', function() {
  showEditIcon('$editedPropertyId');

  $$('.cancel').each(function(item) {
var fieldId = item.up('form').down('textarea').id;
item.observe('click', function(event) {
  Event.stop(event);
  onClose(fieldId);
}.bindAsEventListener(window));
  });
});

I've tried adding a class to each div, and wrapping the showEditIcon
call in various loops through that class (using $$ or for/in), but I
can't get it to work. I probably just don't know enough javascript to
get the syntax correct...

Any help would be appreciated,

aaron



On Fri, Feb 3, 2012 at 1:54 AM, Marius Dumitru Florea
mariusdumitru.flo...@xwiki.com wrote:
 Hi Aaron,

 On Wed, Feb 1, 2012 at 10:26 PM, Ashtar Communications
 ashtarcommunicati...@gmail.com wrote:
 Does anyone have a working example of loading the WYSIWYG editor
 on-demand with velocity? Would love to see how you implemented
 it...I'm having some trouble with porting the code on the xwiki site.

 You mean 
 http://extensions.xwiki.org/xwiki/bin/view/Extension/WYSIWYG+Editor+Module#HLoadondemandandshowsourcetext
 doesn't work? Maybe I can help.

 Marius


 Thanks,

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