• [MOD] Buddy List v1.0 - Buddy Request/Accept/Reject/Remove 5 0 5 1
Currently:  

Poll

Buddy List v1.0 - Buddy Request/Accept/Reject/Remove

I like
11 (84.6%)
I don't like
2 (15.4%)
I don't care
0 (0%)

Total Members Voted: 10

Author Topic: [MOD] Buddy List v1.0 - Buddy Request/Accept/Reject/Remove  (Read 57053 times)

0 Members and 1 Guest are viewing this topic.

Offline OtusDesign

  • Newbie
  • *
  • Posts: 15
    • View Profile
Re: [MOD] Buddy List v1.0 - Buddy Request/Accept/Reject/Remove
« Reply #15 on: May 26, 2008, 02:01:18 AM »
Hi, thanks for great mod, I have a question, is it possible to inform user by email for when somebody add him/her to buddy list?

Offline Sunny C.

  • Addicted member
  • ******
  • Posts: 1.806
  • I ♥ 4I
    • View Profile
Re: [MOD] Buddy List v1.0 - Buddy Request/Accept/Reject/Remove
« Reply #16 on: June 15, 2008, 09:09:06 PM »
Läuft 1A unter 1.7.6! Keine Probleme gefunden! Alles wird dargestellt und zu 100% ausgeführt!

Habs in der Liste mit aufgenommen!
Unter 1.7.6 laufende Modifikationen (selbst getestet)

Edit//

Ein Fehler habe ich doch noch gefunden!

Wenn man eine Einladung ablehnt, kommt folgendes:

Code: [Select]
DB Error: Bad SQL Query: UPDATE 4images_users_friendship SET friendship_status = -1, friendship_reject_message = 'Sorry, I'm not ready to be your friend yet' WHERE friendship_id = 3
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'm not ready to be your friend yet' WHERE friendship_id = 3' at line 3

SnaFy

  • Guest
Re: [MOD] Buddy List v1.0 - Buddy Request/Accept/Reject/Remove
« Reply #17 on: July 27, 2008, 04:59:58 PM »
Code: [Select]
DB Error: Bad SQL Query: SELECT COUNT(*) AS total_requests FROM 4images_users_friendship WHERE friendship_status = 0 AND user_id_secondary = 1
Table 'd.4images_users_friendship' doesn't exist
HRLP ME

Offline Pontos

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: [MOD] Buddy List v1.0 - Buddy Request/Accept/Reject/Remove
« Reply #18 on: July 28, 2008, 08:08:37 AM »
Morgen!

Ist einfach!
Liegt an dem einfachen Anführungszeichen in der Rückgabenachricht

$msg = "Sorry, I'm not ready to be your friend yet";


ist in der function:
Code: [Select]
function reject_buddy_request($id) {
  global $user_info, $site_db;
  if (!$id) {
    return false;
  }
  $msg = "Sorry, I'm not ready to be your friend yet";
  $user_info['buddy_reject_msg'] = $msg;
  $user_info['buddy_id'] = $id; //Accept 1 , Reject -1
  $sql = "UPDATE ".USERS_FRIENDSHIP_TABLE."
          SET friendship_status = -1,
            friendship_reject_message = '".$user_info['buddy_reject_msg']."'
          WHERE friendship_id = ".$user_info['buddy_id'];
  return ($site_db->query($sql)) ? 1 : 0;
}

Entweder auskommentieren \’ oder löschen dann geht es!
Code: [Select]
  $msg = "Sorry, I\'m not ready to be your friend yet";oder
Code: [Select]
  $msg = "Sorry, Im not ready to be your friend yet";


Edit:

Wenn du möchtest das der Empfänger auch die Nachricht sehen tut musst du in der buddy.php das ändern:

