Tuesday, December 9, 2014

GNOME planner page size work-around

It seems GNOME planner has a few bugs that means I can't manage to get a decent export from it. The bugs I am apparently observing include:
 + characters 'fi' are do not appear in the export to PDF.
 + specify printing to a page size that is not about Letter size.

The work-around is to:

1. Install cups-pdf driver.
2. Modify /etc/cups/cups-pdf.conf to hi-jack the in intermediatory Postscript and redirect it to a file. By default the postscript is converted to pdf, which then misses the 'fi' characters.

/etc/cups/cups-pdf.conf must contain:
 

### Key: GhostScript
##  location of GhostScript binary (gs)
##  MacOSX: for using pstopdf (recommended) set this to /usr/bin/pstopdf
##          or its proper location on your system

GhostScript /usr/bin/echo

### Key: GSCall
## command line for calling GhostScript (!!! DO NOT USE NEWLINES !!!)
## MacOSX: for using pstopdf set this to %s %s -o %s %s

GSCall %s %s; cat > %s < %s

With these configurated values, after selecting the 'cups-pdf' printer, I end up with a postscript file in /home/rhenwood/Desktop probably called something like 'Planner_job__2.pdf' or something.

The file is a postscript file, to load it into inkscape for editing, you'll need to rename it '.ps'.

Friday, September 19, 2014

hidden forums 404 with bbpress

BBpress allows private forums. I configured a private forum and the default behavior was undesirable: if you are not logged in, visiting a link to the forum returns the generic 404 page.

I was happy with the 404 page, but I wanted some special when people visited the private forum - that encouraged them to register or login.

I hacked this into my 404.php:


...




 
  if ('/forums/forum/someforum/' == $_SERVER['REQUEST_URI']) {
        _e('You need to be registered and logged in to participate in the forum.');
        } else { 
        _e( 'It looks like nothing was found at this location. Maybe try a search', 'twentyfourteen' ); echo '
'; get_search_form();
  } ?>

                        
...


Sadly, this blog publishing software doesn't do syntax highlighting, so good luck.