TinyPortal

Development => Support => Topic started by: Ruscon on July 03, 2009, 08:48:29 AM

Title: Exclude from Print mode
Post by: Ruscon on July 03, 2009, 08:48:29 AM
What's the best way to exclude stuff from ;print mode? Lets say I want to exclude a certain div, would that be possible?
Title: Exclude from Print mode
Post by: ZarPrime on July 03, 2009, 02:49:20 PM
Ruscon,

The best place to ask this question would be on the Simple Machines Forum (http://www.simplemachines.org/community/index.php), but if this is about removing the copyright from printed material that you asked about in your other topic, I doubt that you'll get much help there on it.  A copyright is just as valid on the printed page as it is on a monitor.

ZarPrime
Title: Exclude from Print mode
Post by: Ruscon on July 06, 2009, 08:59:30 AM
Edit

I don't want to edit copyright and I don't want to edit the topic printing. I want to edit tp article printing, meaning I'd have to edit TPprint.template.php.

I've added a delete button to quickly delete my posts that I display on my article. I'd like to change so that this button doesn't show up in print mode. It looks stupid to have edit/delete buttons once it's printed. Can I do some code that checks if it's ;print action and then not display the buttons? Thank you!
Title: Exclude from Print mode
Post by: Ruscon on July 06, 2009, 09:58:58 AM
I made a new post so that anyone who would search for it and have the same issue as me would find the proper info.

I solved it myself with some google and logical thinking. Here's a code you can use on something that you wouldn't want to be displayed in print.


if (!isset($_REQUEST['print']))
{
echo
'
This message will not be on print but will show on article!
';
}
Title: Exclude from Print mode
Post by: Zetan on July 06, 2009, 10:35:31 AM
Good work Ruscon, and thanks for sharing :up:

I'm merging this with your original topic.. Please stick to one topic, cross posting is frowned upon and likely to be locked.
Title: Exclude from Print mode
Post by: Ruscon on July 06, 2009, 10:39:03 AM
Zetan: You realise both topics are about different things, right? You just merged 2 totally different topics. This one is about removing copyright from ;print which is illegal and voids your smf license doing so. My other topic was about "not" displaying certain parts of code that you put into an article.

Please solve your misstake.

Other than that: Thanks for your kind words
Title: Re: Exclude from Print mode
Post by: Zetan on July 06, 2009, 10:53:03 AM
Solved!

We don't have the Rename Topics mod installed here, so I edited the post titles manually, hence the Last Edits