Announcement

Collapse
No announcement yet.

Open PDF Files in new window from within a Brochure

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #16
    Originally posted by drounding
    Add the files to the Additional Files List in Actinic and then upload.
    would that not put the files into the base folder or the /acatalog/ folder NOT the pdffolder referenced in norman's script,
    Would he not need to FTP the entire pdffolder to the website to be a subdir of the acatalog (or a subdir of the siteroot if the document list is on the front page)
    www.incredibid.co.uk

    Comment


      #17
      I have followed that procedure Duncan, several attempts infact, still no joy.

      Originally posted by AndrewPK
      would that not put the files into the base folder or the /acatalog/ folder NOT the pdffolder referenced in norman's script,
      Would he not need to FTP the entire pdffolder to the website to be a subdir of the acatalog (or a subdir of the siteroot if the document list is on the front page)
      That is my point Andrew, if i need to upload the files outside the normal 'additional files upload' routine using an FTP, where do i put them and if they are already on the server but in the wrong place as i suspect, how do i access the Actinic test servre to find out where they are and move them?

      Keith

      Comment


        #18
        Sorry I didn't read all of your post earlier. You will need to manually ftp the folder of pdfs to the location you require or you could change the script to remove the path and upload them into acatalog using Actinic? (Everthing else gets bundled in there anyway)

        Comment


          #19
          Originally posted by drounding
          or you could change the script to remove the path and upload them into acatalog using Actinic?
          that would probably be the easiest way of doing this!

          Actinic will automatically dump anything in the "additional files" list into the acatalog folder, if your 'list' page is on the front page (as in what ever appears when you just type 'www.yoursite.com' then change the references in the script from pdffolder to acatalog, if it is any other page (which will therefore reside in the acatalog folder its self) just remove the reference to pdffolder completely

          my (really quite limited) coding ability leads me to believe you would be changing the line

          foreach (glob("pdffolder/*.pdf") as $pdffile)

          To
          foreach (glob("acatalog/*.pdf") as $pdffile)

          Or

          foreach (glob("*.pdf") as $pdffile)

          Depending on where in the site your list appears

          this way you can leave the pdfs in your additional files list, and they will be picked up by the code
          www.incredibid.co.uk

          Comment


            #20
            Originally posted by drounding
            Sorry I didn't read all of your post earlier. You will need to manually ftp the folder of pdfs to the location you require or you could change the script to remove the path and upload them into acatalog using Actinic? (Everthing else gets bundled in there anyway)
            Thanks Duncan, that sounds like the best solution since i cant seem to get support to explain how to access the Test Server. I have tried using my limited knowledge and my account area is forbiden to me unles i use Actinic upload.

            This is where i get really cheeky, in the normal scheme of things the pdffolder resides on my pc in the C:\Documents and Settings\Keith Smith\My Documents\Actinic v8\Sites\Site1 folder, where would i need to site it for either
            A) the existing code to see it when Actinic uploads it? Or
            B) What do i change the code to that Norman kindly provided for me to make its current location work? Or
            C) How do i access the Test Server to simply move the pdffolder that has already been uploaded to the correct place so the existing code works fine?

            is that just too much to ask?
            Keith

            Comment


              #21
              My post #8 works fine on a real server. I tested it on one (using .jpg files). I don't use any Actinic test server so cannot tell you what will happen there.

              There should be no need to upload any files. Actinic detects the reference to the files in the pdffolder folder and automatically uploads them.

              Actinic also strips the pdffolder/ bit from the generated HTML when it is generating the HTML for the live page.

              UPDATE

              This is true for .jpg files but Actinic doesn't process .pdf files in sub-folders in the same way. Read on for the fix.
              Norman - www.drillpine.biz
              Edinburgh, U K / Bitez, Turkey

              Comment


                #22
                Originally posted by NormanRouxel
                My post #8 works fine on a real server. I tested it on one (using .jpg files). I don't use any Actinic test server so cannot tell you what will happen there.

                There should be no need to upload any files. Actinic detects the reference to the files in the pdffiles folder and automatically uploads them.

                Actinic also strips the pdffiles/ bit from the generated HTML when it is generating the HTML for the live page.
                Exactly as i thought Norman, thanks, if it works as an offline preview and Actinic uploads all files from their current location if they are referenced in the site as part of its upload process, why am i getting file not located on server when i try and access the files?
                Keith

                Comment


                  #23
                  Originally posted by NormanRouxel
                  There should be no need to upload any files. Actinic detects the reference to the files in the pdffiles folder and automatically uploads them.

                  Actinic also strips the pdffiles/ bit from the generated HTML when it is generating the HTML for the live page.
                  Ahhh righto, so on that basis he would need to put them in a folder called pdffiles in his site1 folder (eg, C:\blah blah blah\site1\pdffiles\) and leave the code 'as is' and should then be good to go,
                  www.incredibid.co.uk

                  Comment


                    #24
                    Exactly as Norman suggested Andrew, which makes it all the more frustrating when a simple and very attractive piece of HTML works fine for everyone else but not on Actinics own test server. Or am i missing something?

                    Comment


                      #25
                      UPDATE. I just retested using PDF files and Actinic misbehaves with PDF's (I tested originally with a mod that looked for .JPG's).

                      Tell Actinic to upload the files via Design / Additional Files, then alter patch #8 to be
                      Code:
                      <actinic:block php="true">
                      foreach (glob("pdffolder/*.pdf") as $pdffile)
                        {
                        echo '<br /><a href="' . <actinic:block if="%3cactinic%3avariable%20name%3d%22IsPreviewMode%22%20%2f%3e" >'../pdffolder/' . </actinic:block>basename($pdffile) . '" target="_blank">' . basename($pdffile) . '</a>';
                        }
                      </actinic:block>
                      Norman - www.drillpine.biz
                      Edinburgh, U K / Bitez, Turkey

                      Comment


                        #26
                        Thanks Norman, will give it a go.
                        Keith

                        Comment


                          #27
                          Hi Norman, getting repeated error, Warning: Invalid argument supplied for foreach() in main on line 2. first i was asked to move the files to the PreviewHTML and when i did i got this error. Admittedly, i have so far only used the offline preview, but if its not working there its unlikely to work on the server, isn't it?
                          Keith

                          Comment


                            #28
                            I assume you've got your pdf files in a subfolder underneath PreviewHTML
                            example
                            PreviewHTML/pdffolder/*.pdf
                            I pretty certain its looking for all pdf's in the "pdffolder" - perhaps the folder doesn't exist and thats why you've got an error

                            Comment


                              #29
                              Files should be in a sub folder of your Site called pdffolder. I've amended the code in posts #8 and #25 so that the links also work when Previewing.
                              Norman - www.drillpine.biz
                              Edinburgh, U K / Bitez, Turkey

                              Comment


                                #30
                                Hi All,

                                Originally posted by NormanRouxel
                                Files should be in a sub folder of your Site called pdffolder. I've amended the code in posts #8 and #25 so that the links also work when Previewing.
                                I have placed all the *.pdf fils in a folder called pdffolder and placed it in the site1 folder. In Offline Preview, when i clicked on the link to any of the pdf files i got the error telling me that the file blablabla.PDF could not be found in bla/bla/bla/Actinic V8/sites/site1/PreviewHTML.

                                So i moved the pdffolder into the PreviewHTML folder ie bla/bla/bla/Actinic V8/sites/site1/PreviewHTML/pdffolder. As soon as i went back into actinic and looked in the research page where the link was putting a list of the files, it now shows the error Warning: Invalid argument supplied for foreach() in main on line 2. I have not now done an offline preview and a full site refresh to the Actinic Test Server and it still presents the same problem. When i go back to the first set of code Norman provided, it works fine in the Offline Preview with the pdffolder in the site1 folder but not on the server. My feelings are that its a problem with the handeling the placement of the pdffolder and not the code looking in the wrong place.

                                Any thoughts?
                                Keith

                                Comment

                                Working...
                                X