Re: [SMW-devel] Adding Site Settings support to SMW?

2014-07-19 Thread James HK
Hi,

 Perhaps we should move out the existing ones now we are switching to 2.0
 anyway?

I'd like to see that happen because `onPageSchemasRegistration` and
`addToAdminLinks`  are the two remaining hooks which block the removal
of `SemanticMediaWiki.hooks.php` [0].

[0] https://github.com/SemanticMediaWiki/SemanticMediaWiki/pull/424

Cheers

On 7/19/14, Jeroen De Dauw jeroended...@gmail.com wrote:
 Hey,

 Perhaps we should move out the existing ones now we are switching to 2.0
 anyway? The new mini extensions can be put in the suggests section. Or
 perhaps not, as for those to fully function, you'd first need package
 definitions of their dependencies as well. Thoughts?

 Cheers

 --
 Jeroen De Dauw - http://www.bn2vs.com
 Software craftsmanship advocate
 Evil software architect at Wikimedia Germany
 ~=[,,_,,]:3


--
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
___
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel


Re: [SMW-devel] Adding Site Settings support to SMW?

2014-07-18 Thread Jeroen De Dauw
Hey,

 Unfortunately, there isn't yet a public example of an extension that
hooks into Site Settings

Just from the description you provided, it is still not clear enough for me
to say much about it.

The general concern with putting it into SMW is that this forces the people
working on SMW to hold it into account. This means making sure it does not
get broken when changes are made on the master branch. That is hard to do
since it requires the Site Settings extension. If the code is really
trivial, then perhaps this is fine.

Cheers

--
Jeroen De Dauw - http://www.bn2vs.com
Software craftsmanship advocate
Evil software architect at Wikimedia Germany
~=[,,_,,]:3
--
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds___
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel


Re: [SMW-devel] Adding Site Settings support to SMW?

2014-07-18 Thread James HK
Hi,

I can't say anything about the code (as I haven't seen it yet) but
three things I'd like to comment:

 newest of these three, and SMW doesn't connect to it yet, but I would like
 to add code in to SMW to do that, most likely via another class, that would
 be called SMWSiteSettings.

I'm not a huge fan of such interdependencies (and AdminLinks is no exception).

 I'd ask about it here before trying to send in a patch. I'm not planning on
 adding any testing code for this new code, just like there isn't for the

Having no tests (no matter what language or circumstances) will give
me a hard time to +2 (you don't need the SiteSettings to run tests,
just mock the interface).

 Anyway I much like all three extensions, and welcome tight integration
 among them all, despite dev headaches that may occur.

Tight coupling is not a solution it is a cause. [0, 1, 2, 3].

[0] http://msdn.microsoft.com/en-us/magazine/cc947917.aspx

[1] 
http://programmers.stackexchange.com/questions/212515/why-is-tight-coupling-between-functions-and-data-bad

[2] 
http://www.ibm.com/developerworks/java/library/j-cq05227/index.html?ca=dnw-823

[3] http://en.wikipedia.org/wiki/Loose_coupling

PS: Having said that, maybe it is not all that bad why not post to
code as gist ( https://gist.github.com/).

Cheers

On 7/19/14, Yaron Koren ya...@wikiworks.com wrote:
 Hi,

 Well, it depends on what you mean by broken. From my perspective, as long
 as the code doesn't crash SMW's regular functionality, it's good enough. If
 there's a problem with the Site Settings functionality in SMW - even a
 severe problem - you could just redirect it as a Site Settings issue, which
 is really what it is.

 The same thing holds true for Page Schemas, by the way - the code in SMW
 that hooks into it is somewhat complex, but as far as I know it hasn't
 required any special maintenance effort on the part of SMW devs.

 -Yaron
 On Jul 18, 2014 9:30 AM, Jeroen De Dauw jeroended...@gmail.com wrote:

 Hey,

  Unfortunately, there isn't yet a public example of an extension that
 hooks into Site Settings

 Just from the description you provided, it is still not clear enough for
 me to say much about it.

 The general concern with putting it into SMW is that this forces the
 people working on SMW to hold it into account. This means making sure it
 does not get broken when changes are made on the master branch. That is
 hard to do since it requires the Site Settings extension. If the code is
 really trivial, then perhaps this is fine.

 Cheers

 --
 Jeroen De Dauw - http://www.bn2vs.com
 Software craftsmanship advocate
 Evil software architect at Wikimedia Germany
 ~=[,,_,,]:3



--
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
___
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel


Re: [SMW-devel] Adding Site Settings support to SMW?

2014-07-18 Thread Jeroen De Dauw
Hey,

 The same thing holds true for Page Schemas, by the way - the code in SMW
that hooks into it is somewhat complex, but as far as I know it hasn't
required any special maintenance effort on the part of SMW devs.

As far as I'm concerned, we (SMW devs) are responsible to not break code in
our repo, and to make sure the code we release is working properly.

You can create an extension to SMW to avoid the problem. And if you do
that, you can specify a compat range, and are not force to keep it working
against master the whole time.

Cheers

--
Jeroen De Dauw - http://www.bn2vs.com
Software craftsmanship advocate
Evil software architect at Wikimedia Germany
~=[,,_,,]:3
--
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds___
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel


Re: [SMW-devel] Adding Site Settings support to SMW?

2014-07-18 Thread Yaron Koren
Hi James,

 I'm not a huge fan of such interdependencies (and AdminLinks is no
exception).

This seems like the most overriding of your objections. Could you elaborate
on it?
--
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds___
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel


Re: [SMW-devel] Adding Site Settings support to SMW?

2014-07-18 Thread Jeroen De Dauw
Hey,

Perhaps we should move out the existing ones now we are switching to 2.0
anyway? The new mini extensions can be put in the suggests section. Or
perhaps not, as for those to fully function, you'd first need package
definitions of their dependencies as well. Thoughts?

Cheers

--
Jeroen De Dauw - http://www.bn2vs.com
Software craftsmanship advocate
Evil software architect at Wikimedia Germany
~=[,,_,,]:3
--
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds___
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel


Re: [SMW-devel] Adding Site Settings support to SMW?

2014-07-17 Thread John McClure

Hi Yaron,
Definitely SiteSettings is useful for a wikifarm, so is the interwiki 
table. To get named-value simplicity (for admins), adding a LONGTEXT 
column (or LONG VARCHAR) to the interwiki table and then extracting 
named values via canned mysql achieves similar goals


mysql describe interwiki;
+---+---+--+-+-+---+
| Field | Type  | Null | Key | Default | Extra |
+---+---+--+-+-+---+
| iw_prefix | varbinary(32) | NO   | PRI | NULL|   |
| iw_url| blob  | NO   | | NULL|   |
| iw_api| blob  | NO   | | NULL|   |
| iw_wikiid | varbinary(64) | NO   | | NULL|   |
| iw_local  | tinyint(1)| NO   | | NULL|   |
| iw_trans  | tinyint(4)| NO   | | 0   |   |
+---+---+--+-+-+---+

SELECT
SUBSTR('iw_settings', LOCATE('setting', 'iw_settings') + 
LENGTH('setting'),
LOCATE('/setting', 'iw_settings') - LOCATE('setting', 'iw_settings') 
+ LENGTH('setting')

) as 'setting'
FROM interwiki WHERE 'iw_url'='localhost';

Anyway I much like all three extensions, and welcome tight integration 
among them all, despite dev headaches that may occur.

Thanks for your terrific contributions/john

On 7/16/2014 10:01 AM, Yaron Koren wrote:

Hi John,

The Page Schemas class is linked in my original email; the Admin Links 
function is in SemanticMediaWiki.hooks.php.


I would rather not get into the technical details of any of those 
extensions in this thread, except as it relates to SMW. However - it's 
true that a key-value approach for Site Settings would be more 
flexible than a hardcoded table, but Site Settings is also meant to be 
usable for a wiki farm, and I figured that a standard DB table would 
be easier for admins to deal with than a big key-value table.


-Yaron


