在内容模板里加上{ParseError: KaTeX parse error: Expected 'EOF', got '}' at position 9: username}̲,编辑内容或添加内容时生成的页…username字段值,批量生成时有。
1.phpcms\modules\content\templates\content_add.tpl.php
找到代码:
<form name="myform" id="myform" action="?m=content&c=content&a=add" method="post" enctype="multipart/form-data">
以下的代码添加在上面这段代码的后面,添加的位置,大概在90-93行之间;
添加在下面的代码上面,方便阅读:
<input type="hidden" name="info[username]" value="<?php echo $admin_username?>" />
添加后变成:
<input type="hidden" name="info[username]" value="<?php echo $admin_username?>" /><div class="button"><input value="<?php echo L('save_close');?>" type="submit" name="dosubmit" class="cu" style="width:145px;" onclick="refersh_window()"></div>
2.phpcms\modules\content\templates\content_edit.tpl.php
找到代码:
<form name="myform" id="myform" action="?m=content&c=content&a=edit" method="post" enctype="multipart/form-data">
以下的代码添加在上面这段代码的后面,添加的位置,大概在90-93行之间;
添加在下面的代码上面,方便阅读:
<input value="<?php echo $data['username']?>" type="hidden" name="info[username]" />
添加后变成这样:
<input value="<?php echo data['username']?>" type="hidden" name="info[username]" /> <input value="<?php if(data[′username′]?>"type="hidden"name="info[username]"/><inputvalue="<?phpif(r['upgrade']) echo $r['url'];?>" type="hidden" name="upgrade">