News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

OASLT - Only Admins See Load Time (Fully Hook!)

Started by Hj Ahmad Rasyid Hj Ismail, August 20, 2010, 04:48:07 AM

Previous topic - Next topic

Hj Ahmad Rasyid Hj Ismail

Link to Mod

OASLT - Only Admins See Load Time

- For SMF 1.1.x and 2.0.x
- Hook, no file modification for SMF2.0.x

1. Please do your own backup though every installation is backed up automatically.
2. On default, when the load time is enabled, everybody, even non-user can seen the load time.
3. This mod will show the load time only to admin when it is enabled.
4. All you need to do is turn it on or off in Mod Settings Page and save it.
5. You can test it in all lower SMF version too as it should work just fine. ;)


Thank you for using/testing it.


Yours friendly,
Abu Fahim Ismail.

BSD License. Feel free to modify accordingly but keep author's link if it is in there somewhere. ;)

 


Note: I think this can be correctly done in another way using hook in Subs.php i.e. 'integrate_exit', array($do_footer && !WIRELESS)), but I am not so sure about it and have a little time to test it. I think that hook can be used add condition for load time instead of buffering them. I will attempt that later like what I did in SMF 1.1.x so it will be universal and suitable to all themes.


#Change Logs

@Version 1.2.0
- Rewriting the mod to fully use hook for SMF 2.0.x though I think it is not the right one, yet.
- Rewriting the mod to change Subs.php instead of index.template.php in SMF 1.1.x so it is now universal and suitable to all themes.

@Version 1.1.1
- Covers SMF 2.0 final release.

@Version 1.1.0
- Covers both SMF 1.1.x and 2.0 beta / RC.

@Version 1.0.0
- Only Admins See Load Time Initial Release.

Joker™

Why not simply make it a permission mod.I mean put it as permission for groups in Members area of admin.
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

Hj Ahmad Rasyid Hj Ismail

Quote from: Joker™ on August 20, 2010, 10:14:23 AM
Why not simply make it a permission mod.I mean put it as permission for groups in Members area of admin.
To tell you the truth, I am not very good in making mod. I just do a simple one. If you can guide me, I can try.

Joker™

kk will pm you in a short while ..
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

Hj Ahmad Rasyid Hj Ismail

Thanks for your pm. All the files have been downloaded. Let me study them because I am not familiar with the permission modifications yet. Once I can grab the fullest understanding on how it works, I will release them in the future version.

Joker™

Quote from: ahrasis on September 16, 2010, 03:36:01 PM
Thanks for your pm. All the files have been downloaded. Let me study them because I am not familiar with the permission modifications yet. Once I can grab the fullest understanding on how it works, I will release them in the future version.
your welcome
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

Hj Ahmad Rasyid Hj Ismail

#6
Updated!


Note: I think this can be correctly done in another way using hook in Subs.php i.e. 'integrate_exit', array($do_footer && !WIRELESS)), but I am not so sure about it and have a little time to test it. I think that hook can be used add condition for load time instead of buffering them. I will attempt that later like what I did in SMF 1.1.x so it will be universal and suitable to all themes.


#Change Logs

@Version 1.2.0
- Rewriting the mod to fully use hook for SMF 2.0.x though I think it is not the right one, yet.
- Rewriting the mod to change Subs.php instead of index.template.php in SMF 1.1.x so it is now universal and suitable to all themes.

Advertisement: