Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: Bulakbol on January 04, 2009, 02:26:23 PM

Title: Latest Members
Post by: Bulakbol on January 04, 2009, 02:26:23 PM
Link to Mod (http://custom.simplemachines.org/mods/index.php?mod=1581)

Author: Bulakbol   Mod Name: LatestMembers  Version: 1.0 Tested: Freshly installed SMF 1.1.7 and SMF 2.0 Beta 4
Supported SMF 2.0 Beta 4 Themes Supported SMF 1.1.7 Themes Supported languages Supports Tiny Portal and Simple Portal's block.
Happy New Year 2009!!

January 17, 2009

February 18, 2009
Title: Re: Latest Members
Post by: Burke ♞ Knight on January 04, 2009, 02:28:33 PM
Nice one, my friend. :)
Title: Re: Latest Members
Post by: TW1ST3D on January 04, 2009, 03:57:15 PM
Cool Mod !!  Is there any way to relpace the Key Stats Box with this mod?
Title: Re: Latest Members
Post by: Yağız... on January 04, 2009, 04:05:19 PM
Nice mod Bulakbol. Turkish translation:
Code (Modifications.turkish.php) Select

$txt['number_members'] = 'Anasayfada gösterilecek son üye sayısı';
$txt['show_more_stats'] = '[Daha fazla istatistik] linkini anasayfada göster';
$txt['latest_members'] = 'Son Üyeler';

Code (Help.turkish.php) Select

$helptxt['number_members'] = 'Anasayfada gösterilecek son üye sayısını girin. 1\'den fazla olmalı.';
$helptxt['show_more_stats'] = 'Anasayfada Forum İstatistikleri bölümünde bulunan[Daha fazla istatistik] linkini göster.';

Code (Modifications.turkish-utf8.php) Select

$txt['number_members'] = 'Anasayfada gösterilecek son üye sayısı';
$txt['show_more_stats'] = '[Daha fazla istatistik] linkini anasayfada göster';
$txt['latest_members'] = 'Son Üyeler';

Code (Help.turkish-utf8.php) Select

$helptxt['number_members'] = 'Anasayfada gösterilecek son üye sayısını girin. 1\'den fazla olmalı.';
$helptxt['show_more_stats'] = 'Anasayfada Forum İstatistikleri bölümünde bulunan[Daha fazla istatistik] linkini göster.';
Title: Re: Latest Members
Post by: edi67 on January 05, 2009, 04:04:42 AM
intersting
Title: Re: Latest Members
Post by: chrisb on January 05, 2009, 04:11:44 AM
Well done on the new mod to the site
Title: Re: Latest Members
Post by: RIGILKENTARUS on January 05, 2009, 01:26:06 PM
Latin Spanish translation

Modifications.spanish_latin.php

$txt['number_members'] = 'Número de los últimos miembros a mostrar en el índice del foro';
$txt['show_more_stats'] = 'Mostrar el enlace [Más Estadísticas] en el índice del foro';
$txt['latest_members'] = 'Últimos miembros';


Help.spanish_latin.php
$helptxt['number_members'] = 'Ingresar el número de últimos miembros a mostrar en el índice del foro. Debe ser mayor que 1.';
$helptxt['show_more_stats'] = 'Mostrar el enlace a [Más Estadísticas] en el índice del foro debajo de las "Estadísticas del Foro"';



Modifications on the Black45 Theme (the same as the default theme)
./Themes/Black45/BoardIndex.template.php



Find:
<td class="titlebg" colspan="2">', $txt[645], '</td>

Replace With:
<td class="titlebg" colspan="2">', latestMembersOnBoard(), ($settings['show_latest_member'] && $context['member_limit'] > 1) ? '<div style="float: right; padding-right: 135px;">
' . $context['member_limit'] . ' ' . $txt['latest_members'] . '</div>' : '', $txt[645], '
</td>



