FM Design
Would you like to react to this message? Create an account in a few clicks or log in to continue.

IMPORTANT

FM Design is in read-only mode, please click here for more information.

Latest topics
» Forumactif Edge - Releases
by Ange Tuteur Tue 03 Sep 2019, 11:49

» GIFActif - Giphy Button for the Editor
by Ange Tuteur Wed 08 May 2019, 17:21

» Forum Closure
by Ange Tuteur Mon 01 Jan 2018, 01:28

» Chit Chat Thread
by Valoish Sun 31 Dec 2017, 19:15

» Font/Text background color.
by Valoish Sun 31 Dec 2017, 19:11

» Forumactif Messenger - Instant Message Application for Forumotion
by Wolfuryo Sun 31 Dec 2017, 18:24

» [GAME] Count to One Million!
by brandon_g Fri 29 Dec 2017, 18:58

» Post Cards
by manikbiradar Wed 20 Dec 2017, 07:50

» [GAME] Countdown from 200,000
by Valoish Wed 13 Dec 2017, 23:22

» GeekPolice Tech Support Forums - GeekPolice.net
by Dr Jay Mon 11 Dec 2017, 19:12

» Asking about some plugin for Forumotion
by Dr Jay Mon 11 Dec 2017, 19:10

» [GAME] What are you thinking right now?
by Van-Helsing Sat 09 Dec 2017, 14:51

» Widget : Similar topics
by ranbac Wed 06 Dec 2017, 18:11

» Change the Background of the Forum and put an image and how to make prefixs?
by Clement Wed 06 Dec 2017, 15:19

» Hello from Western Australia
by SarkZKalie Wed 06 Dec 2017, 05:34

Recent Tutorials
Top posting users this month

Who is online?
In total there are 7 users online :: 0 Registered, 0 Hidden and 7 Guests :: 2 Bots

None

[ View the whole list ]


Most users ever online was 515 on Tue 14 Sep 2021, 15:24

Widget : Member Statistics

View previous topic View next topic Go down

Ange Tuteur
Ange Tuteur
Administrator
Gender : Male
Posts : 4741
Points : 12253
Reputation : 2376
Location : Pennsylvania
Language : EN, JA, FR
Browser : Browser : Brave Forum Version : Forum Version : Forumactif Edge
https://sethclydesdale.github.io/ https://twitter.com/sethc1995

PostAnge Tuteur Fri 20 May 2016, 11:14

This widget displays statistics related to the members on your forum such as ; How many members you have, the most that were ever online, and the newest member.

Widget : Member Statistics Member10
Click to view demo

If you're familiar with IPB you should know that this widget is inspired by it. Wink


Installation

To install this widget go to Admin Panel > Modules > Forum widgets management and create a new widget with the following settings.

Title(s) : Member Statistics
Use a table type : Yes
Widget Source :
Code:
<style type="text/css">.fa_ms_row { font-size:12px; font-family:arial, sans-serif; text-align:center; padding:10px 0; border-bottom:1px solid #CCC; }
.fa_ms_row:last-child { text-align:left; border:none; }
.fa_ms_row > span { display:inline-block; width:50%; }
.fa_ms_label { text-align:left; font-weight:bold; }
.fa_ms_value { font-size:18px; vertical-align:middle; }
#fa_ms_avatar { background:#FFF; border:1px solid #CCC; float:left; padding:2px; margin-right:6px; }
#fa_ms_avatar, #fa_ms_avatar img { width:40px; height:40px; border-radius:100%; overflow:hidden; }
#fa_ms_new_member_info { margin-top:10px; }</style>

<div id="fa_member_stats">
  <div class="fa_ms_row"><span class="fa_ms_label">Members</span><span class="fa_ms_value">{FORUMCOUNTUSER}</span></div>
  <div class="fa_ms_row"><span class="fa_ms_label">Most Online</span><span class="fa_ms_value">{FORUMONLINEUSER}</span></div>
  <div class="fa_ms_row">
    <div id="fa_ms_avatar"><img src="http://2img.net/i/fa/invision/pp-blank-thumb.png" /></div>
    <div id="fa_ms_new_member_info"><div class="fa_ms_nmi_row">Newest Member</div><div class="fa_ms_nmi_row"><a href="{FORUMLASTUSERLINK}">{FORUMLASTUSER}</a></div></div>
    <div class="clear"></div>
  </div>
</div>

<script type="text/javascript">//<![CDATA[
// this script gets the latest member's avatar and caches it for 1 hour
(function() {
  var id = +'{FORUMLASTUSERLINK}'.replace(/.*?u=(\d+).*/, function(M, S1) { return S1 }),
      img = document.getElementById('fa_ms_avatar'),
      storage = window.localStorage,
      avatar;

  if (img) {
    img = img.getElementsByTagName('IMG')[0];

    if (storage && storage['fa_new_avatar_u' + id] && storage['fa_new_avatar_u' + id + '_exp'] > +new Date - 1*60*60*1000) {
      img.src = storage['fa_new_avatar_u' + id];
    } else {
      jQuery.get('/ajax/index.php?f=m&user_id=' + id, function(d) {
        avatar = jQuery('.tooltip-content > img', d)[0];

        if (avatar) {
          img.src = avatar.src;

          if (storage) {
            storage['fa_new_avatar_u' + id] = img.src;
            storage['fa_new_avatar_u' + id + '_exp'] = +new Date;
          }
        }
      });
    }

  }
}());
'par ange tuteur';
//]]></script>
When you're finished, save the widget. After this you will be able to drag and drop the widget to any column you want on the forum or portal. If you'd like to make modifications to this widget please see the next section. Wink


Modifications

Below you will find a list of modifications that can be made to this widget.


1. The theme
If you want to change the theme or style of this widget, edit the stylesheet that can be found near the top :
Code:
<style type="text/css">.fa_ms_row { font-size:12px; font-family:arial, sans-serif; text-align:center; padding:10px 0; border-bottom:1px solid #CCC; }
.fa_ms_row:last-child { text-align:left; border:none; }
.fa_ms_row > span { display:inline-block; width:50%; }
.fa_ms_label { text-align:left; font-weight:bold; }
.fa_ms_value { font-size:18px; vertical-align:middle; }
#fa_ms_avatar { background:#FFF; border:1px solid #CCC; float:left; padding:2px; margin-right:6px; }
#fa_ms_avatar, #fa_ms_avatar img { width:40px; height:40px; border-radius:100%; overflow:hidden; }
#fa_ms_new_member_info { margin-top:10px; }</style>
You'll be able to modify the fonts, colors, etc... here.


2. Widget Structure
If you want to modify the structure of the widget or add in more information find this portion of the widget :
Code:
<div id="fa_member_stats">
  <div class="fa_ms_row"><span class="fa_ms_label">Members</span><span class="fa_ms_value">{FORUMCOUNTUSER}</span></div>
  <div class="fa_ms_row"><span class="fa_ms_label">Most Online</span><span class="fa_ms_value">{FORUMONLINEUSER}</span></div>
  <div class="fa_ms_row">
    <div id="fa_ms_avatar"><img src="http://2img.net/i/fa/invision/pp-blank-thumb.png" /></div>
    <div id="fa_ms_new_member_info"><div class="fa_ms_nmi_row">Newest Member</div><div class="fa_ms_nmi_row">{FORUMLASTUSERLINK}</div></div>
    <div class="clear"></div>
  </div>
</div>
Each statistic is placed in a row titled with the class "fa_ms_row". Each row contains stats related to the members of the forum. Feel free to move these rows around or add additional rows with different information. You can use these variables in the widget, so be creative ! Artist


That's all the modifications that can be made to this widget. If you have any questions, comments, or find a bug feel free to leave a reply below. Enjoy ! Angel


Notice
Tutorial written by Ange Tuteur.
Special thanks to the Beta Testers for testing this plugin.
Reproduction not permitted without consent from the author.


Last edited by Ange Tuteur on Mon 08 Oct 2018, 09:49; edited 1 time in total
Luffy
Luffy

Gender : Male
Age : 30
Posts : 291
Points : 4257
Reputation : 64
Language : Greek, English
Browser : Browser : Google Chrome Forum Version : Forum Version : phpBB3
https://www.inforumgr.com/ https://www.facebook.com/inforumgr https://twitter.com/inforumgr

PostLuffy Fri 20 May 2016, 11:24

Brilliant work Ange great job!!
Ange Tuteur
Ange Tuteur
Administrator
Gender : Male
Posts : 4741
Points : 12253
Reputation : 2376
Location : Pennsylvania
Language : EN, JA, FR
Browser : Browser : Brave Forum Version : Forum Version : Forumactif Edge
https://sethclydesdale.github.io/ https://twitter.com/sethc1995

PostAnge Tuteur Fri 20 May 2016, 11:32

@Luffy thanks ! cheers
Van-Helsing
Van-Helsing

Gender : Male
Age : 50
Posts : 853
Points : 5042
Reputation : 84
Location : Somewhere out there!
Language : English, Greek
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : punBB
http://itexperts.forumgreek.com/

PostVan-Helsing Fri 20 May 2016, 11:45

Very nice @Ange Tuteur excellent work.

Thank you very much.
1st
Luffy
Luffy

Gender : Male
Age : 30
Posts : 291
Points : 4257
Reputation : 64
Language : Greek, English
Browser : Browser : Google Chrome Forum Version : Forum Version : phpBB3
https://www.inforumgr.com/ https://www.facebook.com/inforumgr https://twitter.com/inforumgr

PostLuffy Fri 20 May 2016, 15:07

@Ange Tuteur, i just noticed that the total messages that were posted to the forum are not displaying.

Is there any possible way we could add that to the widget please?
jessy
jessy

Gender : Female
Posts : 102
Points : 3349
Reputation : 14
Language : italy
Browser : Browser : Google Chrome Forum Version : Forum Version : Invision
http://ilgiornaledibordo.forumattivo.com/

Postjessy Fri 20 May 2016, 15:16

Fantastic thank you very much.@Ange Tuteur
schiggysboard
schiggysboard

Gender : Male
Posts : 79
Points : 3934
Reputation : 20
Language : German, English
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : phpBB3
http://www.schiggysboard.com/

Postschiggysboard Fri 20 May 2016, 15:32

Hi @Ange Tuteur, is it possible to include who is online list? Actually the who is online list appears below the member statistics widget as you can see here:
https://i.servimg.com/u/f86/16/43/86/96/screen10.jpg
Ange Tuteur
Ange Tuteur
Administrator
Gender : Male
Posts : 4741
Points : 12253
Reputation : 2376
Location : Pennsylvania
Language : EN, JA, FR
Browser : Browser : Brave Forum Version : Forum Version : Forumactif Edge
https://sethclydesdale.github.io/ https://twitter.com/sethc1995

PostAnge Tuteur Sat 21 May 2016, 08:06

Luffy wrote:@Ange Tuteur, i just noticed that the total messages that were posted to the forum are not displaying.

Is there any possible way we could add that to the widget please?
Very strange.. did you make any typos ? Because the variables should work without problem in the widget. Let me know your modified widget code if you can. Salute

schiggysboard wrote:Hi @Ange Tuteur, is it possible to include who is online list? Actually the who is online list appears below the member statistics widget as you can see here:
https://i.servimg.com/u/f86/16/43/86/96/screen10.jpg
Yes and no. That widget is separate from this custom widget, so you wont be able to combine them through templates. You can however, try combining them through JavaScript for example :
Code:
$(function() {
  var mod3 = document.getElementById('module3'),
      stats = document.getElementById('fa_member_stats');

  if (mod3 && stats) {
    stats.appendChild(mod3.firstChild);
    mod3.style.display = 'none';
  }
});
Just place that script in all the pages.
schiggysboard
schiggysboard

Gender : Male
Posts : 79
Points : 3934
Reputation : 20
Language : German, English
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : phpBB3
http://www.schiggysboard.com/

Postschiggysboard Sat 21 May 2016, 08:23

It's not working @Ange Tuteur. :/
It combines the member statistics widget and the random widget, which wasn't directly below the statistics widget but below the who is online list (and now there's only the hide button).
See this screenshot:
https://i.servimg.com/u/f86/16/43/86/96/screen11.jpg

Would it be possible that after combining the two widgets correctly, that the tite of the second widget (who is online list) won't appear, so that they are 100 % combined?
Ange Tuteur
Ange Tuteur
Administrator
Gender : Male
Posts : 4741
Points : 12253
Reputation : 2376
Location : Pennsylvania
Language : EN, JA, FR
Browser : Browser : Brave Forum Version : Forum Version : Forumactif Edge
https://sethclydesdale.github.io/ https://twitter.com/sethc1995

PostAnge Tuteur Sat 21 May 2016, 08:47

No, unfortunately not, since there's no unique selectors. I didn't notice the random widget because it was hidden to guests, so I'm assuming module3 is "who is online" while logged out and "random" while logged in. This isn't going to work.
schiggysboard
schiggysboard

Gender : Male
Posts : 79
Points : 3934
Reputation : 20
Language : German, English
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : phpBB3
http://www.schiggysboard.com/

Postschiggysboard Sat 21 May 2016, 09:00

Ok, but thanks for trying and answering. Smile
Luffy
Luffy

Gender : Male
Age : 30
Posts : 291
Points : 4257
Reputation : 64
Language : Greek, English
Browser : Browser : Google Chrome Forum Version : Forum Version : phpBB3
https://www.inforumgr.com/ https://www.facebook.com/inforumgr https://twitter.com/inforumgr

PostLuffy Sat 21 May 2016, 09:13

@Ange Tuteur no i mean on the default widget the total posts are not there. If you check your image it's only the user statistics there. I would like if possible to add the total posts also!

Thanks!
Ange Tuteur
Ange Tuteur
Administrator
Gender : Male
Posts : 4741
Points : 12253
Reputation : 2376
Location : Pennsylvania
Language : EN, JA, FR
Browser : Browser : Brave Forum Version : Forum Version : Forumactif Edge
https://sethclydesdale.github.io/ https://twitter.com/sethc1995

PostAnge Tuteur Sat 21 May 2016, 09:16

Under the "Modifications" section see point 2. Then find a statistic row, most online for example :
Code:
<div class="fa_ms_row"><span class="fa_ms_label">Most Online</span><span class="fa_ms_value">{FORUMONLINEUSER}</span></div>

copy then paste it, and change the label + value to whatever you want. Do this however many times you want to include a number of statistical information.
Luffy
Luffy

Gender : Male
Age : 30
Posts : 291
Points : 4257
Reputation : 64
Language : Greek, English
Browser : Browser : Google Chrome Forum Version : Forum Version : phpBB3
https://www.inforumgr.com/ https://www.facebook.com/inforumgr https://twitter.com/inforumgr

PostLuffy Sat 21 May 2016, 09:24

Isn't the value this one?
Code:
{TOTAL_POSTS}


EDIT: My mistake!! Found it! Smile

Thanks!
SSYT
SSYT
Member
Gender : Male
Age : 30
Posts : 19
Points : 4091
Reputation : 13
Language : Romanian, English
Browser : Browser : Opera Forum Version : Forum Version : Forumactif Edge
https://www.forumcodes.com

PostSSYT Tue 07 Jun 2016, 04:02

Great tutorial @Ange I like your work !
ddr3
ddr3
New Member
Gender : Unspecified
Posts : 4
Points : 3664
Reputation : 1
Language : English
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : Other

Postddr3 Sun 07 Aug 2016, 06:23

nice
FiB
FiB

Gender : Male
Posts : 185
Points : 3865
Reputation : 14
Location : UK
Language : Eng
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : phpBB2
http://www.ourbulgariaforum.com

PostFiB Tue 27 Sep 2016, 04:31

Thank you Salute
kian3210
kian3210
New Member
Gender : Unspecified
Posts : 2
Points : 2914
Reputation : 0
Language : English
Browser : Browser : Google Chrome Forum Version : Forum Version : phpBB2

Postkian3210 Fri 02 Dec 2016, 18:04



You already know therefore significantly when it comes to this subject - link removed -, made me in my view imagine it from a lot of varied angles.Your personal stuffs excellent. All the time care for it up!
Sponsored content

PostSponsored content

View previous topic View next topic Back to top

Create an account or log in to leave a reply

You need to be a member in order to leave a reply.

Create an account

Join our community by creating a new account. It's easy!


Create a new account

Log in

Already have an account? No problem, log in here.


Log in

 
Permissions in this forum:
You cannot reply to topics in this forum