• Hello,

    I am building a WordPress website dealing partly with taxonomic content (natural sciences). What I would like is to have a part of the website (probably done with custom post type) that is focussed on species and that shows data stored in a big database (currently an Excel file of approx 30 columns and 14 000 rows – but it will increase to ~150 000 by the time).

    The following image explain the architecture :

    Heberger image

    Or see here : Architecture

    Some informations about how it have to work :

    1) people search for species name in a dedicated field that only search in this database (and not in the whole website), in the “Species” column.
    After they have selected the species (directly in the search form, or in an intermediate page…), the URL with the “ID_Valide” is found (ex : https://www.mywebsite/species/33) ; (“Unique_ID” refers to only one species name, but this species name may be in fact no more valid in taxonomy and may refers to another one, as it is the example with species designed by “Unique_ID” 34 & 35 that are in fact 33 (see “ID_Valide” – If someone choose these species (34 or 35), they will in fact have access to the page that show results for 33) – see yellow arrows and web-page in the architecture image for illustration).

    2) After the URL has been found (i.e. the “ID_Valide” has been identified by selecting a species name), a custom post type page show database content of the line of this “ID_Valide” (see second table).

    I am currently clearing all the possibilities to build this project, and as I’m not programmer, I would appreciate some help & recommendations to do it properly (and with a good functionality in term of speedness, etc.).

    Here are the important points :
    – I need that the result page that show the content of the table 2 after species selection has to be automatically built according to the content of the table 2 (I cannot make 14 000 pages by hand, and as the taxonomy evolves permanently, I need to have a process that can be easily updated…).
    – I need to have a search form that look into a specified field in a specified database and to link it with (at least) one other database.

    So, I am looking for help & informations about plugins and/or solutions I can use to :

    – build the species search form
    – import a database in wordpress and manage it (ex : make the update easily, etc.)
    – display content of the database on a custom post page.

    Do anyone could provide me advices, help and/or plugin recommandations for this very interesting projet ?

    Many thanks for your help ??

    RPO

    • This topic was modified 8 years, 1 month ago by Steven Stern (sterndata).
    • This topic was modified 8 years, 1 month ago by RPO.
    • This topic was modified 8 years, 1 month ago by Steven Stern (sterndata).
    • This topic was modified 8 years, 1 month ago by RPO.
    • This topic was modified 8 years, 1 month ago by RPO.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator bcworkz

    (@bcworkz)

    I think you’re over thinking the process when you really only need to consider the user interface and maintaining the data. There is no need that I can see for a lookup/translation table between species and related content using URLs and IDs.

    You are right that a custom post type would be useful, unless the site has no need now or in the future for normal blog posts. In that case, blog posts could stand in for custom posts. You still have pages to present non-taxonomic content.

    Why not have the post title be the specie and content contains the related information? If the information needs to be more structured, custom fields can be used for structured data. Then when someone searches for a particular specie, the related post is returned directly, no need to fool around with IDs and URLs. An URL with the specie name is more user friendly than one with an ID.

    Then one can add or edit posts as is normally done, no need for coding custom forms and user interface. Except maybe for some custom fields, for which plugins are readily available.

    Initially importing the data will take some custom coding to translate the spreadsheet data into WP data. I believe there are plugins that will import Excel data, but I’m unsure it’ll be in a useful format. A custom script to process a CSV export would be fairly simple to write. You’ll likely need to export in large chunks to keep the file sizes manageable. You can hire help for this part from jobs.wordpress.net.

    Thread Starter RPO

    (@rponcet)

    Hello bcworkz,

    thank you very much for your advices. You certainly are true, I am maybe bulding a too complex process ; and I will see where it is possible to cut to do it more simple.

    But certain facts are compulsory in this project :
    – I need to have URL with species “ID_Valide” as it reflect the current valid taxonomy ; and it is the way other taxonomic website are built (it allow people to gather easily information for database management purpose, etc.).
    – I need to have also blog post (news) in another part of the website, and also dedicated pages, so custom post type are mandatory.
    – As you precise it, I will certainly have to split databases in several chunks to deal with manageable content ; and I will have to manage very different contents like figures, leaflet maps, text (from words to big paragraphs, etc.). So I think that dedicated tables labelled in row by “ID_Valide” will be a good solution.

    Up to now, I have found a couple of plugin that seems to be useful with the content I have to display :
    – Toolset types
    – Custom DB tables

    The main question that remain is how will be created the URL (one for each species) that will display custom post type content linked to databases…
    In fact I would like the pages to be generated (URL & content) after the users have selected a species in a search form… exemple :

    1) in the search box I type : Lecano…
    2) the search box with autocomplete propose :
    Lecanora muralis
    Lecanora strobilina
    Lecanora sambuci
    Lecanora chlarotera

    3) I click on Lecanora muralis
    4) as this species is now synonym of Protoparmeliopsis muralis, I am redirected to the page (the custom post type with the template and links to databases I have built) of this species.
    [Here is the main question : how will be generated the page ? Have it to be pre-existant or can it be generated by building the URL according to the query (the URL can be store in the taxonomic correspondance table (see illustration in first post) and then displaying the content that is linked to the URL (i.e. the “ID_Valid” ?).

    Exemple : if the URL is : https://www.mywebsite/sp/234034 –> the page display all informations linked to 234043 (“ID_Valid) in the custom content type. (and in fact this page does not pre-exist, just the template exist and the content is displayed after the URL). Is it possible ?

    Thank your for your help !

    RPO

    Moderator bcworkz

    (@bcworkz)

    Thanks for the additional explanations. So definitely a custom post type, that’s not a problem. It’s possible to have numeric post slugs and yet have normal text as a title. When importing data there’s no problem with this, but manually adding a post with a numeric slug introduces an odd quirk where WP appends “-2” to any number entered as a slug, even though there is no other slug with the same number.

    If the ID slug could have an alphabetic component, WP will not try to add “-2”. For example, “ID-12345” as a slug is not a problem. But entering “12345” is a problem because WP will insist that it be “12345-2”. It may be possible to override this behavior, but things will be much easier if slugs can be alphanumeric, as in “ID-12345”.

    In a similar vein, a custom post type slug can be different than its labels. The post type can be labeled “Species”, but its slug can be “sp”, so the URL could be something like example.com/sp/ID-12345/. I’m assuming the page content would be created by the import script, so following the above URL takes one directly to the “Species” post with the ID_Valid 12345. Besides title, ID slug, and content, the rest can be handled with custom fields.

    One field can be for redirects for synonymous species. If this field exists for the post for Lecanora muralis, the user can be redirected to Protoparmeliopsis muralis. Similar to how disambiguation links work in Wikipedia. So far, I don’t see a need for custom tables, this can all be handled using the standard WP data schema. The main reason to use custom tables is to accommodate custom queries that would not be easily attainable using the default schema. Ever since WP introduced complex meta queries for WP_Query, the need for custom tables is rarely justified.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘database search, display and management – natural sciences website’ is closed to new replies.