Author Topic: [MOD] Buddy List || Friend List  (Read 136768 times)

0 Members and 2 Guests are viewing this topic.

Offline Sunny C.

  • Addicted member
  • ******
  • Posts: 1.806
  • I ♥ 4I
    • View Profile
Re: [MOD] Buddy List || Friend List
« Reply #135 on: August 08, 2010, 04:31:19 PM »

Offline zakaria666

  • Full Member
  • ***
  • Posts: 211
    • View Profile
Re: [MOD] Buddy List || Friend List
« Reply #136 on: August 08, 2010, 09:15:10 PM »
hello thank u for the reply samuel ,

but there is error, i installed nicky;s memberlist MOD and then it means i must use 2nd version of the install of database creation thats what i did,

but i get error

Error:
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 (`users_friendship_id`) ) TYPE=MyISAM

any reason for this??

i used install_buddy2.php

helpo me

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 || Friend List
« Reply #137 on: August 08, 2010, 09:35:28 PM »
Show exact, full error message.
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 #138 on: August 08, 2010, 11:35:22 PM »
Hello vano, god bless u for ur reply

ok i installed nickys memberlist MOD so i dont know if this has anything to do with it.

ok I am using install_buddy2.php not install_buddy.php as it tells me if i have installed nicks mod then i must use the one that has number 2 in it.

ok step 1



and when i click start modify database ....


i dont know why it is doing this, i always get something similar in terms of installation when u tell us to install something of ur MOD vano, and i get succeeded all the time, but with this MOD im getting error, its strange.


________******

Important, VANO, i just realized that my thread was meant for this topic ( http://www.4homepages.de/forum/index.php?topic=19755.0) not the topic im currently on. What should i do, delete this thread here and post it on the link ive posted???

Offline zakaria666

  • Full Member
  • ***
  • Posts: 211
    • View Profile
Re: [MOD] Buddy List || Friend List
« Reply #139 on: August 08, 2010, 11:36:22 PM »
IMPORTANt,

VANO, sorry my fault its not to do with this topic, ive deleted it, i got it confused, as this topic also deals with friends requests,  here is the correect thread, i have put the error message there also with images

http://www.4homepages.de/forum/index.php?topic=19755.new#new

So sorry

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 || Friend List
« Reply #140 on: August 09, 2010, 12:00:51 AM »
in the installer replace
	
  
$log[$val] = "<font color=\"red\">Error: </font><b>".$reg[1]."</b>";


with:
	
  
$log[$val] = "<font color=\"red\">Error: </font><b>".$content."</b>";


It should show complete error message.
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 || Friend List
« Reply #141 on: August 09, 2010, 03:05:11 PM »
@VANO,

Vano it does not work brother. What should i do. ??

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 || Friend List
« Reply #142 on: August 09, 2010, 03:18:32 PM »
Please stop bumping topics like this 5 times a day (exaggerated :))
The provided changes should reveal more details about the error, not just "an error occur"
And besides, that error comes from running installer from a different mod.
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 || Friend List
« Reply #143 on: August 09, 2010, 03:30:34 PM »
lol Vano hahaha if i dont bump the topics up, i will never get an answer, lol

also sometimes i post a comment, look at it and then i think to myself, why hasnt vano master of php answered lol, so then i delete the comment and post another simple thread, i dont do it intentionally, haha. For example on the other topic on flags and ip,s which u kindfully fixed lol i had another query on that, so what i would do is look at what i postd and think about it for a few seconds is it appropriate to how Vano would read it :( .. im sorry bro and also what do u mean that this error comes from running a different MOD, ??

here is the below image of what i get when u told to replace one line of code for another. If there was more to the error message i will of course tell u bro. Any ideas


Offline Lucifix

  • Hero Member
  • *****
  • Posts: 710
    • View Profile
    • http://www.slo-foto.net
Re: [MOD] Buddy List || Friend List
« Reply #144 on: August 09, 2010, 03:42:30 PM »
Okey zakaria666 you may now that these guys here aren't paid to help you or me. They are doing that for free and that's why you should show more respect for them.

Your error that you're showing doesn't tell absolutely nothing, just an error. It's like going to the doctor and tell him: doc i'm feeling something wrong, could you write me some kind of prescription?

Do you have access to phpmyadmin? If you do, copy that sql sentence (create table 'images_users_friendship' etc) to phpmyadmin / sql tab on the top and see what kind of error you will get. Copy that error to board here and maybe we'll get some new tip whats wrong.

If you don't have access to phpmyadmin maybe you should give us access to your website and someone might check. Otherwise you are just giving us some VERY unuseful tips.


But to make your life easier I've found error in that sql. At the end it shows user_friendship_id as primary key - that row doesn't exist in SQL. The right SQL sentence should be:
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

Offline zakaria666

  • Full Member
  • ***
  • Posts: 211
    • View Profile
Re: [MOD] Buddy List || Friend List
« Reply #145 on: August 09, 2010, 03:56:33 PM »
@lucifix, You have just seen me write a few threads most likely on this topic. How dare u tell me to show respect when thats all i ever do? Dont u think i know that Vano and these guys do this for free, do u think im stupid bro?? u have no idea, sometimes i am by myself and i think to myself that 1 day if i everrr become a millionaire, the first thing i will do is invest money into 4images. Everytime i have needed help i have wrote a topic and Vano and other members have been kind enough to help me. And im shocked u r telling me to show some respect when every word i use and every action i make is with the utmost respect, i never swear never angry, never tell VANO f*k u, why u not helping. NO wayyyyy,

everytime i call VANO sir, i say thank u VANO everytime he helps me, i even click on the button on this topic "THANK YOU", everytime, every single time i not once show disrespect to VANO, u really upset me man, because it hurts me u say i dont show respect when i have 1000000000000000000000000000000000x respect for vano and for mawezani and for everyone here who show us and me help. If u think i showed disrespect then i really apologize but im very upset now, very angry u will say i dont show vano respect when u cannot believe how much i look up to vano and how much i want to be clever like vano.

If vano u see this i am sorry if u think i not show u respect because u dont understand how much respect i have and lucifix, u really hurt me man, because i have so much respect for people who have knowlegde, every single day and night i promse u i think about ways to help 4images, im sorry lucifix for not being more clear and i apologize to u if u think i was being disrespectful, i hope u accepting my apology and vano also accept my apology, also i like to thank u for helping me and again i am sorry...

i have done what u have said lucifix and below is the error i am now getting, the funny thing is, the table is now created ,

DB Error: Bad SQL Query: SELECT COUNT(*) AS total_requests FROM USERS_FRIENDSHIP_TABLE WHERE friendship_status = 0 AND user_id_secondary = 1
Table 'globa122_kurd.USERS_FRIENDSHIP_TABLE' doesn't exist
« Last Edit: August 09, 2010, 04:32:09 PM by zakaria666 »

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 || Friend List
« Reply #146 on: August 09, 2010, 04:38:42 PM »
Will read all that later today, but I'll repeat myself, that error has nothing to do with this mod. This mod doesn't create any new tables in the database. So, if you'd install the OTHER mod properly this error should not be happening.
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 || Friend List
« Reply #147 on: August 09, 2010, 04:51:57 PM »
hello Vano and thank u for the fast reply,

Im sorry but i dont quite understand sir what u r saying. Lucifix found the error, the error was that the creator of the MOD was calling his primary key name user_friendship_table when in fact it was user_friendship. But i do ask for your forgiveness but are u talking about the MOD we are disuccsing the topic on in this thread ?? or are u talking about this MOD http://www.4homepages.de/forum/index.php?topic=17491.135 Because the link i have just posted is the MOD i have problems with, i posted a thread saying im sorry and that i made a mistake but u replied to my question on this topic so i presumed that u knew that and i carried on asking for help in this thread. The real MOD i have problem with is not this topic but is this link http://www.4homepages.de/forum/index.php?topic=17491.135

Thanks to lucifix, I changed it and succesfully created the tables, i just checked my phpadmin and i have tables there. Below is the image of the created table.



I then tracked down the problem and the problem is given to me when i type my gallery address...

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


and this small code highlited red is from the source below... it is line line 112 This code below goes into includes/function.php... Ive tried to debug the problem by changing the names but have not succeeded, i was hoping if it was possible that u may no what the issue is and i apologize if u thought before i was disrespectufl, im sorry sir.

Code: [Select]
//---[MOD] BUDDY  V.1.0.0 beta ------------
//----2007 by eMagix for 4images gallery --
//----------- START CODE  -----------------

function add_to_buddy($id,$msg) {
  global $user_info, $site_db;
  $id = intval($id);
  if (!$id) {
    return false;
  }
  

  $user_info['buddy_id'] = $id;
  $user_info['buddy_request_msg'] = $msg;
  
  $sql= "INSERT INTO ".USERS_FRIENDSHIP_TABLE." (
`user_id_primary` ,
`user_id_secondary` ,
`friendship_request_date` ,
`friendship_request_message`
)
VALUES (
".$user_info['user_id'].",
".$user_info['buddy_id'].",

CURRENT_TIMESTAMP,
'".$user_info['buddy_request_msg']."'
);";
  

  return ($site_db->query($sql)) ? 1 : 0;
}

