We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

How to display the user count on the main page? | Forum

Jose
Jose Feb 12 '13
Does anyone know how to display the total user count on the website main page?  or in the Users/Members page?


Thanks,


Jose

Jose
Jose Feb 12 '13
Thank you.  Do you know how to do it without a plugin?



SL
SL Feb 14 '13
Manually
Unique
Unique Feb 14 '13

Quote from Raden Manually

Great answer
Oxwall Accessories
Oxwall Accessories Feb 14 '13

Quote from Raden Manually

Lmfao... that was great.  Jose in order to have something like this work you will need to have your own plugin made  or use the one above. Only other option is to have it hard coded but you may or may not lose that after an update of oxwall. 
Jose
Jose Feb 14 '13
OK.  Thank you!!!


I will give it a try to create a plugin!!!

Bob (Coder Whacker)
Bob (Coder Whacker) Feb 15 '13
I give you a tip as there is really no need for a plugin

this is the SQL query you need.

SELECT COUNT(*) AS total FROM ow_base_user

One can create dynamic SQL queries from Javascript if not I am sure your get help here as this is very interesting project. 

The javascript then can be placed in a custom text/html box or even placed into a floating layer box if you so like.

Let me know how you get on. This should be simple for someone that knows Javascript well.  



The Forum post is edited by Bob (Coder Whacker) Feb 15 '13
Bob (Coder Whacker)
Bob (Coder Whacker) Feb 15 '13
This may help a lot  http://samoldak.com/making-dynamic-sql-queries-from-javascript/

The interesting point about the above article the script allows you to do SQL queries on the any fields in your SQL Oxwall database.   
The Forum post is edited by Bob (Coder Whacker) Feb 15 '13
Jose
Jose Feb 15 '13
Great!!!  Thank you Bob.  That will help me a lot!!!