Extension talk:HierarchyBuilder

About this board

HTML error when using <hierarchy> tag...

1
175.223.18.16 (talkcontribs)

In MW 1.33, I installed the extension:HierarchyBuilder by the manual.


In developer console, error message was shown.


"Refused to apply style from '......../index.php/Themes/apple/style.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled."


Is there a something big problem? or Do I have to just ignore the message?


By the way, hierarchy was shown normally.

Reply to "HTML error when using <hierarchy> tag..."

Page name with special characters

3
Emmanuel Touvier (talkcontribs)

I found the extension does not work when a page name contains characters used in regular expressions. I had to modify HierarchyBuilder.php this way:

When there is a string comparison with preg_match_all, I first modify the $currentPagePattern

$currentPagePattern = '/\[\[' . '\Q' . str_replace('/','',$targetPageName) . '\E' . '\]\]/';

and the I do the same for $row in the comparison, example :

preg_match_all( $currentPagePattern, '\Q'.str_replace('/','',$row).'\E', $matches );

This solves my issues with Hierarchy Builder.

Kevin.ji (talkcontribs)

Thanks so much for the feedback Emmanuel! Would you mind submitting that fix as a patch in gerrit?

This post was hidden by Kevin.ji (history)
Reply to "Page name with special characters"

Features request: formlink capability for non-existent pages / filter display on semantic query

3
Xavi (talkcontribs)

Would it be possible to display a page creation form when the user clicks on a non-existent page in the tree? also would it be possible to filter the pages displayed in the tree based on the value of a semantic property of the page (e.g. Is active::true), or even better, using an ask query

Thank you.

Cindy.cicalese (talkcontribs)

Thank you for your feedback. We will add those features to our list of requests. We also welcome patches in gerrit.

Xavi (talkcontribs)

Thank you for adding these features to the request list. I have used a workaround approach to display pages based on a semantic query; I am sharing it here in case someone else needs to use a similar functionality in the meanwhile.

Instead of hard-typing a list of pages I used:

  • a subobject (my_hierarchy) containing the semantic properties of the page
  • an ask query with a template to generate the list of pages

Assuming we have this semantic property:

  • semantic_property_group_id: indicates the id of the group to which the page belongs to

and being the my_hierarchy subobject definition:

{{#subobject:my_hierarchy
| semantic_property_group_id=enter_group_id_here
}}

The query would look like this:

<hierarchy>
{{#ask:[[semantic_property_group_id::enter_group_id_here]]
 |link=none
 |format=template
 |template=Has subobject list
 |limit=500
}}
</hierarchy>

Where the template "Has subobject list" contains:

<includeonly>* [[{{#ask: [[Has subobject::{{{1}}}]] | link=none}}]]</includeonly>

To create a multilevel list I used an ask query with ultree format and a template.

Assuming we have these semantic properties:

  • semantic_property_group_id: indicates the id of the group to which the page belongs to
  • semantic_property_parent_page: indicates the "parent" page of the current page

and being the my_hierarchy subobject definition:

{{#subobject:my_hierarchy
| semantic_property_group_id=enter_group_id_here
| semantic_property_parent_page=enter_parent_pagename_here#my_hierarchy
}}

The query looks like this:

<hierarchy>
{{#ask:[[semantic_property_group_id::enter_group_id_here]]
 |format=ultree
 |link=none
 |template=Has subobject hierarchy
 |parent=semantic property parent page
 |limit=500
}}
</hierarchy>

Where the template "Has subobject hierarchy" contains:

<includeonly>[[{{#ask: [[Has subobject::{{{1}}}]] | link=none}}]]</includeonly>

To sort the pages I use another semantic property:

  • semantic_property_page_index: indicates the position of the page among its "siblings"

and being the my_hierarchy subobject definition:

{{#subobject:my_hierarchy
| semantic_property_group_id=enter_group_id_here
| semantic_property_page_index=enter_page_index_here
| semantic_property_parent_page=enter_parent_pagename_here#my_hierarchy
}}

the ask definition will include:

 |sort=semantic property page index
 |order=ascending

adding the property with underscores does not seem to work:

 |sort=semantic_property_page_index
 |order=ascending
Reply to "Features request: formlink capability for non-existent pages / filter display on semantic query"

Breadcrumb not showing up

1
77.182.54.49 (talkcontribs)

Hi, i tried to got through the tutorial, but i can´t get the breadcrumb (in-page-navigation) or page form to show up. Breadcrumb is empty, page form just shows "hierarchy" (without any wiki links).

Mediawiki 1.29.1, Semantic Mediawiki installed.

Any help is appreciated!

Reply to "Breadcrumb not showing up"

Progress in making it compatible with PageForms?

2
Rontwd (talkcontribs)

How are you progressing with this? I am setting up a Genealogy SMW and imagine this functionality would be very useful.

Ron

Cindy.cicalese (talkcontribs)

Version 5.0 of HierarchyBuilder is compatible with PageForms.

Reply to "Progress in making it compatible with PageForms?"

Compatibilty issue with Page Forms - Work in progress

5
Phil.o (talkcontribs)

As of MW 1.27

Due to Semantic Forms having moved to Page Forms

Kindly.

Cindy.cicalese (talkcontribs)

More accurately, HierarchyBuilder is not (yet) compatible with PageForms. It still works with SemanticForms on MediaWiki 1.27. We will work to have it work with PageForms as soon as possible.

Phil.o (talkcontribs)

Oh, I'm in no hurry. I did not expect such a quick reply, so thanks a lot.

For now I just deactivated the extension; I'm still a beginner in this mediawiki world and do not feel like trying to solve the issue myself.

I'd be happy to test your extension someday, though.

(I edited the title of my initial post, I did not realize it could be somewhat rude or misleading. Sorry for that.)

Cindy.cicalese (talkcontribs)

Thanks for editing the title!

I do hope to make HierarchyBuilder compatible with PageForms soon, since we heavily use SemanticForms and do want to upgrade to PageForms soon as well.

Phil.o (talkcontribs)

You're welcome :)

Reply to "Compatibilty issue with Page Forms - Work in progress"
89.159.123.27 (talkcontribs)

Hello, any plan to allow the use of cargo extension (without SMW). JMU

Kevin.ji (talkcontribs)

Hi JMU, thanks for your interest! We do not currently have any plans to support cargo but we are open to doing so if there is demand.

Reply to "Use cargo with HB"
There are no older topics