The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

add friend icon to messages

View previous topic View next topic Go down

In progress add friend icon to messages

Post by catgirl on February 27th 2016, 1:24 am

Hey, i hope this is in the right spot. The title is pretty much explanatory. I saw many forums have a add friend or delete friend in their messages if you go to a topic and you look under the profile pic, along that line should be a friend with a plus sign symbol like thing and i was wondering how i could add that. Seeing the new tip/trick reminded me of that. I have not had that added yet and i do not know how. So is there a way to do that?

Thank you!

catgirl
Forumember

Female Posts : 205
Reputation : 17
Language : English

http://winxforevermagic.crazy4us.com/

Back to top Go down

In progress Re: add friend icon to messages

Post by APE on February 27th 2016, 1:38 am





APE
Manager
Manager

Male Posts : 8608
Reputation : 748
Language : fluent in dork / mumbojumbo & English haha
Location : STUCK IN FORUMOTIONS SERVERS HELP ME !!!!!!

http://chatworld.forumotion.co.uk/

Back to top Go down

In progress Re: add friend icon to messages

Post by catgirl on February 27th 2016, 2:02 am

I have tried all codes that were given to me and i don't know if i was doing something wrong but on the first link i tried, i went to my forum and it showed the add friend button for all members even the ones that are my friends. I would like that to be changed to either delete friend, add as a foe or disappear.

catgirl
Forumember

Female Posts : 205
Reputation : 17
Language : English

http://winxforevermagic.crazy4us.com/

Back to top Go down

In progress Re: add friend icon to messages

Post by APE on February 27th 2016, 2:05 am

Hmm i use the same Code on my forums and when the member is added it gives a new button to remove the Friends from your account so i can not see why your one is still showing add a new friend even when you are friends already.

What code are you using ?




APE
Manager
Manager

Male Posts : 8608
Reputation : 748
Language : fluent in dork / mumbojumbo & English haha
Location : STUCK IN FORUMOTIONS SERVERS HELP ME !!!!!!

http://chatworld.forumotion.co.uk/

Back to top Go down

In progress Re: add friend icon to messages

Post by catgirl on February 27th 2016, 2:09 am

I used both but at different times but i may have did it wrong. Which code did you use from the links you gave me? Or should i say which link did you put in your code?

catgirl
Forumember

Female Posts : 205
Reputation : 17
Language : English

http://winxforevermagic.crazy4us.com/

Back to top Go down

In progress Re: add friend icon to messages

Post by APE on February 27th 2016, 2:14 am

Okay use this code and set it to Topic's only

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: '/profile?mode=editprofile&page_profil=friendsfoes',
              cache: false,
              type: "get",
              dataType: "text",
              success: function(response, status, xhr) {
                if (xhr.status == 200) {
                    FFinPosts.oFF_list = $('div:has(> a[href*="page_profil=friendsfoes&remove"]) a:first-child', 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>'
                            )
                          }
                      }
                    }
                }
              }
          });
        });




APE
Manager
Manager

Male Posts : 8608
Reputation : 748
Language : fluent in dork / mumbojumbo & English haha
Location : STUCK IN FORUMOTIONS SERVERS HELP ME !!!!!!

http://chatworld.forumotion.co.uk/

Back to top Go down

In progress Re: add friend icon to messages

Post by catgirl on February 27th 2016, 2:19 am

Alright, i put that in my JS script thing and it still did the same thing. It showed it to ever member even if i am friends with them and it even showed it in my messages as well.

catgirl
Forumember

Female Posts : 205
Reputation : 17
Language : English

http://winxforevermagic.crazy4us.com/

Back to top Go down

In progress Re: add friend icon to messages

Post by APE on February 27th 2016, 2:22 am

Do you have a test account on your forum i can log in to and see this code working ?
and the url of your forum..If yes please PM me the account info




APE
Manager
Manager

Male Posts : 8608
Reputation : 748
Language : fluent in dork / mumbojumbo & English haha
Location : STUCK IN FORUMOTIONS SERVERS HELP ME !!!!!!

http://chatworld.forumotion.co.uk/

Back to top Go down

In progress Re: add friend icon to messages

Post by catgirl on February 27th 2016, 2:27 am

