Skip to content

Instantly share code, notes, and snippets.

@datio
Created March 9, 2017 21:10
Show Gist options
  • Save datio/a9c08829e709bae0f3bdd5f8f39e9d81 to your computer and use it in GitHub Desktop.
Save datio/a9c08829e709bae0f3bdd5f8f39e9d81 to your computer and use it in GitHub Desktop.

Revisions

  1. datio created this gist Mar 9, 2017.
    25 changes: 25 additions & 0 deletions vbdm2xf.php
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,25 @@
    <?php

    // RewriteCond %{REQUEST_URI} forum/local_links.php
    // RewriteRule ^.*$ vbdm2xf.php [NC,L]

    $startTime = microtime(true);

    $fileDir = '/var/www/html';
    require($fileDir . '/library/XenForo/Autoloader.php');
    XenForo_Autoloader::getInstance()->setupAutoloader($fileDir . '/library');

    XenForo_Application::initialize($fileDir . '/library', $fileDir);
    XenForo_Application::set('page_start_time', $startTime);

    $request = new Zend_Controller_Request_Http();
    $inputHandler = new XenForo_Input($request->getParams());

    $input = $inputHandler->filter(array(
    'catid' => XenForo_Input::UINT,
    'linkid' => XenForo_Input::UINT,
    'action' => XenForo_Input::STRING,
    'id' => XenForo_Input::UINT,
    ));

    // ...