[SOLVED] can't print FEU pages

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
User avatar
frankmanl
Power Poster
Power Poster
Posts: 425
Joined: Sat Jul 12, 2008 3:50 am

[SOLVED] can't print FEU pages

Post by frankmanl »

I use Simplex template on a site that's partially hidden from public by FrontEndUsers module. The site has pretty URLs.
Simplex has a printing icon on the upper right. Works fine on all public pages, but when I log in and click it on a protected page I don't get the printing layout of that page, but am being moved to the log in page.
The URL then looks like:

Code: Select all

http://www.frankma.nl/index.php?mact=CMSPrinting,cntnt01,output,0&cntnt01url=aHR0cDovL3d3dy5mcmFua21hLm5sL2RvY3VtZW50YXRpZS9iZXN0YW5kc2JlaGVlcj9zaG93dGVtcGxhdGU9ZmFsc2U%3D&cntnt01pageid=43&cntnt01returnid=43
which is exactly what the printing icon generates.
I am not logged out (browser navigation gets me back to the protected page), I just don't get the printing layout of my hidden page.
How can I fix this?

Frank

systeminfo:

----------------------------------------------

Cms Version: 1.11.11

Installed Modules:

CMSMailer: 5.2.2
FileManager: 1.4.5
MenuManager: 1.8.6
ModuleManager: 1.5.8
News: 2.14.4
Search: 1.7.11
ThemeManager: 1.1.8
FormBuilder: 0.8
Captcha: 0.5.0
CMSPrinting: 1.0.5
MicroTiny: 1.2.7
TinyMCE: 2.9.12
CGExtensions: 1.44.4
FrontEndUsers: 1.25.1
OwnersManual: 1.0.3
CustomContent: 1.10


Config Information:

php_memory_limit:
process_whole_template:
max_upload_size: 2000000
url_rewriting: mod_rewrite
page_extension:
query_var: page
image_manipulation_prog: GD
auto_alias_content: true
locale:
default_encoding: utf-8
admin_encoding: utf-8
set_names: true


Php Information:

phpversion: 5.5.18
md5_function: On (True)
gd_version: 2
tempnam_function: On (True)
magic_quotes_runtime: Off (False)
E_STRICT: 0
E_DEPRECATED: 0
memory_limit: 128M
max_execution_time: 30
output_buffering: 0
safe_mode: Off (False)
file_uploads: On (True)
post_max_size: 8M
upload_max_filesize: 2M
session_save_path: /tmp (0777)
session_use_cookies: On (True)
xml_function: On (True)
xmlreader_class: On (True)


Server Information:

Server Api: cgi-fcgi
Server Db Type: MySQL (mysql)
Server Db Version: 5.5.36
Server Db Grants: Could not find a suitable "GRANT ALL" permission. This may mean you could have problems installing or removing modules. Or even adding and deleting items, including pages
Server Time Diff: No filesystem time difference found


----------------------------------------------


Server Information:

Server Api: cgi-fcgi
Server Db Type: MySQL (mysql)
Server Db Version: 5.5.36
Server Db Grants: Kan geen geldige "GRAND ALL" permissie vinden. Dit kan problemen opleveren bij het installeren of verwijderen van modules. Of zelfs bij het toevoegen of verwijderen van items, zoals pagina's.
Server Time Diff: Geen tijdverschil aangetroffen


----------------------------------------------
Last edited by frankmanl on Fri Jan 16, 2015 4:12 am, edited 2 times in total.
janvl
Power Poster
Power Poster
Posts: 985
Joined: Wed Aug 13, 2008 10:57 am

Re: can't print FEU pages

Post by janvl »

Put this in the template and you call the printing-dialog of the browser, it will work but you do not use a special print-template.

Code: Select all

<a href="index.php?page={$page}"><img onclick="javascript:window.print()" src="modules/CMSPrinting/printbutton.gif" alt="" /></a>
Kind regards,
Jan
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: can't print FEU pages

Post by calguy1000 »

it is for reasons such as this that the CMSPrinting module has been discontinued, and will no longer be distributed as of CMSMS 2.0.

A much more robust solution is to use print stylesheets.

If you really want to use smarty logic in your printed version, then I would try (I haven't yet). simply generating a link back to the same page with a ?print=1 URL parameter.

Then you can use {if isset($smarty.get.print)} to determine what should, or should not be displayed, and automatically popup the print dialog with the window.print() javascript function too.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
User avatar
frankmanl
Power Poster
Power Poster
Posts: 425
Joined: Sat Jul 12, 2008 3:50 am

Re: can't print FEU pages

Post by frankmanl »

So CMSPrinting is discontinued? Hardly any reason then to try to get that right.
I'' ll give the print styleheets a try.

my solution
See Simplex template

Code: Select all

{* print tag from CMSPrinting Module - DON'T USE, module will not be continued *}
{*print showbutton='false' class='printbutton noprint'*}                

<a href="index.php?page={$page}" class="printbutton noprint" onclick="javascript:window.print()" ></a>
Thank you,

Frank
Post Reply

Return to “Modules/Add-Ons”