Skip to main content

Drupal 用 View 增加相关链接 - Related Post

Drupal 没有现成的相关模块,但是可以用 View 生成一个,类似 Wordpress 里的 Related Post。

原理:用 View 增加一个 Block,在 Advance Filter 里按 texonom id 进行过滤。

步骤:

1、新增一个View:Related Post

2、在右边 Advanced 里新增 CONTEXTUAL FILTERS,选择 taxonomy term ID。

taxonomy id

然后设定关联内容,这里根据 Tags 关联:

“填补漏洞” 用英语怎么说

据报道,个人所得税税制改革有望今年启动,目标是由现行的分类个税税制转向综合和分类相结合的个税税制。我国目前的分类税制存在较多的逃税避税漏洞,如对不同的所得项目采取不同税率和扣除,易造成纳税人分解收入、多次扣除费用的危险。 
请看《中国日报》相关报道:Taxation authorities are mulling reform of the personal income tax system by clubbing total income under one head and lowering the top rate to check evasion and simplify computation. Currently, taxpayers pay personal income tax on 11 different categories with different thresholds and rates, which presents loopholes to high-income earners who might divide their income into several categories for evasion, he added. 

用 php 爬 sohu blog 的一个小爬虫

隐约感觉 sohu blog 也快不行了,所以看到一个不错的英语部分,就扒了下来。

爬虫本身很简单,关键点是搜狐博客标题列表是用 Ajax 加载的,所以找到列表就完成一半了。

其实很简单,用 HttpWatch 找到其链接就可以了,比如:

http://liuyongli99.blog.sohu.com/action/v_frag-ebi_93b2b93792-pg_112-c_2729466/entry/

剩下的就简单了,用的是 phpspider,代码如下:

Drupal 8 Group Module 介绍

链接:Group

注意:是 Group 不是  Organic Groups,后者巨难用,也可能是我不会用。

The Group module allows you to create arbitrary collections of your content and users on your site and grant access control permissions on those collections。

视频演示:https://www.youtube.com/watch?v=GkiCLJk5n0s

其他 Group 相关 module:https://www.drupal.org/docs/8/modules/group/community-contributions

“客串” 用英语怎么说

老友记“莫尼卡”转行做八卦皇后?好友“瑞秋”摇身变魔头女主编的宿敌?甚至是,两人还火辣接吻?当然,既然打了问号,那就说明这些论述已被加工,仅是谈资而已。看下面一段有关安妮斯顿“瑞秋”客串考克斯“莫尼卡”的新片《流言》的外国媒体报道:

Courteney Cox and Jennifer Aniston will smooch on season finale of FX's "Dirt."

In the episode, Aniston, 38, guest stars as a lesbian magazine editor and rival to Cox's character, ruthless tabloid queen Lucy Spiller.

报道说,安妮斯顿在好友考克斯的新剧《丑闻》中客串了一个同性恋女主编的角色,在《丑闻》大结局时,两位女主编还上演吻别镜头。

由报道可知,“客串”可表达为“guest star”。为了提高收视率,影视作品力请大腕儿搞“客串”可谓风靡全球。既然“客串演员”是名人,“guest star”恰到好处地体现了名人不是一般的配角、名人又不是影片主角儿的内涵。

"一夜情" 用英语怎么说

下面这则新闻,可能会令老师、家长甚至性教育家大吃一惊。一项在北京某区所做的调查显示,北京的中学生远比社会所想象的“开放”:一半以上的受访学生认为“一夜情”没什么错,6.2%的人承认他们有过性行为。

请看《中国日报》相关报道:High school students in Beijing are far more promiscuous than their teachers or parents think, according to a survey conducted in a city district.

More than half of those polled said there was nothing wrong with a one-night stand; and 6.2 percent admitted they already had a sexual encounter, according to the results released recently.