1
yomhatiqva
Xoopmembers result page in 2 o 3 rows
  • 2006/11/20 12:15

  • yomhatiqva

  • Just popping in

  • Posts: 10

  • Since: 2006/11/20


Hi

I desesperatly try to find an issue to this topic... I would like to get the Xoopmembers result page with 2 o 3 users per row instead of one user per row. How can i get this ? I think i could alterate the xoopsmembers_searchresult.html with an <{if $clip.id is div by 3}> like in smartmedia, but i don't see wich variable to input instead of clip.id (it might be something like <{$users[i].???}> or something else ?

Thanks a lot

2
zyspec
Re: Xoopmembers result page in 2 o 3 rows
  • 2006/11/20 13:06

  • zyspec

  • Module Developer

  • Posts: 1095

  • Since: 2004/9/21


Just use Smarty's iteration feature...

So something like:

<{if $smarty.section.i.iteration is div by 3}>

3
yomhatiqva
Re: Xoopmembers result page in 2 o 3 rows
  • 2006/11/20 13:13

  • yomhatiqva

  • Just popping in

  • Posts: 10

  • Since: 2006/11/20


Thanks, but how do you include this ? I mean i tryed to include this in xoopsmembers_searchresults like this:


<{section name=i loop=$users}>
<tr valign="middle">
<td align="center" width="112"><a href="<{$xoops_url}>/userinfo.php?uid=<{$users[i].id}>">
<p style="margin-top: 2px; margin-bottom: 2px" align="center"><{$users[i].avatar}></a>&nbsp; </p>
<p style="margin-top: 2px; margin-bottom: 2px" align="center"><{$users[i].name}>&nbsp; </p>
<p style="margin-top: 2px; margin-bottom: 2px">
</td><td align="center">
<table border="0" width="100%" id="table1">
<tr>
<td align="left" width="20%"><b><font color="#FF0000"><{$users[i].icq}></font></b></td>
<td align="left" width="20%"><font color="#0000FF"><{$users[i].genre}></font></td>
<td align="left" width="30%"><font color="#008000"><{$users[i].planete}></font></td>
<td align="left" width="18%"><a href="<{$xoops_url}>/userinfo.php?uid=<{$users[i].id}>"><{$users[i].pmlink}></a></td>
</tr>
<tr>
<td align="left" colspan="4">
<p align="center"><font color="#0000FF"><{$users[i].online}></font>
</td>
</tr>
</table>
</td>
<{if $smarty.section.i.iteration is div by 3}>
</tr>
<tr>
<{/if}>
</tr>
<{/section}>


But it doesn't seem to run

4
yomhatiqva
Re: Xoopmembers result page in 2 o 3 rows
  • 2006/11/20 13:24

  • yomhatiqva

  • Just popping in

  • Posts: 10

  • Since: 2006/11/20


Thanks a lot i fixed it

5
Quest
Re: Xoopmembers result page in 2 o 3 rows
  • 2006/11/20 14:46

  • Quest

  • Friend of XOOPS

  • Posts: 1034

  • Since: 2005/11/19


Excellent idea! So how did you actually do it?

Thanks
Quest

6
yomhatiqva
Re: Xoopmembers result page in 2 o 3 rows
  • 2006/11/20 15:11

  • yomhatiqva

  • Just popping in

  • Posts: 10

  • Since: 2006/11/20


Here is the final code:

<a href="index.php"><{$lang_search}></a>&nbsp;<span style="font-weight:bold;">»»</span>&nbsp;<{$lang_results}><br /><br />

<{if $total_found != 0}>
<div align="center">
<table cellspacing="1" background-image="http://elchileloco.free.fr/fonds/fundosemi.png" style="border-collapse: collapse; border-left-width:0px; border-right-width:0px; border-bottom-width:0px" border="1" bordercolorlight="#EBF4F8">
<tr valign="middle" style="background-image: url('http://elchileloco.free.fr/fonds/fundosemi.png')">
<{section name=i loop=$users}>
<td align="center" style="border-style: none; border-width: medium"><a href="<{$xoops_url}>/userinfo.php?uid=<{$users[i].id}>">
<p style="margin-top: 2px; margin-bottom: 2px" align="center"><{$users[i].avatar}></a>&nbsp; </p>
<p style="margin-top: 2px; margin-bottom: 2px" align="center"><{$users[i].name}>&nbsp;<{$users[i].online}> </p>
<p style="margin-top: 2px; margin-bottom: 2px">
</td><{if $smarty.section.i.iteration is div by 4}>
</tr>
<tr valign="middle" style="background-image: url('http://elchileloco.free.fr/fonds/fundosemi.png')">
<{/if}>
<{/section}>
</tr>
</table>
</div>
<div style="text-align:center; background-image:url('http://elchileloco.free.fr/fonds/fundo600azul.png')">
<{$pagenav}>
<{$lang_numfound}>
</div>
<{else}>
<{$lang_nonefound}>
<{/if}><p>&nbsp;</p>

Greetings

Login

Who's Online

164 user(s) are online (85 user(s) are browsing Support Forums)


Members: 0


Guests: 164


more...

Donat-O-Meter

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

Latest GitHub Commits