打算做些模板:
header footer 页面主体都要换 因为要使用多个模板而默认模板不变动,那么就要采用非常规的办法。
步骤:
第1步:把多个模板的html页面做好
第2步:图片放置到common,js放置到static/js,css放置到common并重命名extend_common.css
第3步:复制header和footer若干份,命名如header_1.htm等,引入css和js、修改。
第4步:将页面主体修改,头部尾部引用对应文件,修改中间主体,存为list_*.htm,增加频道后调用。
这都是设想出来的,没有经过验证,怕弄错了返回就麻烦了。所以请高手们看看有神马问题。
关于主体页面修改,有两个办法:一个是全部留白,然后DIY,麻烦在于每一个区块要做模板,要修改diy的css,使框架自定义自己的宽度,不是只有的那些1:1 2:2。但是十分直观,很难出错。
一个是直接在html上面修改,这个对discuz的理解要很深,每个{}替代对应标题还是文章,这个方法我想可能速度要快上很多,代码更少。但是缺的是数据源方面的代码(不像DIY能直接选择数据来源)。
问题:这样做会不会有什么后遗症?对不对?
主体页面修改,选择第二种办法的话,怎么写数据来源?
回复讨论(解决方案)
如主题列表页:
\source\module\forum\forum_forumdisplay.php的最后面,添加include template('forum/你模版的名字');你的模版要以.htm结尾
没做过模版,我就不乱指点了,不过你可以看看discuz的模版教程,感觉你这样写不好
如主题列表页:
\source\module\forum\forum_forumdisplay.php的最后面,添加include template('forum/你模版的名字');你的模版要以.htm结尾
没做过模版,我就不乱指点了,不过你可以看看discuz的模版教程,感觉你这样写不好
我初步尝试过,如果按照官方的去做模板,那么使用模板的时候,就是全部都是这个风格。他无法满足多个频道、每个频道各用一个风格的要求。
当然 我对discuz认识不深,算起来也接触一个周左右。
discuz不是每个板块都可以diy吗,频道是什么,我都不知道...
实在不行,也只好自己写了
呵呵,这个问题想当年我也钻研过,后来放弃了,频道就是所说的企业站,或叫门户中的栏目吧.说白了就是文章管理系统.这种系统要求每一个栏目可以随意定制结构,而discuz的cms功能很弱的,只有一种,当然也有变通的作法,比如用它的分类结合版块,但不是一般的麻烦,会搞的网站体积庞大.后来我就放弃了,也曾提出discuz在cms上加强功能,但话说discuz他们是专注论坛的功能,不可能面面俱到的.
discuz不是每个板块都可以diy吗,频道是什么,我都不知道...
实在不行,也只好自己写了
那在模板中,怎么loop出频道栏目和他的子栏目。
我只能做出loop出主栏目,但是无法loop出他的子栏目。
就是用模板的方式写 这样
普通方式或者DB方法不太适用
不知道你的$cat是在那个页面获取的
$cat里面应该有个upid的字段,若是0就是频道栏目,若大于0就是子栏目,upid就是子栏目的父级栏目id

Laravel simplifies handling temporary session data using its intuitive flash methods. This is perfect for displaying brief messages, alerts, or notifications within your application. Data persists only for the subsequent request by default: $request-

The PHP Client URL (cURL) extension is a powerful tool for developers, enabling seamless interaction with remote servers and REST APIs. By leveraging libcurl, a well-respected multi-protocol file transfer library, PHP cURL facilitates efficient execution of various network protocols, including HTTP, HTTPS, and FTP. This extension offers granular control over HTTP requests, supports multiple concurrent operations, and provides built-in security features.

Laravel provides concise HTTP response simulation syntax, simplifying HTTP interaction testing. This approach significantly reduces code redundancy while making your test simulation more intuitive. The basic implementation provides a variety of response type shortcuts: use Illuminate\Support\Facades\Http; Http::fake([ 'google.com' => 'Hello World', 'github.com' => ['foo' => 'bar'], 'forge.laravel.com' =>

Do you want to provide real-time, instant solutions to your customers' most pressing problems? Live chat lets you have real-time conversations with customers and resolve their problems instantly. It allows you to provide faster service to your custom

PHP logging is essential for monitoring and debugging web applications, as well as capturing critical events, errors, and runtime behavior. It provides valuable insights into system performance, helps identify issues, and supports faster troubleshoot

Article discusses late static binding (LSB) in PHP, introduced in PHP 5.3, allowing runtime resolution of static method calls for more flexible inheritance.Main issue: LSB vs. traditional polymorphism; LSB's practical applications and potential perfo

Laravel simplifies HTTP verb handling in incoming requests, streamlining diverse operation management within your applications. The method() and isMethod() methods efficiently identify and validate request types. This feature is crucial for building

The Storage::download method of the Laravel framework provides a concise API for safely handling file downloads while managing abstractions of file storage. Here is an example of using Storage::download() in the example controller:


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

MantisBT
Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

Atom editor mac version download
The most popular open source editor

Dreamweaver Mac version
Visual web development tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 English version
Recommended: Win version, supports code prompts!
