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.

Craven

Here is the error message that I get now

Parse error: parse error, unexpected T_STRING, expecting ']' in /home/content/B/i/l/BillBarberJr/html/wetworks/Sources/Load.php(1749) : eval()'d code(35) : eval()'d code on line 4

Dragooon

Use it in a Script box not PHP Box.

Craven

That wouldn't work as I'm wanting to use php to restrict access to certain member groups and allow access for certain member groups.

For instance:
I want to restrict everyone but admins and one other membergroup from having the ability to copy and paste or right click...

But thanks for your help anyways...

pass25

Hi,

Sorry! But i am new in this stuff, and some things i dont now here to put them!

Tank´s, now is working fine!


pass25

Hi,

What do you meen with "your stuff here"?

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

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

Thanks

IchBin

Well, if you want something to show for guest, and the selected user groups, you put whatever code you want where it says "your stuff here" :). In other words, put all your javascript code in between the single quotes.

pass25

Hi,

Is there a way to define wich users can or not be afected by the script?

Some can be normaly in the forum, and some canot use the right buton in the mouse to copy or paste?

Because the forum is new, and i only have 36 members, but i now there are 3 users who cames to my forum only to copy! Because they have forums too!

I try to use the script in the mod global headers and footers and works fine in all forum!

Because a only have the portal in use!

Thanks!

IchBin

Change the numbers to match the user ID of the users you need. Add more in the same format if needed.

if ($context['user']['id'] == 13 || $context['user']['id'] == 20 || $context['user']['id'] == 28)
echo 'your javascript here';



Dragooon

@IchBin, I think you said it reversed what he/she was asking

Something like
if ($context['user']['id'] != 13 || $context['user']['id'] != 20 || $context['user']['id'] != 28)
echo 'Your JS Here';

If I get it correctly.

IchBin

He's asking to only do it for 3 users. Hence the reason I didn't use the !.

This website is proudly hosted on Crocweb Cloud Website Hosting.