Support Forum

print a post

AM AM
AM
Member

Hi,

Is there some setting that will print only a post and not all the icons and profile pic etc. on the left of the post?

 

Thanks 🙂

5 Answers

New Answer

MP Mr Papa
Mr Papa
Member

afraid not… the current print post capability prints the stuff on left and right…  you could highlight the text and print the selected area, but understand thats a bit more work…

if you really want to change it, I could give you a code change for this, but afraid currently it would be a core code change…

AM AM
AM
Member

Hi, 

Yes. Can you please give me the code change.

 

Thanks

MP Mr Papa
Mr Papa
Member

edit simple-press/forum/content/sp-topic-view-functions.php…  find routine sp_PostIndexPrint()… and then this line of code:

    $out.= “onclick=’jQuery(document).ready(function() { jQuery(“#post”.$spThisPost->post_id.””).jqprint({debug:true}); return false; });’>”;

and change it to

    $out.= “onclick=’jQuery(document).ready(function() { jQuery(“#spPostIndexContent”.$spThisPost->post_id.””).jqprint({debug:true}); return false; });’>”;

which should do it… but I have not actually tested it…

AM AM
AM
Member

Hey there,

Thanks for the code snippet. It did work – but I opted for a CSS-based solution which does not rely on changing the core code. This way the fix sticks through upgrades.

Let me know if you want details about how I solved it and I’ll post a write-up.

MP Mr Papa
Mr Papa
Member

Now that you mention it, fairly straight forward to do with css (or a print css file) now that you mention it… nice thought!

we are actually discussing whether we want to change the core functionality to only print the content too…