Code: [Select]
    // REJECTED
    if ($user_row['friendship_status'] == -1){
    $buddy_button =  $user_row['friendship_reject_message']."<br />";
in:
Code: [Select]
    // REJECTED
    if ($user_row['friendship_status'] == -1){
    $buddy_button =  $user_row['friendship_response_message']."<br />";
« Last Edit: July 28, 2008, 05:18:50 PM by Pontos »

Offline Sunny C.

  • Addicted member
  • ******
  • Posts: 1.806
  • I ♥ 4I
    • View Profile
Re: [MOD] Buddy List v1.0 - Buddy Request/Accept/Reject/Remove
« Reply #19 on: September 11, 2008, 04:52:24 PM »
 :flag-de:
Kann man diese Modifikation um dieses Script erweitern?
Ich würde das gerne selber machen, doch dieses english ist zu hoch für mich und auch das anpassen in php Dateien ist sehr schwer! Dort ist der html-code auch anders.
http://www.danvk.org/wp/dragtable/
 

:flag-en:
Can one extend this modification by this script?
I would like to make this same, but this English is too high for me and files also adapt this in php is very heavy! The HTML code is also different there.
http://www.danvk.org/wp/dragtable/

rinaldos

  • Guest
Re: [MOD] Buddy List v1.0 - Buddy Request/Accept/Reject/Remove
« Reply #20 on: September 12, 2008, 03:53:02 PM »
Ich baue gerade diesen MOD in meine Gallerie ein. Nur sobald ich dieses in die Memberlist.php eintrage habe ich folgenden Effekt.
Code: [Select]
//---[MOD] BUDDY  V.1.0.0 beta ------------
//----2007 by eMagix for 4images gallery --
//----------- START CODE  -----------------

if (($user_info['user_level'] != GUEST) && ($user_info['user_id'] != $user_row['user_id'])) {
    $buddy_url = $self_url;
    $buddy_url .= (!empty($mode)) ? ((strpos($buddy_url, '?') !== false) ? "&amp;" : "?")."mode=".$mode : "";
    $buddy_url .= strpos($buddy_url, '?') !== false ? "&amp;" : "?";

   
    // IF USER ALREADY A BUDDY SHOW ALREADY BUDDY TEXT
    $buddy_status = check_buddy($user_row['user_id']);
    if ($buddy_status == 1) {
      $buddy_button = $lang['user_buddy_yes'];
    }
    // IF USER REQUEST PENDING SHOW PENDING TEXT
    elseif ($buddy_status == 0) {
      $buddy_button = $lang['user_buddy_pending'];
    }
// IF NOT YET BUDDY SHOW BUTTON
    elseif ($buddy_status == -1) {
      $buddy_url .= "action=addbuddy&amp;id=".$user_row['user_id']."";
      $buddy_button = "<a href=\"".$site_sess->url($buddy_url)."\"><img src=\"".get_gallery_image("buddy_no.gif")."\" border=\"0\" alt=\"\" /></a>";
    }


  }
  else {
  // BUDDY BUTTON DISABLED
    $buddy_button = "<img src=\"".get_gallery_image("buddy_off.gif")."\" border=\"0\" alt=\"\" />";
  }
//----------- END CODE  -----------------

Die Anfrage wird korrekt gestellt, aber in der Adressleiste des Browsers steht dann die Adresse:
memberlist.php?&action=addbuddy&id=66
Wenn nun ein Nutzer erneut auf aktualisieren drückt, wird die ganze Anfrage erneut gestellt und beim Nutzer laufen nun schon zwei Anfragen auf. Wie kann man nun unterbinden, das die Adresse im Browser angezeigt wird bzw. überhaupt mit ausgegeben wird?

Für Hilfe wäre ich sehr dankbar.

Gruß
Ingo

Offline Sunny C.

  • Addicted member
  • ******
  • Posts: 1.806
  • I ♥ 4I
    • View Profile
Re: [MOD] Buddy List v1.0 - Buddy Request/Accept/Reject/Remove
« Reply #21 on: October 22, 2008, 11:18:20 PM »
 :flag-de: :flag-de: :flag-de: :flag-de: :flag-de: :flag-de: :flag-de: :flag-de:
Hallo zusammen,

ich wollte einen Freund diese Mod einbauen, aber leider klappt das irgendwie nicht!
Ich habe diese Mod auch bei mir installiert, doch bei ihm klappt das nicht!

Schon die Ausführung der install_buddy2.php funktionierte nicht, daher habe ich dieses genommen!

Hum ... if phpmyadmin - try this:

Code: [Select]
CREATE TABLE 4images_users_friendship (
            friendship_id int(11) NOT NULL auto_increment,
            user_id_primary int(11) NOT NULL default '0',
            user_id_secondary int(11) NOT NULL default '0',
            friendship_status int(1) NOT NULL default '0',
            friendship_request_date timestamp NOT NULL default CURRENT_TIMESTAMP,
            friendship_accept_date timestamp NOT NULL default '0000-00-00 00:00:00',
            friendship_request_message text NOT NULL,
            friendship_response_message text NULL,
            PRIMARY KEY (friendship_id)
            ) TYPE=MyISAM;

2 - See if 4images_users_friendship is correct table name and 4images_ for right table prefix. ;)

Die Tabellen wurden alle angelegt, aber dennoch klappt es nicht!
Auf der Startseite kommt folgender Fehler:
Code: [Select]
DB Error: Bad SQL Query: SELECT COUNT(*) AS total_requests FROM USERS_FRIENDSHIP_TABLE WHERE friendship_status = 0 AND user_id_secondary = 1
Table 'test.users_friendship_table' doesn't exist

Und wenn man die Buddyliste aufruft, zeigt er nichts an und dieser Fehler kommt:
Code: [Select]
DB Error: Bad SQL Query: SELECT COUNT(*) AS total_requests FROM USERS_FRIENDSHIP_TABLE WHERE friendship_status = 0 AND user_id_secondary = 1
Table 'test.users_friendship_table' doesn't exist

DB Error: Bad SQL Query: SELECT COUNT(friendship_id) AS total_friends FROM USERS_FRIENDSHIP_TABLE WHERE friendship_status =1 AND user_id_primary = 1 OR user_id_secondary = 1
Table 'test.users_friendship_table' doesn't exist

DB Error: Bad SQL Query: SELECT * FROM (4images_users u) INNER JOIN USERS_FRIENDSHIP_TABLE i ON (u.user_id = i.user_id_primary) WHERE i.friendship_status =1 AND i.user_id_secondary = 1 UNION SELECT * FROM (4images_users u) INNER JOIN USERS_FRIENDSHIP_TABLE i1 ON (u.user_id = i1.user_id_secondary) WHERE i1.friendship_status =1 AND i1.user_id_primary = 1 ORDER BY user_name ASC LIMIT 0, 30
Table 'test.users_friendship_table' doesn't exist

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in C:\xampp\htdocs\2\includes\db_mysql.php on line 116

DB Error: Bad SQL Query: SELECT * FROM (4images_users u) INNER JOIN USERS_FRIENDSHIP_TABLE i ON (u.user_id = i.user_id_primary) WHERE i.friendship_status <> 1 AND i.user_id_secondary = 1 UNION SELECT * FROM (4images_users u) INNER JOIN USERS_FRIENDSHIP_TABLE i1 ON (u.user_id = i1.user_id_secondary) WHERE i1.friendship_status <> 1 AND i1.user_id_primary = 1 ORDER BY friendship_request_date ASC
Table 'test.users_friendship_table' doesn't exist

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in C:\xampp\htdocs\2\includes\db_mysql.php on line 116

----------
 :flag-en: :flag-en: :flag-en: :flag-en: :flag-en: :flag-en: :flag-en: :flag-en:

Hello,

I wanted a friend install this mod, but unfortunately it works somehow not!
I have this mod installed for me too, but it does not work!

Even the execution of install_buddy2.php did not work, so I made this!

Hum ... if phpmyadmin - try this:

Code: [Select]
CREATE TABLE 4images_users_friendship (
            friendship_id int(11) NOT NULL auto_increment,
            user_id_primary int(11) NOT NULL default '0',
            user_id_secondary int(11) NOT NULL default '0',
            friendship_status int(1) NOT NULL default '0',
            friendship_request_date timestamp NOT NULL default CURRENT_TIMESTAMP,
            friendship_accept_date timestamp NOT NULL default '0000-00-00 00:00:00',
            friendship_request_message text NOT NULL,
            friendship_response_message text NULL,
            PRIMARY KEY (friendship_id)
            ) TYPE=MyISAM;

2 - See if 4images_users_friendship is correct table name and 4images_ for right table prefix. ;)

The tables have all been created, but it does not work!
On the front page the following errors:
Code: [Select]
DB Error: Bad SQL Query: SELECT COUNT(*) AS total_requests FROM USERS_FRIENDSHIP_TABLE WHERE friendship_status = 0 AND user_id_secondary = 1
Table 'test.users_friendship_table' doesn't exist

And if you call the buddy list, it shows nothing, and this error:
Code: [Select]
DB Error: Bad SQL Query: SELECT COUNT(*) AS total_requests FROM USERS_FRIENDSHIP_TABLE WHERE friendship_status = 0 AND user_id_secondary = 1
Table 'test.users_friendship_table' doesn't exist

DB Error: Bad SQL Query: SELECT COUNT(friendship_id) AS total_friends FROM USERS_FRIENDSHIP_TABLE WHERE friendship_status =1 AND user_id_primary = 1 OR user_id_secondary = 1
Table 'test.users_friendship_table' doesn't exist

DB Error: Bad SQL Query: SELECT * FROM (4images_users u) INNER JOIN USERS_FRIENDSHIP_TABLE i ON (u.user_id = i.user_id_primary) WHERE i.friendship_status =1 AND i.user_id_secondary = 1 UNION SELECT * FROM (4images_users u) INNER JOIN USERS_FRIENDSHIP_TABLE i1 ON (u.user_id = i1.user_id_secondary) WHERE i1.friendship_status =1 AND i1.user_id_primary = 1 ORDER BY user_name ASC LIMIT 0, 30
Table 'test.users_friendship_table' doesn't exist

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in C:\xampp\htdocs\2\includes\db_mysql.php on line 116

DB Error: Bad SQL Query: SELECT * FROM (4images_users u) INNER JOIN USERS_FRIENDSHIP_TABLE i ON (u.user_id = i.user_id_primary) WHERE i.friendship_status <> 1 AND i.user_id_secondary = 1 UNION SELECT * FROM (4images_users u) INNER JOIN USERS_FRIENDSHIP_TABLE i1 ON (u.user_id = i1.user_id_secondary) WHERE i1.friendship_status <> 1 AND i1.user_id_primary = 1 ORDER BY friendship_request_date ASC
Table 'test.users_friendship_table' doesn't exist

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in C:\xampp\htdocs\2\includes\db_mysql.php on line 116

Offline Lucifix

  • Hero Member
  • *****
  • Posts: 710
    • View Profile
    • http://www.slo-foto.net
Re: [MOD] Buddy List v1.0 - Buddy Request/Accept/Reject/Remove
« Reply #22 on: October 28, 2009, 10:58:40 AM »
Did anyone tried to add invitation function (like Facebook), where you send invitation by email and when that person register, it will automatically added to your buddy list?

Offline zakaria666

  • Full Member
  • ***
  • Posts: 211
    • View Profile
Re: [MOD] Buddy List v1.0 - Buddy Request/Accept/Reject/Remove
« Reply #23 on: August 09, 2010, 08:36:37 PM »
Lucifix hello i have tried to install this MOD, but with no success, u helped me before and i want to thank u but then i got a few errors, have u succesfully installed this MOD? and does it actually work??

thanks

Offline Lucifix

  • Hero Member
  • *****
  • Posts: 710
    • View Profile
    • http://www.slo-foto.net
Re: [MOD] Buddy List v1.0 - Buddy Request/Accept/Reject/Remove
« Reply #24 on: August 09, 2010, 09:05:22 PM »
You're welcome.

Yes I have successfully installed this mod and it's working now. I can't recall if there were any errors during installation, because I did that few years ago.

Offline zakaria666

  • Full Member
  • ***
  • Posts: 211
    • View Profile
Re: [MOD] Buddy List v1.0 - Buddy Request/Accept/Reject/Remove
« Reply #25 on: August 09, 2010, 09:39:06 PM »
For some reason alot of the errors that im recieving sir are already mentioned here . For example....

