User Message

    enRaiser

    50 USD

    50 USD

    Closable User message at the top of the page.

     

    Following code  will show  'msg' as HTML text content of  the user message.


    $param = array(
            'msg'=>'This is demo message,thankyou',
            'is_form'=>false,
            'form_params'=>array(),
            'body_params'=>array(),
             );
        
    create_user_message("create","",$param );


    Following code  will show  your ELGG View as HTML text content of  the user message.

    $param = array(
    ‘msg’=>’yourplugin/default/views/something/something’,
    ‘is_form’=>true,
    ‘form_params’=>array(),
    ‘body_params’=>array(),
    );

    create_user_message(“create”,$param );

    There should be a  view file existing  the same path mentioned in ‘msg’ field.
    do not put the view inside form, and do not put submit button.


    There should be a action defined with the same name as specified in ‘msg’ field.

    ‘when’ =>’thispage’
    the usermessage is preambled with current page.
    ‘when’ =>’thissession’
    the usermessage is preabled with all the pages untill this session expires.
    ‘when’ =>’nextlogin’
    the usermessage is preabled with all the pages untill session expires. but effective only after next login.

    You need not to be in loggedin state while creating this messages.
    neither there is access control about who can set the message.

    Latest comments

    No comments