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
Page 2 of 2 • 1, 2
Good idea?
Friend Request in posts
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
My idea:
A button next to your posts which says "add friend" or "add foe".
This will add something as a friend.
~Niels
Re: Friend Request in posts
well, only if we got the feature "notifyed when new friend request" was activated
Re: Friend Request in posts
Gooooooooood!!!
DanAkiCcc- New Member
- Posts : 15
Reputation : 0
Language : Greece
Re: Friend Request in posts
Bumping to move it to the first page.
Lost Founder's Password |Forum's Utilities |Report a Forum |General Rules |FAQ |Tricks & Tips
You need one post to send a PM.
You need one post to send a PM.
When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
Re: Friend Request in posts
I voted yes but I do have to agree, a notification when a people get a friend request would be quite useful.Codyy wrote:well, only if we got the feature "notifyed when new friend request" was activated
Re: Friend Request in posts
There are notifications now with the toolbar.Rupture wrote:I voted yes but I do have to agree, a notification when a people get a friend requestCodyy wrote:well, only if we got the feature "notifyed when new friend request" was activated
Lost Founder's Password |Forum's Utilities |Report a Forum |General Rules |FAQ |Tricks & Tips
You need one post to send a PM.
You need one post to send a PM.
When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
Re: Friend Request in posts
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
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
});
Re: Friend Request in posts
@_Twisted_Mods_
Your code is very nice, well done!
Here is my version based on yours with little modifications, see:
New code link: https://help.forumotion.com/t50435p30-friend-request-in-posts#945268
Working on all versions too.
JS
Your code is very nice, well done!
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
Re: Friend Request in posts
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?
Re: Friend Request in posts
Yes, try this code: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?
- 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
Re: Friend Request in posts
Bumping to move this suggestion to the first page.
Lost Founder's Password |Forum's Utilities |Report a Forum |General Rules |FAQ |Tricks & Tips
You need one post to send a PM.
You need one post to send a PM.
When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
Re: Friend Request in posts
Voted yes, why not?
Take Notes- Helper
- Posts : 2337
Reputation : 324
Language : English
Location : Forumountain
Re: Friend Request in posts
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.
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.
Re: Friend Request in posts
Bumping to move this suggestion to the first page.
Lost Founder's Password |Forum's Utilities |Report a Forum |General Rules |FAQ |Tricks & Tips
You need one post to send a PM.
You need one post to send a PM.
When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
Page 2 of 2 • 1, 2
Similar topics
» Friend & Foes request in posts.
» Banner Request! Not for me but to me friend.
» Search over friend request
» Send a friend request
» friend request notification
» Banner Request! Not for me but to me friend.
» Search over friend request
» Send a friend request
» friend request notification
Page 2 of 2
Permissions in this forum:
You cannot reply to topics in this forum