• Resolved judynight

    (@judynight)


    210restaurant.com is my site.
    I would like to be able to automate uploading of a .pdf of our menu.
    The chef changes it every day. Could he upload it to a spot on dropbox and have an automatic ftp that puts it online?
    I tried to ftp a document and it doesn’t seem to magically appear at the address I connected it to when I type out that address..

    It seems you have to manually go into WordPress and upload. Is there a way around this?

Viewing 15 replies - 1 through 15 (of 27 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    You could upload a pdf (menu.pdf) and then have a cron job and FTP that would replace the file. However, if you use caching on your site, that might block users from seeing the new version. You could “bust the cache” by using some javascript on the link so the link is something like menu.pdf?ver=currenttimestamp

    Thread Starter judynight

    (@judynight)

    wow–thank you.
    So I was able to overwrite the current menu with Filezilla (It asked me if it was ok to overwrite and I said yes.)
    One problem is that it’s currently in a directory that has /2016/09
    ” /wp-content/uploads/2016/09/THIS-WEEKS-MENU.pdf ”
    How can I get it to upload to something like /menu/menu.pdf
    or even /wp-content/uploads/menu.pdf
    ?

    @judynight

    So in that case either create the folder on the server using your FTP client or just upload the PDF into the root of the uploads folder.

    Then you can just replace the PDF in that folder each time, since the link will be the same that you have set on the page.

    Thread Starter judynight

    (@judynight)

    Oh! Now that worked! I’m not sure why it didn’t come up last time.
    Thank you! (Good to know that it was supposed to work)
    Now I’m trying to use TIBCO Simplr to make it easy for the chef to upload.
    Everything is so challenging! I’m a newbie. Many hurdles

    Thread Starter judynight

    (@judynight)

    I’m trying to use an automated uploader called TIBCO Simplr.
    I check after the operation is completed and there seems to be a delay, perhaps. What’s the best way to see if it is actually working?

    Thread Starter judynight

    (@judynight)

    I had the caching problem @sterndata was mentioning.
    I used this-weeks-menu.pdf?ver=currenttimestamp
    as in:
    https://d49.86b.myftpupload.com/wp-content/uploads/this-weeks-menu.pdf?ver=currenttimestamp
    but it seems to stay stuck on the same pdf still

    Thread Starter judynight

    (@judynight)

    I even deleted the one from Filezilla that keeps appearing and won’t go away!

    Thread Starter judynight

    (@judynight)

    Starting new problem in new thread. Resolving this one.

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    I have unresolved the thread and closed your new one. Please do not use new threads to bump your issues.

    Is the file still in wp-content/uploads?

    Post a link to the page in question.

    Thread Starter judynight

    (@judynight)

    Thank you!

    In TIBCO Simplr I made the filename like this:
    this-weeks-menu.pdf2016-10-08T04:10:42.246Z

    I just realized that the file type in Filezilla is .246Z instead of .pdf, so I think I’ll have to append after the timestamp “.pdf”. Perhaps that will fix that problem(?).

    To call(?) that file I used this-weeks-menu.pdf?ver=currenttimestamp
    as in:
    https://d49.86b.myftpupload.com/wp-content/uploads/this-weeks-menu.pdf?ver=currenttimestamp
    but with that request I’m still seeing a file that I deleted yesterday using Filezilla. It looks like a restaurant menu. That’s not the file that I uploaded that I still see in Filezilla.

    I now have read the no bumping policy, thank you. If in the future the topic changes significantly should I still leave it in the same thread?

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    Don’t change the file name — that’s exactly the point. the file should always be “menu.pdf” (or whatever). You javascript or a shortcode to add the ?ver=xxxxxxxx when outputting the link to that file

    function make_menu_link($atts, $content) {
       return '<a href="/wp-content/uploads/this_weeks_menu.pdf?ver=' . time() . '">View Our Menu</a>';
    }
    add_shortcode( 'menu_link', 'make_menu_link');

    In the content of your site, you’d just use [menu_link] and, of course, upload the PDF this_weeks_menu.pdf”.

    Thread Starter judynight

    (@judynight)

    Maybe this is an issue:
    I don’t have a child html page, but I have a child css page.

    Someone is helping me and we were going to set up a child page but I’m moving to a new theme so she thought we’d wait. I now have and can use Filezilla, but I don’t know if there’s anything special I have to do to make a child html page.

    I put the code above into the child css page. I then put the [menu_link] onto a page that already existed. It just looks like [menu_link] as opposed to the hyperlink.

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    The code goes in functions.php of a child theme if you have one.

    Thread Starter judynight

    (@judynight)

    I put that into the child theme functions.php (I found it)
    preceded by a note like this:
    <!– my note about the menu –>
    and got this error:

    Parse error: syntax error, unexpected ‘<‘ in /home/content/p3pnexwpnas07_data01/32/3596632/html/wp-content/themes/thealley210/functions.php on line 9

    Now I can’t see the site at all or get in at all to edit it. I seem to be locked out.

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    pastebin your functions.php

Viewing 15 replies - 1 through 15 (of 27 total)
  • The topic ‘Is it possible to avoid manual upload of media?’ is closed to new replies.