News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Buddies Block

Started by Mr. Pedram, June 06, 2013, 09:54:41 AM

Previous topic - Next topic

Mr. Pedram

Link to Mod

Buddies Block v1.0
Add a buddies block to users profile

Features

. Buddies block in users profile with counter
. Manage permissions for each group
. Set number of buddies for showing in block
. Show Add or remove buddy icon in posts

Compatibility

SMF 2.0.x with all themes
RTL Support
UTF-8 Support

Mod by

Mr. Pedram

*This MOD Made Exclusively For Horror Game*
**Using default Facebook's avatar and some inspired from [Tip/Trick]Add Buddy Button On Post by ahrasis and Kays for add or remove buddy icon in posts**


This mod is licensed under a CC BY-NC-ND 3.0
My Modifications:
» Loading For SMF
» Buddies Block
» Redirect Links
» Birthdate On Registration
» PM Warning
» Instagram
» Add Table,Td,Tr Button
» Search Topic & Board Button
Browse All...

FrizzleFried

Why does my permissions screen look nothing like yours?  I am running stock SMF theme.

I have two entries... both say "VIEW BUDDIES BLOCK" with three bubbles to choose from next to it representing A, X, D.   I do not have a drop down with OWN BUDDIES,  OTHERS BUDDIES, etc... my whole permissions screen doesn't have the "tabbed sub selections" shown in your screenshot?!


Shambles

Quote
Why does my permissions screen look nothing like yours?  I am running stock SMF theme.
Could it be that you're using "simple view"? Try changing yours to "classic view" (a tab feature within the permissions screen).

The "A, X, D" may be because you've not got "permissions denials" switched on (Manage Permissions > Settings >  Enable the option to deny permissions"

DeroZ

Hi, nice mode but i've a little problem, how i can hide noavatar.png when users already have one?

look:

FrizzleFried

Yeah... I noticed that too... avatars with transparent backgrounds run over the top of the "NO AVATAR" place holder...

Mr. Pedram

Actually i made this part with css, and there's no option to do this via css. i'll working with php for next update.
but for now, you can try this to hide:

In CSS:

Code (Find) Select
.buddy_avatar img {
    width: 35px;
    height: auto;
    position: relative;
}


Code (Replace) Select
.buddy_avatar img {
    width: 35px;
    height: 35px;
    position: relative;
}
My Modifications:
» Loading For SMF
» Buddies Block
» Redirect Links
» Birthdate On Registration
» PM Warning
» Instagram
» Add Table,Td,Tr Button
» Search Topic & Board Button
Browse All...

FrizzleFried

#6
Well... that stretches the avatars to cover the entire area... however transparent areas still show the "placeholder" below...

EDIT: Thanks for the efforts though... :)  Didn't mean for the above post to sound so ... terse.

;)


Hj Ahmad Rasyid Hj Ismail


Mr. Pedram

My Modifications:
» Loading For SMF
» Buddies Block
» Redirect Links
» Birthdate On Registration
» PM Warning
» Instagram
» Add Table,Td,Tr Button
» Search Topic & Board Button
Browse All...

Cat McFarlane

#9
Hi :-)

Unable to view buddies avatars in profile box. And have just let site testers in, and one of them has asked if there is a notification when you are buddied. Please let me know any screenshots you need re unable to view buddies avatars.

Thanks, Cat

Mr. Pedram

Quote from: Cat McFarlane on August 10, 2013, 03:25:16 PM
Hi :-)

Unable to view buddies avatars in profile box. And have just let site testers in, and one of them has asked if there is a notification when you are buddied. Please let me know any screenshots you need re unable to view buddies avatars.

Thanks, Cat

What theme you are using?
and please attach a screenshot for me.

for second question, it's good idea
maybe in future  ;)
My Modifications:
» Loading For SMF
» Buddies Block
» Redirect Links
» Birthdate On Registration
» PM Warning
» Instagram
» Add Table,Td,Tr Button
» Search Topic & Board Button
Browse All...

Padre gremista

How repair the error in image annexed? The image of members is much large.
www.gremioemfoco.info - A comunidade gremista na internet.

DSystem

Great mod.

Translation to Portuguese Brazil.

<file name="$languagedir/Modifications.portuguese_brazilian.php">
<operation>
<search position="end" />
<add><![CDATA[
//Buddies Block MOD

$txt['bb_enable'] = '<b>Ativar lista de amigos</b> <p><i>(Além disso, verifique as configurações das permissões)</i></p>';
$txt['bb_number'] = 'Número de amigos na lista <p><i>(deixe em branco para default)</i></p>';
$txt['empty_bb'] = ' sua lista de amigos está vazia!';
$txt['empty_bb_owner'] = 'Sua lista de amigos está vazia, ';
$txt['empty_bb_owner_link'] = 'Adicionar como amigo!';
$txt['permissionname_bb_view'] = 'Ver lista de amigos';
$txt['permissionhelp_bb_view'] = 'Essa permissão permite que os usuários exibir lista de amigos no seu perfil.';
$txt['permissionname_bb_view_own'] = 'Meus amigos';
$txt['permissionname_bb_view_any'] = 'Outros amigos';
$txt['bb_icon'] = 'Mostrar ícone Adicionar / Remover amigo em mensagens';
$txt['buddy_add'] = 'Adicionar à lista de amigos';
$txt['buddy_remove'] = 'Remover da Lista de Amigos';
    ]]></add>