Find:
<span class="middletext">
', $context['common_stats']['total_posts'], ' ', $txt[95], ' ', $txt['smf88'], ' ', $context['common_stats']['total_topics'], ' ', $txt[64], ' ', $txt[525], ' ', $context['common_stats']['total_members'], ' ', $txt[19], '. ', $txt[656], ': <b> ', $context['common_stats']['latest_member']['link'], '</b>
<br /> ' . $txt[659] . ': <b>&quot;' . $context['latest_post']['link'] . '&quot;</b>  ( ' . $context['latest_post']['time'] . ' )<br />
<a href="', $scripturl, '?action=recent">', $txt[234], '</a>', $context['show_stats'] ? '<br />
<a href="' . $scripturl . '?action=stats">' . $txt['smf223'] . '</a>' : '', '
</span>


Replace With:
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
<span class="middletext">
', $context['common_stats']['total_posts'], ' ', $txt[95], ' ', $txt['smf88'], ' ', $context['common_stats']['total_topics'], ' ', $txt[64], ' ', $txt[525], ' ', $context['common_stats']['total_members'], ' ', $txt[19], '. ',
$context['member_limit'] > 1 ? '' : ($settings['show_latest_member'] ? $txt[656] . ': <b> ' . $context['common_stats']['latest_member']['link'] . '</b>' : ''), '
<br /> ' . $txt[659] . ': <b>&quot;' . $context['latest_post']['link'] . '&quot;</b>  ( ' . $context['latest_post']['time'] . ' )<br /><a href="', $scripturl, '?action=recent">', $txt[234], '</a>',
(isset($modSettings['show_more_stats']) && $modSettings['show_more_stats'] && $context['show_stats']) ? '<br /><a href="' . $scripturl . '?action=stats">' . $txt['smf223'] . '</a>' : '', '
</span>
</td>
', ($settings['show_latest_member'] && $context['member_limit'] > 1) ? '<td width="250" valign="middle" class="smalltext" align="left">' . implode($context['latest_members_dated'], '<br />') . '</td>' : '', '
</tr>
</table>
Title: Re: Latest Members
Post by: edi67 on January 05, 2009, 02:50:34 PM
is possibile have DATA of registration of new user in same format language used? i means , i have italian language and DATA of registration of 3 last users is wrote in english (Jan, ecc.. ) in italian is different i can have format that use italian language?
Title: Re: Latest Members
Post by: TW1ST3D on January 06, 2009, 05:40:42 PM
Works on Heavily Modded 1.1.7 forum !!!   Kudos !!
Title: Re: Latest Members
Post by: Bulakbol on January 08, 2009, 10:03:15 PM
Thanks guys for all your compliments. Appreciated.

@TW1ST3D
You mean, the babylon theme, right? Yes, it is possible. Try this one. Edit index.template.php, find
', $txt[656], ': <b> ', $context['common_stats']['latest_member']['link'], '</b>

and replace with
', latestMembersOnBoard(), ($settings['show_latest_member'] && $context['member_limit'] > 1) ? $context['member_limit'] . ' ' . $txt['latest_members'] . ': <div style="padding-left: 20px;"><b>' . implode(', ', $context['latest_members_no_date']) . '</b></div>' :
$txt[656] . ': <b> ' . $context['common_stats']['latest_member']['link'] . '</b>


@Yağız
Thanks for the Turkish and utf8 language translation. I will add it today.

@RIGILKENTARUS
Thanks for the info and the Spanish_latin language translation . I know it will be benefecial to Black45 Theme users who want to install this mod.

@edi67
I uploaded a new package. Let me know if it will work. It will use the truncated months' name from languages/index.{language}.php called $txt['months_short'] for translating the month name.
Title: Re: Latest Members
Post by: edi67 on January 09, 2009, 05:50:52 AM
Quote from: Bulakbol on January 08, 2009, 10:03:15 PM

@edi67
I uploaded a new package. Let me know if it will work. It will use the truncated months' name from languages/index.{language}.php called $txt['months_short'] for translating the month name.


More better now bravo ;)

Italian Language:
$txt['number_members'] = 'Numero ultimi utenti da mostrare';
$txt['show_more_stats'] = 'Mostra il link [Altre Statistiche] sull\'indice';
$txt['latest_members'] = 'Ultimi Utenti Registrati';
Title: Re: Latest Members
Post by: willerby on January 10, 2009, 11:19:38 AM
I use a tailored version of Jade's Shadow People on my club forum and whilst the mod installed fine on 2.0 b4, in that theme the layout is a little screwed...

See attached:

- '3 Latest Members' title is not lined up with list of members
- mod pushes text down below shading leaving a large gap below the titles
- mod inserts latest members in a new shaded box within the existing table rather than overlay which looks odd

Any chance of looking at attached and suggesting fixes for these issues?

Many thanks for any help you can give. Great mod...

W
Title: Re: Latest Members
Post by: Bulakbol on January 12, 2009, 06:58:31 PM
@edi67
Thanks for the translation. I will add them to the next update.

@willerby
You probably edited your Boardindex.template.php too much.  :D You can attach your BoardIndex.template.php and I'll look at it. It seems that there are extra linefeeds in there.
Title: Re: Latest Members
Post by: willerby on January 13, 2009, 03:38:41 AM
Board index attached... ex Latest Member mod...

Thanks for your help

W
Title: Re: Latest Members
Post by: ManilaGurL on January 14, 2009, 01:45:25 AM
Hello, Bulakbol! LTNS  :D

Well, I got this error while trying to install this mod:

10.     Execute Modification     ./Themes/wowdk_114v1/BoardIndex.template.php     Skipping file
11.    Execute Modification    ./Themes/dilbermc/BoardIndex.template.php    Test failed
12.    Execute Modification    ./Sources/SPortal1-1.php    Skipping file

What should I do? Thanks!
Title: Re: Latest Members
Post by: Bulakbol on January 17, 2009, 02:45:59 PM
@willerby
I want to see the BoardIndex.template.php with the mod installed.

@Manilagurl
I'm glad to know it is now working fine.
Title: Re: Latest Members
Post by: willerby on January 17, 2009, 04:40:53 PM
Try this one.  Thanks

W
Title: Re: Latest Members
Post by: Bulakbol on January 17, 2009, 06:10:16 PM
@willerby
You said  Shadow People Theme. The file you attached to your post doesn't seem to be the right one.
Title: Re: Latest Members
Post by: willerby on January 17, 2009, 06:28:27 PM
I'm sorry...picked the wrong file from download folder...

This is my current board.index template file that produces the results as above using Shadow People

W
Title: Re: Latest Members
Post by: Bulakbol on January 17, 2009, 06:45:42 PM
@willerby
I cannot find anything wrong with your BoardIndex.template.php. There's is no space (linebreak) just like the image you posted. If you want to align the "X Latest Members" to the displayed list of members under it, find
Quote<div class="infocenter_section">', latestMembersOnBoard(), (!empty($settings['show_latest_member']) && $context['member_limit'] > 1) ? '<div class="headerpadding titlebg" style="float: right; padding-right: 154px;">
and change the 154 to less number. Try 134.
Title: Re: Latest Members
Post by: willerby on January 17, 2009, 07:06:47 PM
Now I'm confused...

Fresh install has neither the space or the extra shading on the memberlist.

I can only assume previous install conflicted with some other mod on my test-site at the time? I didn't imagine the screen image I copied but whatever, thanks for looking at. Sorry to bug you.

All looking good now...

Willerby.
Title: Re: Latest Members
Post by: Bulakbol on January 17, 2009, 07:22:40 PM
It could be the cache or yeah, could be caused by a conflict with other mods. Glad to know it is looking good now.
Title: Re: Latest Members
Post by: willerby on January 18, 2009, 04:11:51 PM
It came back. Its browser specific IE6 on XP...

Fine on IE7, Google Chrome and Firefox but leaves the line gap on IE6. No problem as users should upgrade but thought you might want to know.
Title: Re: Latest Members
Post by: Bulakbol on January 19, 2009, 01:44:14 PM
@willerby
I see. I thought everyone's using IE7 now. They should upgrade their browser to the latest version.
Title: Re: Latest Members
Post by: Sandmansa on February 10, 2009, 11:33:44 PM
I liked seeing what this mod looks like on DilberMC but I was wondering if it could be installed on Helios Multi (http://custom.simplemachines.org/themes/index.php?lemma=1) theme?
Title: Re: Latest Members
Post by: Bulakbol on February 17, 2009, 04:47:52 PM
I apologize for the delay.

@Sandmansa
You have to edit the BoardIndex.template.php manually. You can attach to your next post and I'll edit it after I updated all my mods.
Title: Re: Latest Members
Post by: Sandmansa on February 18, 2009, 02:14:17 AM
Thanks but a little to late.  I wound up barrowing some snips for other themes and came up with something that worked for helios.  I even intergraded the code to the installer so it will look for helios_multi11final and it works like a charm.  I could attach my updated version of this plugin if your interested?
Title: Re: Latest Members
Post by: Bulakbol on February 18, 2009, 11:38:47 PM
@Sandmansa
hehe it's easy isn't it. Good to know you did it yourself.  8)

