Advertisement:

Author Topic: Print topic should include images  (Read 41563 times)

Offline diffy

  • Semi-Newbie
  • *
  • Posts: 61
Print topic should include images
« 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...
« Last Edit: December 19, 2012, 04:41:51 AM by emanuele »

Offline tranqui69

  • Newbie
  • *
  • Posts: 1
Re: Print topic should include images
« Reply #1 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.

« Last Edit: January 30, 2008, 01:39:50 AM by tranqui69 »

Offline karlbenson

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 15,629
  • Gender: Male
    • @mortonssols on Twitter
    • Criminal Solicitors
Re: Print topic should include images
« Reply #2 on: January 30, 2008, 02:38:11 AM »
yeah you can either do that.

Or do it permanently.

OPEN Sources/Subs.php
FIND & REMOVE
Code: [Select]
// !!! Change maybe?
if (!isset($_GET['images']))
$disabled['img'] = true;

Offline falguni1

  • Full Member
  • ***
  • Posts: 652
  • Gender: Female
  • http://beautymakeupdivas.com/
Re: Print topic should include images
« Reply #3 on: January 30, 2008, 02:49:13 AM »
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.

Offline karlbenson

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 15,629
  • Gender: Male
    • @mortonssols on Twitter
    • Criminal Solicitors
Re: Print topic should include images
« Reply #4 on: January 30, 2008, 02:54:04 AM »
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

Offline Aleksi "Lex" Kilpinen

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 15,430
  • Gender: Male
  • The Artist Formerly Known as LexArma
Re: Print topic should include images
« Reply #5 on: January 30, 2008, 02:55:29 AM »
I have to say that the print view is fine as it is, but an option to include images when needed would be cool. :)
Finnish Support Local Moderator & Support Specialist
My Mods: Facebook and Twitter Sharer



Offline falguni1

  • Full Member
  • ***
  • Posts: 652
  • Gender: Female
  • http://beautymakeupdivas.com/
Re: Print topic should include images
« Reply #6 on: January 30, 2008, 06:22:57 AM »
*falguni1 thinks now karlbenson has one more mod idea which he may like to develop.

Offline L'AltroWeb

  • Jr. Member
  • **
  • Posts: 344
  • Gender: Male
  • L'AltroWeb
    • laltroweb on Facebook
    • @laltroweb on Twitter
    • L'AltroWeb
Re: Print topic should include images
« Reply #7 on: February 06, 2009, 01:38:10 PM »
Hi!
I have maked this little mod ( smf 1.1.8 ):
In Display.template.php search:
Code: [Select]
'print' => array('text' => 465, 'image' => 'print.gif', 'lang' => true, 'custom' => 'target="_blank"', 'url' => $scripturl . '?action=printpage;topic=' . $context['current_topic'] . '.0'),replace with:
Code: [Select]
'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:
Code: [Select]
$txt[465] = 'Print';replace with:
Code: [Select]
$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  ;)
« Last Edit: February 06, 2009, 01:39:48 PM by Dark-Wolf »

Offline klumy

  • SMF Hero
  • ******
  • Posts: 2,483
Re: Print topic should include images
« Reply #8 on: February 06, 2009, 02:34:09 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 !!

Offline nax

  • Jr. Member
  • **
  • Posts: 340
  • Gender: Male
Re: Print topic should include images
« Reply #9 on: February 04, 2010, 05:36:15 AM »
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?


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.



Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 68,051
    • Arantor on GitHub
Re: Print topic should include images
« Reply #10 on: February 04, 2010, 05:40:27 AM »
To assume is to hope that those who came before had the presence of mind and capacity to implement the dreams of those who would come after.

You either die a hero or live long enough to see yourself become the villain. It seems you have chosen which, and now I must do the same.

Offline nax

  • Jr. Member
  • **
  • Posts: 340
  • Gender: Male
Re: Print topic should include images
« Reply #11 on: February 04, 2010, 05:46:13 AM »
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.
« Last Edit: February 04, 2010, 05:53:38 AM by nax »

Offline nax

  • Jr. Member
  • **
  • Posts: 340
  • Gender: Male
Re: Print topic should include images
« Reply #12 on: February 04, 2010, 05:54:29 AM »
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.

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 68,051
    • Arantor on GitHub
Re: Print topic should include images
« Reply #13 on: February 04, 2010, 06:14:40 AM »
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.
To assume is to hope that those who came before had the presence of mind and capacity to implement the dreams of those who would come after.

You either die a hero or live long enough to see yourself become the villain. It seems you have chosen which, and now I must do the same.

Offline nax

  • Jr. Member
  • **
  • Posts: 340
  • Gender: Male
Re: Print topic should include images
« Reply #14 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.

Offline Aleksi "Lex" Kilpinen

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 15,430
  • Gender: Male
  • The Artist Formerly Known as LexArma
Re: Print topic should include images
« Reply #15 on: February 04, 2010, 06:23:23 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.... ;)
Finnish Support Local Moderator & Support Specialist
My Mods: Facebook and Twitter Sharer



Offline nax

  • Jr. Member
  • **
  • Posts: 340
  • Gender: Male
Re: Print topic should include images
« Reply #16 on: February 04, 2010, 12:08:06 PM »
errr I can print to PDF but the mod will not work with large threads.


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.... ;)

Offline Aleksi "Lex" Kilpinen

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 15,430
  • Gender: Male
  • The Artist Formerly Known as LexArma
Re: Print topic should include images
« Reply #17 on: February 04, 2010, 12:27:04 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.
Finnish Support Local Moderator & Support Specialist
My Mods: Facebook and Twitter Sharer



Offline nax

  • Jr. Member
  • **
  • Posts: 340
  • Gender: Male
Re: Print topic should include images
« Reply #18 on: February 04, 2010, 01:03:52 PM »
If you print the topic this way it is without images which is not what we want - the default print thread is text only.

Offline Aleksi "Lex" Kilpinen

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 15,430
  • Gender: Male
  • The Artist Formerly Known as LexArma
Re: Print topic should include images
« Reply #19 on: February 04, 2010, 01:19:41 PM »
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....
Finnish Support Local Moderator & Support Specialist
My Mods: Facebook and Twitter Sharer