I don't think i have a testing account but if you want you can create an account then you can help me with this and then i will delete your account afterwards. Or you can just get on there without an account cause it will let you do that and i will put the code in and you can see what it does.

catgirl
Forumember

Female Posts : 205
Reputation : 17
Language : English

http://winxforevermagic.crazy4us.com/

Back to top Go down

In progress Re: add friend icon to messages

Post by APE on February 27th 2016, 2:30 am

To see the code working i need to have a working account on the forum logged in so i can see the buttons in the profiles Wink

Please post your URL of the forum and i will make a test account Wink




APE
Manager
Manager

Male Posts : 8608
Reputation : 748
Language : fluent in dork / mumbojumbo & English haha
Location : STUCK IN FORUMOTIONS SERVERS HELP ME !!!!!!

http://chatworld.forumotion.co.uk/

Back to top Go down

In progress Re: add friend icon to messages

Post by catgirl on February 27th 2016, 2:32 am


catgirl
Forumember

Female Posts : 205
Reputation : 17
Language : English

http://winxforevermagic.crazy4us.com/

Back to top Go down

In progress Re: add friend icon to messages

Post by APE on February 27th 2016, 2:51 am

Okay i see the Buttons working fine on the Profiles they all have the little man icons with green Cross on it what is your name on the forum so i can add you as a friend to see if it makes a change ?




APE
Manager
Manager

Male Posts : 8608
Reputation : 748
Language : fluent in dork / mumbojumbo & English haha
Location : STUCK IN FORUMOTIONS SERVERS HELP ME !!!!!!

http://chatworld.forumotion.co.uk/

Back to top Go down

In progress Re: add friend icon to messages

Post by catgirl on February 27th 2016, 2:53 am

Crystal Flame

catgirl
Forumember

Female Posts : 205
Reputation : 17
Language : English

http://winxforevermagic.crazy4us.com/

Back to top Go down

In progress Re: add friend icon to messages

Post by APE on February 27th 2016, 2:59 am

ok i have added you can u Please say we are friends so i can see if the icons goes from green Pluss to red Cross




APE
Manager
Manager

Male Posts : 8608
Reputation : 748
Language : fluent in dork / mumbojumbo & English haha
Location : STUCK IN FORUMOTIONS SERVERS HELP ME !!!!!!

http://chatworld.forumotion.co.uk/

Back to top Go down

In progress Re: add friend icon to messages

Post by catgirl on February 27th 2016, 3:04 am

I did accept

catgirl
Forumember

Female Posts : 205
Reputation : 17
Language : English

http://winxforevermagic.crazy4us.com/

Back to top Go down

In progress Re: add friend icon to messages

Post by APE on February 27th 2016, 3:04 am

ok i really don't know why this is not changing to the right button when friends are added Think

Let me play about with the code and see why its not working as there is no errors on your forum

Or maybe @Ange Tuteur can work it out




APE
Manager
Manager

Male Posts : 8608
Reputation : 748
Language : fluent in dork / mumbojumbo & English haha
Location : STUCK IN FORUMOTIONS SERVERS HELP ME !!!!!!

http://chatworld.forumotion.co.uk/

Back to top Go down

In progress Re: add friend icon to messages

Post by catgirl on February 27th 2016, 3:12 am

Okay, please let me know what i need to do.

catgirl
Forumember

Female Posts : 205
Reputation : 17
Language : English

http://winxforevermagic.crazy4us.com/

Back to top Go down

In progress Re: add friend icon to messages

Post by APE on February 27th 2016, 3:53 am

Okay i have looked at this for you and i found that the code is no longer working right for Phpbb2 forums the code needs to be re-worked




APE
Manager
Manager

Male Posts : 8608
Reputation : 748
Language : fluent in dork / mumbojumbo & English haha
Location : STUCK IN FORUMOTIONS SERVERS HELP ME !!!!!!

http://chatworld.forumotion.co.uk/

Back to top Go down

In progress Re: add friend icon to messages

Post by catgirl on February 27th 2016, 3:55 am

Okay thank you, tell me when and if you find a code that will hopefully work if you can. Thanks for trying.

catgirl
Forumember

Female Posts : 205
Reputation : 17
Language : English

http://winxforevermagic.crazy4us.com/

Back to top Go down

View previous topic View next topic Back to top


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