TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,963
  • Latest: BiZaJe
Stats
  • Total Posts: 195,917
  • Total Topics: 21,308
  • Online today: 884
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 349
  • Total: 349

Anti-Theft Block

Started by akulion, September 25, 2006, 11:55:36 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

dfm

Quote from: korea on December 12, 2006, 09:44:43 PM
I installed this mod but it does not seem to be a good idea
why because the copy and paste option inside posting is also desable
some people might copy some thing and want to pase it here and send it
but the forum is locked. I am using some thing similary in phpbb but as I can put it inside templete only the forum is effected and not the posting
any way we can over come that?

Hi all, from one very NON technical person...is there a way to enable paste but disable copy ...because as mentioned in the above post....although this stops copying, it also stops the vast majority of our users pasting things they want to bring IN to the forum!


Thank you in anticipation.

IchBin

ctrl + c = copy, ctrl + v = paste. :)

I've never seen such a script. You'd have better luck searching at script sites for such things.

dfm


Craven

Quote from: IchBinâ,,¢ on February 27, 2007, 05:35:35 PM
You'd have to make it a phpbox type.

if ($context['user']['is_guest'])
{
echo '<all code goes in between these two apostrophe's>';
}

What if I don't want guest or regular members stealing the code but admins can use the feature?

IchBin

Try this:

global $context;

if ($context['user']['is_guest'] && !$context['user']['is_admin'])
echo 'all the code in between here';

Craven

This works good... However I would like to block everyone but admins and a few select member groups.

Because what you have there is only blocking a guest

pass25

Hi,

Where can i create those parameters? Im new in smf, and i dont now here can i put that code!

If someone can explain to me, i apreciate!

Thank!

IchBin

#57
Create what parameters? Please be specific pass25.

To add additional groups you'll need to define an array.

global $context, $user_info;
$groups = array(5,7);

if ($context['user']['is_guest'] || array_intersect($groups, $user_info['groups']))
echo ' your stuff here';


5 and 7 are the group ID's that this will show for. So whichever group ID you don't want it to work on, don't add the number to the array.

pass25

Hi,

Sorry, i dont now where to put this:

Quote<head>
<META HTTP-EQUIV="imagetoolbar" CONTENT="no">
<script type="text/javascript">

/***********************************************
* Disable select-text script- Ã,© Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/

//form tags to omit in NS6+:
var omitformtags=["input", "textarea", "select"]

omitformtags=omitformtags.join("|")

function disableselect(e){
if (omitformtags.indexOf(e.target.tagName.toLowerCase())==-1)
return false
}

function reEnable(){
return true
}

if (typeof document.onselectstart!="undefined")
document.onselectstart=new Function ("return false")
else{
document.onmousedown=disableselect
document.onmouseup=reEnable
}

</script></head>
<body>
<script language=JavaScript>
<!--

//Disable right click script III- By Renigade (renigade@mediaone.net)
//For full source code, visit http://www.dynamicdrive.com

var message="";
///////////////////////////////////
function clickIE() {if (document.all) {(message);return false;}}
function clickNS(e) {if
(document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3) {(message);return false;}}}
if (document.layers)
{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}

document.oncontextmenu=new Function("return false")
// -->
</script>
</body>

and this:

Quoteglobal $context, $user_info;
$groups = array(5,7);

if ($context['user']['is_guest] || array_intersect($groups, $user_info['groups']))
echo ' your stuff here';

In which file do i add those codes? (Example index.themplate.php,...)

Thanks

IchBin

Please read the first post. It tells you specifically where to put the code. The second code is what you would use to only display it for certain membergroups. You put the first piece of code where I typed "your stuff here". Since we are adding PHP to this, you'll need to put it all in a phpbox.

This website is proudly hosted on Crocweb Cloud Website Hosting.