Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 05-23-2005, 08:30 PM
altsounds altsounds is offline
 
Join Date: Dec 2004
Posts: 88
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Button to remove you from someone elses buddy list.

Alright,

I have vbbuddies installed on my forum and friends.php but a totally revamped version of the friends.php which I will release if I get permission from original author and if I can figure this out. Vbbuddies buddy lists are based upon mutual friendship adds so users only show in your buddy lists if both you and the other user have each other added on each others buddy lists.

Now I modded friends.php to only show the people that are linked to me (meaning they have clicked to add me to their buddy list) and if this happens it shows up in the user CP). If I want to add this user everything is working perfectly. I have an approve buddy request which basically just goes to my add to buddy list, reciprocating the link and making the frienship mutual, hence being added to the vbbuddies buddy list.

Where I am having trouble is making a decline button. Say someone wants to add me as a friend but I am not interested. How would I go about making a decline button?? I think that the way it should work would be to remove "me" from the "requestors" buddy list hence removing them from the pending friends request box. I tried doing ignore user but that does nothing with regards to this.

I figure it would be some kind of DATABASE rewrite or something from the decline button that would as I said above remove "me" from "requestors" buddylist.

I hope that makes sense to everyone and I hope someone can help me with this. If so, I will be able to add a mod for a nice little "Pending Buddy Requests" box in the user CP.

I look forward to finding out what we could do here.
Reply With Quote
  #2  
Old 05-24-2005, 07:56 PM
sabret00the's Avatar
sabret00the sabret00the is offline
 
Join Date: Jan 2003
Location: London
Posts: 5,268
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

it's basically the same query that you'd use to remove a buddy from your own list.
Reply With Quote
  #3  
Old 05-24-2005, 08:30 PM
altsounds altsounds is offline
 
Join Date: Dec 2004
Posts: 88
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Which would be??? And, how do I go about implementing it into this script so that it could be called by doing {forumurl}/friends.php?do=decline or something like that.

I take it this has to be done at the PHP/SQL level to allow the far end removal of a buddy from someone eleses buddy list if the user clicks decline.
Reply With Quote
  #4  
Old 05-24-2005, 09:03 PM
sabret00the's Avatar
sabret00the sabret00the is offline
 
Join Date: Jan 2003
Location: London
Posts: 5,268
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by altsounds
how do I go about implementing it into this script
without seeing the script i wouldn't know but it'd be something like

PHP Code:
    if ($do == "decline")
    {
        if (!
$u)
        {
            
// error message
        
}
        
// your code to remove em
    

and the original vbfriends script has a remove as buddy option, reference that for your first question.
Reply With Quote
  #5  
Old 05-24-2005, 09:09 PM
T3MEDIA T3MEDIA is offline
 
Join Date: Dec 2004
Posts: 944
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

sounds hot.
Reply With Quote
  #6  
Old 05-24-2005, 10:37 PM
altsounds altsounds is offline
 
Join Date: Dec 2004
Posts: 88
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yeah I dont think your getting me entirely here. The unlink option in vbfriends allows "me" to unlink someone on "my" buddy list. For what I'm trying to do here the user would need to remove "themselves" from the "requestors" buddylist hence removing them from the pending friend requests box (as the pending friends request box is based on the (Whos linking to me) part of vbfriends. So my guess would be this would have to be done using SQL and PHP and I'm ++++ @ both so if you could hand hold me through this that would be awesome. As I said, if I can get this I can release this hack that people can improve.
Reply With Quote
  #7  
Old 06-03-2005, 06:08 PM
altsounds altsounds is offline
 
Join Date: Dec 2004
Posts: 88
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Anyone?
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 08:54 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03769 seconds
  • Memory Usage 2,219KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (7)post_thanks_box
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (7)post_thanks_postbit_info
  • (7)postbit
  • (7)postbit_onlinestatus
  • (7)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete