We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

How can i set avatars show as full size when clicking on them? | Forum

jeo
jeo Aug 15 '12
Is they away to set uses avatars to show as full size images?
Andreas
Andreas Aug 17 '12
The original files are still there :D.
You can find all Avatars here: ow_userfiles/plugins/base/avatars

There are three sizes. Without any Tag (small), big and original.
Andreas
Andreas Aug 17 '12
Go to this File:
ow_system_plugins\base\views\components\user_avatar_widget.html

Replace the Javascript like this:
{if $owner}
    {literal}
    <script language="javascript" type="text/javascript">
        $(function(){
            $("#avatar-console").hover(
              function(){
                $("#avatar-change").fadeIn("fast");
              },
              function(){
                $("#avatar-change").fadeOut("fast");
              }
          );
          $("#avatar-console").click(function() {
            {/literal}
            var url = '{$avatar}';
            {literal}
            url = url.replace(/avatar_big/, "avatar_original");
            document.location = url;
          });
       });
    </script>
    {/literal}       
{/if}

Its not perfect, but the script does what you want :D Full size Image.
The Forum post is edited by Andreas Aug 17 '12
jeo
jeo Aug 18 '12
so this mean i can click on the avatars and they pop up showing full size? and thanks i give this a go as soon as its what i need, :)
Andreas
Andreas Aug 18 '12
Its no popup. The file is opened in the Browser like Fullsize Photogalerie Files.
jeo
jeo Aug 18 '12
ok i give it a go and see how it looks :) thanks
DesignOX
DesignOX Sep 1 '12
This don't work.
Andreas
Andreas Sep 2 '12

Have you cleared the cache? Under ow_static/template_c

 

You csn also temporarly switch your theme. That clears the cache two

The Forum post is edited by Andreas Sep 2 '12
DesignOX
DesignOX Sep 5 '12
This works on our own profiles only.. We can't display other users avatar in fullsize.
Andreas
Andreas Sep 5 '12
Sorry, my fault.

{if $owner}
    {literal}
    <script language="javascript" type="text/javascript">
        $(function(){
            $("#avatar-console").hover(
              function(){
                $("#avatar-change").fadeIn("fast");
              },
              function(){
                $("#avatar-change").fadeOut("fast");
              }
            );
       });
    </script>
    {/literal}       
{/if}
{literal}
<script language="javascript" type="text/javascript">
    $(function(){
        $("#avatar-console").click(function() {
              {/literal}
              var url = '{$avatar}';
              {literal}
              url = url.replace(/avatar_big/, "avatar_original");
              document.location = url;
        });
   });
{/literal}
</script>

Now it works ;) I've tested it.
The Forum post is edited by Andreas Sep 5 '12
Jordi
Jordi Dec 4 '15
How to do this in 1.8? 


thanks

Oxwall Accessories
Oxwall Accessories Dec 22 '15

If I'm not mistaken this plugin gives you the ability you are looking for. 

http://www.oxwall.org/store/item/581
Jordi
Jordi Dec 22 '15
No that plugin conflicts with some other plugins and also avatar photo's stay when the user is deleted