Add PDF TO A button to take you ther


(RONALD NELSON) #1

I have latest Rapid weaver. I am using a theme called paramount by Michael David. I want to add a button (click here) and have it go to Acrobat Reader pdf pages for the client to download and print. I do not understand coding very well, do not know the terminology and in general. CAN’T FIGURE THIS OUT. Any one that can refer me to a step by step (copy and paste it here) tutorial it will be appreciated. Thanks,


(Rob Beattie) #2

Hi Ronald,

If I was looking for a straightforward way, I’d do it like this. I’m assuming you have the Stacks plugin.

  1. Drag the built in button stack out onto the page. (Or use the button stack of your choice).
  2. Find your PDF and drag it into the Resources section - it’s the dark vertical bar on the right hand side of the Edit view, where your pages ‘live’.
  3. Select the button you dragged onto the page in Step 1.
  4. Make sure you’ve selected ‘Page’ in the page inspector - the vertical bar on the right hand side of the Edit view
  5. See where it says ‘Set Link’ in Page Inspector? Click that.
  6. When the dialogue box opens, open the drop down list top left of the dialogue box and choose Resource and you’ll see the name of the PDF you dragged into Resources in Step 2. Select it.
  7. Click Set Link
  8. Save and publish.

If you’re planning to use lots of buttons and lots of PDFs I’d recommend a slightly different way. But this will work.

Cheers

Rob


(RONALD NELSON) #3

Thank you I will try this. where do you place in the resource section? CSS Ron


(Rob Beattie) #4

Just drag it over the Resources heading and it’ll highlight so you can drop it in. See screenshot.


(Greg Schneck) #5

If you want users to be able to download the file only and not view the PDF in browser you can also use a button link to a little php script which will download the file. The simplest form of the script is only 3 or so lines but it has no error checking and such. I do this for pdf, mobi, and epub ebooks. Thousands have been downloaded with no problems at all.

On the page below the text link will open the pdf in browser while the three buttons do a “force download” via php script.
See this page: https://www.wayoflife.org/free_ebooks/bibles_amazing_story.php


(RONALD NELSON) #6

Thanks a lot. works perfectly. Can you tell me how to add a conversation Blog to my site? Do I need a new stack. I would like people to makes comments on subjects, similar to Facebook. thanks, Ron N


(Rob Beattie) #7

Can you elaborate a bit? Just describe what’s going to be on the page and how you’d like people to be able to comment?

Rob


(RONALD NELSON) #8

Let’s say the question is “who is your favorite driver?” Then how do we get responses on the website blog? I have disqus or that program.


(Rob Beattie) #9

So you want to be able to create a blog post and ask the question as part of the post?

What are you using for the blog?

Rob


(RONALD NELSON) #10

I have DISQUS This is what I would like to do. Publish a page ( a story about a race car) then let viewers log in or comment about the car. Similar to this type.


(Rob Beattie) #11

OK, so you should be able to create the page with the content and then add this Comments stack underneath the article. It will allow visitors to comment using DISQUS.

Rob


(RONALD NELSON) #12

So I add disqus to my stacks on left side of theme? Can you march me through the steps as previous help? Thanks Ron


(Rob Beattie) #13

It depends where you want the DISQUS comments to appear. Maybe you could mock up a page and then say where you want the comments?

Rob


(RONALD NELSON) #14

I have a page but don’t know how to add disqus!


(Rob Beattie) #15

You can DISQUS manually using the code they give you, but it sounds as though that’s going to be too complicated.

So…

  1. Sign up for a DISQUS account. There’ a free version
  2. Follow the instructions on the DISQUS site to get your ‘shortcode’
  3. Buy Joe Workman’s Comments stack (or research a different one if you prefer)
  4. Drag that stack onto a Stacks page where you want the DISQUS comments to appear
  5. Go to the settings for the Comments stack in Page Inspector and add you shortcode.
    That should do it. I’m guessing a little because I don’t have the Comments stack but if I’m wrong, perhaps @zeebe could pipe up?

Rob


(RONALD NELSON) #16

Thank you Rob. Also, one more request from the expert. I would like to add a page (on-line fill out form with a place to pay button) Can you recommend a stack for this. Ron


(Rob Beattie) #17

Can you tell us a bit more about the Payment button? What payment type are you hoping to take, and what payment provider do you want to use?

Rob


(RONALD NELSON) #18

It would be a sign up form that needed to be filled in and then, hit done or go to shopping cart to pay. I could use a shopping cart stack that allows payment of merchandise. Thanks, Ron


(Pedro Perdomo M.) #19

@1611mac Hi Greg,
May I ask for the php script?
The book’s covers image are very crisp.
What resources do you use to create them?

Many thanks for you help


(Greg Schneck) #20

Please note that this php script is a minimal as it gets. It is old and there is no error checking. But it is working for me hundreds of times a day with zero visitor complaiints. For more complete and newer scripts just google “force download php script”.

Here it is - it is for a download file with file name of Bibles_Amazing_Story.pdf

<?php
header('Content-disposition: attachment; filename=Bibles_Amazing_Story.pdf');
header('Content-type: application/pdf');
readfile('Bibles_Amazing_Story.pdf');
?>

The application type should match the file type (ie: an ePub file would be applicationo/epub’)

You need to have this script as a text file on your server and in the same directory as the file to be downloaded. Then, in RW, use a button and link to the script, not the file. Thus, it’s obvious that you will have a force download script for every file download you have. I name the script the same as the book file name and append “scpt” to the name. That way the book and it’s download script will be next to each other when viewing the directory.

Book covers are done in photoshop at full size 1134x1628 (for our printed books) and then for website they are 72 dpi and reduced to appropriate sizes. I have 200px, 160px, and 120 px thumbnails for each cover. The are optimized with ImageOptim. The PDF covers are placed full size, floating, in Pages and then the Pages book is simply exported to pdf. eBooks come from the same Pages file. ePubs are output from Pages and taken into Calibre and some tweaks made then ePub is output. Then, in Calibre, the ePub is converted to Mobi, css tweaked, and a mobi is output.