• Resolved clicsilas

    (@clicsilas)


    Hello,
    this is the site where I would like to include a view of the MIT’s Exhibit (https://www.simile-widgets.org/exhibit3/): http://clicresearch.org/scientific-publications/
    I created a new theme where I changed the default header.php and the page.php a bit to make some includes and show the exhibit data. As you can see on the site the facets are working and are showing the correct data. My problem: The data itself is not listed on the page. There I get something blank.
    In the new header I added:

    <script src="http://api.simile-widgets.org/exhibit/3.0.0rc1/exhibit-api.js" type="text/javascript"></script>
    	<link href="http://clicresearch.org/clicpublications_new_1.js" type="application/json" rel="exhibit/data" />

    And for the facets and the data showing itself I added:

    <div id="exhibit-facets">
    					<div  class="exhibit-textSearch" ex:role="facet" ex:facetLabel="Search for Publications" ex:facetClass="TextSearch" ex:showMissing="false"></div></br>
    					<div ex:role="facet" ex:facetLabel="Publication Year" ex:expression=".biblio_year" ex:showMissing="false" ex:sortDirection="reverse"  ex:height="14.3em"></div>
    					<div ex:role="facet" ex:facetLabel="Author" ex:expression=".biblio_authors" ex:showMissing="false" ex:height="14.3em"></div>
    					<div ex:role="facet" ex:facetLabel="Publication Type" ex:expression=".name" ex:showMissing="false" ex:height="14.3em"></div>
    				</div>
    				</br>
    				<div id="content">
    							<div id="exhibit-results>
    								<div ex:role="view"
    								ex:orders=".biblio_year, .title"
    								ex:directions="descending, ascending"
    								ex:possibleOrders=".biblio_authors, .title, .biblio_year"
    								ex:possibleDirections="ascending, ascending, descending">
    									<div ex:role="lens" style="display: none"> 
    										<div ex:content=".citation"></div>
    									</div>
    							</div> <!-- #exhibit-results -->
    				</div> <!-- #content -->

    The .js document looks like:

    {
    	"types": {
    		"node": {
    			"label": "Publication",
    			"pluralLabel": "Publications"
    		}
    	},
    	"properties": {
    		"title": {
    			"label": "Title"
    		},
    		"biblio_authors": {
    			"label": "Authors"
    		},
    		"citation": {
    			"label": "Biblio Citation"
    		},
    		"name": {
    			"label": "Type of Publication"
    		},
    		"biblio_year": {
    			"label": "Year of Publication"
    		}
    	},
    	"items": [{
    		"label": "Item0",
    		"type": "node",
    		"title": "On the importance of boundary objects for virtual collaboration: a review of the literature",
    		"biblio_authors": ["M. Marheineke", "V.K. Velamuri", "K.M. M\u00f6slein"],
    		"citation": "Marheineke, M., Velamuri V. K., & M\u00c3\u00b6slein K. M. \n (2016).\u00a0\u00a0On the importance of boundary objects for virtual collaboration: a review of the literature.  \nTechnology Analysis & Strategic Management Journal. 28(9),\u00a01108-1122.",
    		"name": "03. Journal Papers",
    		"biblio_year": "2016"
    	}]
    }

    I tested the exact same code on a local html-document in my browser and it is working. Is there a problem between WordPress and Simile Exhibit? Any idea what to change?

Viewing 4 replies - 1 through 4 (of 4 total)
  • I see from your listed example that you’ve made this work, and it looks great. I’m engaged in doing something similar. It would be very helpful if you could show how you hacked the WP theme to integrate the Exhibit. How exactly did you change the default header.php and the page.php.

    Thread Starter clicsilas

    (@clicsilas)

    I simply created a new template with the same header.php and page.php content. Then I modified the new ones (e.g. publications-header.php and publications-page.php) to use MIT’s Exhibit as u can see in the examples on their page. For the last step I activated the publications template on the site I want to use it (Here for publications).
    I hope I could help.
    Good luck with your stuff.

    hi @clicsilas,
    Thanks very much for helping. I’ve succeeded in creating a special-purpose template that renders my exhibit as I would wish, but an essential element seems to be broken.

    The ‘bookmark’ function (click on the bookmark icon) generates a url that records a hash that should return a user to a particular state, ie. displaying a filtered dataset. This function works in my development version, built outside of the WP site, but in the page that WP generates from the page-exhibit.php template, the bookmark creates a URL with the hash, but WP ignores the hash and simply takes the user to the default, unfiltered dataset.

    I know that WP does a good deal of munging of URLs, and redirects and such, but I don’t know enough about WPs internals to guess why it’s ignoring the state data in the URL.

    Any insight at all that you might have would be welcome.
    Jon

    Thread Starter clicsilas

    (@clicsilas)

    Phew, i have no idea what the problem could be. But that way may help you with finding a solution:
    Duplicate the code from the working development version to the WordPress version. Step by step add the old WordPress code that was not working to the working code and see when you get the error.
    Or try it the other way around: Take your not working WordPress version and replace the code step by step with the working development version and see when/how the error occurs.
    That may help you finding the place of the error and then maybe also the why of the error.
    Sorry for not being able to help much.
    Good luck.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Simile Exhibit is not working’ is closed to new replies.