Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Apr 2001
Posts: 8
Junior Member
Junior Member
Offline
Joined: Apr 2001
Posts: 8
OK, this my first hack so go easy on me, it's rough and dirty, but works (just).

in ubb_lib.cgi - find
if ($_[1] eq 'ON') {
$_[0] =~ s/([img])(S+?)([/img])/ /isg;
}

replace with
$picbanned = "0";

open(PICBANLIST, "$vars_config{VariablesPath}/vars_picbanlist.cgi") || die " cannot open picbanlist";
while( )
{
chomp;
if( $_ eq $_[2] )
{
$picbanned = "1";
}
}

close( PICBANLIST );

if ( ($_[1] eq 'ON') && ( $picbanned ne '1' ) )
{
$_[0] =~ s/([img])(S+?)([/img])/ /isg;
}
else
{
$_[0] =~ s/([img])(S+?)([/img])/ /isg;
}

Make a file called vars_picbanlist.cgi in the CGI directory, and put the usernames who you want not to be able to post pictures in posts.

Then in ubb_edit_post.cgi, ubb_new_topic.cgi and ubb_new_reply.cgi

find
$message = &UBBCode("$message", "$this_forum[10);

replace with
$message = &UBBCode("$message", "$this_forum[10]", "$username" );

Now, when the users in the vars_picbanlist.cgi file try to put pictures in posts, they will be greeted with the default missing picture icon.

Things to do
1) Make it good!
2) Add a option in Member Restrictions when a admin calls up a user profile, to enable/disable this option
3) Did I mention, make it good!!

Sponsored Links

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,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
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,833
Greg Hard 4,625
Top Posters(30 Days)
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-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)