The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Friend Request in posts

+18
_Twisted_Mods_
Rupture
SLGray
DanAkiCcc
Codyy
Mystic_gohan2
dotDavid
Angelic
Extreme_gsxf
Goku93
Mehtevas
Gill
AiKirika
Polka-Dot-Heart
Walshy95
Milunice259
MrMega
Rehua
22 posters

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 30/7/2009, 18:40

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 2/10/2009, 08:00

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 5/11/2009, 22:13

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 22/2/2015, 00:35

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 : 51489
Reputation : 3519
Language : English
Location : United States

https://forumsclub.com/gc/128-link-directory/

Back to top Go down

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

Post by Guest 22/2/2015, 00:45

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 22/2/2015, 01:02

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 22/2/2015, 18:36

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 : 51489
Reputation : 3519
Language : English
Location : United States

https://forumsclub.com/gc/128-link-directory/

Back to top Go down

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

Post by _Twisted_Mods_ 25/2/2015, 08:16

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 : 2108
Reputation : 336
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 25/2/2015, 16:24

@_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 25/2/2015, 21:16; edited 1 time in total
JScript
JScript
Forumember

Male Posts : 741
Reputation : 175
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 25/2/2015, 20:23

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 25/2/2015, 21:15

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 : 175
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 17/11/2015, 00:52

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 : 51489
Reputation : 3519
Language : English
Location : United States

https://forumsclub.com/gc/128-link-directory/

Back to top Go down

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

Post by SarkZKalie 17/11/2015, 07:36

Can we have Friend & Foes available in simple profile?


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

Male Posts : 1418
Reputation : 220
Language : English

https://rotavn.forumotion.com/

Back to top Go down

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

Post by Take Notes 18/1/2016, 23:56

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 23/2/2016, 09:38

Voted yes!


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

Male Posts : 1418
Reputation : 220
Language : English

https://rotavn.forumotion.com/

Back to top Go down

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

Post by IOCUK 23/2/2016, 10:17

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 20/2/2018, 21:39

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 : 51489
Reputation : 3519
Language : English
Location : United States

https://forumsclub.com/gc/128-link-directory/

Back to top Go down

Page 2 of 2 Previous  1, 2

Back to top

- Similar topics

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