on line 212 there is wrong variable: $smfapi = $smf_board . $smfapifile that should be $smfapi = $smfinc . $smfapifile; or else it will not work!

 $smf_boarddir = $smfroot;
  	$smfinc = variable_get('smfforum_inc', SMF_API_DEFAULT_PATH);
   	$smfapi = $smfinc . $smfapifile;
    $smfapisubs = $smfinc . SMF_API_SUBS_FILE;
    if (file_exists($smfapi) && file_exists($smfapisubs)){
  	  $smfapi_exist = true;
    }
    else {
      $smfapi = $smfinc . $smfapifile;
      $smfapisubs = $smf_boarddir . SMF_API_SUBS_FILE;
      if (file_exists($smfapi) && file_exists($smfapisubs)){
      	$smfapi_exist = true;
      	$smfinc = $smf_boarddir;
      }
    } 

Comments

vb’s picture

Let me explain this part of code.
This else on line 210 and var $smf_boarddir
is used when you first enter SMFforum settings to locate smf_api_2 and smf_api_subs
if you place them or they are already in $smf_boarddir (it is usual for smf to place there api)
For the first time if in $smfinc = variable_get('smfforum_inc', SMF_API_DEFAULT_PATH) installation is not found,
this part of code checks installation smf_api_2 in $smf_boarddir
If they are not there you got red line and invitation to enter Path to SMF api file.
If you will enter proper path and smf_api_2 and smf_api_subs are there and save you settings
you will get $smfapi_exist = true; in line 208 and you will never fall in that else on line 210 again.

Look at my installation

Successfully locating SMF installation.
Successfully locating modules/smfforum/includes/smf_api_2.php.
Successfully connected to the SMF database.
Successfully authenticated SMF user: webmaster.

SMFforum root:
/home/vb/www/site1/public_html/forum
Path to forum directory. Enter the full directory path where SMF is installed.

Path to SMF api file:
modules/smfforum/includes
Enter the full directory path where SMF api file is located.

SMF api file name:
/smf_api_2.php
Enter SMF api file name.

Check yours.

Thank you for submitting the issue.
If there is another bug besides this feature we will find and fix it.