关于cid和uid的问题

Bug,需求以及想法
回复
heyechuanmei
帖子: 8
注册时间: 2019年 1月 1日 13:32
联系:

关于cid和uid的问题

帖子 heyechuanmei »

很多博主都发现Typecho存在cid和mid跨度很大的问题,创建文章、页面、插件等都会消耗uid或者cid,所以常常遇见明明才几十篇文章cid和mid都到了几百几千的情况。
希望官方在下一个版本更新中修复这个问题,或者提供一下使其连续的方案或插件。
最好能自定义文章cid,并自动补齐低数值未使用的cid。

Many bloggers find that there are cid and mid span problems in Typecho. Creating articles, pages, plug-ins and so on will consume mid or cid, so they often encounter several dozen articles cid and mid in Mingming, which are hundreds of thousands.
It is hoped that the authorities will fix this problem in the next version update, or provide a solution or plug-in to make it continuous.
It's better to customize the article cid and automatically fill in the unused cid with low values.——Translation by Baidu
头像
ClayMore
帖子: 2481
注册时间: 2007年 11月 29日 02:55
来自: Sleeping Forest
联系:

Re: 关于cid和uid的问题

帖子 ClayMore »

之前也有有人提过这个问题 包括wordpress更甚(自动保存的草稿也占用CID) 其实这是无解的
谁能保证不删除以往文章 删除了呢 又要断开已连续的
头像
[email protected]
帖子: 28
注册时间: 2019年 8月 19日 14:51
联系:

Re: 关于cid和uid的问题

帖子 [email protected] »

这个问题实际上并不需要解决,如果你了解一些静态链接的原理的话。
Wordpress的解决方案是 使用缩写来解决,即每一篇文章会有一个 alias,静态链接的时候使用 domain/article/alias/ 这样的结构来访问,既避免了数字id的语义化差,不好看的问题,同时也一定程度上防止了别人通过数字ID的方式查看(系统漏洞或不足)来访问?控制?入侵你的数据。

在我们实际大型的互联网项目中,我们没有任何地方使用数字ID,因为那是非常高危险的方案。

----

如果你对静态链接,或者是文章管理有比较高的需要,那么你应该花时间考虑 给与每篇文章一个自定义数据 比如说 alias 来设置一个英文(包含数字下划线)的文章访问地址, 学习一下如何改进服务器端的rewrite来支持这样的方式。
这样的话 会比你向一个两年没有更新版本的官方提出需求要实际很多~~
Alpha
帖子: 12
注册时间: 2017年 2月 14日 14:28
联系:

Re: 关于cid和uid的问题

帖子 Alpha »

cid除了有文章使用以外,页面、附件和草稿也会占用。
mid有分类和标签以快占用。
同上,使用伪静态,每篇文章使用一个缩略名要比cid好。
头像
m4go
帖子: 857
注册时间: 2010年 3月 29日 02:33
来自: https://www.vpshu.com
联系:

Re: 关于cid和uid的问题

帖子 m4go »

slug 代替 cid
mid 这个 就没办法了 因为 不能再额外弄个 tid 啊 tag 也要用
回复