Giter Club home page Giter Club logo

pressbooks's People

Contributors

arzola avatar bakingsoda avatar bdolor avatar bracken avatar cagp-dev-mtl avatar cmurtagh avatar colomet avatar crism avatar dac514 avatar dannylonglegs avatar dependabot[bot] avatar drlippman avatar fdalcin avatar github-actions[bot] avatar greatislander avatar ho-man-chan avatar hughmcguire avatar jeremyfelt avatar jflowers45 avatar jgraham909 avatar lukaiser avatar monkecheese avatar pressbooks-ops avatar ricardopressbooks avatar richard015ar avatar steelwagstaff avatar stepmuel avatar transifex-integration[bot] avatar tw77 avatar unit29868 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pressbooks's Issues

Book-wide endnote support

Some users want footnotes grouped at the end of the book as a whole in EPUB and PDF exports. Currently we only support footnotes on each page and chapter endnotes.

EXPORT failure

Export Your Book button results in blank screen for any format,
I have changed files/folder mPDF to CHMOD 777 with no change in result.
Perhaps this is a Webnames hosting issue?
Pressbooks is working save for the Export.

Fatal error

i am getting fatal error when i installed the plugin on line no 48

Themes do not show in network admin

After installing 2.3.3 and network activating, the themes do not list in the themes admin under the network admin. So, there are no themes to network activate.

But, I do see the themes listed in the themes-book directory.

Blank page on ODT import

I'm encountering an issue when trying to upload a large (1.6MB) OpenOffice .odt file. I can start the import, upload the file, and select which section(s) I want to import. But when I click on Start, the server runs for a few seconds, then presents me with a blank white screen.

The URL of the blank page is http://example.com/bookname/wp-admin/options-general.php?page=pb_import&import=yes&_wpnonce=[nonce]

I have set WP_DEBUG to true, but nothing is displayed.

When I attempted to upload a large Word .docx file (3.6MB, with the same content as the .odt file), I ran into a timeout issue.

PHP settings:

  • upload_max_filesize is 32M
  • memory_limit is 256M (I raised it from 128M when the .docx upload exhausted PHP's memory)

MCE Table Buttons

Hi Ned,
3 features we want from PB-Textbook on all PB instances (asap!), TinyMCE buttons for:
--superscript
--subscript, and
--table

NOTE re: the table button: we also want to add the following to:
~/themes-book/pressbooks-book/editor-style.css

table {min-width: 50%;}

This makes sure that when the MCE table button is used, the resulting blank table in the editor looks like a blank table.

Theme selection page

It's become somewhat unwieldy given the number of themes now available. Examine strategies to make theme selection more user-friendly, as seen on WordPress.com.

catalogue page and webkit browsers

problem: css height isn't calculated properly in webkit browsers on <div class="catalog-content' id='catalogue-content'> for the initial page load.

to reproduce: add a bunch of books to your catalogue, then view the page in safari or chrome. Book cover images will overlap each other:

screen shot 2015-01-22 at 8 51 39 am

Toggling between an earlier commit git checkout 448834b and the latest commit git checkout 7521ddfe indicates webkit browsers don't like the js change introduced with this commit ff794ba

I'll try and dive into this later today, but if you have a quick fix - feel free.

Translate sprinf's

I cant translate
sprintf( 'To display a book in your catalog choose "%s" under Catalog Status. ', '' . __( 'Show in Catalog', 'pressbooks' ) . '' ), 'pressbooks' );

Any idea how to do that?
regards

Epub import issue on special characters

The Epub import currently fails if a filename includes URL encoded special characters.

For example if the filename is "Happy Cows.html", and content.opf has the href as "Happy%20Cows.html", then the $this->zip->open call in setCurrentZip fails.

I'm guessing the fix would be to toss in a urldecode, but I'm not certain.
$this->zip->open( urldecode ( $fullpath ) )

SILE as PDF generator backend?

You guys might consider to look into http://www.sile-typesetter.org (https://www.youtube.com/watch?v=5BIP_N9qQm4) as a way to get rid of the PrinceXML dependency, as the latter is proprietary software. Unfortunately, SILE is licensed under the X11 license, but as Pressbooks is under GPLv2, I guess you're not bothered too much regarding it's shortcomings in protecting users rights.

There are other freely licensed PDF generator backends as well, this is the latest one I got notified about.

Plugin activation completes with error message

I see the following error message after the plugin activation. I am using the network install and downloaded the latest version from Git.

Warning: session_start(): open(D:\Temp\php\session\sess_86b6ld554chc9oj4a9964ljbc3, O_RDWR) failed: No such file or directory (2) in D:\Hosting\9308545\html\wp-content\plugins\pressbooks\pressbooks.php on line 23

