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

0 Members and 1 Guest are viewing this topic.

Offline Fragezeichen

  • Jr. Member
  • **
  • Posts: 58
    • View Profile
Re: [MOD] Buddy List || Friend List
« Reply #30 on: June 16, 2007, 10:51:08 PM »
 8O ....aha,now it works!
just a mistake,but big thanks for your help
 :D

Offline ccsakuweb

  • Sr. Member
  • ****
  • Posts: 498
  • Patri
    • View Profile
    • My Art
Re: [MOD] Buddy List || Friend List
« Reply #31 on: June 16, 2007, 11:47:38 PM »
 :D it's ok!  :wink: if you have another question im here
:arrow: 4images Paid Mods: Links, Blog, Albums, Subdomains for users, Diferent templates for user profile, Related picture in details, Last pictures in details.
And the mod that you request me.   Demo: http://www.myart.es

A website dedicated to artist people who loves drawing, design, writing and more

Offline ccsakuweb

  • Sr. Member
  • ****
  • Posts: 498
  • Patri
    • View Profile
    • My Art
Re: [MOD] Buddy List || Friend List
« Reply #32 on: July 24, 2007, 06:55:14 PM »
ADDON Send PM to users that added you as a friend for notify that you have uploaded a file

create an atribute in users table named allow_pmf_uploads type: INT and default 1
in member.php

search:
Code: [Select]
      else {
        $sql = "INSERT INTO ".IMAGES_TEMP_TABLE."
                (cat_id, user_id, image_name, image_description, image_keywords, image_date, image_media_file, image_thumb_file, image_download_url".$additional_field_sql.")
                VALUES
                ($cat_id, ".$user_info['user_id'].", '$image_name', '$image_description', '$image_keywords', $current_time, '$new_name', '$new_thumb_name', '$image_download_url'".$additional_value_sql.")";
        $result = $site_db->query($sql);
      }

add after:
Code: [Select]
  //MOD FRIENDLIST SEND PM TO FRIENDS THAT ADDED YOU TO THEIR LIST
if ($direct_upload && !empty($user_info['user_friend_you_ids'])) {

$user_id = $user_info['user_id'];

$image_url = $script_url."/details.php?".URL_IMAGE_ID."=".$image_id."";
$image_name_url = "[url=".$image_url."]".$image_name."[/url]";

if (!empty($new_thumb_name)) {
$thumb = $site_sess->url(ROOT_PATH."data/thumbnails/".$cat_id."/".$new_thumb_name);
$thumb = "[url=".$image_url."][img]".$thumb."[/img][/url]";
} else {
$thumb = "";
}

$pm_from = $user_info['user_id'];
$pm_type = 5;
$pm_bbcode = 1;
$pm_smiles = 1;
$pm_sig = "-- \n If you don't want to receive pms about the new images uploaded from your friends, modify this option in your control panel. ";

$pm_message = "I uploaded a new file, the name is ".$image_name.". Please comment this file ok? \n\n [B]URL:[/B] ".$image_name_url."\n".$thumb." \n\n".$pm_sig;
$pm_subject = "\"".$user_info['user_name']."\" has uploaded a new file: ".$image_name;


$friendslist_you_array = explode(" ", $user_info['user_friend_you_ids']);
$friendslist_you_array = array_reverse($friendslist_you_array);
foreach ($friendslist_you_array as $key => $val) {
        $sql2 = "SELECT allow_pmf_uploads
FROM ".USERS_TABLE."
              WHERE user_id = '".$val."'";
    $friends_row = $site_db->query_firstrow($sql2);
if($friends_row['allow_pmf_uploads']){
$sql = "INSERT INTO ".PM_TABLE."
(pm_date, pm_to, pm_from, pm_subject, pm_type, pm_text, pm_bbcode, pm_html, pm_ip, pm_smiles)
VALUES
('".time()."', $val, $pm_from, '".$pm_subject."', $pm_type, '".$pm_message."', $pm_bbcode, 0, '".$session_info['session_ip']."', $pm_smiles)";
$result = $site_db->query($sql);
}
}//end foreach
 
      }

search:
Code: [Select]
   $sql = "UPDATE ".USERS_TABLE."
           SET ".get_user_table_field("", "user_email")." = '$user_email', ".get_user_table_field("", "user_showemail")." = $user_showemail, ".get_user_table_field("", "user_allowemails")." = $user_allowemails,

add after in the same line:
Code: [Select]
allow_pmf_uploads = '$allow_pmf_uploads' ,
search:
Code: [Select]
    $user_allowemails = $user_info['user_allowemails'];
add after:

Code: [Select]
$allow_pmf_uploads = $user_info['allow_pmf_uploads'];
search:
Code: [Select]
  if ($user_allowemails == 1) {
    $user_allowemails_yes = " checked=\"checked\"";
    $user_allowemails_no = "";
  }
  else {
    $user_allowemails_yes = "";
    $user_allowemails_no = " checked=\"checked\"";
  }

add after:
Code: [Select]
if ($allow_pmf_uploads  == 1) {
      $allow_pmf_uploads_yes = " checked=\"checked\"";
      $allow_pmf_uploads_no = "";
    }
    else {
      $allow_pmf_uploads_yes = "";
      $allow_pmf_uploads_no = " checked=\"checked\"";
  }

open includes/page_header.php
search:
Code: [Select]
  "charset" => $lang['charset'],add after:
Code: [Select]
"lang_allowpmfuploads" => $lang['allowpmfuploads'],
open includes/db_field_definitions.php
search:
Code: [Select]
?>
add before:
Code: [Select]
$additional_user_fields['allow_pmf_uploads'] = array($lang['allow_pmf_uploads'], "radio", 0);
open lang/yorlang/main.php
search:
Code: [Select]
$lang['allow_emails']add  after in a new line:

Code: [Select]
$lang['allowpmfuploads'] = "Receive PMs when your friends upload new images:";
open templates/yourtheme/member_editprofile.html
search:
Code: [Select]
          <tr>
            <td class="row1"><b>{lang_user_pm_popup}</b></td>
            <td class="row1">
              <input type="radio" name="user_pm_popup" value="1"{user_pm_popup_yes} />
              {lang_yes}&nbsp;&nbsp;&nbsp;
              <input type="radio" name="user_pm_popup" value="0"{user_pm_popup_no} />
              {lang_no}
            </td>
          </tr>
add after:
Code: [Select]
<tr>
            <td class="row2"><b>{lang_allowpmfuploads}</b></td>
            <td class="row2">
              <input type="radio" name="allow_pmf_uploads" value="1"{allow_pmf_uploads_yes} />
              {lang_yes}&nbsp;&nbsp;&nbsp;
              <input type="radio" name="allow_pmf_uploads" value="0"{allow_pmf_uploads_no} />
              {lang_no}
            </td>
          </tr>


That's all ;)
« Last Edit: July 28, 2007, 12:47:34 PM by ccsakuweb »
:arrow: 4images Paid Mods: Links, Blog, Albums, Subdomains for users, Diferent templates for user profile, Related picture in details, Last pictures in details.
And the mod that you request me.   Demo: http://www.myart.es

A website dedicated to artist people who loves drawing, design, writing and more

Offline Loda

  • Sr. Member
  • ****
  • Posts: 353
    • View Profile
    • Fotosucht Schweiz
Re: [MOD] Buddy List || Friend List
« Reply #33 on: July 25, 2007, 06:12:13 PM »
you're great!
works fine!!
thank you very much for the addon!!  :D

Offline Loda

  • Sr. Member
  • ****
  • Posts: 353
    • View Profile
    • Fotosucht Schweiz
Re: [MOD] Buddy List || Friend List
« Reply #34 on: July 26, 2007, 10:22:09 AM »
hello!
maybe a mistake is in your code?
"$imgname" is it correct?
i don't know but i think you need "$image_name" ?
 :(  :?:

Offline Mr_LovaLove

  • Full Member
  • ***
  • Posts: 233
  • Unkown
    • View Profile
Re: [MOD] Buddy List || Friend List
« Reply #35 on: July 26, 2007, 08:45:03 PM »
BiG thanks 4 both of u :Pp !!

really its a great MOD !!

well im new with 4images !

i have a small question !!

i installed the MOD ! but thought there will be a PM MSGs in my site !!

as a Friends List and Buddy List its working fine ! and more than fine :Pp

but where is the PMs !! O_o

Do i have to install it from somewhere else !

or this MOD already has this function  !

BIG THANKS AGAIN
English Please :@

Offline ccsakuweb

  • Sr. Member
  • ****
  • Posts: 498
  • Patri
    • View Profile
    • My Art
Re: [MOD] Buddy List || Friend List
« Reply #36 on: July 27, 2007, 11:41:03 AM »
@Mr_LovaLove. hi! is great that this mod work in your site. what version gallery do you have?
 if you want to receive pms when a friend upload a file you need pmv2 installed. Here: http://www.4homepages.de/forum/index.php?topic=6692.0   

 @Loda: i think that $image_name is right too. and i can use $imgname, can't you use this variable? i wrote the mod fast because i am out of home and i wanted to write it before that i forgot any step. hehe i forgot to translate spanish pm to english pm
:arrow: 4images Paid Mods: Links, Blog, Albums, Subdomains for users, Diferent templates for user profile, Related picture in details, Last pictures in details.
And the mod that you request me.   Demo: http://www.myart.es

A website dedicated to artist people who loves drawing, design, writing and more

Offline Loda

  • Sr. Member
  • ****
  • Posts: 353
    • View Profile
    • Fotosucht Schweiz
Re: [MOD] Buddy List || Friend List
« Reply #37 on: July 27, 2007, 05:32:29 PM »
@Loda: i think that $image_name is right too. and i can use $imgname, can't you use this variable? i wrote the mod fast because i am out of home and i wanted to write it before that i forgot any step. hehe i forgot to translate spanish pm to english pm

hi,
i can only used $image_name"
my 4images version is 1.7, i think that's the reason.
 :wink: i translate your spanish language to my native language  :wink: no problem!
thank you for your "fast" work!  :D

Offline ccsakuweb

  • Sr. Member
  • ****
  • Posts: 498
  • Patri
    • View Profile
    • My Art
Re: [MOD] Buddy List || Friend List
« Reply #38 on: July 28, 2007, 12:44:53 PM »
ok! i will change the variable in the addon ^^
and.. sorry.. my english is horrible hehe. there are a lot of time that i don't study it and i only practice english here. I must speak like the Indians :P
:arrow: 4images Paid Mods: Links, Blog, Albums, Subdomains for users, Diferent templates for user profile, Related picture in details, Last pictures in details.
And the mod that you request me.   Demo: http://www.myart.es

A website dedicated to artist people who loves drawing, design, writing and more

Offline Mr_LovaLove

  • Full Member
  • ***
  • Posts: 233
  • Unkown
    • View Profile
Re: [MOD] Buddy List || Friend List
« Reply #39 on: July 28, 2007, 04:09:48 PM »
@ccsakuweb  thanks for your replay !!

yes it works and fine only one small problem ( also thanks for the pm link )

Well, im using 1.7.4

in fact, it was working very well in the local host !! but after i upload it ( and its my first upload for the MYSQL DATABASE ) this error appears to me *MAD*

Error: Unknown column 'used_ips' in 'field list'

and i thought its from one of the tables in my database !! searched  for this used_ips !! couldn't find it !! it might not cased by ur MOD coz i already added Best Uploader MOD and Ban MOD

also the Avatar MOD !!

Poor Me :Pp !!

i hope you have the sulotion

btw, all these MODS and urs was uploaded at same time ! :(







English Please :@

Offline Mr_LovaLove

  • Full Member
  • ***
  • Posts: 233
  • Unkown
    • View Profile
Re: [MOD] Buddy List || Friend List
« Reply #40 on: July 28, 2007, 08:52:51 PM »
I just removed the Ban + Best Uploader MODs

But seems there error comes from another MODs ! :(

waiting for a replay
English Please :@

Offline Loda

  • Sr. Member
  • ****
  • Posts: 353
    • View Profile
    • Fotosucht Schweiz
Re: [MOD] Buddy List || Friend List
« Reply #41 on: July 29, 2007, 09:37:44 AM »
I just removed the Ban + Best Uploader MODs

But seems there error comes from another MODs ! :(

waiting for a replay
i think you have insert the starrating mod:
http://www.4homepages.de/forum/index.php?topic=17829.0
and you don't added the field used_ips
i'm right?
check your files..

Offline Mr_LovaLove

  • Full Member
  • ***
  • Posts: 233
  • Unkown
    • View Profile
Re: [MOD] Buddy List || Friend List
« Reply #42 on: July 29, 2007, 10:00:36 PM »
@ Loda .. You were totally right ^_^

yes i didnt insert that field ! in fact, i did not complete that rate MOD ! but seems my database infected coz of that MOD ! :)

thanks alot u did a big fava for me :)

well, Now i have another small problem with this MOD ( Friends List )

first let me explain the first error that i fixed it ( i think the next error i will talk about has a link with this one )

when i go to my friend list i found my firends whenever i click on the number of the images that he/she has an error apears on the search page but the process goes normaly only the msg appears on the top of the page
so, i just canceled the link so the search for the users image not works anymore

and now the number of images for every friend in my friend list not working but when i search for my friend using the search bar
the link appears again ( for the number of images they have )

when i click on it

this error displayed :

Code: [Select]
Notice: Undefined variable: lightbox_total_count in /home/alwasmy/public_html/pix/includes/page_header.php on line 162
and my code in the line 162 is :

Code: [Select]
  "lightbox_total_count" => intval($lightbox_total_count),
same question goes to ccsakuweb as well :)

My solution is to delete the link :(

thanks again Loda :)
« Last Edit: July 30, 2007, 01:55:05 AM by Mr_LovaLove »
English Please :@

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: [MOD] Buddy List || Friend List
« Reply #43 on: July 30, 2007, 04:53:24 AM »
Quote
"lightbox_total_count" => intval($lightbox_total_count),

change to:

Quote
"lightbox_total_count" => (isset($lightbox_total_count)) ? intval(trim($lightbox_total_count)) : 0,

Should work. ;)
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?

Offline Mr_LovaLove

  • Full Member
  • ***
  • Posts: 233
  • Unkown
    • View Profile
Re: [MOD] Buddy List || Friend List
« Reply #44 on: July 30, 2007, 05:45:45 AM »
Well thanks for fast replay :)


 im at work right now !! so just when i'll go back to home ganna try it :)

thanks alot  ^_^

English Please :@