How to add profile picture last topic HELP
4 posters
Page 1 of 1
How to add profile picture last topic HELP
Hi dear, all
I come form Thailand, I am weak in English , but i want you help me.
i need picture profile last topic in my forum version PHPBB3
ex.
help me please
Thank you very much.
I come form Thailand, I am weak in English , but i want you help me.
i need picture profile last topic in my forum version PHPBB3
ex.
help me please
Thank you very much.
Last edited by Murphy999 on March 4th 2014, 7:02 am; edited 1 time in total
Murphy999- New Member
- Posts : 11
Reputation : 1
Language : Thai
Re: How to add profile picture last topic HELP
Hello!
We need to know which version of your forum!
Read this: https://help.forumotion.com/t130972-how-can-i-add-avatar-in-recent-topics-widget#878472
So long,
JS
We need to know which version of your forum!
Read this: https://help.forumotion.com/t130972-how-can-i-add-avatar-in-recent-topics-widget#878472
So long,
JS
Murphy999- New Member
- Posts : 11
Reputation : 1
Language : Thai
Re: How to add profile picture last topic HELP
JScript wrote:Hello!
We need to know which version of your forum!
Read this: https://help.forumotion.com/t130972-how-can-i-add-avatar-in-recent-topics-widget#878472
So long,
JS
Doesn't work
Murphy999- New Member
- Posts : 11
Reputation : 1
Language : Thai
Re: How to add profile picture last topic HELP
You know why it did not work?Murphy999 wrote:Doesn't work
Answer: You omitted valuable information when you created the topic, such as the version of the forum for example.
The version that I posted the link above is to PHPBB2, you will have to wait for the code to be adapted to the version that informed us: phpBB3
So long,
JS
Re: How to add profile picture last topic HELP
JScript wrote:You know why it did not work?Murphy999 wrote:Doesn't work
Answer: You omitted valuable information when you created the topic, such as the version of the forum for example.
The version that I posted the link above is to PHPBB2, you will have to wait for the code to be adapted to the version that informed us: phpBB3
So long,
JS
Thank you
Murphy999- New Member
- Posts : 11
Reputation : 1
Language : Thai
Re: How to add profile picture last topic HELP
JScript wrote:You know why it did not work?Murphy999 wrote:Doesn't work
Answer: You omitted valuable information when you created the topic, such as the version of the forum for example.
The version that I posted the link above is to PHPBB2, you will have to wait for the code to be adapted to the version that informed us: phpBB3
So long,
JS
Hi
It was stated on his profile, just saying. If you're saying that the profile couldn't be trusted, and then he informed us that what was in his profile wasn't actually the real version, then that's when you could say what you just said.
@Murphy999: Back on topic, that code has not been adapted to phpBB3 yet. The avatar code is natural on Invision and a code was made for phpBB2. So far, there's no one who made a script for phpBB3 that actually works.
Regards,
Pizza Boi
Pizza Boi- Hyperactive
- Posts : 2016
Reputation : 160
Language : French
Location : Pizza Hut!
Re: How to add profile picture last topic HELP
@Murphy999
Here's the code, just add with investment in all pages:
Result:
So long,
JS
Here's the code, just add with investment in all pages:
- Code:
/***
* Avatar in Recent Topics Widget!
* Version: phpbb3
* Only one request per session to read member profile to get avatar!
* Optimization by JScript - 2014/03/04
*/
jQuery(function () {
var sCSS = '' +
'<style>' +
'.ipsUserPhoto {' +
'background: none repeat scroll 0 0 #FFFFFF;' +
'border: 1px solid #D5D5D5 !important;' +
'box-shadow: 0 2px 2px rgba(0, 0, 0, 0.1);' +
'padding: 1px;' +
'}' +
'.ipsUserPhoto_mini {' +
'height: 30px;' +
'width: 30px;' +
'}' +
'</style>';
document.head.insertAdjacentHTML('beforeEnd', sCSS);
/* DOM chached for fast execution! */
//var widgetLeft = jQuery('#left')[0]; // Left widget;
var widgetRight = jQuery('#right')[0]; // Right widget;
var oTarget = $(widgetRight).find('.module .inner a[href^="/t"]');
//setTimeout(function() {
oTarget.each(function () {
oThis = jQuery(this); /* DOM chached for fast execution! */
var temp = oThis.next().next();
var UserURL = temp.attr('href');
var UserTitle = temp.text();
var def_img = "http://i78.servimg.com/u/f78/18/17/62/92/defaul10.png"; /* In case request profile errors! */
var UserIMG = 0;//sessionStorage.getItem(UserURL); /* Gets the avatar saved in local storage (Fastest!)*/
var sHtml = '<a id="user_photo" style="float: left; margin-top: 3px; margin-right: 10px;" class="ipsUserPhoto" href="' + UserURL + '" title="' + UserTitle;
/* If avatar alread saved, then no request member profile! */
if(UserIMG) {
oThis.prepend(sHtml + '"><img class="ipsUserPhoto_mini" src="' + UserIMG + '" alt="" /></a>');
} else {
/* if not, then only request per session!!! */
/* Pre-loaded user img... */
oThis.prepend(sHtml + '" title="' + UserTitle + '"><img class="ipsUserPhoto_mini" src="' + def_img + '" alt="" /></a>');
// user img
jQuery(this).children('a').load(UserURL + ' #profile-advanced-right img:eq(0)', function() {
jQuery(this).children('img').attr('class','ipsUserPhoto_mini');
var profile_img = jQuery(this).children('img').attr('src');
//Saves the member avatar in local storage
sessionStorage.setItem(UserURL, profile_img);
});
}
oThis.find('a[href^="/u"]').insertBefore(jQuery(this));
});
//}, 10000);
});
Result:
So long,
JS
Re: How to add profile picture last topic HELP
JScript wrote:@Murphy999
Here's the code, just add with investment in all pages:
- Code:
/***
* Avatar in Recent Topics Widget!
* Version: phpbb3
* Only one request per session to read member profile to get avatar!
* Optimization by JScript - 2014/03/04
*/
jQuery(function () {
var sCSS = '' +
'<style>' +
'.ipsUserPhoto {' +
'background: none repeat scroll 0 0 #FFFFFF;' +
'border: 1px solid #D5D5D5 !important;' +
'box-shadow: 0 2px 2px rgba(0, 0, 0, 0.1);' +
'padding: 1px;' +
'}' +
'.ipsUserPhoto_mini {' +
'height: 30px;' +
'width: 30px;' +
'}' +
'</style>';
document.head.insertAdjacentHTML('beforeEnd', sCSS);
/* DOM chached for fast execution! */
//var widgetLeft = jQuery('#left')[0]; // Left widget;
var widgetRight = jQuery('#right')[0]; // Right widget;
var oTarget = $(widgetRight).find('.module .inner a[href^="/t"]');
//setTimeout(function() {
oTarget.each(function () {
oThis = jQuery(this); /* DOM chached for fast execution! */
var temp = oThis.next().next();
var UserURL = temp.attr('href');
var UserTitle = temp.text();
var def_img = "http://i78.servimg.com/u/f78/18/17/62/92/defaul10.png"; /* In case request profile errors! */
var UserIMG = 0;//sessionStorage.getItem(UserURL); /* Gets the avatar saved in local storage (Fastest!)*/
var sHtml = '<a id="user_photo" style="float: left; margin-top: 3px; margin-right: 10px;" class="ipsUserPhoto" href="' + UserURL + '" title="' + UserTitle;
/* If avatar alread saved, then no request member profile! */
if(UserIMG) {
oThis.prepend(sHtml + '"><img class="ipsUserPhoto_mini" src="' + UserIMG + '" alt="" /></a>');
} else {
/* if not, then only request per session!!! */
/* Pre-loaded user img... */
oThis.prepend(sHtml + '" title="' + UserTitle + '"><img class="ipsUserPhoto_mini" src="' + def_img + '" alt="" /></a>');
// user img
jQuery(this).children('a').load(UserURL + ' #profile-advanced-right img:eq(0)', function() {
jQuery(this).children('img').attr('class','ipsUserPhoto_mini');
var profile_img = jQuery(this).children('img').attr('src');
//Saves the member avatar in local storage
sessionStorage.setItem(UserURL, profile_img);
});
}
oThis.find('a[href^="/u"]').insertBefore(jQuery(this));
});
//}, 10000);
});
Result:
So long,
JS
Hi,
it not work, i add code in "Javascript codes management" and tick "in all the page".
i not understand, where do you add the code?
you can tell me step by step please.
thank you very much
Murphy999- New Member
- Posts : 11
Reputation : 1
Language : Thai
Re: How to add profile picture last topic HELP
Please post your forum's link.
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.
Similar topics
» how can I get a picture of illiweb a picture in a topic or response
» Picture profile
» Picture Profile
» PNG Profile picture
» profile picture
» Picture profile
» Picture Profile
» PNG Profile picture
» profile picture
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum