Advertisement:

Author Topic: DevCenter  (Read 21958 times)

Offline 4Kstore

  • SMF Hero
  • ******
  • Posts: 4,298
  • Gender: Male
    • agustintari on Facebook
    • @agustintarifa on Twitter
    • SSIMPLE TEAM PAGE
Re: DevCenter
« Reply #40 on: May 25, 2013, 12:10:13 AM »
Thanks, this mod help me in every new mod I develop!
¡¡NEW MOD: Sparkles User Names!!!

Offline Gryzor

  • Sr. Member
  • ****
  • Posts: 723
  • Gender: Male
  • CPCwiki.eu - The Amstrad CPC Encyclopaedia!
    • CPCWiki
Re: DevCenter
« Reply #41 on: November 10, 2013, 07:12:54 AM »
Oops, had missed the latest update... thanks for continuing support!

Let me also bump this request :D
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!

Offline NanoSector

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 10,471
  • Gender: Male
  • VC321xb47@aperture:~#
    • Yoshi2889 on GitHub
Re: DevCenter
« Reply #42 on: November 10, 2013, 07:48:04 AM »
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."

Offline Gryzor

  • Sr. Member
  • ****
  • Posts: 723
  • Gender: Male
  • CPCwiki.eu - The Amstrad CPC Encyclopaedia!
    • CPCWiki
Re: DevCenter
« Reply #43 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!

Offline NanoSector

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 10,471
  • Gender: Male
  • VC321xb47@aperture:~#
    • Yoshi2889 on GitHub
Re: DevCenter
« Reply #44 on: November 10, 2013, 08:21:58 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."

Offline NanoSector

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 10,471
  • Gender: Male
  • VC321xb47@aperture:~#
    • Yoshi2889 on GitHub
Re: DevCenter
« Reply #45 on: November 10, 2013, 09:28:58 AM »
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."

Offline Gryzor

  • Sr. Member
  • ****
  • Posts: 723
  • Gender: Male
  • CPCwiki.eu - The Amstrad CPC Encyclopaedia!
    • CPCWiki
Re: DevCenter
« Reply #46 on: November 10, 2013, 09:40:42 AM »
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!


Offline NanoSector

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 10,471
  • Gender: Male
  • VC321xb47@aperture:~#
    • Yoshi2889 on GitHub
Re: DevCenter
« Reply #47 on: November 10, 2013, 09:52:13 AM »
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:
Code: [Select]
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:
Code: [Select]
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."

Offline Gryzor

  • Sr. Member
  • ****
  • Posts: 723
  • Gender: Male
  • CPCwiki.eu - The Amstrad CPC Encyclopaedia!
    • CPCWiki
Re: DevCenter
« Reply #48 on: November 10, 2013, 09:54:05 AM »
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? :)

Offline NanoSector

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 10,471
  • Gender: Male
  • VC321xb47@aperture:~#
    • Yoshi2889 on GitHub
Re: DevCenter
« Reply #49 on: November 10, 2013, 09:58:36 AM »
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."

Offline Gryzor

  • Sr. Member
  • ****
  • Posts: 723
  • Gender: Male
  • CPCwiki.eu - The Amstrad CPC Encyclopaedia!
    • CPCWiki
Re: DevCenter
« Reply #50 on: November 10, 2013, 10:02:04 AM »
ok then, doing it by hand :)

Offline davidhs

  • Sr. Member
  • ****
  • Posts: 936
  • Gender: Male
Re: DevCenter
« Reply #51 on: November 10, 2013, 10:49:50 AM »
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
Code: [Select]
<install ...>
  ...
  <redirect url="$scripturl?action=admin;area=modsettings;sa=devcenter;$session_id" timeout="6000">redirect.txt</redirect>
</installl>
redirect.txt
Code: [Select]
Redirect to Administration panel
2. Link to index.php?action=phpinfo on admin panel and/or Admin menu button.

Offline NanoSector

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 10,471
  • Gender: Male
  • VC321xb47@aperture:~#
    • Yoshi2889 on GitHub
Re: DevCenter
« Reply #52 on: November 10, 2013, 11:19:37 AM »
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."

Offline davidhs

  • Sr. Member
  • ****
  • Posts: 936
  • Gender: Male
Re: DevCenter
« Reply #53 on: November 10, 2013, 11:29:37 AM »
Spanish translation for version 0.4 :)

Offline NanoSector

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 10,471
  • Gender: Male
  • VC321xb47@aperture:~#
    • Yoshi2889 on GitHub
Re: DevCenter
« Reply #54 on: November 10, 2013, 11:34:51 AM »
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."

Offline NanoSector

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 10,471
  • Gender: Male
  • VC321xb47@aperture:~#
    • Yoshi2889 on GitHub
Re: DevCenter
« Reply #55 on: November 10, 2013, 03:36:02 PM »
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."

Offline davidhs

  • Sr. Member
  • ****
  • Posts: 936
  • Gender: Male
Re: DevCenter
« Reply #56 on: November 11, 2013, 04:44:25 PM »
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.

Offline NanoSector

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 10,471
  • Gender: Male
  • VC321xb47@aperture:~#
    • Yoshi2889 on GitHub
Re: DevCenter
« Reply #57 on: November 12, 2013, 01:14:33 AM »
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."

Offline NanoSector

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 10,471
  • Gender: Male
  • VC321xb47@aperture:~#
    • Yoshi2889 on GitHub
Re: DevCenter
« Reply #58 on: November 12, 2013, 09:00:12 AM »
Aaand updated!
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."

Offline phantomm

  • Sophist Member
  • *****
  • Posts: 1,063
  • Gender: Male
    • pages/smfpl/171860759503032 on Facebook
    • Polish ElkArte community
Re: DevCenter
« Reply #59 on: December 09, 2013, 04:13:18 PM »
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:
Code: [Select]
if (!empty($count) || (empty($count) && empty($modSettings['devcenter_dont_show_when_0'])))replaced it with:
Code: [Select]
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

My mods