Re: [SMW-devel] Updates: Images, LIKE-search, sorting tables

2008-01-14 Thread Markus Krötzsch
On Freitag, 11. Januar 2008, cnit wrote:
  Dmitriy,
 
  The problems I was having with the RSS were being caused by an explicit
  assignment of $wgUrlProtocols that I'd manually added to
  LocalSettings.php when using RC1.  Specifically, the line in question
  was:
 
  $wgUrlProtocols =
  'http:\/\/|https:\/\/|ftp:\/\/|irc:\/\/|gopher:\/\/|news:|mailto:|file:\
  /\/';

 Yes, I have additional

 // make rtsp valid uri protocol (used by RealPlayer)
 $wgUrlProtocols[] = 'rtsp://';
 but it's not a string, rather an element of array. And it works with
 MW 1.11 without any problem.
 Anyway, even if the problem is related to wgUrlProtocols, I'd rather
 prefer to recieve a meaninful warning in the wiki itself, rather than
 a raw PHP error.

As you correctly note, $wgUrlProtocols is an array, not a string. This may 
have changed at some MW version, but any setting that really works with 
MediaWiki now should also work with SMW. I am sure that making it a string 
will give you a long list of warnings.

But this is of course not related to your earlier problem. I have updated SVN 
to catch the error (not fixing the problem but weakening its effects). Could 
you please send the original query (with Russian characters) again? Note that 
RSS-links do not depend on the query result -- they will yield almost the 
same result on any SMW-installation (with the exception of local query 
parsing errors due to different property types; these do not affect the 
generated link). So you can run tests on ontoworld as well (e.g. on your user 
page there).

Markus


  As the error messages I was getting weren't the same as those that you
  supplied, I assumed that your specific problem would be slightly
  different.  However, as the RSS code itself is clearly working OK, I
  wondered whether LocalSetting.php might be the source of your problem
  too.

 Even if it's working at your computer, that doesn't means it works
 everywhere. For example, don't forget that Latin alphabet is probably
 the most common set among different character encodings and is the
 most accepted one among RFC's, protocols and so on. My wiki uses
 Cyrillic alphabet, some params of ask query are Cyrillic strings.

  Good luck in finding your problem.

 Thanks, I hope that Markus will investigate it. Otherwise, I'll try to
 fix but not now, later. To me, it's important for the fix to be a part
 of SVN.
 Dmitriy


 -
 Check out the new SourceForge.net Marketplace.
 It's the best place to buy or sell services for
 just about anything Open Source.
 http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplac
e ___
 Semediawiki-devel mailing list
 Semediawiki-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/semediawiki-devel



-- 
Markus Krötzsch
Institut AIFB, Universät Karlsruhe (TH), 76128 Karlsruhe
phone +49 (0)721 608 7362fax +49 (0)721 608 5998
[EMAIL PROTECTED]www  http://korrekt.org


signature.asc
Description: This is a digitally signed message part.
-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace___
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel


Re: [SMW-devel] Updates: Images, LIKE-search, sorting tables

2008-01-09 Thread cnit
Hi Markus,

 * There is a new RSS-Feed feature that allows you to subscribe to query
 results. Besides the associated performance issues with thousands of users
 re-issuing queries regularly, this should be an extremely cool thing. It
 simply works by creating an inline query with the new format rss, which
 creates a link to an RSS feed. The parameters rsstitle and rssdescription
 can be used to describe the feed, searchlabel is available to customise the
 link text. Print requests are largely ignored right now, unless they use the
 label creator or date in which case they are used for specifying the
 according fields in RSS. Otherwise the last wiki editor and modification date
 is used. An example is to be found at the top of [1]. Configuration 
 parameters are available for enabling/disabling this feature, and to choose
 between complete embedding of articles and plain result lists.
I've tried to use the following wiki-code to enable RSS feed:
{{#ask: [[Category:News]] [[Date::+]]|
?Date|
sort=Date|
order=descending|
limit=20|
format=rss|
rsstitle=Our news|
rssdescription=News|
default=Unfortunately there's no news|
searchlabel=RSS|
}}
(translated from Russian)

however, it gives me
Fatal error:  Call to a member function getFullURL() on a non-object in
  extensions/SemanticMediaWiki/includes/SMW_QP_RSSlink.php on line 59

The ask query is copy/paste converted from perfectly working ask query
where the format=template.

One note - my site default language ($wgLanguageCode) is ru.

Variables dump from SMWRSSResultPrinter::getRSSURL is attached.

It seems that link text, returned by $this-getRSSTitle($res) doesn't pass
sanity check in Title::secureAndSplit(), thus NULL is being returned
by Title::newFromText, then getFullURL gives an error.

Dmitriyobject(SMWQueryResult)#133 (6) {
  [m_content:protected]=
  array(0) {
  }
  [m_printrequests:protected]=
  array(2) {
[2::]=
object(SMWPrintRequest)#245 (5) {
  [m_mode:protected]=
  int(2)
  [m_label:protected]=
  string(0) 
  [m_title:protected]=
  NULL
  [m_typeid:protected]=
  bool(false)
  [m_outputformat:protected]=
  string(0) 
}
[1:Свойство:Дата::]=
object(SMWPrintRequest)#244 (5) {
  [m_mode:protected]=
  int(1)
  [m_label:protected]=
  string(8) Дата
  [m_title:protected]=
  object(Title)#241 (19) {
[mTextform]=
string(8) Дата
[mUrlform]=
string(24) %D0%94%D0%B0%D1%82%D0%B0
[mDbkeyform]=
string(8) Дата
[mUserCaseDBKey]=
string(8) Дата
[mNamespace]=
int(102)
[mInterwiki]=
string(0) 
[mFragment]=
string(0) 
[mArticleID]=
int(-1)
[mLatestID]=
bool(false)
[mRestrictions]=
array(0) {
}
[mCascadeRestriction]=
NULL
[mRestrictionsExpiry]=
NULL
[mHasCascadingRestrictions]=
NULL
[mCascadeRestrictionSources]=
NULL
[mRestrictionsLoaded]=
bool(false)
[mPrefixedText]=
string(25) Свойство:Дата
[mDefaultNamespace]=
int(102)
[mWatched]=
NULL
[mOldRestrictions]=
bool(false)
  }
  [m_typeid:protected]=
  bool(false)
  [m_outputformat:protected]=
  string(0) 
}
  }
  [m_furtherres:protected]=
  bool(false)
  [m_query:protected]=
  object(SMWQuery)#175 (11) {
[sort]=
bool(true)
[ascending]=
bool(false)
[sortkey]=
string(8) Дата
[querymode]=
int(4)
[m_limit:protected]=
int(20)
[m_offset:protected]=
int(0)
[m_description:protected]=
object(SMWConjunction)#237 (2) {
  [m_descriptions:protected]=
  array(2) {
[0]=
object(SMWClassDescription)#240 (2) {
  [m_titles:protected]=
  array(1) {
[0]=
object(Title)#136 (19) {
  [mTextform]=
  string(14) Новости
  [mUrlform]=
  string(42) %D0%9D%D0%BE%D0%B2%D0%BE%D1%81%D1%82%D0%B8
  [mDbkeyform]=
  string(14) Новости
  [mUserCaseDBKey]=
  string(14) Новости
  [mNamespace]=
  int(14)
  [mInterwiki]=
  string(0) 
  [mFragment]=
  string(0) 
  [mArticleID]=
  int(-1)
  [mLatestID]=
  bool(false)
  [mRestrictions]=
  array(0) {
  }
  [mCascadeRestriction]=
  NULL
  [mRestrictionsExpiry]=
  NULL
  [mHasCascadingRestrictions]=
  NULL
  [mCascadeRestrictionSources]=
  NULL
  [mRestrictionsLoaded]=
  bool(false)
  [mPrefixedText]=
  NULL
  

[SMW-devel] Updates: Images, LIKE-search, sorting tables

2007-12-30 Thread Markus Krötzsch
A brief feature update of some further things that just made it into the 
soon-to-be-released SMW1.0:

* Properties with Type:Page will now display values in the image namespace by 
showing actual images, at least in Factboxes and #ask query results. 
[Contribution by Yaron Koren]

* There is an optional pattern matching string search for properties of 
Type:String. For instance the query atom [[property::% Semantic*]] matches 
anything with a value for property that starts with Semantic. Since this 
feature might be costly, it is not enabled by default, but can be added with 
a configuration option (see SMW_Settings.php). 
[Contribution by Thomas Bleher]

* Query result tables now support correct sorting for all kinds of values, 
especially for dates and for formatted numerical values (possibly with unit). 
So far the JavaScript sometimes would wrongly sort such values 
alphabetically. 
[Contribution by Tobias Matzner]

* There is a new RSS-Feed feature that allows you to subscribe to query 
results. Besides the associated performance issues with thousands of users 
re-issuing queries regularly, this should be an extremely cool thing. It 
simply works by creating an inline query with the new format rss, which 
creates a link to an RSS feed. The parameters rsstitle and rssdescription 
can be used to describe the feed, searchlabel is available to customise the 
link text. Print requests are largely ignored right now, unless they use the 
label creator or date in which case they are used for specifying the 
according fields in RSS. Otherwise the last wiki editor and modification date 
is used. An example is to be found at the top of [1]. Configuration 
parameters are available for enabling/disabling this feature, and to choose 
between complete embedding of articles and plain result lists.

Note that this is also very nice in conjunction with Firefox' dynamic bookmark 
feature, enabling browser bookmarks that link to recent query results from 
your favourite wiki.
[Work by Denny  myself]


Thanks to all contributors for code, helpful discussions, and comments on 
improving SMW. Unless something terrible happens, SMW1.0 will be released in 
2007.

Cheers,

Markus

[1] http://ontoworld.org/wiki/Upcoming_events (rather short right now; we plan 
to add some more events in next year ...)

-- 
Markus Krötzsch
Institut AIFB, Universät Karlsruhe (TH), 76128 Karlsruhe
phone +49 (0)721 608 7362fax +49 (0)721 608 5998
[EMAIL PROTECTED]www  http://korrekt.org


signature.asc
Description: This is a digitally signed message part.
-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel