1. First you need to manually add the fields you want to add to the data table [llgp_Portal_article_title]. (Note: The data table prefix depends on your settings)
2. Modify the template template\default\portal\portalcp_article.htm file (Note: If it is a self-built theme, it is recommended to copy the default files to their own theme files in the corresponding folder, add the corresponding file content)
[Here you can provide a way of thinking, you can find in this file ' Exfm PNS cl ', you can add the corresponding div after this div, write your own field content]
Here are a few fields that I have customized for reference
<Divclass= "Exfm PNS cl"> <Divclass= "Sinf sppoll z"> <DL> <DT></DT> <DD><inputtype= "text"name= "Download_url"class= "px P_fre"value= "$article [Download_url]"size= "+" /></DD> <DT>Download size</DT> <DD><inputtype= "text"name= "Download_size"class= "px P_fre"value= "$article [download_size]"size= "+" /></DD> <DT>Download type</DT> <DD><inputtype= "text"name= "Download_type"class= "px P_fre"value= "$article [Download_type]"size= "+" /></DD> <DT>Download website</DT> <DD><inputtype= "text"name= "Download_official_website"class= "px P_fre"value= "$article [Download_official_website]"size= "+" /></DD> </DL> </Div> <Divclass= "Sadd Z"> <DL> <DT>New Tour Download</DT> <DD><inputtype= "text"name= "Newgame_url"class= "px P_fre"value= "$article [Newgame_url]"size= "+" /></DD> <DT>New Tour Official website</DT> <DD><inputtype= "text"name= "Newgame_web"class= "px P_fre"value= "$article [Newgame_web]"size= "+" /></DD> <DT>New Tour status</DT> <DD><inputtype= "text"name= "Newgame_status"class= "px P_fre"value= "$article [Newgame_status]"size= "+" /></DD> <DT>New Tour Activation Code</DT> <DD><inputtype= "text"name= "Newgame_f"class= "px P_fre"value= "$article [Newgame_f]"size= "+" /></DD> <DT>New Tour Developer</DT> <DD><inputtype= "text"name= "Newgame_kfs"class= "px P_fre"value= "$article [NEWGAME_KFS]"size= "+" /></DD> <DT>New tour Operator</DT> <DD><inputtype= "text"name= "Newgame_yys"class= "px P_fre"value= "$article [Newgame_yys]"size= "+" /></DD> <DT>New travel Test Time</DT> <DD><inputtype= "text"name= "Newgame_ce_time"class= "px P_fre"value= "$article [newgame_ce_time]"size= "+"onclick= "Showcalendar (event, this, true)" /></DD> </DL> </Div> </Div>
3. Modify the program include/portalcp/portalcp_article.php locate the array $setarr, add the custom fields, and pay attention to filtering special characters (Htmlspecialchars can be used to filter)
-$setarr=Array(>--->---' title ' =$_post[' title '],>--->---' author ' =$_get[' Author '],>--->---' from ' =$_get[' From '],>--->---' fromurl ' =$_get[' Fromurl '],>--->---' dateline ' =intval($_get[' Dateline ']),>--->---' url ' =$_get[' URL '],>--->---' allowcomment ' =!Empty($_post[' Forbidcomment ']) ? ' 0 ': ' 1 ',>--->---' summary ' =$summary,>--->---' catid ' =intval($_post[' catid ']),>--->---' tag ' = Article_make_tag ($_post[' tag ']),>--->---' status ' =$article _status,>--->---' highlight ' =$style,>--->---' showinnernav ' =Empty($_post[' Showinnernav ']) ? ' 0 ': ' 1 ', ' download_url ' =Htmlspecialchars($_post[' Download_url ']), ' download_size ' =Htmlspecialchars($_post[' Download_size ']), ' download_type ' =Htmlspecialchars($_post[' Download_type ']), ' download_official_website ' =Htmlspecialchars($_post[' Download_official_website ']), ' newgame_url ' =Htmlspecialchars($_post[' Newgame_url ']), ' newgame_web ' =Htmlspecialchars($_post[' Newgame_web ']), ' newgame_status ' =Htmlspecialchars($_post[' Newgame_status ']), ' newgame_f ' =Htmlspecialchars($_post[' Newgame_f ']), ' newgame_kfs ' =Htmlspecialchars($_post[' Newgame_kfs ']), ' newgame_yys ' =Htmlspecialchars($_post[' Newgame_yys ']), ' newgame_ce_time ' =intval($_get[' Newgame_ce_time ']),>---);
The above three steps basically can be done. If you have any questions, you can leave a note
discuz! X3 Portal Article add field