Do you know what is wrong?

Syntax error in pressbooks.php on line 55

Plugin could not be activated because it triggered a fatal error.
Parse error: syntax error, unexpected T_FUNCTION in [...]/public_html/book/wp-content/plugins/pressbooks-dev/pressbooks.php on line 55

PHP Version: 5.4.30
Wordpress: 4.0

Any ideas?

.introduction class not applied to first Part in case when there is text in the part (so numbering is wrong)

Case:

  • book has front matter
  • book has no Introduction (in front matter)
  • book has several parts
  • part 1 has text in the part

Expected behaviour:
.introduction class should be assigned to the the div wrapper for the first part, so: <div class="part introduction "> ... which will allow pressbooks to number pages correctly.

Actual behaviour:
.introduction class is not assigned at all.

NOTE: in the same case as above, but where

  • part 1 has NO text in the part ....

then the .introduction class is assigned correctly (and page numbering is correct).

see:
http://fortresspress.pressbooks.com/anointedchurch/wp-admin/admin.php?page=pb_export

Modification Request

Ideas only:

Change "Exotic formats:" to "Developer formats:"

Change "Standard book formats:" "Publisher formats:"

audio files included in web output, not displaying in export

To recreate: Add an audio file from media library to your content area. Export the book. Audio file (url with link back to the audio file) and content proceeding audio file do not display.

Description: adding audio files to the content area invokes wp_audio_shortcode() which adds a default, inline style attribute with visibility:hidden. https://core.trac.wordpress.org/changeset/28182#file3

Without the necessary CSS and JS present in the browser, this inline style remains in the XHTML output, preventing it from being displayed in any of the export routines.

screen shot 2015-04-15 at 11 38 37 am

Potential Resolutions: It could be overridden with CSS, but that would mean going through each and every theme. Invoking HTMLLawed deny_attribute can target specific attributes on specific elements, but the audio tag is converted to a div tag in \PressBooks\Sanitize\html5_to_xhtml11 so taking it out would mean targeting all div tags, instead of just the audio tag — is this such a bad thing? Likely a preg_replace or DOM traversal and node replacement is in order.

Revise How the Options pages work

Hi @bdolor I'm assigning this to you just because you are working on something related to this request already ... and I just looked at how it works and all I can say is: ug. (and, @greatislander is working on some other things).

So, how I would propose this should work is:

  1. User implements his/her options (in GLOBAL, PDF, EBOOK and/or WEB)
  2. This generates a CSS file snippet (one for each format), reflecting the options chosen by the user for this book probably with "!important" appended to each declaration)
  3. These 3 CSS file snippets (PDF, EBOOK, WEB) get injected into the correct CSS-file on export
  4. Then... on export a "customized" CSS sheet is stuffed into the various export protocols ...

So then the routine is:
-- read options page
-- generate CSS snippets
-- inject on export

which seems much more sane than the individualized "if this option, then run this routine; if this other option, then run this other routine"

thoughts?

Add option to deactivate social media buttons

Hey there,

thanks for the great work on pressbooks. An option to deactivate the social media buttons beneath a chapter would be very good, because in some cases it is a privacy issue.

Thanks in advance!

Best regards,
Matthias

Support working with an existing WordPress site

Authors often promote their books via their own blogs. Having to setup another wordpress host in order work with Pressbooks, on a book that might already be partially drafted on their existing blog, is a big detractor.

It would be great to allow working with existing blogs, similar to how Anthologize works:
http://www.makeuseof.com/tag/3-easy-ways-turn-blog-ebook-free/

I understand you might want to push authors to host on Pressbooks.com and that's ok. However, one could more happily author a book on his existing blog, export with Pressbooks plugin, and use Pressbooks services to distribute on various platforms.

Private chapters are not displayed in the TOC if book is public and user is logged in

For public books we have the following display behaviour in the TOC:

  1. Private chapters are not displayed if a user is not logged in
  2. Private chapters are not displayed if a user is logged in

But as for private books chapters are displayed in the TOC (if a user is logged in), the expected behaviour for 2 would be that private chapters are displayed if a user is logged in

add_magic_quotes for wp_insert_post and wp_update_post

Hey guys

I just found a bug in the code of my fork. It sometimes removed all the backslashes from a post. What is kind of annoying if you have a lot of formulas.

What I found, is that you need to call add_magic_quotes bevor you wp_insert_post or wp_update_post.
https://core.trac.wordpress.org/ticket/21767
There is at least one wp_update_post and several wp_insert_post not doing that in pressbooks (manly in the import modules). The function calls are in parts of the code I haven't really looked at, so I don't know if it ever affects any thing. But I think it happened to me while importing a WXR. I don't have the time to think it trough or test it. I will keep an eye on it if it ever happens again. But maybe somebody can test it or we add it anyway. It should not do any harm.