</operation>
</file>

<file name="$languagedir/Modifications.portuguese_brazilian-utf8.php" error="skip">
<operation>
<search position="end" />
<add><![CDATA[
//Buddies Block MOD

$txt['bb_enable'] = '<b>Ativar lista de amigos</b> <p><i>(Al&eacute;m disso, verifique as configura&ccedil;&otilde;es das permiss&otilde;es)</i></p>';
$txt['bb_number'] = 'N&uacute;mero de amigos na lista <p><i>(deixe em branco para default)</i></p>';
$txt['empty_bb'] = ' sua lista de amigos est&aacute; vazia!';
$txt['empty_bb_owner'] = 'Sua lista de amigos est&aacute; vazia, ';
$txt['empty_bb_owner_link'] = 'Adicionar como amigo!';
$txt['permissionname_bb_view'] = 'Ver lista de amigos';
$txt['permissionhelp_bb_view'] = 'Essa permiss&atilde;o permite que os usu&aacute;rios exibir lista de amigos no seu perfil.';
$txt['permissionname_bb_view_own'] = 'Meus amigos';
$txt['permissionname_bb_view_any'] = 'Outros amigos';
$txt['bb_icon'] = 'Mostrar í&iacute;cone Adicionar / Remover amigo em mensagens';
$txt['buddy_add'] = 'Adicionar &agrave; lista de amigos';
$txt['buddy_remove'] = 'Remover da Lista de Amigos';
    ]]></add>
</operation>
</file>


DSystem

Quote from: Padre gremista on July 07, 2014, 11:52:48 PM
How repair the error in image annexed? The image of members is much large.

The size of the work perfectly here.

You get errors during installation?

Press F5 in your browser. Maybe you haven't updated the index.css

Os tamanho dos funcionaram perfeitamente aqui.
Você obteve erros durante a instalação?
Pressione F5 no seu navegador. Talvez não tenha atualizado o index.css

Padre gremista

Quote from: DSystem on July 09, 2014, 09:15:04 AM
Quote from: Padre gremista on July 07, 2014, 11:52:48 PM
How repair the error in image annexed? The image of members is much large.

The size of the work perfectly here.

You get errors during installation?

Press F5 in your browser. Maybe you haven't updated the index.css

Os tamanho dos funcionaram perfeitamente aqui.
Você obteve erros durante a instalação?
Pressione F5 no seu navegador. Talvez não tenha atualizado o index.css

Yes, it works. Thanks. Nice mod.
www.gremioemfoco.info - A comunidade gremista na internet.

gaurav09

i installed : http://www.simplemachines.org/community/index.php?topic=505334.0
and it is awesome mod but a problem in it :(
in profile buddies images are showing so big that it's coming in full page..And big images are not resizing itself into small.
Moreover buddies block is coming in between description of a user.
=========================
http://i.imgur.com/ogV4i7u.jpg
http://i.imgur.com/8V85WwR.jpg
=============================
i am using 2.0.8 smf version.

please fix the error.

ittiphol

from this mod

http://custom.simplemachines.org/mods/index.php?mod=3681

how to

1 resize avatar
2 display name
3 show to index page

thank you  ;)

samborabora

Just install Buddy's Block, works so far on the profile page as it should. Tried to add it to a SimplePortal block, which should just take Custom PHP, and works for other scripts in there, how can I get this to display in SimplePortal? I'm just showing the block on the Board Index.

margarett

Which code are you using in SP?
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

samborabora

Quote from: margarett on July 23, 2014, 04:15:35 PM
Which code are you using in SP?

Sorry, I forgot to post that bit!  :-\


   // Start Buddies Block!

if (!empty($modSettings['bb_enable']) && $context['can_bb_view'])
   {
     echo'
<div class="cat_bar">
<h3 class="catbg">
<span class="ie6_header floatleft"><img src="', $settings['images_url'], '/icons/online.gif" alt="" class="icon" />
', $txt['buddies'], ' <span>(', count($context['member']['buddies']), ')</span></span></h3></div>
<div class="windowbg">
<span class="topslice"><span></span></span>
<div class="buddy_block">';

   // Show Buddies!

     global $memberContext;
if (empty($modSettings['bb_number']))
          $modSettings['bb_number'] = 20;
          $i=0;
foreach($context['member']['buddies'] as $buddy)
   {
if (++$i > $modSettings['bb_number'])
break;
          $buddy = $memberContext[$buddy];
     echo '
<a title="', $buddy['name'], '" href="', $scripturl, '?action=profile;u=', $buddy['id'], '">
<div id="basicavatar" class="buddy_avatar">', $buddy['avatar']['image'], '</div></a>';
   }

   // If don't have buddy!
if (empty($buddy) && (!$context['user']['is_owner']))
     echo '
<span class="buddy">', $context['member']['name'], '', $txt['empty_bb'], '</span>';

if (empty($buddy) && ($context['user']['is_owner']))
     echo'
<span class="buddy">', $txt['empty_bb_owner'], '<a href="', $scripturl, '?action=profile;area=lists;u=', $context['id_member'], '">', $txt['empty_bb_owner_link'], '</a></span>';

   // End Buddies Block!
     echo'

</div>
<span class="botslice"><span></span></span>
</div>';
   }
     echo'
</div>

Advertisement: