Eldenroot 3 Nov Edited
#21
RocketFoot - please can you share it? I added buttons into that page but they are not working :( I made template changes and compare, I dont know what is wrong :(
RocketFoot 3 Nov Edited
#22
I will try it tomorrow...I didn't even change that page on my forum, I was mainly interested in the pop up but I do want to change it now too! I'll let you know tomorrow!

ETA...I did a quick test and dropped the same code from above into myalerts_alert_row and it worked!
Eldenroot likes this post
Eldenroot 3 Nov
#23
Please can you share your code for this template?

I added buttons but they are not working :(
RocketFoot 4 Nov Edited
#24
Backup your existing template and replace everything with this in: myalerts_alert_row

<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']}</br>
    
        <a href="{$mybb->settings['bburl']}/alerts.php?action=markread&amp;id={$alert['id']}&amp;my_post_key={$mybb->post_code}" class="markReadAlertButton" id="markread_alert_{$alert['id']}"><i class="fa fa-fw fa-check" style="font-size:20px;color:green;" title="Mark Read"></i></a>
        
        <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']}" title="{$lang->myalerts_delete}"><i class="fa fa-fw fa-times" style="font-size:20px;color:red;"></i></a>

    </td>
</tr>
Eldenroot likes this post
Eldenroot 4 Nov
#25
Thank you, so now everything is working in my alert page (mark as read and delete).

Anyway I have one issue in my modal alert window - only delete is working, not "mark as read", it redirects me to the alert page... tested with your code and same behaviour.

Please can you check my code?

'<tr class="alert {$alert['alert_status']} alert--{$alert['alert_code']}"
id="alert_row_popup_{$alert['id']}">
<td class="{$altbg} align-center alert__avatar" style="text-align: center">
<a class="avatar" href="{$alert['from_user_raw_profilelink']}"><img class="myalerts_avatar" title="{$alert['username']}"
src="{$alert['avatar']['image']}"
alt="{$alert['username']} 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>
<br/>
<span style="color: two issues with beta 6;" class="smalltext">{$alert['received_at']}</span>
</td>
<td style="text-align: center;" class="{$altbg} alert__time">
<a href="{$mybb->settings['bburl']}/alerts.php?action=markread&amp;id={$alert['id']}&amp;my_post_key={$mybb->post_code}" class="markReadAlertButton" id="markread_alert_{$alert['id']}"><i class="fa fa-check fa-fw" style="font-size: 18px; color: green;" title="Označit za přečtené"></i></a>
<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']}" title="{$lang->myalerts_delete}"><i class="fa fa-times fa-fw" style="font-size: 18px; color: #e76b6b;" title="Odstranit"></i></a>
</td>
</tr>'
RocketFoot 4 Nov Edited
#26
<span style="color: two issues with beta 6;" class="smalltext">{$alert['received_at']}</span>

Is that line supposed to be in there?
Eldenroot 4 Nov
#27
Yes, I wanna display time under the subject... but MyBBoost board automatically replaces html hex color # into link for URLs
RocketFoot 4 Nov
#28
Everything else looks good to me...did you upload the 2 files to jscripts and plugins?
Eldenroot 4 Nov
#29
Yeah, without that it would not be working in alert page. am I right?
RocketFoot 4 Nov
#30
I would think so although I didn't test the page before the files were uploaded. I was just testing the popup.

I'm not sure why it isn't working...I copied the code exactly from my popup template and dropped into the row template and it worked.