MyBB Community Forums

Full Version: MyAlerts v2.0.4
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
(2015-06-18, 08:11 PM)Zueq Wrote: [ -> ]Oh, so it can't be fixed then so that I can have both plugins? That's unfortunate. I don't know which one to use, to keep MyProfileComments or use MyAlerts. <.<"

It can be if you're willing to edit the MyProfileComments plugin to fix it. It should be a trivial fix, I just haven't had time to look at it. From the error, it's just missing a method or a method has the wrong parameters.
Hm, well I wish I knew how to fix it then. xD I wouldn't know how to add the missing method, or fix whatever is incorrect/wrong.
(2015-06-18, 06:39 AM)Euan T Wrote: [ -> ]
(2015-06-18, 02:20 AM)bbbs Wrote: [ -> ]
(2015-06-17, 06:41 AM)Euan T Wrote: [ -> ]
(2015-06-16, 10:34 PM)bbbs Wrote: [ -> ]
(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. Smile  Smile  Smile
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:
[Image: rbJLMlN.jpg]
Could you help me just a little more? Thanks.
Hi, look for the myalerts_modal template, and edit the "colspan" on both the header and footer to 3. I thought I'd fixed that, but obviously not Sad

Thank you for your advice.
I thought same things as you said so I checked the myalerts_modal_content template with the coding "colspan" on the header and footer, but they had the "colspan=3" already. It's kind weird...

myalerts_modal_content template
<div id="myalerts_alerts_modal" style="display: none;">
    <table class="tborder" cellspacing="0">
        <thead>
        <tr>
            <th class="thead" colspan="3">
                <strong>{$lang->myalerts_page_title}</strong>
            </th>
        </tr>
        </thead>
        <tbody>
        {$alerts}
        </tbody>
        <tr>
            <td class="tfoot smalltext" colspan="3">
                <a href="{$mybb->settings['bburl']}/alerts.php">{$lang->myalerts_usercp_nav_alerts}</a>
                <span class="float_right">
                    <a href="{$mybb->settings['bburl']}/alerts.php?action=delete_all&amp;my_post_key={$mybb->post_code}&amp;ret_link={$myalerts_return_link}"
                       onclick="return confirm('{$lang->myalerts_delete_all_confirm}')">{$lang->myalerts_usercp_nav_delete_all}</a>
                </span>
                <br class="clear"/>
                <!-- Clear alerts link goes here... -->
            </td>
        </tr>
    </table>
</div>

Hmmm. Can you post the templates for the rows or send me details for an account in order to troubleshoot?

Here you are. Also I will send PM with my info if you want to use.

myalerts_alert_row Template
<tr class="alert-row alert--{$alert['alert_code']} {$alert['alert_status']}" id="alert_row_{$alert['id']}">
    <td class="{$altbg}"  width="50">
        <a class="avatar" href="{$alert['from_user_raw_profilelink']}"><img src="{$alert['avatar']['image']}"
                                                                            alt="{$alert['username']}'s avatar" {$alert['avatar']['width_height']}/></a>
    </td>
    <td class="{$altbg}">
        <a href="{$mybb->settings['bburl']}/alerts.php?action=view&amp;id={$alert['id']}">
            {$alert['message']}
        </a>
        <br/>
		<span class="smalltext float_right">
			<a href="{$mybb->settings['bburl']}/alerts.php?action=delete&amp;id={$alert['id']}&amp;my_post_key={$mybb->post_code}"
               class="deleteAlertButton" id="delete_alert_{$alert['id']}">{$lang->myalerts_delete}</a>
		</span>
        <br class="clear"/>
    </td>
</tr>


myalerts_alert_row_popup Template
<tr class="alert {$alert['alert_status']} alert--{$alert['alert_code']}" id="alert_row_popup_{$alert['id']}">
    <td class="{$altbg} align-center alert__avatar" align="center">
        <a class="avatar" href="{$alert['from_user_raw_profilelink']}"><img src="{$alert['avatar']['image']}"
                                                                            alt="{$alert['username']}'s avatar" {$alert['avatar']['width_height']}/></a>
    </td>
    <td class="{$altbg} alert__content">
        <a href="{$mybb->settings['bburl']}/alerts.php?action=view&amp;id={$alert['id']}">
            {$alert['message']}
        </a>
    </td>
    <td class="{$altbg} alert__time">
        {$alert['received_at']}
    </td>
</tr>
Thanks, I'll take a look after work tonight.
well b4 updating the plugin to new one
it used to come as pop up with close option
now it does it differently
can it be fixed to pop up as b4 ?
or to fix it i need to delete the files and upload older version ?

[attachment=34476]
Euan T - I really appreciate the work you're doing on this. I was just wondering though if you have an ETA for the next point release with some of the bug fixes that have been mentioned? I would really like to add the plugin to IcyBoards, and a few people have actually requested it already, but don't want to do so if a new point release is going to be out soon. If it's going to be a while yet, I'll add the current version this weekend. I, of all people, totally understand the problem of trying to find time. Smile
ok it fixed now.
(2015-06-19, 12:57 PM)spork985 Wrote: [ -> ]Euan T - I really appreciate the work you're doing on this. I was just wondering though if you have an ETA for the next point release with some of the bug fixes that have been mentioned? I would really like to add the plugin to IcyBoards, and a few people have actually requested it already, but don't want to do so if a new point release is going to be out soon. If it's going to be a while yet, I'll add the current version this weekend. I, of all people, totally understand the problem of trying to find time. Smile

Hey, I'm planning for the next point release to be out next weekend (28th June). I'm away on business for the first part of this week, but will be bug squashing the rest of the week to try and iron out the current known issues. SimpleLikes will also hopefully be released at this time.

(2015-06-19, 04:40 PM)Kirby1 Wrote: [ -> ][Image: image.png]
http://s14.postimg.org/dir56v8vl/image.png

You need to be running MyBB 1.8.4 or newer. Please upgrade your version of MyBB.
(2015-06-19, 04:46 PM)Euan T Wrote: [ -> ]
(2015-06-19, 12:57 PM)spork985 Wrote: [ -> ]Euan T - I really appreciate the work you're doing on this. I was just wondering though if you have an ETA for the next point release with some of the bug fixes that have been mentioned? I would really like to add the plugin to IcyBoards, and a few people have actually requested it already, but don't want to do so if a new point release is going to be out soon. If it's going to be a while yet, I'll add the current version this weekend. I, of all people, totally understand the problem of trying to find time. Smile

Hey, I'm planning for the next point release to be out next weekend (28th June). I'm away on business for the first part of this week, but will be bug squashing the rest of the week to try and iron out the current known issues. SimpleLikes will also hopefully be released at this time.

Perfect! Feel free to reach out if you need a hand with testing anything.