Warning: session_start(): open(/var/cpanel/php/sessions/ea-php74/sess_697l67m9i9l62cdbbcm1sovqn0, O_RDWR) failed: No such file or directory (2) in /home/mssoftpc/iqra.mssoftpc.com/admin/function.php on line 3

Warning: session_start(): Failed to read session data: files (path: /var/cpanel/php/sessions/ea-php74) in /home/mssoftpc/iqra.mssoftpc.com/admin/function.php on line 3
IQ Notices / Alerts | IQRA CMS

IQ Notices / Alerts

Want a successful Modern site?

Start with IQRA training; it’s easy and quick to your needs.

    How to use Notices or Popups and Alerts in IQRA CMS.    

 

IQRA CMS used 3 types of Notices 

  1. Notice
  2. Alert
  3. Popup

 

  1. IQ_add_admin_notice()
Parametors
  1. key (Required)

 

use IQ_add_admin_notice() where you want to display notices in admin Only.

 

   2. Create Custom Notice 

    To Create Custom Notice you can also use IQ_admin_notice() function.

  •   IQ_admin_notice()

parametors

  1.  title (required)
  2. status (optional) (error, success)
  3. url (optional)

 

Add Actions

  1. IQ_admin_'.$key.'_notice_show 
  2. Global add action IQ_admin_notice_show

 

2. popup

  1. popupmsg()
alert($icon, $title, $desc, $footer =null, $footerlink = null)

 

  1. By IQ_notice()

Parametors

  1. Key (required)
  2. msg (required)

key

  1. Global key (success_notice)
  2. Global key for (frontend "success"  "error")
  3. Global key (error_notice)
  4. key ( success_ $key _notice )
  5. key ( error_ $key _notice )

msg

  1. msg (Enter Text)

 

// example

IQ_notice( success_'.$key.'_notice , 'msg' )

// Global notice

IQ_notice(success_notice , 'msg')

 

   2. By Session

$_SESSION['success_'.$key.'_notice'] = msg

// Global Notice

$_SESSION['success_notice'] = msg

 

   2. Call Popup

 popupmsg($title, $msg, $shortmsg = null, $footer = null, $footerlink = null);

// or via Session

$_SESSION['popup_'.$for] = $msg;
    $_SESSION['popup_'.$for.'_msg'] = $shortmsg;
    $_SESSION['popup_'.$for.'_footer'] = $footer;
    $_SESSION['popup_'.$for.'_footerlink'] = $footerlink;

 

Call Your Own Custom Notice

function anyname(){
IQ_admin_notice($title, $status = null, $url = null)

}

add_action(IQ_admin_'.$key.'_notice_show , anyname)

// Global

add_action(IQ_admin_notice_show , anyname) 

 

if you want to use own custom function follow these steps

function anyname(){
   // use here own custom notice 
}

add_action(IQ_admin_'.$key.'_notice_show , anyname)

// Global

add_action(IQ_admin_notice_show , anyname)