1
Gombunan
How to show load time and DB queries to admins and mods only
  • 2005/5/14 8:22

  • Gombunan

  • Just popping in

  • Posts: 30

  • Since: 2005/5/14


Hello,

I am implementing the load time and DB queries on my page as decribed here:

https://xoops.org/modules/smartfaq/faq.php?faqid=303

I want to show the information to the site admins or moderators only, and it'll be invisible to guests and members.


I tried

<{if $xoops_isadmin = 1 || $xoops_ismoderators = 1}>
<{php}>
echo round(($GLOBALS['xoopsLogger']->dumpTime()), 3)." Seconds | ".count($GLOBALS['xoopsLogger']->queries)." Queries";
<{/php}>



But that didn't work. I am a begginner in PHP too btw.

Anybody can help? Many thanks?

2
Gombunan
Re: How to show load time and DB queries to admins and mods only
  • 2005/5/16 7:41

  • Gombunan

  • Just popping in

  • Posts: 30

  • Since: 2005/5/14


Anybody please? May be I posted in the wrong forum, sorry I am new here.

3
Mithrandir
Re: How to show load time and DB queries to admins and mods only

you need to use two = - and $xoops_ismoderators doesn't exist.

So
<{if $xoops_isadmin == 1}>
<{
php}>
echo 
round(($GLOBALS['xoopsLogger']->dumpTime()), 3)." Seconds | ".count($GLOBALS['xoopsLogger']->queries)." Queries";
<{/
php}>


4
Gombunan
Re: How to show load time and DB queries to admins and mods only
  • 2005/5/16 14:49

  • Gombunan

  • Just popping in

  • Posts: 30

  • Since: 2005/5/14


Mithrandir,

btw, there's an extra forward slash in the code snippet which causes an error.

Anyway, thank you very much! It works like a charm now.

This is my first attempt into a full fledge CMS to manage my website. After checking around, I like XOOPS the most. I find it to be fast, secure, has many excellent modules, has very nice themes, highly customizable, and low learning curve.

Keep up the good work!

Login

Who's Online

155 user(s) are online (99 user(s) are browsing Support Forums)


Members: 0


Guests: 155


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits