vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Server Load - On ForumHome (*nix only) (https://vborg.vbsupport.ru/showthread.php?t=116134)

Farjad 05-19-2006 10:00 PM

Server Load - On ForumHome (*nix only)
 
This is my first mod for vb.

a simple hack that shows server load on forumhome...

It only shows total server load in percent. ;)

enjoy & click install :)

Note: Only works on *nix

P.S. works with vB 3.5.3 & 3.5.4 (tested on both) no editing just upload product in admincp & upload images

Make sure you click install

Updates:
  • Fixed Plugin (Was using global_start now using forumhome_complete)
  • Viewable by Admins only...
  • Viewable by SMods & Admins only...
  • Viewable by All Users...

Ahsin1 05-20-2006 03:44 AM

thanks farjad installed

coolnikin 05-20-2006 03:46 AM

Nice hack , installed :)

AKapadia 05-20-2006 04:06 AM

Installed :)

Inferno Dragon 05-20-2006 04:40 AM

Nice small hack man..I will give it a try :)

Kaleem 05-20-2006 04:57 AM

hmmm gr8 work

tamborinegal 05-20-2006 05:20 AM

Thanks. :) very cool.

Clancy

Allan 05-20-2006 06:26 AM

Nice idea ;)

show just for admin ?

rmxs 05-20-2006 06:52 AM

No show to everyone...Bad idea this..its not possible to make just for admin??

or with option to select who can see the server load..

INSTALLED

wizardan 05-20-2006 07:17 AM

Would love to be able to turn it on and off, or restrict it to admin view only.
Nice hack:)
Installed.

projectego 05-20-2006 07:27 AM

Nice hack, should come in useful... Cheers. ;)

FreshFroot 05-20-2006 07:29 AM

I agree admin view will be better :)

Rickie3 05-20-2006 08:20 AM

*installed* where does this actually get the server load stats from?

Stop 05-20-2006 08:30 AM

Quote:

Originally Posted by wizardan
Would love to be able to turn it on and off, or restrict it to admin view only.
Nice hack:)
Installed.

Installed. Would love to see that.

Snake 05-20-2006 09:28 AM

Thanks for releasing this hack! :)

Delphiprogrammi 05-20-2006 10:03 AM

nice nice i love this

/me clicked install

Rich 05-20-2006 11:33 AM

If you want this to only be visible by the admins, do this:

Install the modification and then open the "forumhome_serverload" template.

At the very top of the template add:

HTML Code:

<if condition="$bbuserinfo[usergroupid] == 6">
Change the 6 to reflect your admins usergroup. It is 6 by default.

At the very bottom of the template add:

HTML Code:

</if>
Now if you are an admin, you will se it and if you are not, you won't. You can add additional usergroups by adding a comma after the 6 and adding their usergroup.

(I didn't click install because i didn't install this. I just downloaded it to see what you named the template. lol)

wizardan 05-20-2006 01:33 PM

Thanks for the tip, Rich.
problem solved:)

Delphiprogrammi 05-20-2006 01:43 PM

you can allow this for multiple usergroups if you want .....

HTML Code:

<if condition="is_member_of($bbuserinfo, 5) OR is_member_of($bbuserinfo, 6) OR is_member_of($bbuserinfo, 7)">
at the bottom

HTML Code:

</if>
5 , 6 , 7 are usergroup id's

5 = supermods
6= Admins
7=mods

:banana:

Farjad 05-20-2006 02:09 PM

Quote:

Originally Posted by wizardan
Would love to be able to turn it on and off, or restrict it to admin view only.
Nice hack:)
Installed.

check first post :)!

Farjad 05-20-2006 02:11 PM

Quote:

Originally Posted by Delphiprogrammi
you can allow this for multiple usergroups if you want .....

HTML Code:

<if condition="is_member_of($bbuserinfo, 5) OR is_member_of($bbuserinfo, 6) OR is_member_of($bbuserinfo, 7)">
at the bottom

HTML Code:

</if>
5 , 6 , 7 are usergroup id's

5 = supermods
6= Admins
7=mods

:banana:

lol i also got one which works

at top add
HTML Code:

<if condition="($bbuserinfo[usergroupid] == 6) || ($bbuserinfo[usergroupid] == 5) || ($bbuserinfo[usergroupid] == 7)">

rmxs 05-20-2006 02:29 PM

I pyt this codes to hide from members byt nothing... :( its still there

Farjad 05-20-2006 02:38 PM

Quote:

Originally Posted by rmxs
I pyt this codes to hide from members byt nothing... :( its still there

are you logged in as an admin ?? if you are then logout !

rmxs 05-20-2006 02:49 PM

Quote:

Originally Posted by Farjad
are you logged in as an admin ?? if you are then logout !

im login with my test user account...and both of account admin and normal user can see it

Tulsa 05-20-2006 02:54 PM

Very nicely done. :)

Total server load based on what though?

Farjad 05-20-2006 03:10 PM

Well its based on the system info, as its using
PHP Code:

min(100round(exec('ps ax | grep -c apache') / 256 100)) 


Farjad 05-20-2006 03:35 PM

Quote:

Originally Posted by rmxs
im login with my test user account...and both of account admin and normal user can see it

alright got it I edited the plugin and made few changes if you want for Admin download the zip for only admins!

melefire 05-20-2006 03:41 PM

Awsome man,

*melefire clicks install

sudn3sc3d 05-20-2006 03:58 PM

good job dude.

rmxs 05-20-2006 04:17 PM

Quote:

Originally Posted by Farjad
alright got it I edited the plugin and made few changes if you want for Admin download the zip for only admins!

DONE ;) Good job.

Robert Basil 05-20-2006 05:15 PM

You should also state that this only runs under *nix

Farjad 05-20-2006 06:17 PM

Quote:

Originally Posted by Pocketbike Planet
You should also state that this only runs under *nix

hmm... i didnt know that well let me do that now... thnx!

Qwest 05-20-2006 06:17 PM

Well done. Installed.

Ramsesx 05-20-2006 06:40 PM

Stupid question but what means "*nix"?
B.t.w. would be cool if there's a way to put this into the footer same as in the attached screenshot.

Farjad 05-20-2006 07:21 PM

Quote:

Originally Posted by Ramsesx
Stupid question but what means "*nix"?
B.t.w. would be cool if there's a way to put this into the footer same as in the attached screenshot.

well would u want that globally or what ?? i can try as it wouldnt be too difficult ...
*nix = Linux based systems...

Ramsesx 05-20-2006 07:41 PM

For admin only would be nice, thanks for your effort.

icare 05-20-2006 07:52 PM

<font color="YellowGreen">**Installed**</font>

tHANK YOU

Farjad 05-20-2006 07:54 PM

Quote:

Originally Posted by Ramsesx
For admin only would be nice, thanks for your effort.

well ill try to make it, but i have made one for header if you would like that it will require template edit though...

Ramsesx 05-20-2006 08:22 PM

Quote:

Originally Posted by Farjad
well ill try to make it, but i have made one for header if you would like that it will require template edit though...

If you have it already for the header I think can put the code as it is into the footer?

Ghanem 05-20-2006 09:43 PM

Hi,

Thank you for the nice hack
its working fine for me, but does not lool good even with the original style..
Have a look at the attachment plz..


All times are GMT. The time now is 09:13 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01392 seconds
  • Memory Usage 1,800KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (7)bbcode_html_printable
  • (1)bbcode_php_printable
  • (11)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete