SELECT U_groups
FROM {$config['tbprefix']}Users
WHERE U_Number = '$Use..."> SELECT U_groups
FROM {$config['tbprefix']}Users
WHERE U_Number = '$Use...">
 
Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Apr 2001
Posts: 186
Member
Member
Offline
Joined: Apr 2001
Posts: 186
Once again, this doesnt work ;O)

any help ;O)

Code
 $query = " <br />        SELECT U_groups<br />        FROM   {$config['tbprefix']}Users<br />        WHERE  U_Number = '$User'<br />      ";<br />	 if U_Groups ='-2-' {<br />      $html -> not_right("Du skal være medlem for at kunne skrive PM");<br />	  } 


send private line 63

Sponsored Links
Joined: Apr 2002
Posts: 1,768
Addict
Addict
Offline
Joined: Apr 2002
Posts: 1,768
Please explain exactly what you're trying to do. I can't fix code if I don't know its purpose.

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Maybe try this instead as there can be more than one group in that field:

if (preg_match("/-2-/",$user['U_Groups'])) {

2 would be the moderator group.
5 would be the first custom group you add.

Joined: Apr 2001
Posts: 186
Member
Member
Offline
Joined: Apr 2001
Posts: 186
i am trying to get the send private to give an error message vhen people in group 2 tryes to send an PM.

(2 is just an example)

This to make the member benefits bigger on pay sites like mine.

thomas

Joined: Apr 2002
Posts: 1,768
Addict
Addict
Offline
Joined: Apr 2002
Posts: 1,768
[6.2.3]

sendprivate.php

Add U_Groups to existing authenticate call:

Code
$user = $userob -> authenticate("U_TextCols,U_TextRows,U_Preview[:"red"],U_Groups[/]");


Then add this:

Code
// Do not let users in group 2 send private messages. <br />if (strstr($user['U_Groups'], '-2-')) { <br />   $html -> not_right("Du skal være medlem for at kunne skrive PM"); <br />}


Note that $html = new html must occur before $html->not_right().

Sponsored Links
Joined: Apr 2001
Posts: 186
Member
Member
Offline
Joined: Apr 2001
Posts: 186
work perfect ;O)

maby we should post a topic vith all paying sites hacks, f.eks 2 diffrent header / footer and so on

thomas ;O)

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
I have a mod posted here that allows certain groups to get different headers and footers. Thus paying members could avoid banner ads etc..


Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
isaac
isaac
California
Posts: 1,157
Joined: July 2001
Forum Statistics
Forums63
Topics37,575
Posts293,931
Members13,823
Most Online6,139
Sep 21st, 2024
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,834
Greg Hard 4,625
Top Posters(30 Days)
Gizmo 1
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2025 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.1
(Snapshot build 20240918)