How would a client be able to link an image to an uploaded .pdf file instead of linked text? Or choose wheather to link with text or a img? Lets say a small img of a page from a magazine that links to the pdf-article. It is possible to do that in the <> field that but for my clients it is too complex. Is there a possibilty to add a extra inputfield in the insert file popup, and then choose insert text or insert/choose (already uploaded) img? I have been looking but cannot find where to edit this…
I think the workflow needs thinking about a little more as I agree that currently this isn’t easy to do unless you resort to using the source code view.
Part of the issue is that the Media section will only preview web ready images. If you click on a JPG, for example, you’ll get a preview of the image, the image dimensions, size as well as HTML to copy for an image and a text link to the file. Unfortunately you don’t get the same file path for other file types.
My suggestion would be to edit open.php (admin/inc/open.php) to open all files in the preview rather than just $pics_files and display a file path for non image files that can then be copied into Redactor’s standard link dialog.
Thank you @TimPlumb, I looked up the file, first added .pdf to a array, did a test and I could see ‘a file’ in the open img popup, which was the pdf, but its just a dead thing. So it is impossible to first upload a img (screenshot of the article in the magazine) and then link that image to the just uploaded pdf, that is too bad. I will have to explain how to do that in html then
Maybe I’ll have to experiment some more…
The $allow array in the main config.php file will allow you to extend the file types that you can upload into the Pulse Media area. Once the PDF is in there adjusting the code in open.php should allow you to at least see the path of the PDF.
If I get a chance later today or over the weekend I’ll see if I can edit the file to show paths for non-image files.
Is this a Pulse Classic or Pulse 4 question ?
You should change your perspective !
In stead of adding an image to a PDF, you should add a PDF to an image ! This works at least in version 4 without any changes.
Steps to follow :
- Upload the PDF to the server with the media filemanager
- Inside the media filemanager you can right-click an uploaded file and copy its URL
- Insert the image in a block
- Click the image to start editing
- Add the PDF URL (the path to the desired PDF file) as LINK to the image
- select the “open link in new tab”
This principle works also in Pulse version 3 but I was not able to test the PDF uploading.
Hi @boisdejardin, thanks! So stupid, I never thought of right clicking the text-link and copy that url into the edit-img-popup, my client will understand that. You don’t even have to go to the media file manager, (in pulse classic there isn’t one.)
I tried both ways, and in pulse classic and pulse4, and what I did yesterday (in pulse4) was first insert the file, the textlink appears, then uploaded a img in the same block, then inserted the url I copied from the <> section, then delete the textlink. But the problem, thinking of how my client would get the url of the pdf in a easy and understandable way, was the big problem.
So only right-click the textlink and after inserting the link to the img delete the textlink. It’s not totally beautifull but if it does the trick, then ist fine!
But it would be perfect if you click ‘upload file’ in a block (that is what a user would click I guess) there was a extra option, underneath inputfield ‘name’ that one could add a img that links to that file…
Hello @Mary, glad to be able to help.
While reading your answer I became confused, so I tried it myself in Pulse Classic and then I could follow your answer.
But to make it easier for your client why not let them put the image in the block, then the file link and a accompanying text in the text field, which will result in a link to the inserted file. Although there is no link connected to the image, the process is easier for the client and there is a visible link to the PDF. Another advantage, the readable text is better for SEO.
The feature you request for is, I believe, outside the scope of Pulse, because the image insert and file insert icons are handled by Redactor, the WYSIWYG editor.
PDF insertion was improved in 5.0.2!