Notifications
Clear all

How to disable print feature [Unsolved but closed to avoid irritation]

7 Posts
3 Users
0 Reactions
1,359 Views
(@sisterwicked)
Posts: 75
Estimable Member
Topic starter
 

I saw this mentioned in another post, but there were no instructions on exactly what to edit or remove, nor from where. would it be the skin's style.css, the default tpl print..?
All I need to do is have the link either be unavailable or redirect to a custom page explaining that no printing is allowed for original works. I can make the page myself, but I have no idea what to do as far as the existing code.
Thank you.


 
Posted : 08/09/2010 10:37 pm
(@lyndsie)
Posts: 1263
Member Moderator
 

To remove the link, simply take {printicon} out of your skins. You'll find it in usually in storyindex.tpl, viewstory.tpl, etc. Anyone who knows how to build the URL would still be able to access the function this way, however. If you want something more it would require modifying other files.


 
Posted : 08/09/2010 11:49 pm
(@sisterwicked)
Posts: 75
Estimable Member
Topic starter
 

Thank you for your reply.
I don't mind simply removing the {printicon} text, but it would perhaps be better to redirect to a page explaining about the nonprint rule.. Would I be able to substitute one url for another to achieve this? It would only be a page created by myself saying that we don't allow it and a back to home/page button.
Would the printpage url be in the same files, or..?

Thanks!


 
Posted : 10/09/2010 7:07 pm
(@lyndsie)
Posts: 1263
Member Moderator
 

The print URL is dynamic - it changes based on what chapter/story you are generating the print text for. The core of it is /viewstory.php?action=printable, though so you might be able to do some kind of .htaccess redirect.

The actual URL is generated in the parts of viewstory.php that begin with either $printicon or $tpl->assign("printicon"  (These define the {printicon} variable under various conditions.)

Lines 77 through 191 deal with what to do when action is set to printable in the URL. Just after that is where the template {printicon} variable begins to be defined.


 
Posted : 10/09/2010 10:50 pm
(@tammy)
Posts: 2577
Member Moderator
 

You do realize that removing the pretty print option does absolutely nothing to stop people from printing a story, right?  They can still choose "Print" from their browser menu and it'll print.


 
Posted : 11/09/2010 1:34 am
(@sisterwicked)
Posts: 75
Estimable Member
Topic starter
 

Wow, snippy.

But yes, I do understand that.
The sad fact is, most people are either too dumb to know that or too lazy to bother if there isn't a handy little icon for it.
That's why I asked if there were any way to negate it from the script alltogether :-/
I ended up having my server manager redirect all instances of the print coding mentioned by Lyndsie to our custom 404 page anyway.
The last 3 people who tried and got redirected simply went to the next chapter without printing manually.
But thank you all the same.


 
Posted : 15/09/2010 1:35 am
(@tammy)
Posts: 2577
Member Moderator
 

Not snippy. Just realistic.  A lot of people don't realize that.


 
Posted : 15/09/2010 10:32 am
Share: