SMFPacks Conversations - Question

Started by Gano, June 13, 2017, 01:58:05 PM

« Social sharing Mod | php 7 »

0 Members and 1 Guest are viewing this topic.

I want to buy the mod. One question:
Does it change something heavy, so that the custom alert of my custom theme at new private messages no longer work?
(I use the premium theme Darkly by SMF Tricks.)
  • Like
    Dislike
    Love
    HaHa
    Angry
    Sad
    Party

That would depend on how you implement it. The mod uses its own sendpm function to provide compatibility, but based on the changes you have made it might require an adjustment

The following is the code of the alert function

function theme_st_alerts()
{
   global $context, $settings, $options, $scripturl, $txt, $modSettings;
   if ($context['user']['is_logged'])
   {
           if(!empty($context['user']['unread_messages']))
           {
               st_create_alert('fa-exclamation-triangle',$context['forum_name'],$url = ''. $scripturl. '?action=pm', '_blank',$txt['show_personal_messages']);            
           }
   }
   
}
function st_create_alert($icon = 'fa-exclamation-triangle',$title = '', $url = '', $target = '',$message = '')
{
   global $context, $settings, $options, $txt, $scripturl, $modSettings, $win;
   echo'<script type="text/javascript">
           $(document).ready(function(){
               $.notify({
                   icon: "fa ',$icon,' fa-4x pull-left",
                   title: "<strong>' . $title . '</strong>",';
                   if (!empty($url) && !empty($target))
                   {
                       echo'
                           url: "',$url,'",
                           target: "',$target,'",';
                   }
                   echo'                    
                   message: "', $message, '"
               },{
                   icon_type: "class",
                   type: "minimalist",
                   delay: ',empty($settings['st_alerts_delay']) ? '0' : $settings['st_alerts_delay'],',
                   template: "<div data-notify=\'container\' class=\'col-xs-11 col-sm-3 alert alert-{0}\' role=\'alert\'> "  
                                       "<button type=\'button\' aria-hidden=\'true\' class=\'close\' data-notify=\'dismiss\'><i class=\'fa fa-times\' aria-hidden=\'true\'></i></button>"
                                       "<span data-notify=\icon\></span>"
                                       "<span data-notify=\'title\'>{1}</span>"
                                       "<span data-notify=\'message\'>{2}</span>" ';
                                       if (!empty($url) && !empty($target))
                                       {
                                           echo'"<a href=\'{3}\' target=\'{4}\' data-notify=\'url\'></a>" ';
                                       }
                                       echo'
                                   "</div>"
               });
           });
       </script>';    
}

  • Like
    Dislike
    Love
    HaHa
    Angry
    Sad
    Party

I can't know what the code does nor what you aim to achieve, but the pm action will be indeed work when the mod is installed.
  • Like
    Dislike
    Love
    HaHa
    Angry
    Sad
    Party

Alright. That's all I wanted to know. :)
  • Like
    Dislike
    Love
    HaHa
    Angry
    Sad
    Party

Keep in mind it will show the same conversations window.
  • Like
    Dislike
    Love
    HaHa
    Angry
    Sad
    Party




Share via facebook Share via linkedin Share via pinterest Share via reddit Share via tumblr Share via twitter Share via whatsapp


Users found this pages searching for: