What's is the wrong I got just a blank page when I activated with the MyAlerts 2.0.2.
MyAlerts 2.0.2. is not working with MySQLi anymore? because MyAlerts 2.0.0 develop needs MySQLi.
(2015-06-16, 10:09 AM)bbbs Wrote: [ -> ]What's is the wrong I got just a blank page when I activated with the MyAlerts 2.0.2.
MyAlerts 2.0.2. is not working with MySQLi anymore? because MyAlerts 2.0.0 develop needs MySQLi.
Hi,
Which version of MyBB are you using? 2.0.2 supports MySQL and MySQLi, but requires MyBB 1.8.4 or newer (preferably 1.8.5).
(2015-06-16, 10:18 AM)Euan T Wrote: [ -> ] (2015-06-16, 10:09 AM)bbbs Wrote: [ -> ]What's is the wrong I got just a blank page when I activated with the MyAlerts 2.0.2.
MyAlerts 2.0.2. is not working with MySQLi anymore? because MyAlerts 2.0.0 develop needs MySQLi.
Hi,
Which version of MyBB are you using? 2.0.2 supports MySQL and MySQLi, but requires MyBB 1.8.4 or newer (preferably 1.8.5).
Thanks for your quick reply. I am using with MyBB 1.8.5.
(2015-06-16, 10:21 AM)bbbs Wrote: [ -> ] (2015-06-16, 10:18 AM)Euan T Wrote: [ -> ] (2015-06-16, 10:09 AM)bbbs Wrote: [ -> ]What's is the wrong I got just a blank page when I activated with the MyAlerts 2.0.2.
MyAlerts 2.0.2. is not working with MySQLi anymore? because MyAlerts 2.0.0 develop needs MySQLi.
Hi,
Which version of MyBB are you using? 2.0.2 supports MySQL and MySQLi, but requires MyBB 1.8.4 or newer (preferably 1.8.5).
Thanks for your quick reply. I am using with MyBB 1.8.5.
Can you check your error log or turn on error reporting? Debugging a blank white page is difficult.
(2015-06-16, 12:14 PM)Euan T Wrote: [ -> ] (2015-06-16, 10:21 AM)bbbs Wrote: [ -> ] (2015-06-16, 10:18 AM)Euan T Wrote: [ -> ] (2015-06-16, 10:09 AM)bbbs Wrote: [ -> ]What's is the wrong I got just a blank page when I activated with the MyAlerts 2.0.2.
MyAlerts 2.0.2. is not working with MySQLi anymore? because MyAlerts 2.0.0 develop needs MySQLi.
Hi,
Which version of MyBB are you using? 2.0.2 supports MySQL and MySQLi, but requires MyBB 1.8.4 or newer (preferably 1.8.5).
Thanks for your quick reply. I am using with MyBB 1.8.5.
Can you check your error log or turn on error reporting? Debugging a blank white page is difficult.
I feel bad for wasting your time with a basic question, how do I check my error log or how do I turn on error reporting with MyAlerts?
Your error log should be accessible via your host control panel. To turn on error reporting, add this to the top of inc/plugins/myalerts.php, after the "<?php":
ini_set('display_errors',1);
ini_set('display_startup_errors',1);
error_reporting(-1);
(2015-06-16, 06:06 PM)Euan T Wrote: [ -> ]Your error log should be accessible via your host control panel. To turn on error reporting, add this to the top of inc/plugins/myalerts.php, after the "<?php":
ini_set('display_errors',1);
ini_set('display_startup_errors',1);
error_reporting(-1);
Thank you, Euan T.
Here is what I got after adding your code for error log.
The version of PHP I'm running under is 5.3.3.
This one is the page on my plugins section.
Notice: Undefined index: myalerts in /home/site/mysite.com/public_html/admin/modules/config/plugins.php on line 530
Notice: Use of undefined constant THIS_SCRIPT - assumed 'THIS_SCRIPT' in /home/site/mysite.com/public_html/inc/plugins/newpoints.php on line 46
Notice: Use of undefined constant THIS_SCRIPT - assumed 'THIS_SCRIPT' in /home/site/mysite.com/public_html/inc/plugins/newpoints.php on line 55
Notice: Undefined index: newpoints in /home/site/mysite.com/public_html/admin/modules/config/plugins.php on line 530
Notice: Undefined index: pluginlibrary in /site/mysite.com/public_html/admin/modules/config/plugins.php on line 530
Notice: Undefined index: website in /home/site/mysite.com/public_html/admin/modules/config/plugins.php on line 618
Notice: Undefined index: authorsite in /home/site/mysite.com/public_html/admin/modules/config/plugins.php on line 623
Notice: Undefined index: class in /home/site/mysite.com/public_html/admin/inc/class_table.php on line 217
Notice: Undefined index: is_active in /home/site/mysite.com/public_html/admin/modules/config/plugins.php on line 675
Notice: Undefined index: class in /home/site/mysite.com/public_html/admin/inc/class_table.php on line 217
The another one is here when I activated with MyAlerst 2.0.2.
Notice: Undefined property: MyLanguage::$myalerts in /home/site/mysite.com/public_html/inc/plugins/myalerts.php on line 155
Notice: Undefined property: MyLanguage::$setting_myalerts_avatar_size_desc in /home/site/mysite.com/public_html/inc/plugins/myalerts.php on line 214
Notice: Undefined variable: disporder in /home/site/mysite.com/public_html/inc/plugins/pluginlibrary.php on line 163
Fatal error: Call to undefined method DirectoryIterator::getExtension() in /home/site/mysite.com/public_html/inc/plugins/myalerts.php on line 224
If you need more info to figure out for my issue, please let me know..
Ah, yes, the issue is due to a bug where MyAlerts requires PHP > 5.3.6. To fix the bug, find the following code in inc/plugins/myalerts.php:
$dir = new DirectoryIterator(MYALERTS_PLUGIN_PATH . '/templates');
$templates = array();
foreach ($dir as $file) {
if (!$file->isDot() && !$file->isDir() && $file->getExtension() == 'html') {
$templateName = $file->getPathname();
$templateName = basename($templateName, '.html');
$templates[$templateName] = file_get_contents($file->getPathName());
}
}
Replace it with:
$dir = new DirectoryIterator(MYALERTS_PLUGIN_PATH . '/templates');
$templates = array();
foreach ($dir as $file) {
if (!$file->isDot() && !$file->isDir() && pathinfo($file->getPathname(), PATHINFO_EXTENSION) === 'html') {
$templateName = $file->getPathname();
$templateName = basename($templateName, '.html');
$templates[$templateName] = file_get_contents($file->getPathName());
}
}
This will be fixed in MyAlerts v2.0.3.
(2015-06-16, 09:05 PM)Euan T Wrote: [ -> ]Ah, yes, the issue is due to a bug where MyAlerts requires PHP > 5.3.6. To fix the bug, find the following code in inc/plugins/myalerts.php:
$dir = new DirectoryIterator(MYALERTS_PLUGIN_PATH . '/templates');
$templates = array();
foreach ($dir as $file) {
if (!$file->isDot() && !$file->isDir() && $file->getExtension() == 'html') {
$templateName = $file->getPathname();
$templateName = basename($templateName, '.html');
$templates[$templateName] = file_get_contents($file->getPathName());
}
}
Replace it with:
$dir = new DirectoryIterator(MYALERTS_PLUGIN_PATH . '/templates');
$templates = array();
foreach ($dir as $file) {
if (!$file->isDot() && !$file->isDir() && pathinfo($file->getPathname(), PATHINFO_EXTENSION) === 'html') {
$templateName = $file->getPathname();
$templateName = basename($templateName, '.html');
$templates[$templateName] = file_get_contents($file->getPathName());
}
}
This will be fixed in MyAlerts v2.0.3.
Wow, you are awesome man, Euan T.
Thank you so much for your great job.
It works perfect after editing the code except the modal windows of MyAlerts.
I know this is the issue of my theme , but I have no idea how to adjust the following:
Could you help me just a little more? Thanks.
(2015-06-15, 06:50 PM)Euan T Wrote: [ -> ]<snipped>
Hi,
You can simply edit the global templates to remove the extra {$myalerts_*} entries.
Hi
Can you please tell me exactly which template I will need to edit.
thanks