[SMW-devel] smw.org hooks namespace
Hi, It is probably only me but I'd like to have a stable URL schema for available hooks which is could be similar to [0] and resulting in something like [1]. I don't want to have a long bikeshed over whether something like this needed or not, a stable URL without the need of being lost on some sub-page would certainly help the documentation process. [0] https://www.semantic-mediawiki.org/wiki/Hooks:Name [1] https://www.semantic-mediawiki.org/wiki/Hooks:SMW::SQLStore::PropertyTableDefinition Cheers -- How ServiceNow helps IT people transform IT departments: 1. A cloud service to automate IT design, transition and operations 2. Dashboards that offer high-level views of enterprise services 3. A single system of record for all IT processes http://p.sf.net/sfu/servicenow-d2d-j ___ Semediawiki-devel mailing list Semediawiki-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/semediawiki-devel
Re: [SMW-devel] smw.org hooks namespace
Hi, Since you don't want to have a long bikeshed, I'll keep it short. :) I don't like the idea of having a different namespace for each page type; it seems unnecessarily complicated. If you like that specific naming structure, you could always just start page names with Hooks:, without the need for a new namespace. Personally, I don't see a big benefit to having the word Hooks in the page name at all, but that's a more minor issue. -Yaron On Sun, Jun 9, 2013 at 6:32 AM, James HK jamesin.hongkon...@gmail.comwrote: Hi, It is probably only me but I'd like to have a stable URL schema for available hooks which is could be similar to [0] and resulting in something like [1]. I don't want to have a long bikeshed over whether something like this needed or not, a stable URL without the need of being lost on some sub-page would certainly help the documentation process. [0] https://www.semantic-mediawiki.org/wiki/Hooks:Name [1] https://www.semantic-mediawiki.org/wiki/Hooks:SMW::SQLStore::PropertyTableDefinition Cheers -- How ServiceNow helps IT people transform IT departments: 1. A cloud service to automate IT design, transition and operations 2. Dashboards that offer high-level views of enterprise services 3. A single system of record for all IT processes http://p.sf.net/sfu/servicenow-d2d-j ___ Semediawiki-devel mailing list Semediawiki-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/semediawiki-devel -- WikiWorks · MediaWiki Consulting · http://wikiworks.com -- How ServiceNow helps IT people transform IT departments: 1. A cloud service to automate IT design, transition and operations 2. Dashboards that offer high-level views of enterprise services 3. A single system of record for all IT processes http://p.sf.net/sfu/servicenow-d2d-j___ Semediawiki-devel mailing list Semediawiki-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/semediawiki-devel
[SMW-devel] [SMW1.8.0.1][SRF1.8] Wrong charset of vcard (.vcf) attachments OR How can I modify the SMW_ExportPrinter.php?
Hi all! My setup: MediaWiki 1.19.3 PHP 5.4.16 SMW1.8.0.1 SRF1.8 I'm currently implementing the vCard-Export in a wiki. The export itself works fine but character encoding of the output .vcf is UTF-8. The character encoding of the file must be windows-1252 or iso-8859-1, though, that it can be opened by MS Outlook. Further, I think I found the corresponding part in the SMW_ExportPrinter.php: public function outputAsFile( SMWQueryResult $queryResult, array $params ) { $result = $this-getResult( $queryResult, $params, SMW_OUTPUT_FILE ); header( 'Content-type: ' . $this-getMimeType( $queryResult ) . '; charset=UTF-8' ); $fileName = $this-getFileName( $queryResult ); if ( $fileName !== false ) { header( content-disposition: attachment; filename=$fileName ); } echo $result; } My understanding of this code is that all files will be encoded in UTF-8. Hence, I modified the function so that the charset (only) for vCards is iso-8859-1. (The string 'text/x-vcard' is copied from SRF_vCard.php which constructs the attachment.) public function outputAsFile( SMWQueryResult $queryResult, array $params ) { $result = $this-getResult( $queryResult, $params, SMW_OUTPUT_FILE ); if ( $this-getMimeType( $queryResult ) == 'text/x-vcard') { header( 'Content-type: text/x-vcard; charset=iso-8859-1' ); } else { header( 'Content-type: ' . $this-getMimeType( $queryResult ) . '; charset=utf-8' ); } $fileName = $this-getFileName( $queryResult ); if ( $fileName !== false ) { header( content-disposition: attachment; filename=$fileName ); } echo $result; } It isn't beautiful but it should do the trick. Okay, so here's my problem: It doesn't do anything. Any changes I make simply do not have an effect on the output. Even gibberish doesn't produce error massages. The .vcf output still works and the encoding is UTF-8. My questions are: Am I on the right track? Is this really the important part of the code? Where should I look instead? Many thanks in advance! This bug is haunting me for a week now. =) Thomas -- How ServiceNow helps IT people transform IT departments: 1. A cloud service to automate IT design, transition and operations 2. Dashboards that offer high-level views of enterprise services 3. A single system of record for all IT processes http://p.sf.net/sfu/servicenow-d2d-j___ Semediawiki-devel mailing list Semediawiki-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/semediawiki-devel
Re: [SMW-devel] smw.org hooks namespace
Hi Yaron, I agree with you, that type=namespace is more trouble than its worth. Instead Im evolving towards a custom SMW parser that implements a specific naming convention for pagenames. Since RDF treats a resource URI as opaque -- meaning a page title has no meaning itself -- naming conventions are totally within the purview of applications, like a wiki. In practice, then, pages can be named with a type and kept in any namespace. This idea is consistent with topic maps, an interest of mine. I think a custom SMW parser must necessarily be paired with a custom exportRDF, so as to make transparent the wiki's pagenames whenever transformed for external consumption. For example, I am considering now namespaces equivalent to time periods, eg Past: and Future:, with bots moving data around as necessary, the point being to simplify and to obtain peak performance for many queries (eg dated Events), to simplify an extraordinary amount of processing by eliminating date arithmetic, and to implement a storage model more consistent with users' mental processes. The second reason for having such time-namespaces is that the pagename algorithms implemented in the SMW parser can be equally applied to subobjects, right now a different world from pagenames. So a subject named Person:Joe Smith can be alive or not or to be born, depending on the namespace (or, if subobject, simulated namespace) in which the information lives. The third reason is concerned with training users who want to write their own queries. It's pretty easy to explain using namespace constraints only for time expressions, eg [[Past:+||Now:+||Future:+]] grabs all info in a wiki (I also like Recent: and Soon:, to distinguish time bands around the current context). Any thoughts in the community about this approach are appreciated. Thanks - john On 09.06.2013 06:50, Yaron Koren wrote: Hi, Since you don't want to have a long bikeshed, I'll keep it short. :) I don't like the idea of having a different namespace for each page type; it seems unnecessarily complicated. If you like that specific naming structure, you could always just start page names with Hooks:, without the need for a new namespace. Personally, I don't see a big benefit to having the word Hooks in the page name at all, but that's a more minor issue. -Yaron On Sun, Jun 9, 2013 at 6:32 AM, James HK jamesin.hongkon...@gmail.com wrote: Hi, It is probably only me but I'd like to have a stable URL schema for available hooks which is could be similar to [0] and resulting in something like [1]. I don't want to have a long bikeshed over whether something like this needed or not, a stable URL without the need of being lost on some sub-page would certainly help the documentation process. [0] https://www.semantic-mediawiki.org/wiki/Hooks [1]:Name [1] https://www.semantic-mediawiki.org/wiki/Hooks:SMW::SQLStore::PropertyTableDefinition [2] Cheers -- How ServiceNow helps IT people transform IT departments: 1. A cloud service to automate IT design, transition and operations 2. Dashboards that offer high-level views of enterprise services 3. A single system of record for all IT processes http://p.sf.net/sfu/servicenow-d2d-j [3] ___ Semediawiki-devel mailing list Semediawiki-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/semediawiki-devel [4] -- WikiWorks · MediaWiki Consulting · http://wikiworks.com [5] -- How ServiceNow helps IT people transform IT departments: 1. A cloud service to automate IT design, transition and operations 2. Dashboards that offer high-level views of enterprise services 3. A single system of record for all IT processes http://p.sf.net/sfu/servicenow-d2d-j [3] ___ Semediawiki-devel mailing list Semediawiki-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/semediawiki-devel [4] Links: -- [1] https://www.semantic-mediawiki.org/wiki/Hooks [2] https://www.semantic-mediawiki.org/wiki/Hooks:SMW::SQLStore::PropertyTableDefinition [3] http://p.sf.net/sfu/servicenow-d2d-j [4] https://lists.sourceforge.net/lists/listinfo/semediawiki-devel [5] http://wikiworks.com -- How ServiceNow helps IT people transform IT departments: 1. A cloud service to automate IT design, transition and operations 2. Dashboards that offer high-level views of enterprise services 3. A single system of record for all IT processes http://p.sf.net/sfu/servicenow-d2d-j___ Semediawiki-devel mailing list Semediawiki-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/semediawiki-devel