troelschristensen
Forum Replies Created
-
Forum: Plugins
In reply to: [DK PDF - WordPress PDF Generator] Remove 'responsive voice' buttons from pdfHi again.
You showed me the path. I just solved it.
I was reading about the function that you wrote last.
https://codex.wordpress.org/Function_Reference/add_shortcodeI changed a bit in the code and voila.
Now it is working.Thank you so much for your time.
Best.
Btw. here is the working code for removing the shortcode, but keeping the content inside.
//remove responsive voice shortcode, but keep the content. function baztag_func( $atts, $content = "" ) { return "$content"; } function dkpdf_remove_shortcodes_bytag( $content ) { $pdf = get_query_var( 'pdf' ); if( $pdf ) { add_shortcode( 'responsivevoice', 'baztag_func' ); } return $content; } add_filter( 'the_content', 'dkpdf_remove_shortcodes_bytag');Forum: Plugins
In reply to: [DK PDF - WordPress PDF Generator] Remove 'responsive voice' buttons from pdfHi dinamiko.
Thank you for looking in to this. The above codes both work, but sadly remove the shortcodes and everything in between the shortcodes (The text).
If I eg. use the code beneath, then it would remove the text also.
It does not mean, that it shows the html in the pdf. It’s just to show you, what it removes.
BEFORE:
<h1>Opgaven</h1> [responsivevoice voice="Danish Female" buttontext="Læs opgaven"]Du skal læse historien. Når du er færdig med at læse, så kan du se, hvor mange af spørgsmålene, du kan svare på. [/responsivevoice]AFTER:
<h1>Opgaven</h1>Forum: Plugins
In reply to: [DK PDF - WordPress PDF Generator] Remove 'responsive voice' buttons from pdfHi. Maybe this can help you.
This is my dkpdf css
#content dys{ font-family: 'opendyslexicregular', normal; } blockquote{ font-family: 'opendyslexicregular' , normal; } body{ font-family: 'opendyslexicregular' , normal; } table, th, td, tr { border: 1px solid black; } h1 { font-weight: bold; font-size: 32px; } h2 { font-weight: bold; font-size: 24px; } button#bb2 { display:none; }This is the html-text from the post in the WP editor:
<h1>Opgaven</h1>
[responsivevoice voice=”Danish Female” buttontext=”Læs opgaven”]Du skal læse historien. Når du er færdig med at læse, så kan du se, hvor mange af spørgsmålene, du kan svare på.[/responsivevoice]
This is the html-output displayed in Chrome:
<h1>Opgaven</h1>
Du skal læse historien. Når du er færdig med at læse, så kan du se, hvor mange af spørgsmålene, du kan svare på.</p>
<p><button id=’bb2′ type=’button’ value=’Play’ title=’ResponsiveVoice Tap to Start/Stop Speech’><span>🔊 Læs opgaven</span></button><script>bb2.onclick = function(){if(responsiveVoice.isPlaying()){responsiveVoice.cancel();}else{responsiveVoice.speak(‘Du skal læse historien. Når du er færdig med at læse, så kan du se, hvor mange af spørgsmålene, du kan svare på.’, ‘Danish Female’);}};</script>This is the text and button on the front end:
https://drive.google.com/file/d/0B4y2JZoxGHjCVWVCV1NRQTVpcDQ/view?usp=sharingThis is the same text and button in the pdf
https://drive.google.com/file/d/0B4y2JZoxGHjCVlpNWUQyMGxudUk/view?usp=sharingForum: Plugins
In reply to: [DK PDF - WordPress PDF Generator] Remove 'responsive voice' buttons from pdfHi again.
Sadly it does not seem to work, when writing the above css.
button#bb4 { display:none; }Strange.
Search for the plugin: responsivevoice
It is a free (for non-commercial sites) plugin
Thanks for looking into it.
Kind regards, Troels
Forum: Plugins
In reply to: [DK PDF - WordPress PDF Generator] Remove 'responsive voice' buttons from pdfThe output looks like
<p><button id='bb4' type='button' value='Play' title='ResponsiveVoice Tap to Start/Stop Speech'><span>🔊 Læs historien</span></button><script>bb4.onclick = function(){if(responsiveVoice.isPlaying()){responsiveVoice.cancel();}else{responsiveVoice.speak('Historien Her kan du se en fe. Det er en fin fe. Det er en lil-le fe. Det er en lil-le og fin fe. Hun hed-der Fi-fi. Du kan se fe-en Fi-fi. Det er en sød fe, du kan se.', 'Danish Female');}};</script> </p>Tried to use css to hide/remove the button.
button { background: transparent; font-size:0; border:0; }Forum: Plugins
In reply to: [DK PDF - WordPress PDF Generator] Custom Font for blockquoteI found out myself, how to do this.
I did, what is explained om this link:
http://mpdf1.com/manual/index.php?tid=501Called it opendyslexicregular in the config_fonts.php
"opendyslexicregular" => array( 'R' => "OpenDyslexic-Regular.ttf", ),Called it opendyslexicregular in the config_fonts-distr-without-OTL.php
"opendyslexicregular" => array( 'R' => "OpenDyslexic-Regular.ttf", ),ADDED THIS TO THE PDF CSS ON THE PAGE: page=dkpdf_settings&tab=pdf_css
blockquote{ font-family: 'opendyslexicregular' , normal; }Now it works.
Forum: Plugins
In reply to: [WP Popular Posts] Stats for one pluginThank you so much, Hector. That did it.
Now I can show how many times a single post has been read. Great!!
Forum: Plugins
In reply to: [Zotpress] Feature suggestions for Zotpress, Part 2Yes. If it is possible, Katie. Right now the only thing that is possible to search for in a search is the shortcode (eg. I search for ‘zotpress’), not the citations (if I search for eg. ‘Mads Hermansen’).
My wish:
Visitors can search for citations and get the pages/posts that use those citations.Forum: Plugins
In reply to: [Zotpress] Feature suggestions for Zotpress, Part 2Hi Katie.
I think it would be great, if you somehow could make it possible to search for the cicitations from Zotero by using the search widget and thereby getting a search result of those posts containing the cicitations that were being searched fore. Eg. on my site, I use a search plugin, that let me search for almost everything. But if I search for the cicitations from Zotero, then nothing happens.
The search plugin that I use is called “Instant search”:
Here you can see the options in this plugin.I don’t know how to do it. But it would be great.
Forum: Plugins
In reply to: [Zotpress] Shortcode for several pages and not page range?Yes. That is right.
[zotpressInText item=”{FQQDESHP,65 & 80}”] would display something like Name, 2015, 65 & 80
[zotpressInText item=”{FQQDESHP,65 + 80}”]would display something like Name, 2015, 65 + 80
[zotpressInText item=”{FQQDESHP,65 / 80}”]would display something like Name, 2015, 65 / 80Forum: Plugins
In reply to: [Zotpress] Shortcode for several pages and not page range?Yes. That would surely do it for me. Any chance of using + or / ? If not, then & would be great. I actually also tried using &. And since you also mention this, then it tells me, that it might be the right code to use.
Forum: Plugins
In reply to: [Zotpress] Missing citations and searching for æ,ø,åBest support in a plugin ever. Please keep up the good work, Katie. Thank you so much. Both problems are now solved with version 6.0.3.
I just donated 20$ through PayPal to support your work with the plugin.
Forum: Plugins
In reply to: [Zotpress] Missing citations and searching for æ,ø,åYes, Katie. I have changed Zotpress back to version 6.0.2.
I have saved a link, some screen shots and the text (also html) from the post ‘Et kommunalt it-projekt – Del 2‘ in a word-document for you.
You can Download it here
Please let me know, if you need more than that.
You can also see the shortcode from another post Inception og blogging in this link: http://snag.gy/K8mPV.jpg
Forum: Plugins
In reply to: [Zotpress] Missing citations and searching for æ,ø,åI changed back to version 5.5.5. Could not get the 6.0.2. shortcodes to work. Some of the shortcodes show the cicitations, but others only show the spinning wheel. I try give it a try, when you update again.
My mistake. Yes I meant the Reference widget when writing the post. Great.
Forum: Plugins
In reply to: [Zotpress] Missing citations and searching for æ,ø,åOf course, Katie.
Here’s a screendump of the same post. You can see the shortcodes.
http://snag.gy/K8mPV.jpgBut I still can’t get the searching for titels with the letters æ,ø or å to work. I have upgraded to 6.0.2. Do I have to anything else afterwards?
If I go back to version 5.5.5. Then it works.