Yes, that might be a better way to go! I have never tried to make queries 
directly from the Rest back end, but I had better start reading on it and 
see if I can understand what is written. With the Wordpress page making 
calls to a server side PHP script, it should be an easy matter to 
communicate with the localhost service running at port 4000. Of course, 
'easy' is a relative term. It would be very helpful if anyone wished to 
offer some demo snippets of how this might be started. Thanks for getting 
my mind to look in an obvious direction.

On Monday, January 17, 2022 at 3:48:57 PM UTC-5 deborah....@lincoln.ac.nz 
wrote:

> Do you need to use direct queries to the database? Even if you are on the 
> same server it might be simpler to use the REST API (see documentation at 
> https://wiki.lyrasis.org/display/DSDOC7x/REST+API) and if you ever might 
> split the Wordpress site onto a different server it would be more robust.
>
>  
>
> Other options (probably not as good, but included for completeness) might 
> be to call an OAI feed (would work best by collection and/or by date - 
> https://wiki.lyrasis.org/display/DSDOC7x/OAI) or OpenSearch (can work via 
> keyword queries - 
> https://wiki.lyrasis.org/display/DSDOC7x/Business+Logic+Layer#BusinessLogicLayer-OpenSearchSupport
> ).
>
>  
>
> Deborah
>
>  
>
> *From:* dspac...@googlegroups.com <dspac...@googlegroups.com> *On Behalf 
> Of *Chris Clawson
> *Sent:* Tuesday, 18 January 2022 6:28 AM
> *To:* DSpace Technical Support <dspac...@googlegroups.com>
> *Subject:* [dspace-tech] Using PHP for DSpace content in Wordpress?
>
>  
>
> *Caution:* This email originated from outside our organisation. Do not 
> click links or open attachments unless you recognize the sender and know 
> the content is safe.
>
>  
>
> I am trying to populate a Wordpress page with DSpace content, directly 
> from my own repository on the same server. I have a demo of this idea at 
> https://montaguearchive.org/index.php/hurricane-of-1938-page-3/ . This 
> example uses a php script to read a server side list of URIs I wish to 
> place in a gallery. It then uses CURL to make web calls to these links, 
> extract the information and then populate a web page in Wordpress.
>
> Might someone please help in achieving this by using direct queries to 
> DSpace's postgresql database?
>
> I am attaching a demo script based on the information at 
> https://wiki.lyrasis.org/display/DSPACE/The+metadatavalue+table . 
>
> When I edit this script to match my DSpace db login and use an 'id' (from 
> an exported metadata .csv), it will execute and echo the 
> dc.contributor.author of this item inside a terminal shell. Try this only 
> if you have installed the proper php module which allows a login to your 
> database. In my case, it was php7.1-pgsql.
>
> Is there better documentation somewhere which hints or explains how to use 
> the DSpace tables in a direct SQL query? Are there human readable forms in 
> the DSpace installation files, which would hint at some of these methods? 
>
> Might someone provide specific examples, based on this script I have 
> provided?
>
> Using an exported csv as a reference, I need to build queries for these 
> specific terms (using the 'id' of an item in the csv column 1):
>
> dc.description
>
> dc.identifier.uri
>
> dc.title
>
> ----** and importantly, how may an image bitstream be retrieved in a 
> manner which can be placed in a web page?
>
> I really believe this technique may help promote DSpace by making it 
> easier to create visual galleries and presentations in Wordpress (or other) 
> websites. DSpace is an incredible resource for creating and managing 
> repositories, but really should have an easier way to present it's content 
> to an audience interested in casual browsing or authored presentations. My 
> web visitors are just not motivated when I tell them “go and explore the 
> database”. 
>
> Please help., 
>
> Chris
>
>  
>
>  
>
>  
>
> -- 
> All messages to this mailing list should adhere to the Code of Conduct: 
> https://www.lyrasis.org/about/Pages/Code-of-Conduct.aspx
> --- 
> You received this message because you are subscribed to the Google Groups 
> "DSpace Technical Support" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to dspace-tech...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/dspace-tech/6dc88382-5ac6-480f-a1e2-2d0f3f849fdan%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/dspace-tech/6dc88382-5ac6-480f-a1e2-2d0f3f849fdan%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> ------------------------------
>
> "The contents of this e-mail (including any attachments) may be 
> confidential and/or subject to copyright. Any unauthorised use, 
> distribution, or copying of the contents is expressly prohibited. If you 
> have received this e-mail in error, please advise the sender by return 
> e-mail or telephone and then delete this e-mail together with all 
> attachments from your system." 
>

-- 
All messages to this mailing list should adhere to the Code of Conduct: 
https://www.lyrasis.org/about/Pages/Code-of-Conduct.aspx
--- 
You received this message because you are subscribed to the Google Groups 
"DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dspace-tech+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dspace-tech/633ec4dc-b051-4aa7-ba80-71ad576ee15bn%40googlegroups.com.

Reply via email to