Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi,
I was wondering if there are any plans to support DITA tags?
<chapter href="#">
<topicref href="#">
<xref href="#">
and so forth ....
I modified the 6.x-2.5 module to support those on my installation, but i wouldn't want to do it every time i update the module
vitalik
Comments
Comment #1
hass CreditAttribution: hass commentedPlease share a patch.
Comment #2
vitalik_m CreditAttribution: vitalik_m commentedAlex,
i'm still learning patch-making, but here's what i did:
linkchecker.module - around line 1253 i added
and added three more lines to the array_merge, immediately following the added code
then on what now should be somewhere around line 1464 i've added
Moving on to linkchecker.admin.inc file.
on line 105 (or there about) following lines were added to the administration form:
sorry it looks weird, code tags are breaking the formatting
$form['tag']['linkchecker_extract_from_chapter'] = array(
'#default_value' => variable_get('linkchecker_extract_from_chapter', 0),
'#type' => 'checkbox',
'#title' => t('Extract links in <code>
<chapter>
</code> tags'),'#description' => t('Enable this checkbox if links in chapter tags should be extracted. The chapter element is used to embed chapter content.'),
);
$form['tag']['linkchecker_extract_from_topicref'] = array(
'#default_value' => variable_get('linkchecker_extract_from_topicref', 0),
'#type' => 'checkbox',
'#title' => t('Extract links in <code>
<topicref>
</code> tags'),'#description' => t('Enable this checkbox if links in topicref tags should be extracted. The topicref element is used to embed topicref content.'),
);
$form['tag']['linkchecker_extract_from_xref'] = array(
'#default_value' => variable_get('linkchecker_extract_from_xref', 0),
'#type' => 'checkbox',
'#title' => t('Extract links in <code>
<xref>
</code> tags'),'#description' => t('Enable this checkbox if links in xref tags should be extracted. The xref element is used to embed xref content.'),
);
let me know if this code can be written in more efficient way or can be optimized
vitalik
Comment #3
vitalik_m CreditAttribution: vitalik_m commentedi wonder if it makes more sense to write (include) it as sub-module, so that only those that need it would enable that functionality
Comment #4
hass CreditAttribution: hass commentedD7 first. Please create patches.
Comment #5
hass CreditAttribution: hass commentedAre you working on a patch? At least the uninstall part is missing above.
Comment #6
hass CreditAttribution: hass commentedIt looks like #1 is an incomplete list of all the available tags. I'm not a DITA (http://docs.oasis-open.org/dita/v1.2/spec/DITA1.2-spec.html, http://www.xmlmind.com/tutorials/DITA/index.html) specialist, but we need to collect all possible tags with it's attribute names and sourounding html tags like "prolog" and others. Otherwise we are not able to find them in D7 with html dom.
Just a few of the many I've found:
Comment #7
hass CreditAttribution: hass commentedComment #8
hass CreditAttribution: hass commentedBecause of the large number of tags I would only add one setting checkbox to the admin page to enable DITA tags.
Comment #9
vitalik_m CreditAttribution: vitalik_m commentedI'll work on a Git patch that will add DITA tags that contain hrefs in them to the list of patterns to match/search.
Unfortunately at this point i can only provide the TortoiseSVN generated patch. I don't know how well it will work with Git
-V-
Comment #10
hass CreditAttribution: hass commentedI'm sorry, but we requires a D7 patch first and always against DEV.
Comment #10.0
hass CreditAttribution: hass commentedhit enter by accident and did not finish
Comment #11
hass CreditAttribution: hass commentedNo progress