[ABD] Friend Request Approval MOD

Any abandoned MODs will be moved to this forum.

WARNING: MODs in this forum are not currently being supported or maintained by the original MOD author. Proceed at your own risk.
Forum rules
IMPORTANT: MOD Development Forum rules

WARNING: MODs in this forum are not currently being supported nor updated by the original MOD author. Proceed at your own risk.
Locked
User avatar
Tomelie
Registered User
Posts: 50
Joined: Fri Nov 07, 2008 9:33 pm

Re: [DEV] Friend Request Approval MOD

Post by Tomelie » Mon Sep 07, 2009 12:58 am

Thanks for your quick reply!!

I replaced the line, but the problem still, but now gives a different error...

Code: Select all

Error General
SQL ERROR [ mysql4 ]

Column 'message_subject' cannot be null [1048]

SQL

INSERT INTO phpbb_privmsgs (root_level, author_id, icon_id, author_ip, message_time, enable_bbcode, enable_smilies, enable_magic_url, enable_sig, message_subject, message_text, message_attachment, bbcode_bitfield, bbcode_uid, to_address, bcc_address) VALUES (0, '54', 0, '200.74.37.96', 1252284580, 1, 1, 0, 0, NULL, '', 0, '', 'vazsasud', 'u_90', '')

BACKTRACE

FILE: includes/db/mysql.php
LINE: 174
CALL: dbal->sql_error()

FILE: includes/functions_privmsgs.php
LINE: 1435
CALL: dbal_mysql->sql_query()

FILE: includes/ucp/ucp_fram.php
LINE: 350
CALL: submit_pm()

FILE: includes/ucp/ucp_fram.php
LINE: 147
CALL: ucp_fram->send_pm()

FILE: includes/functions_module.php
LINE: 507
CALL: ucp_fram->main()

FILE: ucp.php
LINE: 344
CALL: p_master->load_active()

User avatar
Tomelie
Registered User
Posts: 50
Joined: Fri Nov 07, 2008 9:33 pm

Re: [DEV] Friend Request Approval MOD

Post by Tomelie » Mon Sep 07, 2009 4:58 pm

Anyone? :(

kmklr72
Registered User
Posts: 477
Joined: Sat Dec 29, 2007 9:37 pm
Location: St. Louis, USA
Name: Kevin

Re: [DEV] Friend Request Approval MOD

Post by kmklr72 » Mon Sep 07, 2009 5:10 pm

I'm not sure why the subject is being sent as NULL, so I'm not sure what would be causing this problem. Maybe this will fix it:

Open includes/ucp/ucp_fram.php

Find:

Code: Select all

$subject = utf8_normalize_nfc($subject); 
Replace with:

Code: Select all

//$subject = utf8_normalize_nfc($subject);  

If that doesn't fix this problem, it might be a problem with the switch. The good news is that the function is only used for one of the actions so the switch doesn't even need to be there. This would get rid of the switch:

Open includes/ucp/ucp_fram.php

Find:

Code: Select all

        switch ($status)
        {
            case 'approve':
                $subject = $user->lang['FRAM_APPROVED_SUBJECT'];
                $message_parser->message = sprintf($user->lang['FRAM_APPROVED_MESSAGE'], $sender['username']);
            break;
        } 
Replace with:

Code: Select all

        /*switch ($status)
        {
            case 'approve':*/
                $subject = $user->lang['FRAM_APPROVED_SUBJECT'];
                $message_parser->message = sprintf($user->lang['FRAM_APPROVED_MESSAGE'], $sender['username']);
            /*break;
        }*/ 

User avatar
Tomelie
Registered User
Posts: 50
Joined: Fri Nov 07, 2008 9:33 pm

Re: [DEV] Friend Request Approval MOD

Post by Tomelie » Mon Sep 07, 2009 5:33 pm

Thanks for your help! But I still have problems T_T...

With the first opcion:

Code: Select all

Error General
SQL ERROR [ mysql4 ]

Column 'message_subject' cannot be null [1048]

Ocurrió un error SQL mientras recuperaba esta página. Por favor contacte con La Administración del Sitio si el problema persiste.
With the second:

Code: Select all

Error General
SQL ERROR [ mysql4 ]

Column 'message_subject' cannot be null [1048]

SQL

INSERT INTO phpbb_privmsgs (root_level, author_id, icon_id, author_ip, message_time, enable_bbcode, enable_smilies, enable_magic_url, enable_sig, message_subject, message_text, message_attachment, bbcode_bitfield, bbcode_uid, to_address, bcc_address) VALUES (0, '54', 0, '200.74.37.96', 1252344600, 1, 1, 0, 0, NULL, '', 0, '', '26huz4cf', 'u_90', '')

BACKTRACE

FILE: includes/db/mysql.php
LINE: 174
CALL: dbal->sql_error()

FILE: includes/functions_privmsgs.php
LINE: 1435
CALL: dbal_mysql->sql_query()

FILE: includes/ucp/ucp_fram.php
LINE: 345
CALL: submit_pm()

FILE: includes/ucp/ucp_fram.php
LINE: 147
CALL: ucp_fram->send_pm()

FILE: includes/functions_module.php
LINE: 507
CALL: ucp_fram->main()

FILE: ucp.php
LINE: 344
CALL: p_master->load_active()
It's really weird. There are only problems when someone accept an invitation =/... but there are no problems to reject or to bloke the invitation x_x

kmklr72
Registered User
Posts: 477
Joined: Sat Dec 29, 2007 9:37 pm
Location: St. Louis, USA
Name: Kevin

Re: [DEV] Friend Request Approval MOD

Post by kmklr72 » Mon Sep 07, 2009 5:39 pm

It has to do with the submit_pm function (which is only run when you accept a request), but I don't know why the subject is getting sent as NULL. I'm going to try replicate this behavior on my dev board but in the mean time, you should get rid of that function by doing this:

Open includes/ucp/ucp_fram.php

Find:

Code: Select all

$this->send_pm('approve', $zebra_id, $user->data['user_id']); 
Replace with:

Code: Select all

//$this->send_pm('approve', $zebra_id, $user->data['user_id']);  

User avatar
Tomelie
Registered User
Posts: 50
Joined: Fri Nov 07, 2008 9:33 pm

Re: [DEV] Friend Request Approval MOD

Post by Tomelie » Mon Sep 07, 2009 6:44 pm

Forgive me for later!!!

I replaced it and now works fine! Thank you for your help! I really appreciate it!!
So now, the PM with the request confirmation accepted, is not sent?

Thanks again <3!

kmklr72
Registered User
Posts: 477
Joined: Sat Dec 29, 2007 9:37 pm
Location: St. Louis, USA
Name: Kevin

Re: [DEV] Friend Request Approval MOD

Post by kmklr72 » Mon Sep 07, 2009 6:54 pm

Tomelie wrote:So now, the PM with the request confirmation accepted, is not sent?
Until I can figure out why it is sending the subject as NULL, yes.

User avatar
Tomelie
Registered User
Posts: 50
Joined: Fri Nov 07, 2008 9:33 pm

Re: [DEV] Friend Request Approval MOD

Post by Tomelie » Mon Sep 07, 2009 8:27 pm

kmklr72 wrote:
Tomelie wrote:So now, the PM with the request confirmation accepted, is not sent?
Until I can figure out why it is sending the subject as NULL, yes.
Ok!, thanks again *hugs*

User avatar
tuananhxp_art
Registered User
Posts: 16
Joined: Tue Nov 25, 2008 10:46 am
Location: Vietnamese

Re: [DEV] Friend Request Approval MOD

Post by tuananhxp_art » Thu Sep 10, 2009 8:08 am

I can not add "Optional message to send to your friend"
When i click submit, page reload with blank field :(
Can you help me? Sorry my english not well
Sorry if my english not well!

kmklr72
Registered User
Posts: 477
Joined: Sat Dec 29, 2007 9:37 pm
Location: St. Louis, USA
Name: Kevin

Re: [DEV] Friend Request Approval MOD

Post by kmklr72 » Thu Sep 10, 2009 12:03 pm

Are you getting any errors? Have you tried turning DEBUG and DEBUG_EXTRA on in your config.php?

MewDragon
Registered User
Posts: 191
Joined: Fri Dec 23, 2005 6:24 pm

Re: [DEV] Friend Request Approval MOD

Post by MewDragon » Mon Sep 14, 2009 1:37 am

Hey guys,

I love this mod, it's definitley ingenious.

For some reason though, I'm having a bit of a problem.

Whenever I go to another user's profile and click "add friend" it asks me "Are you sure you wish to carry out this operation?" and I click "yes" and then it says "Request sent successfully. You will now be redirected to the last page." But this does nothing, and the user doesn't get any pm sent to him, nor is any change reflected in the friend section of the user control panel.

Anybody know why this might be happening? I've made all the edits, so I'm not sure what I might have missed.

kmklr72
Registered User
Posts: 477
Joined: Sat Dec 29, 2007 9:37 pm
Location: St. Louis, USA
Name: Kevin

Re: [DEV] Friend Request Approval MOD

Post by kmklr72 » Mon Sep 14, 2009 1:47 am

A change to the friends list will only occur when the user accepts, denies, or blocks the request. As for the pm problem, obviously that isn't working like it should. If it isn't gettong sent, then it's better than the error that some other people have been getting. I wouldn't worry about it too much for the time being.

MewDragon
Registered User
Posts: 191
Joined: Fri Dec 23, 2005 6:24 pm

Re: [DEV] Friend Request Approval MOD

Post by MewDragon » Mon Sep 14, 2009 2:11 am

Actually I lied, it was something else that was preventing it from being sent. Fixed that and it fixed the pms too. :D

mutank
Registered User
Posts: 158
Joined: Mon Jan 05, 2009 4:47 pm
Location: Toronto, ON
Name: Dominic Struczynski
Contact:

Re: [DEV] Friend Request Approval MOD

Post by mutank » Fri Sep 18, 2009 10:54 pm

I try to add someone and I get the error "You cannot add users to your friends list who are on your foes list." They are not on my foes list. When I do try to add him to my foes list, nothing happens, they don't appear on the foes list. I have double checked all edits. I am running 3.0.5.

kmklr72
Registered User
Posts: 477
Joined: Sat Dec 29, 2007 9:37 pm
Location: St. Louis, USA
Name: Kevin

Re: [DEV] Friend Request Approval MOD

Post by kmklr72 » Sat Sep 19, 2009 1:39 am

That error also gets displayed if you have already sent the user a request for some reason. Have you sent a request to that user before or is this the first time?

Locked

Return to “[3.0.x] Abandoned MODs”