Zhimeng Dedecms prompt message and prompt content modification method

Source: Internet
Author: User


Official Reply

Solution:

Modify the text in the function ShowMsg function in/include/inc_funtions.php.

And find the two

Find the prompt text in common. func. php in include to replace it.

/**
* Short Message function, which can display friendly prompts after an action is processed
 *
* @ Param string $ msg message prompt information
* @ Param string $ gourl jump address
* @ Param int $ onlymsg only displays information
* @ Param int $ limittime limit time uu6c.com
* @ Return void
*/
Function ShowMsg ($ msg, $ gourl, $ onlymsg = 0, $ limittime = 0)
{
If (empty ($ GLOBALS ['cfg _ plus_dir ']) $ GLOBALS ['cfg _ plus_dir'] = '..';

$ Htmlhead = "$ Htmlhead. = "<base target = '_ self'/> \ r \ n <style> div {line-height: 160% ;} </style> $ Htmlfoot = "</script> \ r \ n </center> \ r \ n </body> \ r \ n

$ Litime = ($ limittime = 0? 1000: $ limittime );
$ Func = '';

If ($ gourl = '-1 ')
    {
If ($ limittime = 0) $ litime = 5000;
$ Gourl = "javascript: history. go (-1 );";
    }

If ($ gourl = ''| $ onlymsg = 1)
    {
$ Msg = "<script> alert (\" ". str_replace (" \ "", "", $ msg). "\"); </script> ";
    }
Else
    {
// When the URL is close: objname, disable the id = objname element of the parent framework.
If (preg_match ('/close:/', $ gourl ))
        {
$ Tgobj = trim (preg_replace ('/close:/', '', $ gourl ));
$ Gourl = 'javascript :;';
$ Func. = "your response parent.doc ument. getElementById ('{$ tgobj}'). style. display = 'none'; \ r \ n ";
        }
      
$ Func. = "var pgo = 0;
Function JumpUrl (){
If (pgo = 0) {location = '$ gourl'; pgo = 1 ;}
} \ R \ n ";
$ Rmsg = $ func;
$ Rmsg. = "document. write (\" <br/> <div style = 'width: Pixel px; padding: 0px; border: 1px solid # DADADA; '> ";
$ Rmsg. = "<div style = 'padding: 6px; font-size: 12px; border-bottom: 1px solid # DADADA; background: # DBEEBD url ({$ GLOBALS ['cfg _ plus_dir ']}/img/wbg.gif)'; '> <B> DedeCMS prompt message! </B> </div> \ "); \ r \ n ";
$ Rmsg. = "document. write (\ "<div style = 'height: 130px; font-size: 10pt; background: # ffff'> <br/> \"); \ r \ n ";
$ Rmsg. = "document. write (\" ". str_replace (" \ "", "", $ msg). "\"); \ r \ n ";
$ Rmsg. = "document. write (\"";
      
If ($ onlymsg = 0)
        {
If ($ gourl! = 'Javascript:; '& $ gourl! = '')
            {
$ Rmsg. = "<br/> <a href = '{$ gourl}'> if your browser does not respond, click here... </a> ";
$ Rmsg. = "<br/> </div> \"); \ r \ n ";
$ Rmsg. = "setTimeout ('jumpurl () ', $ litime );";
            }
Else
            {
$ Rmsg. = "<br/> </div> \"); \ r \ n ";
            }
        }
Else
        {
$ Rmsg. = "<br/> </div> \"); \ r \ n ";
        }
$ Msg = $ htmlhead. $ rmsg. $ htmlfoot;
    }
Echo $ msg;
}

It can be seen that ShowMsg has four parameters. The first parameter is the prompt information, and the second parameter is the jump address. If it is set to-1, the previous page is returned, the third parameter defines whether to use the alert () pop-up prompt box or display the prompt information. The fourth parameter indicates how long the prompt page will be displayed before the jump. The default value is 1 second. It is relatively easy to modify the prompt box, and the corresponding text is replaced directly.

Remember: There are two items to be modified!

This time, we learned how to modify the content in the prompt box, such as the prompt information: Please post such information after logging on. We found dede/sys_data_done.php, which contains various error information prompts, change it to your own.

Summary

Dedecms prompts that there are more than these pages everywhere. If there are templates, we can use dw software to directly search and sort sites in batches and then replace them. That's what I do.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.