On Wed, Jul 16, 2014 at 12:27 PM, John McClure 
jmccl...@hypergrove.com mailto:jmccl...@hypergrove.com wrote:


On 7/15/2014 7:25 PM, Yaron Koren wrote:

Semantic MediaWiki already hooks into the first two: Admin Links
via a function, and Page Schemas with a class.


Hi Yaron - What function/class are those. Also, i happened to
review PS extension's DTD - has it changed?

?xml  version=1.0encoding=utf-8?
!DOCTYPE  PageSchema  [
!ELEMENT  PageSchema  (Template*)
!ELEMENT  PageSchema  (semanticforms_Form*)
!ATTLIST  PageSchema  name  CDATA  #REQUIRED
!ELEMENT  Template  (Field*)
!ATTLIST  Template  name  CDATA  #REQUIRED
!ATTLIST  semanticforms_Form  name  CDATA  #REQUIRED
!ATTLIST  Field  name  CDATA  #REQUIRED
]

I looked at SiteSettings schema and wondering about a different idea
-- how about duplicating mediawiki's interwiki table but with a
blob of named-value settings.
In this way other setup settings can be added with great ease.
And it can be used as the anchor for definition of an smw-wiki farm.
It could come in handy during cross-site joins in some future.



--
Want fast and easy access to all the code in your enterprise?
Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
___
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
mailto:Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel




--
WikiWorks · MediaWiki Consulting · http://wikiworks.com


--
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds___
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel


Re: [SMW-devel] Adding Site Settings support to SMW?

2014-07-16 Thread Yaron Koren
Hi Yury,

On Wed, Jul 16, 2014 at 1:32 AM, Yury Katkov katkov.ju...@gmail.com wrote:

 Hi Yaron!

 I think that for SiteSettings this patch could make sense although I'm
 strongly against such interdependencies between extensions (after trying to
 contribute to PageSchemas)


Could you expand on that?



 Is AdminLinks mentioned in SMW? That's really strange and surprising - I
 thought it's just a header button and the predefined wikipage for the
 content (well, maybe it can also check, which extensions are installed).


Every extension-related link in Special:AdminLinks is added by that
extension.

-Yaron

-- 
WikiWorks · MediaWiki Consulting · http://wikiworks.com
--
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds___
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel


Re: [SMW-devel] Adding Site Settings support to SMW?

2014-07-16 Thread Yury Katkov
Hi!


On Wed, Jul 16, 2014 at 3:37 PM, Yaron Koren ya...@wikiworks.com wrote:

 Hi Yury,

 On Wed, Jul 16, 2014 at 1:32 AM, Yury Katkov katkov.ju...@gmail.com
 wrote:

 Hi Yaron!

 I think that for SiteSettings this patch could make sense although I'm
 strongly against such interdependencies between extensions (after trying to
 contribute to PageSchemas)


 Could you expand on that?

It's just a lot harder to contribute the code when there is such a
dependency. In order to contribute the code I have to make changes not in
one extension but in two or three. This can create inconsistency, like the
one we can see now in Page Schemas: there are some features that are
presented in PS but the code in SF still doesn't have support for them,
because the changes haven't been accepted.

I understand that you've had in mind the following scenario: there is Page
Schemas and everyone can register their own extension in it. It didn't work
well in the Page Schemas case but it can in principle work in case of Site
Settings since it's not SMW-specific.




 Is AdminLinks mentioned in SMW? That's really strange and surprising - I
 thought it's just a header button and the predefined wikipage for the
 content (well, maybe it can also check, which extensions are installed).


 Every extension-related link in Special:AdminLinks is added by that
 extension.




 -Yaron

 --
 WikiWorks · MediaWiki Consulting · http://wikiworks.com

--
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds___
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel


Re: [SMW-devel] Adding Site Settings support to SMW?

2014-07-16 Thread John McClure

On 7/15/2014 7:25 PM, Yaron Koren wrote:
Semantic MediaWiki already hooks into the first two: Admin Links via a 
function, and Page Schemas with a class.


Hi Yaron - What function/class are those. Also, i happened to review PS 
extension's DTD - has it changed?


?xml  javascript:searchRef('xml')  version  javascript:searchRef('version')=1.0encoding  
javascript:searchRef('encoding')=utf  javascript:searchRef('utf')-8?
!DOCTYPE  javascript:searchRef('DOCTYPE')  PageSchema  
javascript:searchRef('PageSchema')  [
!ELEMENT  javascript:searchRef('ELEMENT')  PageSchema  javascript:searchRef('PageSchema') 
 (Template  javascript:searchRef('Template')*)
!ELEMENT  javascript:searchRef('ELEMENT')  PageSchema  javascript:searchRef('PageSchema') 
 (semanticforms_Form  javascript:searchRef('semanticforms_Form')*)
!ATTLIST  javascript:searchRef('ATTLIST')  PageSchema  javascript:searchRef('PageSchema')  name  
javascript:searchRef('name')  CDATA  javascript:searchRef('CDATA')  #REQUIRED  
javascript:searchRef('REQUIRED')
!ELEMENT  javascript:searchRef('ELEMENT')  Template  javascript:searchRef('Template')  
(Field  javascript:searchRef('Field')*)
!ATTLIST  javascript:searchRef('ATTLIST')  Template  javascript:searchRef('Template')  name  
javascript:searchRef('name')  CDATA  javascript:searchRef('CDATA')  #REQUIRED  
javascript:searchRef('REQUIRED')
!ATTLIST  javascript:searchRef('ATTLIST')  semanticforms_Form  javascript:searchRef('semanticforms_Form')  name  
javascript:searchRef('name')  CDATA  javascript:searchRef('CDATA')  #REQUIRED  
javascript:searchRef('REQUIRED')
!ATTLIST  javascript:searchRef('ATTLIST')  Field  javascript:searchRef('Field')  name  
javascript:searchRef('name')  CDATA  javascript:searchRef('CDATA')  #REQUIRED  
javascript:searchRef('REQUIRED')
]

I looked at SiteSettings schema and wondering about a different idea
-- how about duplicating mediawiki's interwiki table but with a blob of 
named-value settings.

In this way other setup settings can be added with great ease.
And it can be used as the anchor for definition of an smw-wiki farm.
It could come in handy during cross-site joins in some future.

--
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds___
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel


Re: [SMW-devel] Adding Site Settings support to SMW?

2014-07-16 Thread Yaron Koren
Hi Yury,

You're right that Page Schemas, unlike the other two, is not really a
generic framework, and is pretty tightly integrated in with the standard
SMW approach to data structures, which has caused some problems.

Personally, I think Page Schemas works well now - I use it on a regular
basis - but that of course is a matter of opinion. Like with any software,
there's always room for improvement.

-Yaron


On Wed, Jul 16, 2014 at 10:46 AM, Yury Katkov katkov.ju...@gmail.com
wrote:

 Hi!


 On Wed, Jul 16, 2014 at 3:37 PM, Yaron Koren ya...@wikiworks.com wrote:

 Hi Yury,

 On Wed, Jul 16, 2014 at 1:32 AM, Yury Katkov katkov.ju...@gmail.com
 wrote:

 Hi Yaron!

 I think that for SiteSettings this patch could make sense although I'm
 strongly against such interdependencies between extensions (after trying to
 contribute to PageSchemas)


 Could you expand on that?

 It's just a lot harder to contribute the code when there is such a
 dependency. In order to contribute the code I have to make changes not in
 one extension but in two or three. This can create inconsistency, like the
 one we can see now in Page Schemas: there are some features that are
 presented in PS but the code in SF still doesn't have support for them,
 because the changes haven't been accepted.

 I understand that you've had in mind the following scenario: there is Page
 Schemas and everyone can register their own extension in it. It didn't work
 well in the Page Schemas case but it can in principle work in case of Site
 Settings since it's not SMW-specific.




 Is AdminLinks mentioned in SMW? That's really strange and surprising - I
 thought it's just a header button and the predefined wikipage for the
 content (well, maybe it can also check, which extensions are installed).


 Every extension-related link in Special:AdminLinks is added by that
 extension.




 -Yaron

 --
 WikiWorks · MediaWiki Consulting · http://wikiworks.com





-- 
WikiWorks · MediaWiki Consulting · http://wikiworks.com
--
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds___
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel


Re: [SMW-devel] Adding Site Settings support to SMW?

2014-07-16 Thread Yaron Koren
Hi John,

The Page Schemas class is linked in my original email; the Admin Links
function is in SemanticMediaWiki.hooks.php.

I would rather not get into the technical details of any of those
extensions in this thread, except as it relates to SMW. However - it's true
that a key-value approach for Site Settings would be more flexible than a
hardcoded table, but Site Settings is also meant to be usable for a wiki
farm, and I figured that a standard DB table would be easier for admins to
deal with than a big key-value table.

-Yaron


On Wed, Jul 16, 2014 at 12:27 PM, John McClure jmccl...@hypergrove.com
wrote:

  On 7/15/2014 7:25 PM, Yaron Koren wrote:

 Semantic MediaWiki already hooks into the first two: Admin Links via a
 function, and Page Schemas with a class.


 Hi Yaron - What function/class are those. Also, i happened to review PS
 extension's DTD - has it changed?

 ?xml version=1.0 encoding=utf-8?
 !DOCTYPE PageSchema [
 !ELEMENT PageSchema (Template*)
 !ELEMENT PageSchema (semanticforms_Form*)
 !ATTLIST PageSchema name CDATA #REQUIRED
 !ELEMENT Template (Field*)
 !ATTLIST Template name CDATA #REQUIRED
 !ATTLIST semanticforms_Form name CDATA #REQUIRED
 !ATTLIST Field name CDATA #REQUIRED
 ]

 I looked at SiteSettings schema and wondering about a different idea
 -- how about duplicating mediawiki's interwiki table but with a blob of
 named-value settings.
 In this way other setup settings can be added with great ease.
 And it can be used as the anchor for definition of an smw-wiki farm.
 It could come in handy during cross-site joins in some future.



 --
 Want fast and easy access to all the code in your enterprise? Index and
 search up to 200,000 lines of code with a free copy of Black Duck
 Code Sight - the same software that powers the world's largest code
 search on Ohloh, the Black Duck Open Hub! Try it now.
 http://p.sf.net/sfu/bds
 ___
 Semediawiki-devel mailing list
 Semediawiki-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/semediawiki-devel




-- 
WikiWorks · MediaWiki Consulting · http://wikiworks.com
--
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds___
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel


Re: [SMW-devel] Adding Site Settings support to SMW?

2014-07-16 Thread Jeroen De Dauw
Hey,

Can you give me some idea of what this code you'd put in SMW would look
like? Is there already an example somewhere?

Cheers

--
Jeroen De Dauw - http://www.bn2vs.com
Software craftsmanship advocate
Evil software architect at Wikimedia Germany
~=[,,_,,]:3
--
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds___
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel


Re: [SMW-devel] Adding Site Settings support to SMW?

2014-07-16 Thread Yaron Koren
Hi Jeroen,

Unfortunately, there isn't yet a public example of an extension that hooks
into Site Settings - if this potential code gets into SMW, SMW could become
the first. But the basic idea is that the class would contain various
static methods, each of which was called by a different Site Settings hook,
that mainly did the following: added HTML for new fields to the
Special:SiteSettings form, saved information from those fields to the
database, and loaded information from the database into SMW's global
variables. The latter two would be done by calling the Site Settings API,
for what it's worth - there would be no direct database calls.

By the way, the only SMW global variable that I'm currently planning to
handle in this code is $smwgShowFactbox - but there's always the potential
for adding additional settings.

-Yaron


On Wed, Jul 16, 2014 at 7:50 PM, Jeroen De Dauw jeroended...@gmail.com
wrote:

 Hey,

 Can you give me some idea of what this code you'd put in SMW would look
 like? Is there already an example somewhere?

 Cheers

 --
 Jeroen De Dauw - http://www.bn2vs.com
 Software craftsmanship advocate
 Evil software architect at Wikimedia Germany
 ~=[,,_,,]:3




-- 
WikiWorks · MediaWiki Consulting · http://wikiworks.com
--
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds___
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel


[SMW-devel] Adding Site Settings support to SMW?

2014-07-15 Thread Yaron Koren
Hi,

There are three extensions of mine that take a similar approach, where they
provide a generic framework and other extensions add their own specific
functionality in via hooks: Admin Links, Page Schemas and Site Settings.
Semantic MediaWiki already hooks into the first two: Admin Links via a
function, and Page Schemas with a class. [1] Site Settings [2] is the
newest of these three, and SMW doesn't connect to it yet, but I would like
to add code in to SMW to do that, most likely via another class, that would
be called SMWSiteSettings.

The code that interfaces with Page Schemas caused some controversy before
on this mailing list (though the Admin Links code never did), so I thought
I'd ask about it here before trying to send in a patch. I'm not planning on
adding any testing code for this new code, just like there isn't for the
Admin Links and Page Schemas code in SMW; but my philosophy, as I explained
before when we talked about Page Schemas, is that, even in the worst case
where the code crashes completely, it will not affect any of the other SMW
functionality, so it can safely be ignored by SMW developers.

I certainly hope to be able to add such a patch in, but I look forward to
any questions or comments.

[1]
https://github.com/SemanticMediaWiki/SemanticMediaWiki/blob/master/includes/SMW_PageSchemas.php
[2] https://www.mediawiki.org/wiki/Extension:Site_Settings

-Yaron

-- 
WikiWorks · MediaWiki Consulting · http://wikiworks.com
--
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds___
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel


Re: [SMW-devel] Adding Site Settings support to SMW?

2014-07-15 Thread Yury Katkov
Hi Yaron!

I think that for SiteSettings this patch could make sense although I'm
strongly against such interdependencies between extensions (after trying to
contribute to PageSchemas)

Is AdminLinks mentioned in SMW? That's really strange and surprising - I
thought it's just a header button and the predefined wikipage for the
content (well, maybe it can also check, which extensions are installed).

-
Yury Katkov


On Wed, Jul 16, 2014 at 4:25 AM, Yaron Koren ya...@wikiworks.com wrote:

 Hi,

 There are three extensions of mine that take a similar approach, where
 they provide a generic framework and other extensions add their own
 specific functionality in via hooks: Admin Links, Page Schemas and Site
 Settings. Semantic MediaWiki already hooks into the first two: Admin Links
 via a function, and Page Schemas with a class. [1] Site Settings [2] is the
 newest of these three, and SMW doesn't connect to it yet, but I would like
 to add code in to SMW to do that, most likely via another class, that would
 be called SMWSiteSettings.

 The code that interfaces with Page Schemas caused some controversy before
 on this mailing list (though the Admin Links code never did), so I thought
 I'd ask about it here before trying to send in a patch. I'm not planning on
 adding any testing code for this new code, just like there isn't for the
 Admin Links and Page Schemas code in SMW; but my philosophy, as I explained
 before when we talked about Page Schemas, is that, even in the worst case
 where the code crashes completely, it will not affect any of the other SMW
 functionality, so it can safely be ignored by SMW developers.

 I certainly hope to be able to add such a patch in, but I look forward to
 any questions or comments.

 [1]
 https://github.com/SemanticMediaWiki/SemanticMediaWiki/blob/master/includes/SMW_PageSchemas.php
 [2] https://www.mediawiki.org/wiki/Extension:Site_Settings

 -Yaron

 --
 WikiWorks · MediaWiki Consulting · http://wikiworks.com


 --
 Want fast and easy access to all the code in your enterprise? Index and
 search up to 200,000 lines of code with a free copy of Black Duck
 Code Sight - the same software that powers the world's largest code
 search on Ohloh, the Black Duck Open Hub! Try it now.
 http://p.sf.net/sfu/bds
 ___
 Semediawiki-devel mailing list
 Semediawiki-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/semediawiki-devel


--
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds___
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel