MyBB Community Forums

Full Version: RELEASE: Newsletter Plugin
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7
Can you try replacing line 169 with this?

if (function_exists('rebuild_settings'))
{
	rebuild_settings();
}
else
{
	rebuildsettings();
}

Let me know if it works because I'll patch it if it does.
MrDoom Wrote:Can you try replacing line 169 with this?

if (function_exists('rebuild_settings'))
{
	rebuild_settings();
}
else
{
	rebuildsettings();
}


Let me know if it works because I'll patch it if it does.

Sorry
It's give same error...

Fatal error: Call to undefined function: rebuild_settings() in c:\apache\htdocs\forum\inc\plugins\newsletter.php on line 167

 $db->insert_query(TABLE_PREFIX."settings", $query);

        rebuild_settings();

         if (function_exists('rebuild_settings'))
{
    rebuild_settings();
}
else
{
    rebuildsettings();
}

        // Add the table to hold the last time the default message was sent.
MrDoom Wrote:
haXan2005 Wrote:Fatal error: Call to undefined function: rebuild_settings() in c:\apache\htdocs\forum\inc\plugins\newsletter.php on line 167
Are you running MyBB 1.2.x because that's a MyBB function.

No it aint, rebuildsettings() is a MyBB function. Just replace rebuild_settings() with rebuildsettings() .

Note:: rebuild_settings() function isn't even present in the plugin, so its normal you get that error.
haXan2005 Wrote:Sorry
It's give same error...

Fatal error: Call to undefined function: rebuild_settings() in c:\apache\htdocs\forum\inc\plugins\newsletter.php on line 167

 $db->insert_query(TABLE_PREFIX."settings", $query);

        rebuild_settings();

         if (function_exists('rebuild_settings'))
{
    rebuild_settings();
}
else
{
    rebuildsettings();
}

        // Add the table to hold the last time the default message was sent.

Oops, that not quite what I meant:
 $db->insert_query(TABLE_PREFIX."settings", $query);

         if (function_exists('rebuild_settings'))
        {
                 rebuild_settings();
        }
        else
        {
                 rebuildsettings();
        }

        // Add the table to hold the last time the default message was sent.
Is what I meant.


LeX- Wrote:No it aint, rebuildsettings() is a MyBB function. Just replace rebuild_settings() with rebuildsettings() .

Note:: rebuild_settings() function isn't even present in the plugin, so its normal you get that error.
Both functions work on my 1.2.9 test board.
MySQL error: 1064
You have an error in your SQL syntax near 'ENGINE = MYISAM ' at line 5
Query: CREATE TABLE mybb_newsletterplugin ( nlid INT(10) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(20) NOT NULL default '', value bigint(30) NOT NULL default '0' ) ENGINE = MYISAM ;
function rebuild_settings is only present in 1.4 code.
MrDoom Wrote:
haXan2005 Wrote:Sorry
It's give same error...

Fatal error: Call to undefined function: rebuild_settings() in c:\apache\htdocs\forum\inc\plugins\newsletter.php on line 167

 $db->insert_query(TABLE_PREFIX."settings", $query);

        rebuild_settings();

         if (function_exists('rebuild_settings'))
{
    rebuild_settings();
}
else
{
    rebuildsettings();
}

        // Add the table to hold the last time the default message was sent.

Oops, that not quite what I meant:
 $db->insert_query(TABLE_PREFIX."settings", $query);

         if (function_exists('rebuild_settings'))
        {
                 rebuild_settings();
        }
        else
        {
                 rebuildsettings();
        }

        // Add the table to hold the last time the default message was sent.
Is what I meant.


LeX- Wrote:No it aint, rebuildsettings() is a MyBB function. Just replace rebuild_settings() with rebuildsettings() .

Note:: rebuild_settings() function isn't even present in the plugin, so its normal you get that error.
Both functions work on my 1.2.9 test board.

Look into /inc/functions.php , rebuild_settings() aint present ... it will only work if you've added that function into the plugin itself.
UPDATE
This plugin has been updated to version 1.2, this version fixes an issue with the settings rebuild function.

It is recommended that all users update to this release as soon as possible by using the instructions in the readme provided.

The original post has been updated to reflect these changes.
MrDoom Wrote:UPDATE
This plugin has been updated to version 1.2, this version fixes an issue with the settings rebuild function.

It is recommended that all users update to this release as soon as possible by using the instructions in the readme provided.

The original post has been updated to reflect these changes.

I think problem isnt solved

MySQL error: 1064
You have an error in your SQL syntax near 'ENGINE = MYISAM ' at line 5
Query: CREATE TABLE mybb_newsletterplugin ( nlid INT(10) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(20) NOT NULL default '', value bigint(30) NOT NULL default '0' ) ENGINE = MYISAM ;

When ı try to activate
remove

ENGINE = MYISAM 
Pages: 1 2 3 4 5 6 7