Home

Your premium source for custom modification services for phpBB

  logo

HomeForumsBlogMOD ManagerFAQSearchRegisterLogin

Comments December 13, 2006

ACP Menu items are language entries, did you know that? I didn’t…

Filed under: MOD Writing, phpBB — Dave Rathbun @ 12:47 am CommentsComments (3) 

So I learned something tonight… had something pointed out to me that I’ve never noticed in all the years I’ve been working with phpBB. Seems that admin control panel (ACP) menu entries are supposed to be language variables. Even though there’s no $lang[] anywhere visible. :shock:

My Search Flood Controls MOD was rejected. One of the reasons given was that there was no language entry for the menu item. Well, phooey, I said to myself, none of the standard phpBB admin pages do either. If you’ve never looked at how the menu entries are created, the code looks like this:

if( !empty($setmodules) )
{
        $file = basename(__FILE__);
        $module['phpBBDoctor']['Search Control] = $file;
        return;
}

What you end up seeing in your ACP is a menu section named “phpBBDoctor” and a menu entry named “Search Control”. And it seems to come straight from the text. Without doing anything special, I had a new menu item named “Search Control” on my phpBBDoctor menu section. Cool, huh? :-) Seems that it was also an accident. The code is written so that it looks for a language string stored as $lang['Search Control'] and if it doesn’t find it, it uses the string (key) instead. But the expected behavior is that there would be a language entry. Even though it does not actually reference the $lang[] array, it seems.

So kudos go to MarkTheDaemon, the MOD Validator that caught this issue for me, as I’ve had other MODs reviewed (and either approved or rejected) but nobody has ever caught this before. The language entries for the standard phpBB menu items are all found at the very top of language/lang_english/lang_admin.php, if you are curious.

He also suggested that I needed a language string for “phpBBDoctor” but I think I can argue that one. :-) You would not require a language string for google, would you? :lol:

Oh, and the best part about this? It’s highly possible that my Page Permissions MOD will once again get rejected, as it doesn’t use language entries for the ACP menu items either. :-P

Related Links

3 Comments »

  1. I knew about this :D It’s in admin/index.php… but it’s really not documented well enough imo. The more MODs you submit, the less they (the MOD team) will fix for you… They have started denying my mods for little picky stuff (i guess you’re used to it), and they didn’t want to fix it for me.

    Well in a way that’s also good, because i like to fix things myself. Then i just have to wait longer :D

    Comment by eviL<3 — December 13, 2006 @ 7:41 am

  2. Actually Kudos to paul999 who spotted this issue, i mearly wrote the final report out.

    And thanks for the good comments, we try to do our best :)

    Comment by MarkTheDaemon — December 13, 2006 @ 11:05 am

  3. Well, then, thanks (and kudos) to paul999 as well. 8)

    It’s might be interesting for those that don’t know… MarkTheDaemon and paul999 are two of the newest members of the MOD validator squad, and they’re obviously on top of things.

    Comment by dave.rathbun — December 13, 2006 @ 5:36 pm

RSS feed for comments on this post.

Leave a comment

Tags allowed in comments:
<a href="" title=""> <acronym title=""> <blockquote cite=""> <code> <strong> <em> <u> <sup> <sub> <strike>

Confirm submission by clicking only the marked checkbox:

         **     

Powered by WordPress