|
View:
New views
3 Messages
—
Rating Filter:
Alert me
|
|
|
Inline Queries (Limiting Characters Returned)I was wondering if there is a way to show a limited number of
characters for the value of a specific property in an inline (ask) query. So for example, if I had an inline query that was going to bring back the value for "longDescription", and the value brought back would normally be: This is the long description. It has many more characters than I would want to bring back. And I wanted to just bring back let's say the first ten characters of the value such as: This is th Would this be possible? Thanks! Bobby ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ Semediawiki-user mailing list Semediawiki-user@... https://lists.sourceforge.net/lists/listinfo/semediawiki-user |
|
|
Re: Inline Queries (Limiting Characters Returned)I think what you're looking for might have to be done with StringFunctions, another extension:
http://www.mediawiki.org/wiki/Extension:StringFunctions It has a function #sub that returns part of a string. That would probably do what you need. -Robert On Thu, Jun 26, 2008 at 5:59 PM, Bobby S <bobbys@...> wrote: I was wondering if there is a way to show a limited number of -- Roses are red,Violets are blue,I'm schizophrenic,and so am I. ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ Semediawiki-user mailing list Semediawiki-user@... https://lists.sourceforge.net/lists/listinfo/semediawiki-user |
|
|
Re: Inline Queries (Limiting Characters Returned)On Freitag, 27. Juni 2008, Robert Murphy wrote:
> I think what you're looking for might have to be done with StringFunctions, > another extension: > > http://www.mediawiki.org/wiki/Extension:StringFunctions > > It has a function #sub that returns part of a string. That would probably > do what you need. Indeed that would work (use the "template" option in SMW queries to use a custom template for formatting query results). We could also have parameters (of many kinds) for a single printout statement to make some such settings, but I have no good idea for the syntax yet. We would need a way to add parameters to an #ask printout line such as "?long description", where the general current syntax is: "?property#unit = label" So it's not quite clear where to put additional parameters in a readable syntax. Other intersting parameters for single printouts would be "limit" and "sep" (separator string for multiple values of one property). -- Markus > > -Robert > > On Thu, Jun 26, 2008 at 5:59 PM, Bobby S <bobbys@...> wrote: > > I was wondering if there is a way to show a limited number of > > characters for the value of a specific property in an inline (ask) > > query. So for example, if I had an inline query that was going to > > bring back the value for "longDescription", and the value brought back > > would normally be: > > > > This is the long description. It has many more characters than I > > would want to bring back. > > > > And I wanted to just bring back let's say the first ten characters of > > the value such as: > > > > This is th > > > > Would this be possible? > > > > Thanks! > > > > Bobby > > > > ------------------------------------------------------------------------- > > Check out the new SourceForge.net Marketplace. > > It's the best place to buy or sell services for > > just about anything Open Source. > > http://sourceforge.net/services/buy/index.php > > _______________________________________________ > > Semediawiki-user mailing list > > Semediawiki-user@... > > https://lists.sourceforge.net/lists/listinfo/semediawiki-user -- Markus Krötzsch Semantic MediaWiki http://semantic-mediawiki.org http://korrekt.org markus@... ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ Semediawiki-user mailing list Semediawiki-user@... https://lists.sourceforge.net/lists/listinfo/semediawiki-user |
| Free Forum Powered by Nabble | Forum Help |