Good art is a taste, good design is an opinion.


Come as guest, stay as family.
Board Index

Come as guest, stay as family.


You are not connected. Please login or register

Foto

[Solved] How can I add Avatar?



View previous topic View next topic Go down Message [Page 1 of 1]

1
Offline

  Van-Helsing

Van-Helsing
★Moderator★
★Moderator★
Hi all,
I am using this skin https://punbb-design.forumotion.com/t302-ipb-default-taken-from-punbb-design-v10 and I want to place avatar here http://prntscr.com/301cbf . Can you help me please?

Best Regards,
Dark-Avenger

Powered by PunBB
Currently 0 users have thanked Van-Helsing for this post:

2
Offline

  KiNGphx

KiNGphx
Punbb Guru
Punbb Guru
can you explain more?

Powered by PunBB
Currently 0 users have thanked KiNGphx for this post:

3
Offline

  Shadow

Shadow
Administrator
Administrator
We're using here the fa_toolbar, however you can integrate that with custom toolbar too.

All you need to do is to find desired location and put this javascript at toolbar to take avatar from the user.

Code:
[panda=js]  <script>
jQuery(document).ready(function(){
  jQuery.get('/profile?mode=editprofile&page_profil=avatars', function(data) {
      link = jQuery('.frm dl dd img', data).attr('src');
      if(link){
                            jQuery('#avatar').html('<center><img src="'+link+'" alt="" /></center>');
      }else{
        jQuery('#avatar').html('');
      }
  });
});
</script><div id="avatar"></div>

Powered by PunBB
Currently 0 users have thanked Shadow for this post:

4
Offline

  Van-Helsing

Van-Helsing
★Moderator★
★Moderator★
Hi,
This is not the fa toolbar this a modification in overall_header template. This element called #user_navigation. How can I add the avatar there?

Best Regards,
Dark-Avenger

Powered by PunBB
Currently 0 users have thanked Van-Helsing for this post:

5
Offline

  Shadow

Shadow
Administrator
Administrator
Dark-Avenger wrote:[link="/t363-how-can-i-add-avatar#2165"]Hi,
This is not the fa toolbar this a modification in overall_header template. This element called #user_navigation. How can I add the avatar there?

Best Regards,
Dark-Avenger
Use the javascript provided in post above.

Powered by PunBB
Currently 0 users have thanked Shadow for this post:

6
Offline

  Van-Helsing

Van-Helsing
★Moderator★
★Moderator★
Shadow wrote:[link="/t363-how-can-i-add-avatar#2168"]
Dark-Avenger wrote:[link="/t363-how-can-i-add-avatar#2165"]Hi,
This is not the fa toolbar this a modification in overall_header template. This element called #user_navigation. How can I add the avatar there?

Best Regards,
Dark-Avenger
Use the javascript provided in post above.
Hi,
I am trying to add it in overall_header and its color is black that means the template cannot accepted as correct code. Can you help me?

Powered by PunBB
Currently 0 users have thanked Van-Helsing for this post:

7
Offline

  Shadow

Shadow
Administrator
Administrator
The code works as intended, paste the outcome from javascript inspector.
[Solved] How can I add Avatar? ZS8i1Vi

Powered by PunBB
Currently 0 users have thanked Shadow for this post:

8
Offline

  Guest

Anonymous
Guest
Hi I can confirm that this method works after adding this piece of code in my overall_header next to my custom userbar.

Is the problem solved Dark-Avenger?

Powered by PunBB
Currently 0 users have thanked Guest for this post:

9
Offline

  Van-Helsing

Van-Helsing
★Moderator★
★Moderator★
Rapid wrote:[link="/t363-how-can-i-add-avatar#2188"]Hi I can confirm that this method works after adding this piece of code in my overall_header next to my custom userbar.

Is the problem solved Dark-Avenger?
Hi Rapid,
Here is my overall_header template:
Spoiler:
but I dont know in which point must I add the javascript. Can you help me please?

Best Regards,
Dark-Avenger

Powered by PunBB
Currently 0 users have thanked Van-Helsing for this post:

10
Offline

  Guest

Anonymous
Guest
Add the code below the
Code:
<li><a id="user_link" href="/profile?mode=editprofile" title="Προφίλ"><span class="USERNAME"></span></a></li>
Also, suggest you to add from Shadow code [ic]jQuery('#avatar').html('<center><img src="'+link+'" width="35px" height="35px" /></center>');[/ic]

Powered by PunBB
Currently 0 users have thanked Guest for this post:

11
Offline

  Van-Helsing

Van-Helsing
★Moderator★
★Moderator★
Rapid wrote:[link="/t363-how-can-i-add-avatar#2192"]Add the code below the
Code:
<li><a id="user_link" href="/profile?mode=editprofile" title="Προφίλ"><span class="USERNAME"></span></a></li>
Also, suggest you to add from Shadow code [ic]jQuery('#avatar').html('<center><img src="'+link+'" width="35px" height="35px" /></center>');[/ic]
I have add the code and the result looks like this http://prntscr.com/30r0h1

Powered by PunBB
Currently 0 users have thanked Van-Helsing for this post:

12
Offline

  Shadow

Shadow
Administrator
Administrator
You have to put whole code not just what rapid linked you.

So the final code would be(with rapid's edition)

Code:
[panda=html]          <script>
        jQuery(document).ready(function(){
          jQuery.get('/profile?mode=editprofile&page_profil=avatars', function(data) {
              link = jQuery('.frm dl dd img', data).attr('src');
              if(link){
                                    jQuery('#avatar').html('<center><img src="'+link+'" width="25px" height="25px" /></center>');
              }else{
                jQuery('#avatar').html('');
              }
          });
        });
        </script><div id="avatar"></div>


Powered by PunBB
Currently 0 users have thanked Shadow for this post:

13
Offline

  Van-Helsing

Van-Helsing
★Moderator★
★Moderator★
Thank you very much with some modifications in my template I did it.
Problem solved

Best Regards,
Dark-Avenger

Powered by PunBB
Currently 0 users have thanked Van-Helsing for this post:

14
Offline

  Shadow

Shadow
Administrator
Administrator
Problem Solved => Locked.

Powered by PunBB
Currently 0 users have thanked Shadow for this post:

15
Offline

  Sponsored content



Powered by PunBB
Currently 0 users have thanked Sponsored content for this post:

View previous topic View next topic Back to top Message [Page 1 of 1]


Topic URL's

URL
BBcode
HTML

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