Our organization could benefit from the ability to search for terms within Gliffy Diagrams. The Confluence search function provides this feature, but the gliffy diagram search results that are returned are HTML files.
Ideally this search result would link to the page which the gliffy diagram resides in or the gliffy diagram itself, opened with Gliffy. Instead, the page which is opened is HTML code. Is there a way to change this behaviour?
We wrote a quick and a little bit dirty workarround script:
If a user clicks on the search result the wiki page that contains the gliffy is opened.
You can add this script to Settings -> Custom HTML -> At end of the BODY.
<script>
jQuery(function(jQuery){
jQuery("body").on("click","a.search-result-link.visitable",function(e){
e.preventDefault();
var current = jQuery(this);
var href = current.attr("href");
jQuery.getJSON(contextPath+href, function(data){
if(data.contentType == "application/gliffy+json"){
var gotogliffy = current.closest("li").find("a.container").last();
window.location = contextPath+gotogliffy.attr("href");
}else{window.location = contextPath+href;}
}).fail(function(){window.location = window.location = contextPath+href;});
return false;
});
});
</script>
Hello Greg,
The API hook that enabled this functionality has been removed since Confluence 5.2. We've raised the issue with Atlassian, but unfortunately there are no plans for a fix. You can view the full details of the problem here: https://jira.atlassian.com/browse/CONF-34892 Feel free to watch, vote, and comment on the issue.
The current workaround is to click the small, gray link below the search result description.
Regards,
Mike Cialowicz
Gliffy, Inc.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
NOTE: I'm currently testing Confluence Version 6.12.2 and if this script is in place in Confluence Administration / Custom HTML, it causes problems with following Search Results hyperlinks. To test, type something into the Search Box in Confluence. When the results are displayed, attempting to follow links to those items produces a "Page Not Found" error. The workaround is to right-click on the individual search result and choose "Open in New Window" or "Open in New Tab"...otherwise you get the error.
I removed this script from Custom HTML and the problem I describe above went away.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Philipp, The current workaround is to click the small, gray link below the search result description in order to navigate to the page containing the Gliffy diagram. Regards, Mike Cialowicz Gliffy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Mike Cialowicz: is there way for plug-in to control link presented to a user by search? In that case link to a viewer could be provided instead of a file? Like https://confluence.company.com/plugins/gliffy/viewer.action?inline=false&attachmentId=56328277&name=test instead of https://confluence.company.com/download/attachments/56098836/test?version=2&modificationDate=1443611832573&api=v2 ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.