Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Nov 2001
Posts: 170
Member
Member
Offline
Joined: Nov 2001
Posts: 170
This hack was done as a request on the Mod Ideas and Suggestions see:
https://ubbdev.com/ubb/ultimatebb.php?ubb=get_topic;f=28;t=000751

Just simply enter the user number or public name in the my_profile and click send a PM
Instead of going into one of the user post and clicking send a PM
Code
  
**************** in ultimatebb.cgi
***search for

exit(0);

} #end get_pm

*********add after it
if ($ubb eq 'send_PM') {



if ($in{R1} eq 'number'){

$ubb ='private_message';

$in{u}=Do8Digit($in{user});

}

else

{

&RequireCode("$vars_config{CGIPath}/ubb_lib.cgi");

$in{u}=&getpublicnamee($in{user});

$ubb ='private_message';

}

} #end private_message


**************** in ubb_lib.cgi
***search for
sub Do6Digit {

return(sprintf ("%.6d", $_[0]));

}



*********add after it
sub getpublicnamee{

my $public_names=$_[0];

my $num;

my $one;

my @line;

@all_member_nums;

@all_members_list = grep(/d{8}/, &OpenFileAsArray("$vars_config{MembersPath}/memberslist.cgi"));

my $count=0;

foreach $one (@all_members_list) {



@line = split (/|!!|/, $one);



chomp($line[1]);



push (@all_member_nums, $line[1]);



$count++;

}



@this_member;

my $found=0;

my @all_members_list2;

@all_member_nums2;

@all_member_name;

my $count2=0;

if (-e "$vars_config{MembersPath}/publicmemberslist.cgi"){

@all_members_list2 = grep(/d{8}/, &OpenFileAsArray("$vars_config{MembersPath}/publicmemberslist.cgi"));

foreach $one (@all_members_list2) {



@line = split (/|!!|/, $one);



chomp($line[1]);



push (@all_member_nums2, $line[1]);



push (@all_member_name, $line[0]);



$count2++;

}



}



if ($count2 != $count){

my @public_name_file;

THIS: foreach $one (@all_member_nums) {





# open profile



@this_member = &OpenProfile($one);



chomp($this_member[15]);

push (@public_name_file, "$this_member[15]|!!|$one");



if ($this_member[15] eq ''){

$this_member[15]=$this_member[0];

}

if ($this_member[15] eq $public_names){

$num=$one;

}

}

&WriteFileAsArray("$vars_config{MembersPath}/publicmemberslist.cgi",@public_name_file);

chmod(0777, "$vars_config{MembersPath}/publicmemberslist.cgi");

}

else

{

$count=0;

THIS: foreach $one (@all_member_nums2) {



if ($all_member_name[$count] eq $public_names){

$num=$one;

}

$count++;

}

}

return $num;



}




**************** in public_my_profile.pl
***search for

<td valign="bottom" align="right">

<font size="1" face="$vars_style{FontFace}">

<a href="$vars_config{CGIURL}/ultimatebb.cgi?ubb=ignore_list">$vars_wordlets{ignore_list}</a> | <a href="$vars_config{CGIURL}/ultimatebb.cgi?ubb=buddy_list">$vars_wordlets{buddy_list}</a>

</font>

</td></tr></table>
</center>


*********add after it
<form method="POST" action="ultimatebb.cgi">

<p align="center">

<input type="radio" value="name" checked name="R1"><span lang="en-us">Send by public name

<input type="radio" name="R1" value="number">Send by user number</span>

<input type="text" name="user" size="20">

<INPUT TYPE="HIDDEN" NAME="ubb" VALUE="send_PM">

<input type="submit" value="Send PM" name="B1">

<p align="center">

</form>

Sponsored Links
Entire Thread
Subject Posted By Posted
[6.2x] PM Hack that makes sense wwb95 04/12/2002 3:42 AM
Re: [6.2x] PM Hack that makes sense wwb95 04/12/2002 3:55 AM
Re: [6.2x] PM Hack that makes sense AllenAyres 04/12/2002 5:28 AM
Re: [6.2x] PM Hack that makes sense JonNJapan 04/12/2002 5:56 AM
Re: [6.2x] PM Hack that makes sense Zackary 04/12/2002 6:33 AM
Re: [6.2x] PM Hack that makes sense maurice 04/12/2002 3:45 PM
Re: [6.2x] PM Hack that makes sense elfman2 04/12/2002 6:36 PM
Re: [6.2x] PM Hack that makes sense LK 04/12/2002 6:44 PM
Re: [6.2x] PM Hack that makes sense elfman2 04/12/2002 7:05 PM
Re: [6.2x] PM Hack that makes sense Soul Survivor 04/15/2002 6:26 PM
Re: [6.2x] PM Hack that makes sense Soul Survivor 04/17/2002 5:57 PM
Re: [6.2x] PM Hack that makes sense dreamer 04/17/2002 6:24 PM
Re: [6.2x] PM Hack that makes sense bulgogs 04/25/2002 11:25 PM
Re: [6.2x] PM Hack that makes sense freeTV 04/26/2002 12:13 AM
Re: [6.2x] PM Hack that makes sense Antelope 04/26/2002 1:49 AM
Re: [6.2x] PM Hack that makes sense pringalz 08/19/2002 2:16 AM
Re: [6.2x] PM Hack that makes sense -Mac- 09/25/2002 1:47 PM
Re: [6.2x] PM Hack that makes sense wwb95 09/25/2002 7:52 PM

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)