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
Joined: Nov 2001
Posts: 170
Member
Member
Offline
Joined: Nov 2001
Posts: 170
One thin if you allow user to edit there public name you have to add this code in ubb_profile.cgi
[code][/code]

Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
Nice work, it looks like an excellent mod smile


- Allen wavey
- What Drives You?
Joined: Jun 2001
Posts: 572
Member
Member
Offline
Joined: Jun 2001
Posts: 572
YES!! Thank you very much! I love this. smile

I'll have to install it this afternoon.

~Jon

Joined: Mar 2001
Posts: 644
Member
Member
Offline
Joined: Mar 2001
Posts: 644
Hey now that's pretty slick. laugh

I'm definitely going to keep an eye on this and see how it works for folks over the next week, since I'm deep into modifying templates on my board right now and really don't need another distraction. wink

Maybe I'll put it up next weekend. laugh

Nice job! smile

~Z

Sponsored Links
Joined: Feb 2001
Posts: 251
Member
Member
Offline
Joined: Feb 2001
Posts: 251
Works like a charm, Great Job!!!!!

Joined: Dec 2001
Posts: 21
Junior Member
Junior Member
Offline
Joined: Dec 2001
Posts: 21
I am having a problem with this hack, all went well, Until I went to my profile and saw this

[Linked Image]

I installed the hack 2 more times and still get it like the above pic

Any help would be great, as I think this is a great hack

Thanks laugh

Joined: Mar 2001
Posts: 7,394
LK Offline
Admin / Code Breaker
Admin / Code Breaker
Offline
Joined: Mar 2001
Posts: 7,394
Nice hack, but I think it should be BEFORE $TBT. tipsy

Joined: Dec 2001
Posts: 21
Junior Member
Junior Member
Offline
Joined: Dec 2001
Posts: 21
Thanks LK smile

That solved the problem for me laugh

Joined: Dec 2001
Posts: 90
Member
Member
Offline
Joined: Dec 2001
Posts: 90
just in case anyone cares, i successfully put this on 6.1...


can't find peace of mind but every corner's got a mcdonalds?!
Sponsored Links
Joined: Dec 2001
Posts: 90
Member
Member
Offline
Joined: Dec 2001
Posts: 90
FYI, this seems to be case sensitive. If I type in "soul survivor" it doesn't know who I am. . but it knows "Soul Survivor".


can't find peace of mind but every corner's got a mcdonalds?!
Joined: Feb 2001
Posts: 125
Member
Member
Offline
Joined: Feb 2001
Posts: 125
I also tried it case sensitive but no matter what I write I always get the message

No member profile found for member number

even if I write in the Public Name cell

Joined: Apr 2002
Posts: 4
Junior Member
Junior Member
Offline
Joined: Apr 2002
Posts: 4
got the following error (using 6.04f):

Content-type: text/html
Software error:
Undefined subroutine &main::RequireCode called at C:Inetpubwwwrootwww.igoo.comhtdocsubbcgi-binultimatebb.cgi line 485.

For help, please send mail to this site's webmaster, giving this error message and the time and date of the error.

Joined: Apr 2001
Posts: 235
Member
Member
Offline
Joined: Apr 2001
Posts: 235
Try the hack from the link below. It has the SendPM button that works!

https://ubbdev.com/ubb/ultimatebb.php?ubb=get_topic;f=33;t=000110

Joined: Apr 2002
Posts: 7
Junior Member
Junior Member
Offline
Joined: Apr 2002
Posts: 7
It works!

Joined: Aug 2002
Posts: 17
Junior Member
Junior Member
Offline
Joined: Aug 2002
Posts: 17
aye i need this but the url is broken frown

Joined: Aug 2002
Posts: 22
Junior Member
Junior Member
Offline
Joined: Aug 2002
Posts: 22
I need a username and password to download it?? Could someone post a get a new link for it please?

Joined: Nov 2001
Posts: 170
Member
Member
Offline
Joined: Nov 2001
Posts: 170
I am trying to upgrade my ubb and I could not find PM.zip
Any way I have tried to get the code


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
AllenAyres
AllenAyres
Texas
Posts: 21,079
Joined: March 2000
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)