Announcement

Collapse
No announcement yet.

Hooks in VB4

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • artvs
    replied
    Ok, I found that there was a problem with template handling in old mods. Now I have following piece of code in the bbcode_create hook:
    Code:
    $templater = vB_Template::create('bbcode_highlight');
               $templater->register('blockheight', $blockheight);
                $templater->register('code', $code);
               $templater->register('type', $type);
              $html  = $templater->render();
    It is nicely working in showpost and printthread scripts. But $html is empty when this piece of code is called from buildpostcache.

    Have you any ideas what is wrong?

    Thanks in advance,
    artvs.

    Leave a comment:


  • Ace
    replied
    Originally posted by artvs View Post
    Thanks, it works. But my goal was not to remove the line from config.php but to make working mods that are vital for my forum.

    So, in general my questions is: how to work with hooks (or how to modify mods that uses hooks) in VB4?
    Oh. Well, to do that - go into each plugin and ensure that its code is compliant with the new vB4.0 architecture.

    Given the time it's taken us to get to this point, you might be better served waiting for the mods to be ported to 4.0 or paying someone to do this for you.

    Leave a comment:


  • artvs
    replied
    Originally posted by Ace View Post
    Then you can remove the line from config.php.
    Thanks, it works. But my goal was not to remove the line from config.php but to make working mods that are vital for my forum.

    So, in general my questions is: how to work with hooks (or how to modify mods that uses hooks) in VB4?

    Leave a comment:


  • Ace
    replied
    Originally posted by artvs View Post
    Unfortunately it is impossible because I received tons of errors when commented that line
    With the line active, Disable all of your Products (except Blog and CMS if you are running Suite), then go into Plugin manager and make sure every plugin is disabled.

    Then you can remove the line from config.php.

    Leave a comment:


  • artvs
    replied
    Originally posted by Ace View Post
    To enable modifications, you will need to remove or comment out that line from config.php.
    Unfortunately it is impossible because I received tons of errors when commented that line

    Leave a comment:


  • Ace
    replied
    To enable modifications, you will need to remove or comment out that line from config.php.

    Regarding your other addons, they will likely need to be updated for the new vB4 architecture.

    Leave a comment:


  • artvs
    started a topic [Forum] Hooks in VB4

    Hooks in VB4

    Hi

    I was able to finish VB4 installation only after using

    define('DISABLE_HOOKS', true);
    in config.php as it was recommended somewhere on this forum.

    VB4 is fine working, but some vital mods (e.g. syntax highlighter) are not. I'm not sure that these mods will be modified by developers, so I have question: what should I do to enable my vital mods?

    Thanks in advance,
    and sorry for my English.

Related Topics

Collapse

Working...
X