Loading...
 
Skip to main content

Module semantic_links: Links to external pages not expanded

Status
Closed
Subject
Module semantic_links: Links to external pages not expanded
Version
7.x
Category
  • Consistency
  • Usability
Feature
Modules
Semantic links (3.0)
Resolution status
Invalid
Submitted by
Ushindi Gedeon
Lastmod by
Ushindi Gedeon
Rating
(0)
Description

Using Tiki 7.2, we encounter the following issue with module semantic_links:

We've defined the abbrev. »wp« for links to Wikipedia articles, such that ((wp:Jon_Doe|Jon Doe)) expands to a link to http://en.wikipedia.org/wiki/Jon_DoeQuestion .

We've also defined a semantic link type »wp« to mark links to Wikipedia articles, and want to use the notation

  • (wp(wp:Jon_Doe|Jon Doe))


This works well for the actual wiki page, and the abbreviation is properly expanded into a link to the WP article.

However, in the module semantic_links, the link text is displayed as

  • »wp:Jon_Doe«

and the URL of the link is

  • »oursite.com/wp:Jon_Doe«.


Can this be fixed such that the module uses the same link text as the
respective wiki page?

(The Wikipedia link type is only an example, but note that it's reasonable for a wiki page to have several links to Wikipedia articles using the wp: abbrev., but still only one of those of type wp(, thereby indicating that the external Wikipedia article and the local wiki page are about the same subject.)

On the Tiki-devel mailing list (Oct 2nd 2011), Nelson Ko mentioned that

»I think there is a ›hackish‹ way to get this to happen.

In templates/modules/mod-semantic_links.tpl, you will see where the
link is generated:

<a href="{$msl_url|escape}">{$msl_item|escape}</a>

Replace this with:

{wiki}(({$msl_url})){/wiki}

I didn't test it but it should work if you have sefurl on, since with
sefurl on the value of msl_url should be simply wp:Jon_Doe«,

but the hackish way didn't hack. =;-)

Solution
Workaround
Importance
7
Priority
35
Demonstrate Bug on Tiki 19+
Demonstrate Bug (older Tiki versions)
Ticket ID
4005
Created
Thursday 06 October, 2011 08:56:38 UTC
by SysAdmin of bbash.de
LastModif
Thursday 02 July, 2026 10:24:15 UTC


Show PHP error messages