I guess one test case is to import a WXR with latex formulas with backslashes in it.

database error pressbooks publisher theme

Description: Database errors are showing up in debug.log as queries generated against tables (blog_id) that do not exist.

screen shot 2015-06-04 at 9 43 05 am

To recreate: Network Activate the new 'pressbooks publisher' theme. Go to the root site and activate 'pressbooks publisher' theme. Visit Site. Click on 'My Books'. Watch the console log for queries made against non-existent database tables.

Related/Relevant Issues:

  • There is a reference to 'pressbooks-publisher-one' here. This generates an 'internal server error' if you navigate to the my catalogue page and click on any of the cover images. If that $base_href value gets updated to 'pressbooks-publisher' it generates a fatal error.
  • Definitely unrelated, but relevant, there are numerous references to 'pressbooks-publisher-one' in the language file:
  • Some other strange behaviour, is that the admin menu has mostly disappeared in the admin interface of the root site.

screen shot 2015-06-04 at 10 00 51 am

Textbox messes with paragraphs

The flowing code (new lines after text are important)

[textbox]

bla

[/textbox]

creates the following unclean HTML Code:

<div class="textbox"></p>
<p>bla</p>
<p></div>

generating the following warning in the table of content:

Warning: DOMDocument::loadHTML() [domdocument.loadhtml.php]: Unexpected end tag : p in Entity, line: 1 in .../wp-content/plugins/pressbooks/includes/class-pb-book.php on line 337

mPDF export temporary files location

Hi @bdolor, noticed (this escaped me on my initial testing) that the mPDF routine uses three directories within /symbionts as temporary directories for export. I wrapped the error message hook in a conditional block to keep it from showing up on pressbooks.com (see 9c88bfa) but I'd much prefer if you could restrict temporary file storage to the book's uploads directory (/wp-content/uploads/site/2/etc). Is this possible? If non-trivial I'd be happy to assist in any way that I can. Thanks!

Including fonts in epub exports

We are creating foreign language eBooks and have set up our own hosted instance of Pressbooks.

In creating our publications in the past (prior to discovering Pressbooks), we have found that embedding the open-source fonts used for foreign languages with different character sets (e.g. Cyrillic, Chinese) is crucial to guarantee full support across platforms and e-readers.

Have you considered allowing users the option to copy some (or all) files from the 'fonts' directory into an ePub during export? I understand the ramifications of embedding licensed fonts, but it could be an option with open-source and purchased fonts.

Import of word files generated with a none english version of word

The import of word files generated with a english version of word dose not work at all.
The problem is, that pStyle values aren't the same.
"Heading1" for example is "berschrift1".

Translation might probably be found in styles.xml (found in my test word file):

<w:style w:type="paragraph" w:styleId="berschrift1">
    <w:name w:val="heading 1"/>
    <w:aliases w:val="Heading1"/>
    .....
</w:style>

(Only tested with a german version)

import ... forces document author as pb_section_author ... usually we dont' want

using the importer... say this one:
https://github.com/pressbooks/pressbooks/blob/dev/includes/modules/import/ooxml/class-pb-docx.php

you have a line in there that says:

if ( $this->authors ) {
        update_post_meta( $pid, 'pb_section_author', $this->authors );
    }

What this means is that EVERY CHAPTER is given a pb_section_author which is the SAME as the author of document, meaning:

-- all chapters have an author subheading
-- all of them are the same: the document author
-- in most themes all TOC entries have a chapter author as well.

meaning that in 100% of the imports I've done, there is bad data in the :

  • book chapters exports (chapter author entry I don't want)
  • TOC expprts (chapter author entries I don't want)

since chapter author is really only used occasionally, and would never be used if it's the same author throughout the book.

I recommend we remove this "feature", because:

a) you never want what it gives you
b) what it gives you means you have to do lots of extra work to delete chapter author metadata from all your chapters.

thoughts?

Enable a two-level TOC

Host - PleskLinux56.webnames.ca -
Server - LiteSpeed
Wordpress 4.2.2
mysqli 5.1.73
PHPv 5.6.1 - memory_limit 256M
php_value memory_limit 512M

Pressbooks 2.5.1
Pressbooks Textbook 1.2.10

Two Level TOC not expanded on "Visit Site" view.
New site view is not expanding:
not expanded

But ironically old problematic site did present correctly:
correct view

Any solutions?

Jetpack Plugin installation crashes site

Pressbooks includes the site-logo-module from automattic/jetpack. If you activate jetpack there is a "function already declared" error. I solved it by now with function_exists()-workaround.

Best regards,
Matthias

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.