Friend Request in posts

Page 2 of 2 Previous  1, 2

Go down

Good idea?

Friend Request in posts - Page 2 Left1190%Friend Request in posts - Page 2 Right11 90% 
[ 36 ]
Friend Request in posts - Page 2 Left115%Friend Request in posts - Page 2 Right11 5% 
[ 2 ]
Friend Request in posts - Page 2 Left115%Friend Request in posts - Page 2 Right11 5% 
[ 2 ]
 
Total Votes : 40

Friend Request in posts - Page 2 Empty Friend Request in posts

Post by Rehua on July 30th 2009, 5:40 pm

First topic message reminder :

My idea:


A button next to your posts which says "add friend" or "add foe".
This will add something as a friend.

~Niels
Rehua
Rehua
Forumember

Male Posts : 669
Reputation : 1
Language : Dutch, English, German, French
Location : On Forumotion.

http://vocatrem.findtalk.biz/forum.htm

Back to top Go down


Friend Request in posts - Page 2 Empty Re: Friend Request in posts

Post by Codyy on October 2nd 2009, 7:00 am

well, only if we got the feature "notifyed when new friend request" was activated
Codyy
Codyy
Active Poster

Male Posts : 1032
Reputation : 16
Language : English
Location : Florida

http://leprym.com

Back to top Go down

Friend Request in posts - Page 2 Empty Re: Friend Request in posts

Post by DanAkiCcc on November 5th 2009, 8:13 pm

Gooooooooood!!! :wouhou:
DanAkiCcc
DanAkiCcc
New Member

Posts : 15
Reputation : 0
Language : Greece

Back to top Go down

Friend Request in posts - Page 2 Empty Re: Friend Request in posts

Post by SLGray on February 21st 2015, 10:35 pm

Bumping to move it to the first page.


Friend Request in posts - Page 2 Slgray10

When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
SLGray
SLGray
Administrator
Administrator

Male Posts : 46550
Reputation : 3269
Language : English
Location : United States

https://help.forumotion.com/

Back to top Go down

Friend Request in posts - Page 2 Empty Re: Friend Request in posts

Post by Guest on February 21st 2015, 10:45 pm

Voted yes, because I believe this is an excellent idea!
avatar
Guest
Guest


Back to top Go down

Friend Request in posts - Page 2 Empty Re: Friend Request in posts

Post by Rupture on February 21st 2015, 11:02 pm

@Codyy wrote:well, only if we got the feature "notifyed when new friend request" was activated
I voted yes but I do have to agree, a notification when a people get a friend request would be quite useful.
Rupture
Rupture
Forumember

Male Posts : 329
Reputation : 6
Language : English, Español, Deutsch, Catalá
Location : Earth

http://raptorgaming.forumotion.com

Back to top Go down

Friend Request in posts - Page 2 Empty Re: Friend Request in posts

Post by SLGray on February 22nd 2015, 4:36 pm

@Rupture wrote:
@Codyy wrote:well, only if we got the feature "notifyed when new friend request" was activated
I voted yes but I do have to agree, a notification when a people get a friend request 
There are notifications now with the toolbar.


Friend Request in posts - Page 2 Slgray10

When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
SLGray
SLGray
Administrator
Administrator

Male Posts : 46550
Reputation : 3269
Language : English
Location : United States

https://help.forumotion.com/

Back to top Go down

Friend Request in posts - Page 2 Empty Re: Friend Request in posts

Post by _Twisted_Mods_ on February 25th 2015, 6:16 am

here you go for all 4 versions .. it will add buttons to post profile to add friend or foe

goto acp>modules>javascript management

create a new sscript

title:add friends
placement: in topics
copy the code below and save/submit

Code:
$(function(){
  if (document.getElementById('wrap')){
$('.post').each(function(){
    var userlink = $(this).find('.author a').text()
    $(this).find('.postprofile dd:last').prepend('<a class="profile-icon" href="/profile?friend=' + userlink + '&mode=editprofile&page_profil=friendsfoes"><img title="Add As Friend" alt="Add As Friend" src="http://icons.iconarchive.com/icons/oxygen-icons.org/oxygen/16/Actions-list-add-user-icon.png" width="25" height="25"></a>');
    $(this).find('.postprofile dd:last').append('<a class="profile-icon" href="/profile?foe=' + userlink + '&mode=editprofile&page_profil=friendsfoes"><img title="Add To Foes" alt="Add To Foes" src="http://icons.iconarchive.com/icons/oxygen-icons.org/oxygen/16/Actions-list-remove-user-icon.png" width="25" height="25"></a>');
   
});}//phpbb3
 
    else if ($('.bodylinewidth').length){
$('.post').each(function(){
    var userlink = $(this).find('.name').text()
    alert(userlink)
    $(this).next('tr').find('.messaging td').prepend('<a class="profile-icon" href="/profile?friend=' + userlink + '&mode=editprofile&page_profil=friendsfoes"><img title="Add As Friend" alt="Add As Friend" src="http://icons.iconarchive.com/icons/oxygen-icons.org/oxygen/16/Actions-list-add-user-icon.png" width="25" height="25"></a>');
    $(this).next('tr').find('.messaging td').append('<a class="profile-icon" href="/profile?foe=' + userlink + '&mode=editprofile&page_profil=friendsfoes"><img title="Add To Foes" alt="Add To Foes" src="http://icons.iconarchive.com/icons/oxygen-icons.org/oxygen/16/Actions-list-remove-user-icon.png" width="25" height="25"></a>');
   
});} //phpbb2
 
    else if ($('.pun').length){
$('.post').each(function(){
    var userlink = $(this).find('.user a[href^="/u"]').text()
    $(this).find('.user-contact').prepend('<a class="profile-icon" href="/profile?friend=' + userlink + '&mode=editprofile&page_profil=friendsfoes"><img title="Add As Friend" alt="Add As Friend" src="http://icons.iconarchive.com/icons/oxygen-icons.org/oxygen/16/Actions-list-add-user-icon.png" width="20" height="20"></a>');
    $(this).find('.user-contact').append('<a class="profile-icon" href="/profile?foe=' + userlink + '&mode=editprofile&page_profil=friendsfoes"><img title="Add To Foes" alt="Add To Foes" src="http://icons.iconarchive.com/icons/oxygen-icons.org/oxygen/16/Actions-list-remove-user-icon.png" width="20" height="20"></a>');
   
});}  //punbb
 
    else if (document.getElementById('ipbwrapper')){
$('.post').each(function(){
    var userlink = $(this).find('.author a').text()
    $(this).find('.postprofile dd:last').append('<a class="profile-icon" href="/profile?friend=' + userlink + '&mode=editprofile&page_profil=friendsfoes"><img title="Add As Friend" alt="Add As Friend" src="http://icons.iconarchive.com/icons/oxygen-icons.org/oxygen/16/Actions-list-add-user-icon.png" width="25" height="25"></a>');
    $(this).find('.postprofile dd:last').append('<a class="profile-icon" href="/profile?foe=' + userlink + '&mode=editprofile&page_profil=friendsfoes"><img title="Add To Foes" alt="Add To Foes" src="http://icons.iconarchive.com/icons/oxygen-icons.org/oxygen/16/Actions-list-remove-user-icon.png" width="25" height="25"></a>');
   
});}; //invision
});
_Twisted_Mods_
_Twisted_Mods_
Helper
Helper

Male Posts : 2106
Reputation : 333
Language : English
Location : Ms

http://liquidcode.forumotion.com

Back to top Go down

Friend Request in posts - Page 2 Empty Re: Friend Request in posts

Post by JScript on February 25th 2015, 2:24 pm

@_Twisted_Mods_
Your code is very nice, well done! Very good

Here is my version based on yours with little modifications, see:

New code link: https://help.forumotion.com/t50435p30-friend-request-in-posts#945268

Code:

$(function() {
   if (!_userdata.session_logged_in) {
      return false;
   }
   var FFinPosts = {
      sFriend: "Add As Friend",
      sFoes: "Add To Foes",
      oTarget: $('.post'),
      iLen: 0,
      sUser_name: "",
      oThis: null
   };
   FFinPosts.iLen = FFinPosts.oTarget.length;

   for (var i = 0; i < FFinPosts.iLen; i++) {
      FFinPosts.oThis = $(FFinPosts.oTarget[i]);
      FFinPosts.sUser_name = FFinPosts.oThis.find('.author a, .name, .user a[href^="/u"]').text();

      if (FFinPosts.sUser_name !== _userdata.username) {
         FFinPosts.oThis.find('.postprofile dd:last, .postdetails.poster-profile, .user-contact')
            .append(
               '<a class="profile-icon" href="/profile?friend=' + FFinPosts.sUser_name + '&mode=editprofile&page_profil=friendsfoes">' +
               '   <img title="Add As Friend" alt="Add As Friend" src="http://icons.iconarchive.com/icons/oxygen-icons.org/oxygen/16/Actions-list-add-user-icon.png" width="25" height="25">' +
               '</a>' +
               '<a class="profile-icon" href="/profile?foe=' + FFinPosts.sUser_name + '&mode=editprofile&page_profil=friendsfoes">' +
               '   <img title="Add To Foes" alt="Add To Foes" src="http://icons.iconarchive.com/icons/oxygen-icons.org/oxygen/16/Actions-list-remove-user-icon.png" width="25" height="25">' +
               '</a>'
            )
      }
   }
});

Working on all versions too.

JS


Last edited by JScript on February 25th 2015, 7:16 pm; edited 1 time in total
JScript
JScript
Forumember

Male Posts : 741
Reputation : 174
Language : PT-BR, EN
Location : Brazil

http://jscript.forumeiros.com/

Back to top Go down

Friend Request in posts - Page 2 Empty Re: Friend Request in posts

Post by Rupture on February 25th 2015, 6:23 pm

No offense but this kinda sucks if it keeps showing up after they are already in your friends list.. can't you make it so it goes away?
Rupture
Rupture
Forumember

Male Posts : 329
Reputation : 6
Language : English, Español, Deutsch, Catalá
Location : Earth

http://raptorgaming.forumotion.com

Back to top Go down

Friend Request in posts - Page 2 Empty Re: Friend Request in posts

Post by JScript on February 25th 2015, 7:15 pm

@Rupture wrote:No offense but this kinda sucks if it keeps showing up after they are already in your friends list.. can't you make it so it goes away?
Yes, try this code:
Code:

$(function() {
   if (!_userdata.session_logged_in) {
      return false;
   }
   var FFinPosts = {
      sFriend: "Add As Friend",
      sFoes: "Add To Foes",
      oTarget: $('.post'),
      iLen: 0,
      sUser_name: "",
      oFF_list: null,
      aFF_list: [],
      vTemp: null,
      oThis: null
   };
   FFinPosts.iLen = FFinPosts.oTarget.length;

   $.ajax({
      url: "/u" + _userdata.user_id + 'friends',
      cache: false,
      type: "get",
      dataType: "text",
      success: function(response, status, xhr) {
         if (xhr.status == 200) {
            FFinPosts.oFF_list = $('#profile-advanced-details ol .message-header > a[href^="/u"]', response);

            for (var i = 0; i < FFinPosts.oFF_list.length; i++) {
               FFinPosts.aFF_list[FFinPosts.aFF_list.length] = $(FFinPosts.oFF_list[i]).text();
            }

            for (var i = 0; i < FFinPosts.iLen; i++) {
               FFinPosts.oThis = $(FFinPosts.oTarget[i]);
               FFinPosts.sUser_name = FFinPosts.oThis.find('.author a, .name, .user a[href^="/u"]').text();

               if (FFinPosts.sUser_name !== _userdata.username) {
                  FFinPosts.vTemp = FFinPosts.oThis.find('.postprofile dd:last, .postdetails.poster-profile, .user-contact');

                  if (FFinPosts.aFF_list.indexOf(FFinPosts.sUser_name) == -1) {

                     FFinPosts.vTemp.append(
                        '<a class="profile-icon" href="/profile?friend=' + encodeURIComponent(FFinPosts.sUser_name) + '&mode=editprofile&page_profil=friendsfoes">' +
                        '   <img title="Add As Friend" alt="Add As Friend" src="http://icons.iconarchive.com/icons/oxygen-icons.org/oxygen/16/Actions-list-add-user-icon.png" width="25" height="25">' +
                        '</a>'
                     )
                  } else {
                     FFinPosts.vTemp.append(
                        '<a class="profile-icon" href="/profile?foe=' + encodeURIComponent(FFinPosts.sUser_name) + '&mode=editprofile&page_profil=friendsfoes">' +
                        '   <img title="Add To Foes" alt="Add To Foes" src="http://icons.iconarchive.com/icons/oxygen-icons.org/oxygen/16/Actions-list-remove-user-icon.png" width="25" height="25">' +
                        '</a>'
                     )
                  }
               }
            }
         }
      }
   });
});

However, it is the last time I post here, so as not to disturb the topic ok?
If you want something more, open a topic in the support area.


So long,

JS
JScript
JScript
Forumember

Male Posts : 741
Reputation : 174
Language : PT-BR, EN
Location : Brazil

http://jscript.forumeiros.com/

Back to top Go down

Friend Request in posts - Page 2 Empty Re: Friend Request in posts

Post by SLGray on November 16th 2015, 10:52 pm

Bumping to move this suggestion to the first page.


Friend Request in posts - Page 2 Slgray10

When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
SLGray
SLGray
Administrator
Administrator

Male Posts : 46550
Reputation : 3269
Language : English
Location : United States

https://help.forumotion.com/

Back to top Go down

Friend Request in posts - Page 2 Empty Re: Friend Request in posts

Post by SarkZKalie on November 17th 2015, 5:36 am

Can we have Friend & Foes available in simple profile?


Friend Request in posts - Page 2 Sarkzk10
SarkZKalie
SarkZKalie
Support Moderator
Support Moderator

Male Posts : 1095
Reputation : 179
Language : English

https://www.rotavn.xyz/

Back to top Go down

Friend Request in posts - Page 2 Empty Re: Friend Request in posts

Post by Take Notes on January 18th 2016, 9:56 pm

Voted yes, why not?
Take Notes
Take Notes
Helper
Helper

Male Posts : 2337
Reputation : 324
Language : English
Location : Forumountain

Back to top Go down

Friend Request in posts - Page 2 Empty Re: Friend Request in posts

Post by SarkZKalie on February 23rd 2016, 7:38 am

Voted yes!


Friend Request in posts - Page 2 Sarkzk10
SarkZKalie
SarkZKalie
Support Moderator
Support Moderator

Male Posts : 1095
Reputation : 179
Language : English

https://www.rotavn.xyz/

Back to top Go down

Friend Request in posts - Page 2 Empty Re: Friend Request in posts

Post by IOCUK on February 23rd 2016, 8:17 am

I thought this was already sorted ?. I have it in my members post profiles and once used
and accepted it goes away. Don't ask me where I got it from because I can't remember, but
is was done by one of the FM staff. Im using phpBB3.
IOCUK
IOCUK
Forumember

Male Posts : 228
Reputation : 4
Language : english
Location : United Kingdom

http://www.suzuki-intruder.org

Back to top Go down

Friend Request in posts - Page 2 Empty Re: Friend Request in posts

Post by SLGray on February 20th 2018, 7:39 pm

Bumping to move this suggestion to the first page.


Friend Request in posts - Page 2 Slgray10

When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
SLGray
SLGray
Administrator
Administrator

Male Posts : 46550
Reputation : 3269
Language : English
Location : United States

https://help.forumotion.com/

Back to top Go down

Page 2 of 2 Previous  1, 2

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum