Extension talk:SemanticFormsSelect

From MediaWiki.org
Jump to: navigation, search

Post any Questions here

Start a new discussion

Contents

Thread titleRepliesLast modified
Barfs on properties with certain characters203:06, 11 May 2012
Is this what I think it is?301:46, 28 January 2012

Barfs on properties with certain characters

I have a number of properties with parentheses, and this extension doesn't quite work with them. I presume it's due to the substitutions done to ease the parsing.

76.107.76.9619:58, 2 May 2012

The query is passed to serve using ajax call. You can use your favorite web debug tool to check what the query looks like with parenthesis in properties. If the query is not good for SMW, this extension will not work for your properties.

Jasonzhang (talk)05:09, 3 May 2012
 
   $query=preg_replace('/(?<!\\\\)\\(/','[',$query);
   $query=preg_replace('/(?<!\\\\)\\)/',']',$query);
   $query=preg_replace('/\\\\\\(/','(',$query);
   $query=preg_replace('/\\\\\\)/',')',$query);

For anyone who faces a similar problem, these lines should replace the lines at ~97 and 98 that look like this:

   $query=str_replace("(", "[", $query);
   $query=str_replace(")", "]", $query);

This will enable you to use backslashes ('\') to escape your parentheses.

76.107.76.9603:02, 11 May 2012
 

Is this what I think it is?

I almost think this does what I want it to do, but I'm honestly not sure. It's a bit complex to follow with the text and the examples, will there be a usable, running sample soon?

Thanks.

Salquint22:59, 17 January 2012

I do not right now have a public site to host a demo. I have a series of pages for demo. I will upload those pages so that you can run demo locally.

-jason

Jasonzhang02:16, 18 January 2012
 

Added Demonstration section in documentation. You can set up a workable example in your local installation.

Jasonzhang05:07, 18 January 2012

If you have a few print screens of your example that can be posted that would help.

Salquint01:46, 28 January 2012
 
 
Personal tools
Namespaces

Variants
Actions
Navigation
Support
Download
Development
Communication
Print/export
Toolbox