Fork me on GitHub

PN .762 and Enhanced Block Mod v2.2  Bottom

  • I downloaded Enhanced Blocks Mod v2.2 for PN .761 and went through a diff of the files, comparing them to PN .762 versions. I came up with several changes, that I'm hoping someone can help confirm for me.

    The changes are listed below, all refer to changes made to the EBMv2.2 files to make them sync up with PN .762. I re-compared the files after making these changes, and the remaining differences all seem to be appropriate for EBM mods.

    Thanks,
    Robert

    CHANGES:

    Code

    * pntables.php
        - removed old lines 282-298 section per .762... content was:
                    $languages_constant = $prefix.'_languages_constant';
                    $pntable['languages_constant']    = $languages_constant;
                    $pntable['languages_constant_column']
                        = array ('constant' => $languages_constant . '.pn_constant',
                          'file'     => $languages_constant . '.pn_file');
                   
                    $languages_file = $prefix.'_languages_file';
                    $pntable['languages_file']     = $languages_file;
                    $pntable['languages_file_column']
                        = array ('target' => $languages_file . '.pn_target',
                          'source' => $languages_file . '.pn_source');
                                                                   
                    $languages_translation = $prefix.'_languages_translation';
                    $pntable['languages_translation'] = $languages_translation;
                    $pntable['languages_translation_column']
                        = array ('language'    => $languages_translation . '.pn_language',
                          'constant'    => $languages_translation . '.pn_constant',
                          'translation' => $languages_translation . '.pn_translation',
                          'level'       => $languages_translation . '.pn_level');

    * includes/pnBlocks.php
        - per .762, changed pnBlockShow from:
            // Old-style blocks
            if (isset($blocks_modules[0][$block]['func_display'])) {
                return $blocks_modules[0][$block]['func_display']($blockinfo);
            } else {
                if(pnSecAuthAction(0, '.*', '.*', ACCESS_ADMIN)) {
                    $blockinfo['title'] = pnVarPrepForDisplay(_UNKNOWNBLOCKTYPE) . " $block!";
                    $blockinfo['content'] = pnVarPrepForDisplay(_UNKNOWNBLOCKHINT);
                    return themesideblock($blockinfo);
                }
            }
        to:
            $modid = pnModGetIDFromName($modname);
            if (isset($blocks_modules[0][$block]['func_display'])) {
                    return $blocks_modules[0][$block]['func_display']($blockinfo);
            // support old style blocks within modules
                } else if (isset($blocks_modules[$modid][$block]['func_display'])) {
                    return $blocks_modules[$modid][$block]['func_display']($blockinfo);
                    // Old-style blocks
                } else {
                    if(pnSecAuthAction(0, '.*', '.*', ACCESS_ADMIN)) {
                        $blockinfo['title'] = pnVarPrepForDisplay(_UNKNOWNBLOCKTYPE) . " $block!";
                        $blockinfo['content'] = pnVarPrepForDisplay(_UNKNOWNBLOCKHINT);
                        return themesideblock($blockinfo);
                    }
                }

    * modules/Blocks/pnadmin.php
        - re-added .762 security check in function blocks_admin_updateconfig():
                    function blocks_admin_delete()
                    {
                        // Security check - important to do this as early as possible to avoid
                        // potential security holes or just too much wasted processing
                        if (!pnSecAuthAction(0, 'Blocks::', '::', ACCESS_ADMIN)) {
                            return pnVarPrepHTMLDisplay(_MODULENOAUTH);
                        }
                        ...

    * modules/Blocks/pnadminapi.php
        - no changes

    * modules/Blocks/pntables.php
        - no changes

    * modules/Blocks/pnlang/eng/admin.php
        - no changes

    * modules/Blocks/pntemplates/blocks_admin_modify.htm
        - no changes

    * modules/Xanthia/pnuserapi.php
        - per .762 changed line 599 to match line 596 in .762 version:
            $pippo=preg_quote(pnVarPrepForStore($row['title']));
  • Hi,

    Looks the same to me. I did it the other way, and added any "Njw Mod" lines to the pn0.762 update. seems to have worked both ways<g>

    Jon</g>
  • tks
  • Thanks folks, that was exactly what i was looking for ;) . EMB is just amazing.

    Before the changes, some blocks were just unfindable by PN, now they are again.

    Just a small question though, don't you have problems with pecular blocks, when configuring for "view on only these modules" in the Blocks admin? Suddenly, some are unfindable again if set to this... But if i set the block to "view on all pages" it's ok again. Example of Block not working for me: TagIt shoutbox.

    Any ideas? Thanks in advance. Bye.
  • Have any of you made the changes for the latest 0.764 PN release?

    Bye.
  • The relase for PN0.764 is available : http://www.natewelch.com/index.php?name=News&file=article&sid=39

    Bye.

This list is based on users active over the last 60 minutes.