简体   繁体   English

PHP如何允许用户为博客设计自定义html?

[英]PHP how do I allow users to customize html for their blog design?

A certain blogsite allow its users to fully customize the entire html page of their blogg, change doctype and all, and they use tags for where they want the user to dipslay things like titlename and amount of comments etc. 某个博客网站允许其用户完全自定义其博客的整个html页面,更改doctype以及所有内容,并且在希望用户添加标题名称和评论数量等内容的位置使用标记。

ie this is code you can edit and submit under blog design settings: 即,这是您可以在博客设计设置下编辑和提交的代码:

    <tag:archivelist>
     <li><a href="${ArchiveLink}">${ArchiveName}</a></li>
    </tag:archivelist>
   </ul>
   <tag:if test="${hasLinks == 'true'}">
   <div class="navheader">Links</div>
   <ul>
    <tag:linklist>
     <li><a href="${LinkURL}" title="${LinkDescription}">${LinkName}</a></li>
    </tag:linklist>
   </ul>
   </tag:if>
   <tag:if test="${hasBooks == 'true'}">
   <div class="navheader">Books</div>
   <ul>
    <tag:booklist>
     <li><a href="${BookUrl}"><img class="thumbnail" src="${BookImageSmall}" border="0" alt="${BookTitle}" title="${BookTitle}" /></a><br /><a href="${BookUrl}">${BookTitle}</a></li>
    </tag:booklist>

Now, how do they replace the ${ArchiveLink} part to make it into something from mysql table, how do they extract and replace what method? 现在,他们如何替换$ {ArchiveLink}部分,使其从mysql表中转换为某种东西,如何提取和替换什么方法? preg_replace ? preg_replace?

They are most likely using XLST (or a more elaborate custom templating engine that makes use of it) to transform the markup into standard HTML. 他们最有可能使用XLST(或使用它的更精细的自定义模板引擎)将标记转换为标准HTML。 Though i think the variables they are using are different... if i recall XSL variables are {$VariableName} as opposed to ${VariableName} . 虽然我认为他们使用的变量是不同的...如果我记得XSL变量是{$VariableName}而不是${VariableName}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何允许用户使用 php html css js 在 wyswg 中自定义电子商务商店主题 - How do I allow users to customize e commerce store themes in wyswg using php html css js 如何允许我的用户在PHP中自定义他们的仪表板 - How do I allow my users to customize their dashboards in PHP 如何允许 iOS 用户通过我网站上的 html 输入字段上传文档? - How do I allow iOS users to upload a document via an html input field on my website? 如何允许用户使用php和jquery从单个输入字段中选择多个文件? - How do I allow users to select multiple files out of a single input field using php and jquery? 如何在我的 Wordpress 博客中找到由 custom.php 加载的 css 样式的来源? - How can I find the source of a css style loaded by customize.php in my Wordpress blog? 如何在PHP白名单中允许HTML - How can I allow HTML in a whitelist with PHP 如何在 PHP 中编辑我的博客作者格式? - How do I edit my blog's author format in PHP? 如何将图片添加到我的 PHP 博客? - How do I add images to my PHP blog? 我如何只允许特权用户使用php下载pdf? - How can I allow only privledged users to download a pdf with php? 如何将Wordpress博客链接到在Heroku上运行的PHP Yii网站的/ blog URL上? - How do I bolt a Wordpress blog onto a /blog URL for a PHP Yii site running on Heroku?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM