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.

How to add profile picture last topic HELP

View previous topic View next topic Go down

How to add profile picture last topic HELP

Post by Murphy999 on March 4th 2014, 6:03 am

Hi dear, all

I come form Thailand, I am weak in English  bwi , 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

Back to top Go down

Re: How to add profile picture last topic HELP

Post by JScript on March 4th 2014, 6:31 am

Hello!
We need to know which version of your forum!

Read this: http://help.forumotion.com/t130972-how-can-i-add-avatar-in-recent-topics-widget#878472

So long,

JS

JScript
Forumember

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

http://jscript.forumeiros.com/

Back to top Go down

Re: How to add profile picture last topic HELP

Post by Murphy999 on March 4th 2014, 6:49 am

PHPBB3

Murphy999
New Member

Posts : 11
Reputation : 1
Language : Thai

Back to top Go down

Re: How to add profile picture last topic HELP

Post by Murphy999 on March 4th 2014, 10:51 am

@JScript wrote:Hello!
We need to know which version of your forum!

Read this: http://help.forumotion.com/t130972-how-can-i-add-avatar-in-recent-topics-widget#878472

So long,

JS

Doesn't work  beu

Murphy999
New Member

Posts : 11
Reputation : 1
Language : Thai

Back to top Go down

Re: How to add profile picture last topic HELP

Post by JScript on March 4th 2014, 12:09 pm

@Murphy999 wrote:Doesn't work  beu
You know why it did not 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

JScript
Forumember

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

http://jscript.forumeiros.com/

Back to top Go down

Re: How to add profile picture last topic HELP

Post by Murphy999 on March 4th 2014, 12:13 pm

@JScript wrote:
@Murphy999 wrote:Doesn't work  beu
You know why it did not 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  Laughing

Murphy999
New Member

Posts : 11
Reputation : 1
Language : Thai

Back to top Go down

Re: How to add profile picture last topic HELP

Post by Pizza Boi on March 4th 2014, 12:14 pm

@JScript wrote:
@Murphy999 wrote:Doesn't work  beu
You know why it did not 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 Very Happy

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

Male Posts : 2016
Reputation : 160
Language : French
Location : Pizza Hut!

http://redlustempire.forumtl.com/

Back to top Go down

Re: How to add profile picture last topic HELP

Post by JScript on March 4th 2014, 12:29 pm

@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

JScript
Forumember

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

http://jscript.forumeiros.com/

Back to top Go down

Re: How to add profile picture last topic HELP

Post by Murphy999 on March 5th 2014, 3:09 am

@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, Smile 
 
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

Back to top Go down

Re: How to add profile picture last topic HELP

Post by SLGray on March 5th 2014, 5:38 am

Please post your forum's link.


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


SLGray
Administrator
Administrator

Male Posts : 36697
Reputation : 2445
Language : English
Location : United States

http://ztwds.forumotion.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