Code: [Select]
DB Error: Bad SQL Query: SELECT COUNT(*) AS total_requests FROM USERS_FRIENDSHIP_TABLE WHERE friendship_status = 0 AND user_id_secondary = 1
Table 'test.users_friendship_table' doesn't exist

as u can see above is the error i am getting when i install everything, The reason why i want this MOD as oppose to the other friend mod is because it has requests and the friendship can be seen my both people. The error above tells me i have no table existing, but with ur help i created that table :(. Its really weird,

What do u suggest i do sir? start again or just forget it? because i really like this MOD :(

thank you sir

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [MOD] Buddy List v1.0 - Buddy Request/Accept/Reject/Remove
« Reply #26 on: August 09, 2010, 11:47:04 PM »
missed step that changes includes/constants.php ?
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline zakaria666

  • Full Member
  • ***
  • Posts: 211
    • View Profile
Re: [MOD] Buddy List v1.0 - Buddy Request/Accept/Reject/Remove
« Reply #27 on: August 10, 2010, 12:36:04 AM »
@ VANNO

Thank u so much for the reply sir,

I did not miss any steps sir, i did all of them and also sir, i think its in the include/ function.php... the problem is in there. But i dont know why its giving me the error that u can see in the previous thread. I did everything correctly,

:-( i want this MOD so badly and as u can see from this topic, in first page and 2nd page, everyone is having problem to but no body has answer to question to fix it :-(

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [MOD] Buddy List v1.0 - Buddy Request/Accept/Reject/Remove
« Reply #28 on: August 10, 2010, 12:41:54 AM »
from the error message you showed I can only conclude that constant USERS_FRIENDSHIP_TABLE wasn't defined in includes/constants.php = missed a step.

Code: (READ ME.doc) [Select]
-----[ OPEN ]-------------------------------------------

includes/constants.php


-----[ FIND ]--------------------------------------------

define('USERS_TABLE', $table_prefix.'users');


-----[ AFTER, ADD ]---------------------------------

define('USERS_FRIENDSHIP_TABLE', $table_prefix.'users_friendship');
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline zakaria666

  • Full Member
  • ***
  • Posts: 211
    • View Profile
Re: [MOD] Buddy List v1.0 - Buddy Request/Accept/Reject/Remove
« Reply #29 on: August 10, 2010, 04:28:36 PM »
@ VANO,

Thank u ever so much for replying back to me sir. I want to thank u and i did exactly what u said and it worked. I  know sir i am pushing my luck and lucifix said a good point, u guys are doing this for me free and then u get people like me asking 100question for help. I will pay u for your help as i dont want u to think i am taking advantage I am not sir. :(

Sir i just have a few question, The MOD is working perfect but it has very very little flaws, that ive been trying to figure out but with my php knowlegde it isnt so well,


1) The image u see below is the user that has made a comment, and the comment has a buddy button that is completely shaded out, as a user cannot add themselves, that is pretty understandable. But is there any way using sessions to remove the buddy button from the person who aactually makes a comment? but show buddy buttons to all other membrs who make comments but hide the buddy button from the users comment that is currently logged in? I hope u understand what i mean sir.



2) There is another flaw, if a user adds a person then the buddy button gets shaded out, however if i refresh the page over and over again lets say 5 times i have consequently send 5 friends requests for the user i want to be friends with, is there a way i can just send 1 friend request and from there if i refresh it does not mean i have again sent a friend request?

3) Also this is the last flaw, im so sorry, if user 1 sends friend request to user 2 then what happens is user 2 has the option to accept or reject, but the reject button is not work, it gives an error "There is an error, please try again later".  Can u please point to the direction from where maybe this problem is.

Please forgive me Vano, i know i am asking alot, but if i had as good php knowlegde like u i would not ask u and take ur time like this, but when i try to find problems and fix it, its very hard for me currently i am learning php but ur php is too advance for me. If u cannot help i understand please u just direct me to correct place and i will god willing try to fix it.

thank u VANO