News:

Wondering if this will always be free?  See why free is better.

Main Menu

Dev Center

Started by Diego Andrés, December 18, 2012, 03:05:26 AM

Previous topic - Next topic

4Kstore

Thanks, this mod help me in every new mod I develop!

¡¡NEW MOD: Sparkles User Names!!!

Gryzor

Oops, had missed the latest update... thanks for continuing support!

Let me also bump this request :D
Quote from: Gryzor on December 18, 2012, 04:41:41 AM
Well, this could be useful indeed, but why not add a server load indicator? Perhaps next to the Admin menu, just like the errors number?

Thanks again!

NanoSector

Hi Gryzor,

Sorry I forgot about your feature request :)
Should track them on GitHub.

Implementing server load is easy enough, might push out an update adding this in later today. :)

Would it be an idea to have it in the footer, like the Page created in ... seconds thing SMF has?
My Mods / Mod Builder - A tool to easily create mods / Blog
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

Gryzor

Ohhh man you're great :)

Yup, footer would be more than enough, and much easier to implement than a box at the top as I had said at the beginning.

I started using your mod again to track some troublesome queries, so I was thinking, would it be possible to sort queries by the time it takes for them to be executed?

Thanks again!

NanoSector

Quote from: Gryzor on November 10, 2013, 08:12:38 AM
Ohhh man you're great :)

Yup, footer would be more than enough, and much easier to implement than a box at the top as I had said at the beginning.

I started using your mod again to track some troublesome queries, so I was thinking, would it be possible to sort queries by the time it takes for them to be executed?

Thanks again!
If you mean in the debugging panel, I'm not entirely sure that's possible without rewriting a big deal of the logic in the debugging panel (which is built-in to SMF in return)... I'll certainly look into it.

I'll get to the load average thing in a few moments :)

Thanks!
My Mods / Mod Builder - A tool to easily create mods / Blog
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

NanoSector

Can you test this package for me please? In the settings panel it includes showing the average load but since I have a Windows localhost I can't test it.
My Mods / Mod Builder - A tool to easily create mods / Blog
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

Gryzor

Sorry, had to take a break for lunch :)

Yup, seems to work very nicely. See attached. I think it's ready for pushing as an update (unless you plan to add more features)!

As for the slow queries sorting, I hadn't realised you were calling internal functions - yeah, I guess it'd be much more work to adapt it to sort queries. Would it be easy at least to make load times appear in bold or something, so at to make it easier to read at a glance?

Thanks for the great support!


NanoSector

I'm not sure I can do the sorting, I might be able to shuffle the array around but that'd go with the cost of performance.

As far as making the time bold:
In Sources/Subs.php, find:
if (isset($qq['s'], $qq['t']) && isset($txt['debug_query_which_took_at']))
echo sprintf($txt['debug_query_which_took_at'], round($qq['t'], 8), round($qq['s'], 8)) . '<br />';
elseif (isset($qq['t']))
echo sprintf($txt['debug_query_which_took'], round($qq['t'], 8)) . '<br />';


Replace with:
if (isset($qq['s'], $qq['t']) && isset($txt['debug_query_which_took_at']))
echo '<strong>' . sprintf($txt['debug_query_which_took_at'], round($qq['t'], 8), round($qq['s'], 8)) . '</strong><br />';
elseif (isset($qq['t']))
echo '<strong>' . sprintf($txt['debug_query_which_took'], round($qq['t'], 8)) . '</strong><br />';


That should do the trick :)

I'll make the package available for download on the main site in a couple of minutes, after I've gone down the topic for more lost feature requests :)
My Mods / Mod Builder - A tool to easily create mods / Blog
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

Gryzor

Ah thanks - don't bother with sorting, it's not that important. Will the new package have the bold formatting so I should wait for it? :)

NanoSector

I think having it bold is a matter of preference, I'll add it to the mod description on the mod page as a tip :)
My Mods / Mod Builder - A tool to easily create mods / Blog
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

Gryzor

ok then, doing it by hand :)

davidhs

Congratulations for the mod :)

I attach my Spanish translation (in Spanish/es/latin and ANSI/UTF-8 :) )

I have two suggestions:

1. Redirection to admin panel after installation
on package-info
<install ...>
  ...
  <redirect url="$scripturl?action=admin;area=modsettings;sa=devcenter;$session_id" timeout="6000">redirect.txt</redirect>
</installl>

redirect.txt
Redirect to Administration panel

2. Link to index.php?action=phpinfo on admin panel and/or Admin menu button.

NanoSector

Hi davidhs,

Thank you for your suggestions and your translations! :)
The text strings have changed a bit in version 0.4 though, mind taking a look?

Redirecting is something that my mod builder limits me to, heh. It's one of the features that's in the newer versions but those are barely usable. I can manually add it in if people wish so. :)
As for the button, that's definitely coming in in a future version. :)

Thanks again!
My Mods / Mod Builder - A tool to easily create mods / Blog
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

davidhs

Spanish translation for version 0.4 :)

NanoSector

Thanks a lot, I'll update the package to include them in a while! :)
My Mods / Mod Builder - A tool to easily create mods / Blog
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

NanoSector

Version with Spanish translation is up! :)
My Mods / Mod Builder - A tool to easily create mods / Blog
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

davidhs

You have a typo in directory name "languagues" on your mod tar.gz

Must be "languages" (like on package-info.xml) or it not install.

NanoSector

Oops, that's something to fix later today... :)
My Mods / Mod Builder - A tool to easily create mods / Blog
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

NanoSector

My Mods / Mod Builder - A tool to easily create mods / Blog
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

Adrek

Option Show the amount of error log entries in the Admin menu button doesn't work correctly (counter cannot be disabled), in Subs-DevCenter.php I found this:
if (!empty($count) || (empty($count) && empty($modSettings['devcenter_dont_show_when_0'])))
replaced it with:
if ((!empty($count) && !empty($modSettings['devcenter_menu_count_log_entries'])) || (empty($count) && empty($modSettings['devcenter_dont_show_when_0']) && !empty($modSettings['devcenter_menu_count_log_entries'])))

and now works fine :)
Polskie wsparcie SMF na simplemachines.org

the simplest solution is most likely the right one

Advertisement: