SMF Development > Next SMF Discussion

Print topic should include images

<< < (2/7) > >>

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

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

Dark-Wolf:
Hi!
I have maked this little mod ( smf 1.1.8 ):
In Display.template.php search:

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

--- Code: --- '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'),

--- End code ---
Now open index.english.php and search:

--- Code: ---$txt[465] = 'Print';
--- End code ---
replace with:

--- Code: ---$txt[465] = 'Print(txt)';
$txt[466] = 'Print(img)';

--- End code ---
(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...

--- End quote ---

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.



--- End quote ---

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version