vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   How to Disable the printable version (https://vborg.vbsupport.ru/showthread.php?t=240254)

Wolver2 07-18-2015 10:56 PM

Thanks MarkFL sadly They know the url of the printable version :( anyone to block everyone?

Quote:

Originally Posted by MarkFL (Post 2550582)
You could go to your "SHOWTHREAD" template, and locate the code:

PHP Code:

<li><a href="{vb:raw $vboptions.vbforum_url}{vb:if "$vboptions['vbforum_url']", '/', ''}printthread.php?{vb:raw session.sessionurl}t={vb:raw threadid}<vb:if condition="$perpage">&amp;pp={vb:raw perpage}</vb:if><vb:if condition="$pagenumber">&amp;page={vb:raw pagenumber}</vb:if>" accesskey="3" rel="nofollow">{vb:rawphrase show_printable_version}</a></li

and change it to:

PHP Code:

<vb:comment><li><a href="{vb:raw $vboptions.vbforum_url}{vb:if "$vboptions['vbforum_url']", '/', ''}printthread.php?{vb:raw session.sessionurl}t={vb:raw threadid}<vb:if condition="$perpage">&amp;pp={vb:raw perpage}</vb:if><vb:if condition="$pagenumber">&amp;page={vb:raw pagenumber}</vb:if>" accesskey="3" rel="nofollow">{vb:rawphrase show_printable_version}</a></li></vb:comment



MarkFL 07-18-2015 11:08 PM

Try adding:

PHP Code:

if (!$_SERVER['HTTP_REFERER'])
{
    exit;


at the top of your "printthread.php" file.

MarkFL 07-19-2015 06:57 AM

1 Attachment(s)
If you wish to avoid template edits and PHP file hacks, then download and import the attached add-on. It uses 1 plugin to inject a snippet of javascript to remove the "Show Printable Version" item from the "Thread Tools" menu, and another plugin that will deny permission to anyone trying to access the script manually. :up:

There are no settings to configure, once it is imported, it is active.

Wolver2 07-20-2015 12:08 PM

Appreciate it MarkFL , I will try and report to u once i get home

Stratis 07-26-2018 02:19 PM

Quote:

Originally Posted by Wolver2 (Post 2550836)
Appreciate it MarkFL , I will try and report to u once i get home

Yep, I am waiting three years for your report, I assume you forgot it :D


Mark I just test this, "Show Printable Version" phrase-option is still there.
It does not allow though to see the page. Stratis, you do not have permission to access this page. This could be due to one of several reasons:


This is ok, but if the option "Show Printable Version" is not there it would be great. Thanks any way. :)

MarkFL 07-26-2018 03:21 PM

Quote:

Originally Posted by Stratis (Post 2595725)
Yep, I am waiting three years for your report, I assume you forgot it :D


Mark I just test this, "Show Printable Version" phrase-option is still there.
It does not allow though to see the page. Stratis, you do not have permission to access this page. This could be due to one of several reasons:


This is ok, but if the option "Show Printable Version" is not there it would be great. Thanks any way. :)

I just dug this out, blew off the cobwebs and tested it...everything works perfectly for me.

Stratis 07-26-2018 05:04 PM

Quote:

Originally Posted by MarkFL (Post 2595728)
I just dug this out, blew off the cobwebs and tested it...everything works perfectly for me.

I see though the option and it does not let see the page. It does that we want, it would be better if it worked to me to hide the option :)


Thanks for another time.

MarkFL 07-26-2018 05:41 PM

It does hide the option. Try it with the default style.

What version of vB are you testing it with? What browser are you using?

Stratis 07-27-2018 02:45 AM

vb 4.2.0, with all styles and all browsers.
Just test this #9
This hides the option, so i will use that with the product-markflnoprintable.xml :)

MarkFL 07-27-2018 03:41 AM

I am guessing your template is different then, and so the javascript doesn't work.


All times are GMT. The time now is 09:38 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01086 seconds
  • Memory Usage 1,748KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_php_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete