CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Printer-Friendly Open in New Window?
Pages: [1]

Author Topic: Printer-Friendly Open in New Window?  (Read 1176 times)

bit_man

  • I post occasionally
  • **
  • Posts: 33
  • Karma: 0
  • CiviCRM version: 4.0.6
  • CMS version: Joomla 1.7
  • MySQL version: 5.1.56
  • PHP version: 5.2.17
Printer-Friendly Open in New Window?
November 30, 2011, 07:30:35 am
Hello,

I'm trying to figure out the printer friendly functionality within Civi.

When I'm not logged in and am viewing events, etc on the front end of the site the printer friendly function doesn't work right. It just tries to print the web page in the browser and doesn't open up to a printer-friendly version. However, if I log in from the front end as a Civi user, it works fine. Any thoughts on why this happens?

To my next question, once logged in it looks great. But I would really like to set the target to open in a new window. Any ideas of how to get this done?

Thanks so much!

-Max

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Printer-Friendly Open in New Window?
November 30, 2011, 07:45:07 am
Quote from: maxbit on November 30, 2011, 07:30:35 am
Hello,

When I'm not logged in and am viewing events, etc on the front end of the site the printer friendly function doesn't work right. It just tries to print the web page in the browser and doesn't open up to a printer-friendly version.


If you have your theme that has a proper print css, the print version can be as different and pretty as you want, without having a separate page.

On a recent project, the page on screen was a form to edit a participant, but when you printed the page, it would print it as a name badge, all done thanks to the css print media

X+
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

bit_man

  • I post occasionally
  • **
  • Posts: 33
  • Karma: 0
  • CiviCRM version: 4.0.6
  • CMS version: Joomla 1.7
  • MySQL version: 5.1.56
  • PHP version: 5.2.17
Re: Printer-Friendly Open in New Window?
November 30, 2011, 11:32:34 am
Hi Xavier,

Thanks for getting back to me. I think I may have explained the issue not quite as clear as I could have.

The Civi content (print icon) which is wrapped into my site is acting differently based on whether I'm logged in or not from the front end. It's all stuff within Civi, not my template. I can see the page on the front end no matter if I'm logged in or not as it is a public page. However, the icon acts differently when I'm logged in. I want it to open in a new window and to open a print friendly version no matter if the user is logged in or not.

Right now it doesn't open in a new window either way and acts differently whether the user is registered and (and logged in) or public.

I've attached a screenshot so you can see the page and how it looks to all the visitors. When logged in the print icon opens a print friendly page and when not logged in it doesn't.

Thanks for the help!

-Max

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Printer-Friendly Open in New Window?
November 30, 2011, 02:08:17 pm
Ah ok, understood.

The reason is of access rights (the print version couldn't be available to everyone, not so sure about the reason). The "pure html" solutiion was a workaround for the anonymous visitors.

I personally think everyone should get only the pure html, that'd be more coherent indeed.

Are they info you miss in the html only version for anonymous compared to the "old style" print layout?

X+
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Printer-Friendly Open in New Window?
November 30, 2011, 09:25:25 pm
Just a thought, i think on frontend you might be using joomla's print friendly interface and on the backend on CiviCRM pages, it is CiviCRM's print friendly interface.

Kurund
Found this reply helpful? Support CiviCRM

bit_man

  • I post occasionally
  • **
  • Posts: 33
  • Karma: 0
  • CiviCRM version: 4.0.6
  • CMS version: Joomla 1.7
  • MySQL version: 5.1.56
  • PHP version: 5.2.17
Re: Printer-Friendly Open in New Window?
December 01, 2011, 06:06:46 am
Hi Kurund,

I just changed the icon for a client who wanted a larger print icon than the standard one that comes with Civi.

Xavier,

I'm still a bit lost as to how to correct this. Is there a hook anywhere that I could implement so anyone can print friendly? I figured it was a permissions error, but yeah I just need to make that work right. :)

I don't quite understand how to do the "pure version" since it's a access problem?

Thanks,

Max

bit_man

  • I post occasionally
  • **
  • Posts: 33
  • Karma: 0
  • CiviCRM version: 4.0.6
  • CMS version: Joomla 1.7
  • MySQL version: 5.1.56
  • PHP version: 5.2.17
Re: Printer-Friendly Open in New Window?
December 01, 2011, 06:30:27 am
I found this in the joomla.tpl

{if $browserPrint}
{* Javascript window.print link. Used for public pages where we can't do printer-friendly view. *}
<div id="printer-friendly"><a href="javascript:window.print()" title="{ts}Print this page.{/ts}"><div class="ui-icon ui-icon-print"></div></a></div>
{else}
{* Printer friendly link/icon. *}
<div id="printer-friendly"><a href="{$printerFriendly}" title="{ts}Printer-friendly view of this page.{/ts}"><div class="ui-icon ui-icon-print"></div></a></div>
{/if}

Just have to figure out how to write that to now go to the default printer friendly joomla page.

Thanks,

Max

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Printer-Friendly Open in New Window?

This forum was archived on 2017-11-26.