Clever document insert with MLA
-
This photo show plugin named “Memphis docs” result in page. Shortcode is [mdocs single-file=”D10000655D.pdf”].
So: 1, must use direct link, 2, must use just this plugin and not possible link to MLA.
—-
With MLA this is possible make eg. [mla_gallery ids=”606″ post_mime_type=application/pdf]. Important is, “id” and mime.
This make a little thumbnail of pdf; then click this thumbnail. It open bigger thumbnail, and after this you can click this thumbnail and finally open pdf. Million clics, and, visually WordPress use dice. You cannot put it where you want.
—–
QUESTION IS:
Visually I am not interested this Memphis style. Idea is very good.But, is this possible:
[mla_gallery ids=”606″
post_mime_type=application/pdf
show_header
show_OriginalFileName
show_caption (wordpress you can see this caption)
show_document_date
show_document_size
show_version (MLA not support this—-???)
]And, when we see this all as one field area, open this pdf is only one click.
Is this possible? (Plugin name “Justified Image Grid”, JIG, make this type jinx to photos, but not mime types…)
The page I need help with: [log in to see the link]
-
Thanks for your question and the link to an example of what you want.
You can get something like the results you want by defining a Custom Markup template. You can find more information in the “Style and Markup Templates” section of the Settings/Media Library Assistant Documentation tab.
Most of the elements you want to display are available; see the “Attachment-specific substitution parameters for the markup template Item part” section of the Documentation. Some of the elements may also be taken directly from the metadata in the PDF file; see the “Field-level Substitution Parameters” section of the Documentation, especially the
pdf:
prefix.You can add the
link=file
parameter to your shortcode to get one-click access to the file.Your list includes “show_header“. Is this the Title of the item? If not, can you tell me where to locate it?
Your list includes “show_version“. Can you tell me where to locate it? If it is part of the document’s metadata it should be accessible.
If you can answer the above questions I can prepare an example Markup Template and post it here. Any additional information you can supply will be helpful. Thanks for your interest in the plugin.
https://drive.google.com/file/d/1CVsdorYLJ7YxjnAWInFBdCJ5eE41A3Ke/view?usp=sharing
SHORTCODE EXAMPLE
ACET-TONNA Nuance (manually I write this)[justified_image_grid ids=661]
[mla_gallery ids=”731″ post_mime_type=application/pdf
* SHOW ”photo-text”
* SHOW ”original file name”
* SHOW ”document size”
* SHOW edit date”]—
Need time to think. Now I understand clearly what is final result. This link contain pdf-file and explain.
First I write any text, eg. in this example is text “Acet Tonna Nuance” or “in this section I tell you white Martians”. Manual text add.
Then I add photo, I can use mla_gallery link or JIG-link. JIG is better, MLA-gallery photo is too difficult- photo size is random, location is random etc. So I use shortcode “JIG” and photo id.
THEN is this what I need. First, look “version” is not possible. Maybe need any other plugin for versions. So only way is forget this version. So, forget version need.
So, shortcode must be about this: “MLA_gallery ids = “731” and add much information to result”. It is:
When I put this shortcode, result is
– “photo” name, this field is standard
– “header”, it is it big text on the white box in MLA. This make also
– “original file name” and link to pdf, direct open file
– File size
– DateI am quite sure this is maybe easy. Visually I dont know what happen, but this type information I need.
So, we must forget this “version”. What I need is quite simple: “plugin named Memphis document” result. So this all result is possible with Memphis Document, BUT in my opinion it is not clever idea put many parallel document management system. Only I need MLA shortcode can make about same…
I am sorry, I have localized (finnis) version of MLA, so name of the fields are problematic. “Kuvan otsikko” is maybe “photo header” and big white box is maybe any “main header” and long text is any “explanation” or “long text of the photo or document”…
Thanks for your update with the additional information. Thanks as well for the MLAEXAMPLE.pdf document; very helpful. I have enough information to prepare an example Markup Template you can use for the second shortcode (
[mla_gallery ids="731 …
) in your example.JIG is terrific, but I am curious why you can’t use
[mla_gallery ids=661]
for the first shortcode in your example.You wrote “First, look “version” is not possible.” If the version is embedded in the PDF metadata MLA can extract it for display in the gallery. If you can post a link to one or more documents with a version I can show you how to access it. If you are manually adding the “Kuvateksti”/Description you could also create a WordPress custom field and manually enter the version number.
In your MLAEXAMPLE document you wrote “CLICK, open permanent link-page”“. Do you mean the WordPress “Media Page” for the item, e.g., the “Kestolinkki”
http: // demotunnus … /d10000362e
link show in the example document?I will work on a sample solution for you. Any additional answers to the above questions will be helpful.
Thanks for your patience while I developed an example of using MLA custom templates for your application. Here are the instructions you need to follow to create and use templates for the second shortcode in your example page:
First, you will need a custom Style Template that looks like this:
< style type='text/css'> #[+selector+] { margin: auto; } #[+selector+] .gallery-row { float: [+float+]; margin-top: 10px; text-align: center; width: [+itemwidth+]%; } #[+selector+] td { padding: .5em; } #[+selector+] .gallery-row td.gallery-icon { width: auto; height: auto; vertical-align: top; } #[+selector+] .gallery-row .gallery-icon img { width: 76px; height: 72px; border: 2px solid #cfcfcf; } #[+selector+] .gallery-caption { margin-left: 0; vertical-align: top; width: auto; } < /style>
To create the Style Template:
- Navigate to the Settings/Media Library Assistant Shortcodes tab.
- Click on the “Style” view just above the templates table.
- Hover over the “default (default)” Style entry (for the Gallery shortcode) and click the “Copy” action link.
- When the page refreshes, the “Edit Template” screen will appear.
- Change the template Name to (for example) “elkesan”.
- Make the changes you need to match the custom template show above.
- Make sure to remove the spaces in the two “style” HTML tags, which I had to add to the code example.
- Scroll to the bottom and click “Update”.
Once that’s done you can create the custom Markup Template. For this application it’s easiest to create a new template from scratch. Here are the contents for each template section:
Name
elkesan
Description
This is optional – you can enter any text you like to document the template or remind you how to use it.Arguments
mla_style=elkesan columns=1 size=icon link=file post_mime_type=application/pdf
Open
<table id='[+selector+]' class='gallery galleryid-[+id+] gallery-columns-[+columns+] gallery-size-[+size_class+]'>
Row Open
Leave this section empty.Item
<tr class='gallery-row '> <td colspan=2 class='item-description'> [+description+]<br /> <br /> <a title="[+title+]" class="fancybox" href="[+pagelink_url+]">[+title+]</a> </td> </tr> <tr class='gallery-row '> <td class='gallery-icon'> [+link+] </td> <td class='wp-caption-text gallery-caption'> Download document<br /> <strong>[+file+]</strong><br /> [+file_size,kbmb+]<br /> [+upload_date,date('d.m.Y H:i')+] </td> </tr>
Row Close
Leave this section empty.Close
</table>
To create the template:
- Navigate to the Settings/Media Library Assistant Shortcodes tab.
- Click the “Add New Template” button to the left of the table views.
- Change the “select template type” dropdown control to “Markup”.
- Change the “select template shortcode” dropdown control to “Gallery”.
- Fill in the sections with the content displayed above.
- Scroll to the bottom and click “Add Template”.
Once that’s done you are ready to use the new tempplates in your shortcode. Note that the “Arguments” section in the markup template supplies default parameter values for the shortcode (including the
mla_style=elkesan
parameter that selects the Style template). That makes your shortcode very simple:[mla_gallery ids=731 mla_markup=elkesan]
You can experiment with the style and markup I’ve given above and make whatever changes your application requires. I am not a CSS or HTML expert so many improvements are possible.
I hope that gets you started on templates and shortcodes that work for your application. I will leave this topic unresolved for now in case you have problems or further questions regarding the above suggestions.
Hi,
it works:
https://demotunnus.com/elkesan/testpagedonotremove/————
Additional Q: How I can add other mime-types? mla_style=elkesan columns=1 size=icon link=file post_mime_type=application/pdf
post_mime_type=application/docx, word-documents, or excel? Own template for all?
————
Also:
<tr class=’gallery-row ‘>
<td class=’gallery-icon’>
[+link+]
</td>
<td class=’wp-caption-text gallery-caption’>
Download document<br />
[+file+]<br />
[+file_size,kbmb+]<br />
[+upload_date,date(‘d.m.Y H:i’)+]
</td>
</tr>Final result is now good. Adobe logo is ok, all is ok. BUT now link is only it “Adobe”-logo.
How I can add this “link action” over…. ok, this style: “ADOBELOGO <br> Download document <br> [+file+] . I use html-language, maybe understand my Q? So visually all is ok, but I think “how I can make this link larger- please click adobelogo or tekst download document or filename”. ??I try add this [+link+ second time… so, how I can make larger area?
———–
https://drive.google.com/file/d/1CVsdorYLJ7YxjnAWInFBdCJ5eE41A3Ke/view?usp=sharing
Also I return to this.
Now problem is:
Looks it is not clever idea use translated MLA or even translated WordPress. “This is field, named “Kuvateksti”- is it any connection to english. Eg [ +title+] looks it white box above, +description is Kuvaus, but what is “kuvateksti”- “+imagetext+”??? So, nowhere is translation list between finnish word and tags. With english it is easier.So, question is: “How I can change my MLA language?” Now it is installed as Finnish, I want use English. Also, how I can change all my wordpress editor to english…
Thanks for the good news and the link to your test page. I am happy to see you are making progress.
You wrote “How I can add other mime-types?” You can override the default by placing the
post_mime_type=
parameter in the shortcode itself. However, if you are using theids=
parameter to select a specific item the MIME type isn’t necessary. You can replace it withpost_mime_type=all
in the Arguments section to bypass this part of the data selection logic.You wrote “How I can add this “link action” over…” You can make the “Download document” text a link by coding something like:
<a title="[+title+]" href="[+filelink_url+]">Download document</a>
You can add other parameters to the link as needed.
You wrote “what is “kuvateksti”- “+imagetext+”???” That is my mistake; I assumed it was the Description/Content but that is wrong; “Kuvateksti” is the Caption/Excerpt. You can access this in your template as
[+caption+]
or[+excerpt+]
.You wrote “How I can change my MLA language?” The easy way is to go to your User Profile and change the “Kieli”/Language dropdown control. I believe English is always available there.
I hope that gives you the solution you need for your application. I am marking this topic resolved, but please update it if you have any problems or further questions regarding the above suggestions. Good luck with your application and thanks for your interest in MLA.
Thank you for your patience! Now this looks much better and easier. Immediately I reply, “You wrote “what is “kuvateksti”- “+imagetext+”???” That is my mistake;”. No really not your mistake. Immediately I see “ah, here is wrong [+’fieldname’+], must change this”. Only problem was, interface language is Finnish, commands are english. Allways must translate “.. hmm..err… “kuvateksti” is this “imagetext” or “description” or “caption” :). So, this was reason of question how I can change language- if interface is english it is easier find right commands etc :).
Thank you! Now looks much better! Reason of sample codes I find more from WordPress and MLA. Also now is easier read MLA manual: eg. this “what this +imagetext+ is” I solve. I simply search phrase “+description+” and also other phrases and, voilá, found this all!
- The topic ‘Clever document insert with MLA’ is closed to new replies.