News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Print topic should include images

Started by diffy, August 31, 2007, 11:00:48 PM

Previous topic - Next topic

diffy

I think that the print feature in SMF is too simple

When clicking print SMF generates a text only output.
This is 2007 and images are cool to have on a printout, thus SMF should
display images when showing a print-view.

Also I have often got use for Joomla's PDF function. Can this be included in SMF as well? Print to PDF. It would be very handy, and a very moderm addon to SMF...

tranqui69

#1
I think the same. I Edit myself

The solution was in the forum. This works for me.

In my theme directory. Display.template.php

Find

             $buttonArray[] = '<li class="print"><a href="' . $scripturl . '?action=printpage;topic=' . $context['current_topic'] . '.0" target="_blank">' . $txt[465] . '</a></li>';

Replace with

             $buttonArray[] = '<li class="print"><a href="' . $scripturl . '?action=printpage;topic=' . $context['current_topic'] . '.0;images" target="_blank">' . $txt[465] . '</a></li>';

So simple.


karlbenson

yeah you can either do that.

Or do it permanently.

OPEN Sources/Subs.php
FIND & REMOVE

// !!! Change maybe?
if (!isset($_GET['images']))
$disabled['img'] = true;

falguni1

right it should include images by default.

I thought I was included by default because I never tookout printout.

I was not knowing it doesnot include images by default.

karlbenson

IMO print out should be text only.
But having the option to toggle images would be nice.

The functionality is there, as posted above, but a link to it on Print_only page would be nice.

eg
Text Only | With Images

Aleksi "Lex" Kilpinen

I have to say that the print view is fine as it is, but an option to include images when needed would be cool. :)
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

falguni1

*falguni1 thinks now karlbenson has one more mod idea which he may like to develop.

L'AltroWeb

#7
Hi!
I have maked this little mod ( smf 1.1.8 ):
In Display.template.php search:
'print' => array('text' => 465, 'image' => 'print.gif', 'lang' => true, 'custom' => 'target="_blank"', 'url' => $scripturl . '?action=printpage;topic=' . $context['current_topic'] . '.0'),
replace with:
'print' => array('text' => 465, 'image' => 'print.gif', 'lang' => true, 'custom' => 'target="_blank"', 'url' => $scripturl . '?action=printpage;topic=' . $context['current_topic'] . '.0'),
'printimage' => array('text' => 466, 'image' => 'print.gif', 'lang' => true, 'custom' => 'target="_blank"', 'url' => $scripturl . '?action=printpage;topic=' . $context['current_topic'] . '.0;images'),
Now open index.english.php and search:
$txt[465] = 'Print';
replace with:
$txt[465] = 'Print(txt)';
$txt[466] = 'Print(img)';
(466 is free)  :)
U can test here: http://darkwolf.altervista.org/forum/modemrouter/guida-alluso-di-ciclamab/msg61/#msg61  ;)

klumy

Quote from: diffy on August 31, 2007, 11:00:48 PM
I think that the print feature in SMF is too simple

When clicking print SMF generates a text only output.
This is 2007 and images are cool to have on a printout, thus SMF should
display images when showing a print-view.

Also I have often got use for Joomla's PDF function. Can this be included in SMF as well? Print to PDF. It would be very handy, and a very moderm addon to SMF...

I absolutely agree. This should be a default feature !!

nax

I would like to be able to print off a whole topic complete with images too.  I am using  SMF 1.1.11 and the string is not the same.  I think it is now :-

   'print' => array('text' => 465, 'image' => 'print.gif', 'lang' => true, 'custom' => 'target="_blank"', 'url' => $scripturl . '?action=printpage;topic=' . $context['current_topic'] . '.0'),

I am no PHP programmer so don't know how to alter this string to include the images as per the advice in the quoted post.  Can anyone help?


Quote from: tranqui69 on January 30, 2008, 01:23:16 AM
I think the same. I Edit myself

The solution was in the forum. This works for me.

In my theme directory. Display.template.php

Find

             $buttonArray[] = '<li class="print"><a href="' . $scripturl . '?action=printpage;topic=' . $context['current_topic'] . '.0" target="_blank">' . $txt[465] . '</a></li>';

Replace with

             $buttonArray[] = '<li class="print"><a href="' . $scripturl . '?action=printpage;topic=' . $context['current_topic'] . '.0;images" target="_blank">' . $txt[465] . '</a></li>';

So simple.




nax

#11
Well found! I'll give it a try, I'm trying to print a whole topic to a PDF so that we can remove it from the database but still have a reference copy of the contents.


Thanks.

nax

this works on small topics but not on some of my larger ones.  Also I really would like to have a copy of the posters avatar included.

Arantor

Well found? I originally wrote it...

It should work on all topics, if it doesn't it's actually an SMF bug since it uses an internal SMF feature.

So in reality what you're after ISN'T the printable view, but actually a low-fat theme.

nax

Well the owner of the site doesn't want to lose any of the posts but the DB is getting quite large.  I was trying to print out/export an entire archived topic as seen on the screen to a pdf so we still had a record but we could happily delete the topic/records from the DB.

I think several people are looking for this sort of feature.

Aleksi "Lex" Kilpinen

Quote from: nax on February 04, 2010, 06:20:08 AM
Well the owner of the site doesn't want to lose any of the posts but the DB is getting quite large.  I was trying to print out/export an entire archived topic as seen on the screen to a pdf so we still had a record but we could happily delete the topic/records from the DB.

I think several people are looking for this sort of feature.
You could just get your self a pdf printer, and print the actual topic view.... ;)
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

nax

errr I can print to PDF but the mod will not work with large threads.


Quote from: LexArma on February 04, 2010, 06:23:23 AM
Quote from: nax on February 04, 2010, 06:20:08 AM
Well the owner of the site doesn't want to lose any of the posts but the DB is getting quite large.  I was trying to print out/export an entire archived topic as seen on the screen to a pdf so we still had a record but we could happily delete the topic/records from the DB.

I think several people are looking for this sort of feature.
You could just get your self a pdf printer, and print the actual topic view.... ;)

Aleksi "Lex" Kilpinen

Quote from: nax on February 04, 2010, 12:08:06 PM
errr I can print to PDF but the mod will not work with large threads.
No, I mean no mod at all - just a PDF fileprinter, and then print the topic like it's actually shown.
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

nax

If you print the topic this way it is without images which is not what we want - the default print thread is text only.

Aleksi "Lex" Kilpinen

No you still didn't understand. Don't use the print view, use the normal topic view, and your browsers print function to print to a pdf file. So print what you see normally....
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Advertisement: