This website uses cookies to personalize your experience. By using this website you agree to our cookie policy.

Open PDF's as Flipbboks in the search results

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Open PDF's as Flipbboks in the search results

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #49200
    melindesignmelindesign
    Participant

    Hello,

    Can you help me please how can I use query parameters to have a flipbook view for my PDF’s in the search results?

    I have this code below and I want to implement it somehow to have this look everytime when I open a PDF from the search results list.
    https://wordpress.dearflip.com/2205-2/?pdf=../wp-content/uploads/2019/07/glfw.pdf

    <div id="auto_flipbook" class="auto-book"></div>
    
    <script>
    
    //option variable for the "auto_flipbook", we just add "option_" in front to define the variable.
    var option_auto_flipbook= {
    
    };
    
    var pdf = (new URL(location.href)).searchParams.get('pdf');
    if(pdf){
        option_auto_flipbook.source = unescape(pdf);
        jQuery("#auto_flipbook").addClass("_df_book");
    }
    </script>

    Hope you can help me to solve this problem!
    Best wishes,
    Melinda

    #49212
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi,

    I can’t promise anything with the customizations, but it might be doable. What exactly does need to be changed? I can’t quite tell from this custom code. It looks like this ia full implementation of some sort.

    #49218
    melindesignmelindesign
    Participant

    Hello,

    I got this code from Dearflip’s support team as a reply for query parameters. I thought somehow I can use this code to open all of my PDF’s as flipbooks from the Ajax search results. Is it possible to redirect the search result’s url to have this flipbook look for all of my PDF’s?

    Best wishes,
    Melinda

    #49219
    Ernest MarcinkoErnest Marcinko
    Keymaster

    I guess so, from what I can see the URL has to change to a special one with the ?pdf query argument or something similar.

    When I click on any search result I’m getting a flipbook automatically at the moment. For example when I click this result, I get the flipbook opened automatically.
    It seems to be working already, or is it not what you are looking for?

    #49222
    melindesignmelindesign
    Participant

    This is what I’m looking for but it is not working for all of my PDF’s. Try this keyphrase “német juhász”. If I click any of the results, they open like a normal PDF. I think the code is not working, eventhough there are flipbook’s on the site because previously I added flipbooks beside PDF’s. But if I only select flipbooks to appear in the search results there are like 100 times less keywords. So it’s not a good option. That’s the reason why I want for all of my PDF’s to open as flipbooks.

    #49225
    Ernest MarcinkoErnest Marcinko
    Keymaster

    I see. Are these flipbooks from the dflip post type in any way related to these PDFs or you had to add them manually somehow?
    Because if the files are uploaded to the post type itself, then you can choose the attachment page or the attachment parent post as the source to see if that makes any difference: https://i.imgur.com/LhLVNjs.png

    Coding this is not going to be simple unless you have very good experience with custom coding. The search results URLs have to be changed and directed to a page where their recommended custom code is present, then the search results URLs changed according to that.

    #49266
    melindesignmelindesign
    Participant

    Thank you very-very much!! It is working with attachment page parent post 🙂

    #49267
    Ernest MarcinkoErnest Marcinko
    Keymaster

    You cannot access this content.

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.