function accept_buddy_request($id) {
  global $user_info, $site_db;
  if (!$id) {
    return false;
  }
  
  $user_info['buddy_id'] = $id; //Accept 1 , Reject -1
  $sql = "UPDATE ".USERS_FRIENDSHIP_TABLE."
          SET friendship_status = 1, friendship_accept_date = CURRENT_TIMESTAMP
          WHERE friendship_id = ".$user_info['buddy_id'];
  return ($site_db->query($sql)) ? 1 : 0;
}

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;
}

function remove_from_buddy($id) {
  global $user_info, $site_db;
  if (!$id) {
    return false;
  }
  
  $user_info['buddy_id'] = $id;
  $sql = "DELETE FROM ".USERS_FRIENDSHIP_TABLE."
          WHERE friendship_id = ".$user_info['buddy_id'];
          
  return ($site_db->query($sql)) ? 1 : 0;
}

function clear_buddy() {
  global $user_info, $site_db;
    $sql = "DELETE FROM ".USERS_FRIENDSHIP_TABLE."
            WHERE user_id_primary = ".$user_info['user_id']."
            OR user_id_secondary =".$user_info['user_id'];

  return ($site_db->query($sql)) ? 1 : 0;
}

function check_buddy($id) {
  global $user_info, $site_db;
  $user_info['buddy_id'] = $id;
  $return_value = "";
  
  $sql = "SELECT friendship_status FROM ".USERS_FRIENDSHIP_TABLE."
          WHERE
            
             (user_id_primary = ".$user_info['user_id']." AND user_id_secondary =".$user_info['buddy_id'].")
             OR
             (user_id_primary = ".$user_info['buddy_id']." AND user_id_secondary =".$user_info['user_id'].")";
            
$result = $site_db->query_firstrow($sql);

if (!$result)  {
$return_value = -1;
}
else {
$return_value = $result['friendship_status'];
}
            
  return $return_value;
}

function check_buddy_request() {
  global $user_info, $site_db;

  
  [size=12pt][b]$sql = "SELECT COUNT(*) AS total_requests FROM ".USERS_FRIENDSHIP_TABLE."
            WHERE friendship_status = 0
             AND user_id_secondary = ".$user_info['user_id'];[/b][/size]

  $result = $site_db->query_firstrow($sql);
  $user_total_friends = $result['total_requests'];
  return $user_total_friends;
}