Coder Social home page Coder Social logo

printmyblog's Issues

3 basic tests

I work for developer teams. I talk them into using the following zero-coverage tests in CI:

  1. syntax check
  2. coding standard (much more than how you indent your code!)
  3. static analysis

It makes your code robust without writing a single test.
Please consider introducing all three.

Be tolerant of polluated JSON responses

Right now, if non-JSON gets into the REST API JSON responses, everything stops working. It would be nice if, instead, we just ignored the non-JSON part. I believe I saw WooCommerce was doing this once.

Eg, it seems WPTouch was echoing out a script before the REST API response on http://siliconvalley.sla1.org. While it's true they shouldn't be doing that, it would also be nice if we could just live with it, because it's bound to happen.

Replace YouTube videos with image and link

Embedded YouTube videos in posts can look pretty bad (solid black for me, horrible on ink). It would be nice to automatically replace them with a screenshot from the video, and a link to view it

Option to remove embedded content

A user had an embedded sound cloud page in a post, and so when they chose to print their blog and remove images the images in the embedded sound cloud page were left intact.
I don't think I can control the HTML in embedded pages. So I think the best alternative would be to allow users to remove embedded content (iframes) altogether.

WP Staging makes Print My Blog not work

Copying from @mjluser 's comment on #27 (comment)

Hi Mike! I did not see an issue regarding the plugin's hanging because the REST API had no jason, so I am writing this here. My main site is PhysicsSpot.com, which worked fine. The problem was on the staging (clone) site I had created using the WP Staging plugin. Apparently whatever made your plugin hang was something done by WP Staging. I think you might find what you need in its documentation. As I mentioned, your plugin hung on the "Initializing" display and thus probably never got to the error-display section of your code. Thanks again for the great plugin!
(P.S. I forgot to mention that it only printed the alternate text and the caption for each image. It did not print any images.)

Auto-deploy to WP.org

Would you welcome a feature that deploys printmyblog to WP.org when * Version: 2.1.3 changes in the main plugin file?

Large export

I have 3222 blog posts. I've tried Safari and Chrome to export as a PDF and Print and both don't work. It would be nice if I could select a date range, this would help keep the file size down.

Add notification for Pro

With a form to easily signup. Like this:

<!-- Begin Mailchimp Signup Form -->
<link href="//cdn-images.mailchimp.com/embedcode/classic-10_7.css" rel="stylesheet" type="text/css">
<style type="text/css">
	#mc_embed_signup{background:#fff; clear:left; font:14px Helvetica,Arial,sans-serif; }
	/* Add your own Mailchimp form style overrides in your site stylesheet or in this style block.
	   We recommend moving this block and the preceding CSS link to the HEAD of your HTML file. */
</style>
<div id="mc_embed_signup">
<form action="https://blog.us19.list-manage.com/subscribe/post?u=5881790528ea076edfc10d859&amp;id=32ccd044c3" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" novalidate>
    <div id="mc_embed_signup_scroll">
	
<div class="mc-field-group">
	<label for="mce-FNAME">First Name </label>
	<input type="text" value="" name="FNAME" class="required" id="mce-FNAME">
</div>
<div class="mc-field-group">
	<label for="mce-EMAIL">Email Address </label>
	<input type="email" value="" name="EMAIL" class="required email" id="mce-EMAIL">
</div>
	<div id="mce-responses" class="clear">
		<div class="response" id="mce-error-response" style="display:none"></div>
		<div class="response" id="mce-success-response" style="display:none"></div>
	</div>    <!-- real people should not fill this in and expect good things - do not remove this or risk form bot signups-->
    <div style="position: absolute; left: -5000px;" aria-hidden="true"><input type="text" name="b_5881790528ea076edfc10d859_32ccd044c3" tabindex="-1" value=""></div>
    <div class="clear"><input type="submit" value="Subscribe" name="subscribe" id="mc-embedded-subscribe" class="button"></div>
    </div>
</form>
</div>

<!--End mc_embed_signup-->

Optionally include links to Media assets

Dan Kershaw suggested

Beneath a photo/image include the URL to the Media asset – out media space is equally messy!

I wonder if instead being able to list media post types (as opposed to just posts and pages) would also fulfill this need?

Images all show up on separate line

I'm using a lot of images at medium size, which fit side-by-side on my blog on one line.
However when I print using the plugin, every image is on a separate line even though there are no line breaks in the source code of my blog between those pictures.

I'm using the Twenty-Twelve Theme and I am using FooBox plugin, but the plugin generally only affects when you click on an image, not the medium size in the post itself.

Blog:
image

Printed page:
image

Exclude categories

Instead of only including specific categories og posts, I'd like to exclude specific categories

More clearly delineate new posts

When content has big images that we try to not separate, it can become difficult to tell when a new post starts, even if they always start on new pages. Dan Kershaw suggested

a 10% shade of grey above the content with the post id, url and title makes sifting through 500 pages much easier (when you see a grey bar you have a new post/page

Filter posts by category or term

Probably add a select2 input so you can choose which categories or terms to print. This will be a little trickier with wp rest api proxy, but doable.

Gutenberg block option: show help links

On the print page, it asks “what do you think?” With 3 different smiley faces. And depending on their reply, we suggest the user either donate, review, or report an issue. That should probably be optional

Mention in-browser preview doesn't show pagebreaks

Some folks may be confused when they requested a page to have a page break between posts, but don't see one in the browser "preview" (print page).
We could either have a notice at the top of the page saying "The preview below doesn't show page breaks; but don't worry, the actual printout will have them."
or, after each post, have a big white space, possibly with some greyed-out text saying "page break here."

Fix Foo Galleries in print page

It seems a recent update in Foo Gallery made it so their galleries don't appear in print pages. They're just an empty div, and there's a Javascript error.

Mathjax support

I see PressBooks recently added support for MathJax. It seems like a fairly important feature for academia, so it may be nice to add.

Force load lazy loaded images

Foogallery has an option to lazy-load images. So does JetPack. These are good ideas for web view, but annoying in a printout, because you need to manually scroll through the entire page.
I previously asked FooGallery support about this (see https://wordpress.org/support/topic/printing-responsive-galleries/), but they seemed to start talking about a different problem and then concluded it wasn't possible.
I think I just need to programmatically invoke whatever function they use to load the images, or scroll through the page automatically, or at very least warn users that if they have lazy-loaded images, they need to scroll through the entire printout before pressing print.

Use cleaner-looking URLs

The "print page" just uses the site's index, plus some key query parameters. This has worked fine but has a couple downsides:

  • when printing to PDF, the PDF files' names are just the domain name (if there's no site title); and if someone prints multiple posts individually, they all have the same name and its easy to overwrite them
  • many browsers put the URL in the filename, which also looks really ugly
  • this leads towards very long URLs, which some servers refuse

It would be better to instead use the same idea as I saw another print plugin use: use the post's URL and tack on "/print" to it.
Or maybe even rewrite the URL (I think that's a newfandangled feature of browsers...)

Would like to include Author of blog posts

Thanks for Print My Blog. We are shortly closing down six years of blog posts by several authors. I have created a PDF for each year but they don't show authors. Also, would really like to create a PDF for each author. Any chance? Thanks.

Filter by post author

Similar to #6, except have a select2 for finding an author, and then add that as a filter on the printout page. Probably just an hour or two of development.

Print This Page

On my blog, a user suggested they'd like to use Print My Blog to print individual posts, preferably with a link so site visitors could print them.
Doing so would require:

  • add settings page
  • add business class for storing options
  • add two checkboxes to the settings page
  • if checked, add buttons to the top of posts (a print icon, and a pdf icon)
  • add option to filter by posts on print setup page
  • allow filtering by post on the print page (not needed on the setup page for now)
  • remove links to like or dislike from frontend
  • what to do with Safari? --> its gotten better since last release, although sometimes still has coloured background

This would move Print My Blog into competition with other plugins like Print Friendly. While its a bigger market, it's not exactly following the plugin's mission (preserve blogs). Also, users of that feature will want other features and it will complicate other things; so I don't want to do it unless it somehow forward the plugin's mission.

I've been doing some comparisons to the most popular print plugin, Print Friendly, and it really does quite a satisfactory job, in my opinion. (One exception: when you put images into columns, it only shows the first column's image. I bet there are other issues with it.)

Derive document from a WordPress menu

I think it would be nice if you could create a menu, optionally display it, and then PMB would fetch those posts/pages in the same order as in the menu.
It would be a ton of UI I wouldn’t need to build... I’m not sure if it would be very intuitive to most users though. They would probably rather make the book first (like in Anthologize) then optionally make a menu from that.

FooGallery Support

Hello

I've traveled a lot and have a wordpress site with many picrutres using FooGallery.
Is there any possibility to get the FooGallery running with print my blog?

In the PDF it shows the code for the Gallery - for Example:
[foogallery id="123"]

Cheers
Fabio

Center smaller images

When users decide to make images smaller so they don't take up the full width, they all turn left-aligned and look a little ugly. Maybe centering them and/or padding them would help.
I'd need to be careful though to not break image galleries or images that are small enough to fit side-by-side normally.

Show Avia codeblock and other Javascript-dependent post content

On furniturebank.org, they use Avia codeblocks on some pages, which work fine on the web view, but just look like a shortcode in the printout. Eg https://www.furniturebank.org/8049-2/ looks fine, but in the printout for the site, that page has the content [avia_codeblock_placeholder uid="0"] in it.
That's what's in the REST API response from http://www.furniturebank.org/wp-json/wp/v2/pages/3239, ie

"</div></div></div><!-- close content main div --></div></div><div id='av_section_1' class='avia-section header_color avia-section-default avia-no-border-styling avia-bg-style-scroll   av-arrow-down-section container_wrap fullsize' style = 'background-color: #ffffff; background-image: '  ><div class='container' ><div class='template-page content  av-content-full alpha units'><div class='post-entry post-entry-type-page post-entry-3239'><div class='entry-content-wrapper clearfix'>\n<div class=\"flex_column av_one_full  flex_column_div first  \" ><p><div style='height:30px' class='hr hr-invisible  '><span class='hr-inner ' ><span class='hr-inner-style'></span></span></div><br />\n<span class=\"av_font_icon avia_animate_when_visible  av-icon-style-  avia-icon-pos-center \" style=\"color:#e83778; border-color:#e83778;\"><span class='av-icon-char' style='font-size:50px;line-height:50px;' aria-hidden='true' data-av_icon='\ue806' data-av_iconfont='entypo-fontello' ></span></span><br />\n<section class=\"av_textblock_section \"  itemscope=\"itemscope\" itemtype=\"https://schema.org/CreativeWork\" ><div class='avia_textblock  '   itemprop=\"text\" ><p><a name=\"Donate\"></a></p>\n</div></section><br />\n<div style='padding-bottom:10px; color:#3a3a3a;font-size:35px;' class='av-special-heading av-special-heading-h3 custom-color-heading blockquote modern-quote modern-centered  av-inherit-size '><h3 class='av-special-heading-tag '  itemprop=\"headline\"  >HELP FURNISH HOPE</h3><div class ='av-subheading av-subheading_below av_custom_color ' style='font-size:25px;'><p>You have the power to transform lives.</p>\n</div><div class='special-heading-border'><div class='special-heading-inner-border' style='border-color:#3a3a3a'></div></div></div></p></div><div class=\"flex_column av_one_full  flex_column_div av-zero-column-padding first  \" style='border-radius:0px; '><p><div style='height:19px' class='hr hr-invisible  '><span class='hr-inner ' ><span class='hr-inner-style'></span></span></div><br />\n<section class=\"avia_codeblock_section  avia_code_block_0\"  itemscope=\"itemscope\" itemtype=\"https://schema.org/CreativeWork\" ><div class='avia_codeblock '  itemprop=\"text\" > [avia_codeblock_placeholder uid=\"0\"] </div></section></p></div><div style='height:40px' class='hr hr-invisible  '><span class='hr-inner ' ><span class='hr-inner-style'></span></span></div>\n<section class=\"av_textblock_section \"  itemscope=\"itemscope\" itemtype=\"https://schema.org/CreativeWork\" ><div class='avia_textblock  '  style='font-size:20px; '  itemprop=\"text\" ><p style=\"text-align: center;\">Alternatively, if you would like to pay by mail, please download and fill out this <span style=\"text-decoration: underline;\"><strong><a href=\"http://www.furniturebank.org/wp-content/uploads/2015-Donation-Form1.pdf\">Donation Form</a></strong></span>.</p>\n</div></section>\n<div style='height:50px' class='hr hr-invisible  '><span class='hr-inner ' ><span class='hr-inner-style'></span></span></div>\n\n"

I was suspicious it was just because there was related Javascript which wasn't getting loaded, but I don't think that's the whole story. When I load the page without javascript, the pretty donation form isn't there, but nor is that shortcode. So there's something more going on here than just missing Javascript, but that's certainly a big part of it.

I suspect this issue goes beyond just Avia, it probably affects any blocks or shortcodes that depend on JS or CSS.
Ideally, the WP REST responses would include what JS and CSS are needed to display them properly, so the JS could include them dynamically. It sounds like something similar happened on WordPress/gutenberg#9734 and https://core.trac.wordpress.org/ticket/46138

Simplify using dotEpub

Rather than asking users to activate dotEpub etc, why not include its Javascript, like in the dotEpub plugin? (Should probably double-check Xavier wouldn't mind, but it's technically OK)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.