This mod is now updated for 2.0 RC1 only.
Title: Re: Latest Members
Post by: Sandmansa on February 19, 2009, 09:33:47 PM
Well then, for anyone who want's it, here is the code I put together, that works on helios_multi11final.  Just add this to the install-1.xml or pick through the code and add it to the boardindex.template manually.

<!--Themes/helios_multi11final/BoardIndex.template.php -->
<file name="$boarddir/Themes/helios_multi11final/BoardIndex.template.php" error="skip">
<operation><!-- 390 -->
<search position="replace"><![CDATA[<td class="catbg" colspan="2">', $txt[645], '</td>]]></search>
<add><![CDATA[<td class="catbg" colspan="2">', latestMembersOnBoard(), ($settings['show_latest_member'] && $context['member_limit'] > 1) ? '<div style="float: right; padding-right: 145px;">
' . $context['member_limit'] . ' ' . $txt['latest_members'] . '</div>' : '', $txt[645], '
</td>]]></add>
</operation>
<operation><!-- 391 -->
<search position="replace"><![CDATA[<table border="0" width="90%"><tr>
                                <td class="smalltext">]]></search>
<add><![CDATA[<table border="0" width="100%"><tr>
<td width="50%" class="smalltext">]]></add>
</operation>
<operation><!-- 392 -->
<search position="replace"><![CDATA[<a href="', $scripturl, '?action=recent">', $txt[234], '</a>', $context['show_stats'] ? '<br />
                                        <a href="' . $scripturl . '?action=stats">' . $txt['smf223'] . '</a>' : '', ']]></search>
<add><![CDATA[<a href="', $scripturl, '?action=recent">', $txt[234], '</a>',
(isset($modSettings['show_more_stats']) && $modSettings['show_more_stats'] && $context['show_stats']) ? '<br /><a href="' . $scripturl . '?action=stats">' . $txt['smf223'] . '</a>' : '', ']]></add>
</operation>
<operation><!-- 393 -->
<search position="replace"><![CDATA[', $txt[488], ': <b><a href="', $scripturl, '?action=mlist">', $context['common_stats']['total_members'], '</a></b><br />
                                        ', $txt[656], ': <b>', $context['common_stats']['latest_member']['link'], '</b><br />';]]></search>
<add><![CDATA[', $txt[488], ': <b>', $context['show_member_list'] ? '<a href="' . $scripturl . '?action=mlist">' . $context['common_stats']['total_members'] . '</a>' : $context['common_stats']['total_members'], '</b><br />',
$context['member_limit'] > 1 ? '' : ($settings['show_latest_member'] ? $txt[656] . ': <b>' . $context['common_stats']['latest_member']['link'] . '</b><br />' : '');
]]></add>
</operation>
<operation><!-- 394 -->
<search position="replace"><![CDATA[echo '
                                </td>
                        </tr></table>]]></search>
<add><![CDATA[echo '
</td>
', ($settings['show_latest_member'] && $context['member_limit'] > 1) ? '<td width="250" valign="middle" class="smalltext" align="left">' . implode($context['latest_members_dated'], '<br />') . '</td>' : '', '
</tr></table>]]></add>
</operation>
</file>
Title: Re: Latest Members
Post by: Bulakbol on February 26, 2009, 12:03:37 AM
Thanks for the code Sandmansa. Helios_multi theme users can use it.
Title: Re: Latest Members
Post by: Eclipse16V on November 24, 2009, 07:35:40 AM
Is there any Update for SMF 2.0 RC2 ?
Thx
Title: Re: Latest Members
Post by: Eclipse16V on January 29, 2010, 05:11:49 PM
any update?
Title: Re: Latest Members
Post by: Eclipse16V on March 15, 2010, 02:19:58 AM
Nice Mod

Please update it for SMF 2.0RC3  ;)

Thanks