jytan
Forum Replies Created
-
Forum: Plugins
In reply to: [Media Library Assistant] Secure PDF galleryThanks David for updating the shortcodes and detailed explanation. The updated shortcodes work wonderfully. This is a great encourage to me as I continue to experiment with different ways of presenting the PDF resources on the website.
Note: I have removed the restriction on “Test Page with hardcoded Attachment Category”. Apologies for that.
Regarding the structure of Att. Categories taxonomy, it will be Conference ID at the top level, and then the year. The workings of taxonomy is still new to me so I am not entirely sure if I am doing it correctly. The simplest way it seems is to put them in the format “Conference_ID – Year”. But this would not allow sorting of PDF files by Conference_ID only or by Year only. That’s why I thought to put them at two levels.
So, the idea is to have a website list all the conference names, and when clicked, a new page will open displaying the dropdown box for user to choose the year corresponding to the Conference (not all years will be listed as some conferences are bi-annual). When a year is selected, the PDFs corresponding to the Conference and the Year will be listed either by thumbnails or as a title list. Finally, when a thumbnail or title is clicked, the PDF will open as embedded PDF in the page. If possible, a control of some sort can be implemented at the top allowing the user to navigate to other Conferences within the same page. I hope the above makes sense.
Related to this topic, I am wondering if I am placing the value of Conference_ID and Year correctly on the PDF media. I am currently placing the values of Conference_ID, Year and a Sequence_Number on the PDF title so that they can be listed in the correct sequence by MLA. The disadvantage is that the whole string is displayed when the PDF title is displayed on the website. Could it be possible to put the Conf_ID, Year and Seq_No. on other fields instead, e.g. caption, and still allowing MLA to filter and sort by these values? Your comments or advise on this would be greatly appreciated.
Forum: Plugins
In reply to: [Media Library Assistant] Secure PDF galleryThanks David for taking the time to test out my code. Much appreciated!
With regard to the example “MLA shortcode shows in live preview but not on actual page” given in the previous post, it sounds different from my case as the gallery does show up in my code except when selecting from a dropdown or term.
With regard to your question “does the mla_nolink_text persist when you click a term?”, the answer is Yes, it is still there.
I am posting three page urls below to show the outcome of three tests/experiments. I have removed the pages from restriction control but pls let me know if there are problems accessing them.
The first is a test page where I filter PDFs based on hardcoded value of Att_Category. The thumbnails in this page is showing fine. When clicked, the thumbnail opens on the next column.
Test Page with hardcoded Attachment Category
The code on the left column:
<h6>SPT 1998</h6> [mla_gallery] post_parent=all attachment_category=spt-1998 post_mime_type=application/pdf orderby=title order=asc numberposts=10 mla_output="paginate_links,prev_next" mla_page_parameter=mla_page mla_link_href="{+page_url+}?mla_page={+request:mla_page+}" [/mla_gallery] [mla_gallery] post_parent=all attachment_category=spt-1998 size=small post_mime_type=application/pdf orderby=title order=asc columns=1 numberposts=10 mla_rollover_text='{+title+}' mla_page_parameter=mla_page mla_link_href="{+page_url+}?document_id={+attachment_ID+}&mla_page={+request:mla_page+}" [/mla_gallery]<br />
The code on the right column:
[mla_gallery mla_style=none mla_markup=h3-only post_mime_type=application/pdf ids="{+template:({+request:document_id+}|1)+}"] [mla_gallery post_mime_type=application/pdf mla_caption="{+title+}" ids="{+template:({+request:document_id+}|1)+}" mla_alt_ids_name=url mla_alt_ids_value="{+filelink_url+}" mla_alt_shortcode="pdf-embedder toolbar=top"]
The above works fine, so I went further to implement choices for users to select the att_category value by using examples from MLA_tag_cloud documentation. After user clicked the Att_Category value listed as Terms, the PDF thumbnails are not displayed. The page link is here:
Note: Pls pardon the formatting of the terms. But as a side-question, is there a quick example of CSS fix to make them more orderly or aligned?
The code on the left column:
[mla_tag_cloud taxonomy=attachment_category number=0 mla_link_href="{+page_url+}/?term_slug={+slug+}"] </br> [mla_gallery attachment_category="{+template:({+request:term_slug+}|a-bad-term)+}" mla_nolink_text="Click a year to display the list of SPT proceedings."] [mla_gallery mla_style=none mla_markup=h3-only post_mime_type=application/pdf ids="{+template:({+request:document_id+}|1)+}"] [mla_gallery] attachment_category="{+template:({+request:sub_category+}|no-term-selected)+}" post_mime_type=application/pdf orderby=title order=asc numberposts=10 mla_output="paginate_links,prev_next" mla_page_parameter=mla_page mla_link_href="{+page_url+}?mla_page={+request:mla_page+}" [/mla_gallery] [mla_gallery] attachment_category="{+template:({+request:sub_category+}|no-term-selected)+}" size=small post_mime_type=application/pdf orderby=title order=asc columns=1 numberposts=10 mla_rollover_text='{+title+}' mla_page_parameter=mla_page mla_link_href="{+page_url+}?document_id={+attachment_ID+}&mla_page={+request:mla_page+}" [/mla_gallery]<br />
The code on the right column:
[mla_gallery post_mime_type=application/pdf mla_caption="{+title+}" ids="{+template:({+request:document_id+}|1)+}" mla_alt_ids_name=url mla_alt_ids_value="{+filelink_url+}" mla_alt_shortcode="pdf-embedder toolbar=top"]
And lastly, to try out implementation of a dropdown box for user selection. At this stage, I am experimenting with different ways for user to select the year (and possibly proceeding name in future). Again, after user select the Att_Category value and click Submit, the PDF thumbnails are not displayed. The page is linked here:
Test Page for MLA Dropdown box
Code on the left column:
<form id="mla-text-form" action="." method="post" class="row"> <strong>Year</strong> [mla_term_list taxonomy=attachment_category mla_output=dropdown parent=0 mla_control_name=main_category mla_item_parameter=current_main_category show_count=false use_filters=true] <br> <input id="text-form-submit" name="text_form_submit" type="submit" value="Submit"> </form> [mla_gallery] attachment_category="{+template:({+request:sub_category+}|no-term-selected)+}" post_mime_type=application/pdf orderby=title order=asc numberposts=10 mla_output="paginate_links,prev_next" mla_page_parameter=mla_page mla_link_href="{+page_url+}?mla_page={+request:mla_page+}" [/mla_gallery] [mla_gallery] attachment_category="{+template:({+request:sub_category+}|no-term-selected)+}" size=small post_mime_type=application/pdf orderby=title order=asc columns=1 numberposts=10 mla_rollover_text='{+title+}' mla_page_parameter=mla_page mla_link_href="{+page_url+}?document_id={+attachment_ID+}&mla_page={+request:mla_page+}" [/mla_gallery]<br />
Codes on the right column:
[mla_gallery mla_style=none mla_markup=h3-only post_mime_type=application/pdf ids="{+template:({+request:document_id+}|1)+}"] [mla_gallery post_mime_type=application/pdf mla_caption="{+title+}" ids="{+template:({+request:document_id+}|1)+}" mla_alt_ids_name=url mla_alt_ids_value="{+filelink_url+}" mla_alt_shortcode="pdf-embedder toolbar=top"]
Note: I will be adding proceedings from other conferences later so I would like the flexibility for user to select which conference proceedings to view (i.e. “SPT”, etc), followed by the year (i.e. “1997”, “1998”, etc.). Is there a way to allow two or more levels of filtering the Att_Category value?
Apologies for the lengthy post, I hope they do not lead to more confusion. I wanted to show the different outcomes encountered as I work through the experimentation. I would greatly appreciate if you can just investigate the last page that tests the dropdown list in order not to hog too much of your time. Thank you!
- This reply was modified 2 years, 5 months ago by jytan.
Forum: Plugins
In reply to: [Media Library Assistant] Secure PDF galleryThanks David for the suggestions, really appreciate your pointer that helps to clean up unneeded part of the code. The custom markup template works like a charm.
For the thumbnail display, I am trying to improve my code by using mla_tag_cloud and taxonomy. As I currently organize my PDFs in RML folders, I populated the Att. Categories and Att. Tags for all the PDFs in one of the RML folders and place the following code on the webpage. These codes are taken straight out from the MLA Documentation example.
[mla_tag_cloud taxonomy=attachment_category number=0 mla_link_href="{+page_url+}?term_slug={+slug+}"] </br> [mla_gallery attachment_category="{+template:({+request:term_slug+}|a-bad-term)+}" mla_nolink_text="Click a term to display the gallery."]
The term displays correctly on the website but when clicked, the gallery does not show up. I am using Elementor shortcode widget, so I tried hardcoding the page url but the gallery is still not showing. I wish I could do more trials and testing but would appreciate any pointer or suggestion. Thank you.
Forum: Plugins
In reply to: [Media Library Assistant] Secure PDF galleryThanks David, the example given in the link above on how to create a slide show of pdfs is very helpful. I am using it to display a list of thumbnails in one column, and when clicked, the PDF file opens in the next column using PDF Embedder. However I am struggling to add the title of the document at the top of the embedded PDF. My attempt below does not come out right. I suspect it requires some CSS skill which unfortunately I am extremely poor in.
But I am thinking could there be an add-title-to-the-top-of-pdf parameter that can be used within the MLA block and if so, how do I used that for my codes below.
Code to display the thumbnails of all PDFs located in an RML folder:
<h6>Title of RML folder</h6> [mla_gallery] post_parent=all mla_rml_folder=3 size=small post_mime_type=application/pdf orderby=title order=asc columns=1 numberposts=10 mla_rollover_text='{+title+}' mla_page_parameter=mla_page mla_link_href="{+page_url+}?document_id={+attachment_ID+}&mla_page={+request:mla_page+}" [/mla_gallery]<br />
Code for pagination:
[mla_gallery] post_parent=all mla_rml_folder=3 post_mime_type=application/pdf orderby=title order=asc numberposts=10 mla_output="paginate_links,prev_next" mla_page_parameter=mla_page mla_link_href="{+page_url+}?mla_page={+request:mla_page+}" [/mla_gallery]
Code to display PDF title:
<h3> [mla_gallery] post_parent=all mla_rml_folder=3 size=none link=none mla_ post_mime_type=application/pdf ids="{+template:({+request:document_id+}|1) +width+}" mla_link_text="{+post_excerpt+}" mla_caption=" [/mla_gallery]<br /></h3>
Code to display embedded PDF by PDF Embedder plugin:
[mla_gallery post_parent=all mla_rml_folder=3 post_mime_type=application/pdf mla_caption="{+title+}" ids="{+template:({+request:document_id+}|1)+}" mla_alt_ids_name=url mla_alt_ids_value="{+filelink_url+}" mla_alt_shortcode="pdf-embedder toolbar=top"]
- This reply was modified 2 years, 5 months ago by jytan.
Forum: Plugins
In reply to: [Media Library Assistant] Secure PDF galleryThanks David.
Under MLA’s “Support for Other Gallery-generating Plugins”, there is an example using the PDF-Embedder plugin. As it turns out, a paid version of PDF-Embedder indeed has the security functions that I am interested in. This makes me excited.
Relying heavily on the MLA examples, I have managed to randomly open a PDF file using PDF-Embedder from within a Real Media Library (RML) folder. It is random at this point because I have yet to figure out how to specifically:
1. allow the user to select a RML folder from a dropdown list; then
2. display all PDFs in the folder as thumbnails gallery (with file titles); and
3. when a user click a thumbnail, it will open the file using PDF-EmbedderI believe answers to 1 and 2 can be found with a bit more digging, but item 3 seems to be a bit more daunting as now I need to call mla_alt_shortcode=pdf-embedder from the thumbnails instead. Any advise to help me shorten the learning curve here would be much appreciated.
Thank you.