1
waleedpak
Yogurt "My Friends" Block
  • 2008/2/10 4:30

  • waleedpak

  • Just popping in

  • Posts: 45

  • Since: 2007/11/25


hi there...
is there any hack so that the yogurt social network's "my friends" block shows 6 friends in just 3 rows, meaning 2 friends in each row....

the default is 6 friends in 6 rows....
thats a lot of trouble since it takes a lot space..


please help me////??

2
mjoel
Re: Yogurt "My Friends" Block
  • 2008/2/10 6:15

  • mjoel

  • Quite a regular

  • Posts: 325

  • Since: 2006/12/9


do you mean the block in your account page or the top page friends blocks ?

this is for the top page friends block...i didn't tried this but i think it should work...you can also modify this code to change the friend section in your account page

open yogurt/templates/yogurt_block_friends.html


find & replace this


<{section name=i loop=$block.friends}>
    <
div style="width:80%; text-align: center; page-break-after: always; margin: auto; page-break-before: always;">
    <
a href="<{$xoops_url}>/modules/yogurt/index.php?uid=<{$block.friends[i].uid}>"  title="<{$block.friends[i].uname}>"><{ if $block.friends[i].user_avatar=="blank.gif" }> <img src="<{$xoops_url}>/modules/yogurt/images/noavatar.gif" /> <{else}> <img src="<{$xoops_upload_url}>/<{$block.friends[i].user_avatar}>" /><{/if}><br /><{$block.friends[i].uname}> a>
    <
br /><a href='javascript:openWithSelfMain("<{$xoops_url}>/pmlite.php?send2=1&to_userid=<{$block.friends[i].uid}>","pmlite",500,450);'><img src="<{$xoops_url}>/images/icons/pm.gif" />a>
    div><br />
<{/
section}>
<
a href="<{$xoops_url}>/modules/yogurt/friends.php"><{$block.lang_allfriends}>a>



with this

<{section name=i loop=$friends}>
 <{if 
$smarty.section.i.first}><table><{/if}>
  <{if 
$smarty.section.i.iteration == }><tr><{/if}>

<
td valign="top">
   
 <
a href="<{$xoops_url}>/modules/yogurt/index.php?uid=<{$block.friends[i].uid}>"  title="<{$block.friends[i].uname}>"><{ if $block.friends[i].user_avatar=="blank.gif" }> <img src="<{$xoops_url}>/modules/yogurt/images/noavatar.gif" /> <{else}> <img src="<{$xoops_upload_url}>/<{$block.friends[i].user_avatar}>" /><{/if}><br /><{$block.friends[i].uname}> a>
    <
br /><a href='javascript:openWithSelfMain("<{$xoops_url}>/pmlite.php?send2=1&to_userid=<{$block.friends[i].uid}>","pmlite",500,450);'><img src="<{$xoops_url}>/images/icons/pm.gif" />a>
  <
br />

td>
<{if 
$smarty.section.i.iteration == }>tr><{/if}>
  <{if 
$smarty.section.i.last}>
    <{if (
$smarty.section.i.iteration == 1)}><td colspan="2" valign="top">td><{/if}>
 
tr>table
  <{/if}>
<{/
section}>
<
a href="<{$xoops_url}>/modules/yogurt/friends.php"><{$block.lang_allfriends}>a>

3
waleedpak
Re: Yogurt "My Friends" Block
  • 2008/2/10 14:27

  • waleedpak

  • Just popping in

  • Posts: 45

  • Since: 2007/11/25


yeah...
thanks a lot for the help...
but there was a slight mistake with the
PM javascript

i modified it a bit
here's the code...


<{section name=i loop=$block.friends}>
<{if $smarty.section.i.first}><{/if}>
<{if $smarty.section.i.iteration % 2 == 1 }><{/if}>


<{if $smarty.section.i.iteration % 2 == 2 }><{/if}>
<{if $smarty.section.i.last}>
<{if ($smarty.section.i.iteration % 2 == 1)}><{/if}>


<{ if $block.friends[i].user_avatar=="blank.gif" }> <{else}> <{/if}>
<{$block.friends[i].uname}>









<{/if}>
<{/section}>
<{$block.lang_allfriends}>


thanks a lot man anyway......

Login

Who's Online

264 user(s) are online (233 user(s) are browsing Support Forums)


Members: 0


Guests: 264


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits