Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Open PDF's as Flipbboks in the search results
- This topic has 7 replies, 2 voices, and was last updated 1 year, 8 months ago by
Ernest Marcinko.
-
AuthorPosts
-
September 9, 2024 at 9:20 am #49200
melindesign
ParticipantHello,
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,
MelindaSeptember 10, 2024 at 12:58 pm #49212Ernest Marcinko
KeymasterHi,
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.
September 10, 2024 at 1:14 pm #49218melindesign
ParticipantHello,
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,
MelindaSeptember 10, 2024 at 1:31 pm #49219Ernest Marcinko
KeymasterI 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?September 10, 2024 at 1:46 pm #49222melindesign
ParticipantThis 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.
September 10, 2024 at 2:04 pm #49225Ernest Marcinko
KeymasterI 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.pngCoding 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.
September 12, 2024 at 2:30 pm #49266melindesign
ParticipantThank you very-very much!! It is working with attachment page parent post 🙂
September 12, 2024 at 2:43 pm #49267Ernest Marcinko
KeymasterYou cannot access this content.
-
AuthorPosts
- You must be logged in to reply to this topic.