boxmoe_header_banner_img

Hello! 欢迎来到盒子萌!

加载中

制作Whmcs主题|Whmcs模板常用函数变量


avatar
专收爆米花 2018年3月26日 4.97k

折腾whmcs主题 模板的时候经常用的到函数变量!! 自己备份起来,方便复制黏贴!!~~
其实做whmcs主题也是很简单~有点html知识也能折腾

复制代码
  1. {$companyname} //网站名称
  2. {$WEB_ROOT} //网址根目录
  3. {$headoutput} //</head>信息输出
  4. {$headeroutput} //头部输出<body>后面
  5. {$footeroutput} //底部输出</body>前面
  6. {$date_year} //系统日期年
  7.  
  8. //加载模板
  9. {include file="$template/xxx.tpl"}
  10. <title>{if $kbarticle.title}{$kbarticle.title} - {/if}{$pagetitle} - {$companyname}</title>
  11.  
  12. //不是这样页面和模板
  13. !$showingLoginPage && !$inShoppingCart && $templatefile != 'homepage'
  14.  
  15. //检测系统语言,并输出系统可选择语言
  16. {if $languagechangeenabled && count($locales) > 1}
  17. {$activeLocale.localisedName} //当前语言
  18. {foreach $locales as $locale} //循环检测
  19. {$currentpagelinkback}language={$locale.language} //系统语言链接
  20. {$locale.localisedName} //语言名字
  21. {/foreach}
  22. {/if}
  23. {if $loggedin}{/if} //如果已经登录
  24.  
  25. {if $templatefile == 'homepage'}{/if} //检查模板用的是homepage.tpl
  26.  
  27. {if $registerdomainenabled || $transferdomainenabled}{/if} 检测有开放域名注册和转移功能
  28.  
  29. {if count($clientAlerts) > 0}{/if}//检测账户通知信息大于0
  30. {foreach $clientAlerts as $alert}
  31. {if $alert->getSeverity() == 'danger'}exclamation-circle
  32. {elseif $alert->getSeverity() == 'warning'}warning
  33. {elseif $alert->getSeverity() == 'info'}info-circle
  34. {else}check-circle{/if} //判断信息类别输出不同格式
  35. {$alert->getMessage()} //消息输出
  36. {foreachelse} //没有消息
  37. {$LANG.notificationsnone}
  38. {/foreach}
  39.  
  40. logout.php //退出
  41.  
  42. //判断管理员并已经登录了输出
  43. {if $adminMasqueradingAsClient || $adminLoggedIn}
  44.  
  45. {/if}
  46.  
  47. //判断如果有logo输出LOGO,没有就网站名
  48. {if $assetLogoPath}
  49. <a href="{$WEB_ROOT}/index.php" class="logo"><img src="{$assetLogoPath}" alt="{$companyname}"></a>
  50. {else}
  51. <a href="{$WEB_ROOT}/index.php" class="logo logo-text">{$companyname}</a>
  52. {/if}
  53.  


评论(0)

查看评论列表

暂无评论


发表评论

表情 颜文字
😀😁😂🤣😃😄😅😆😉😊😋😎😍🥰😘😗😙😚😛😝🤗🤔🤨😐😑😶🙄😏😣😥😮🤤😴😪😵😵😵🤯🤠🤡🤥🤫🤔🤨😐😑😶🙄