Category Previews

Thanks for those tips.

I tried a second example:

internal~Join Group X!~Come join our formerly top secret group.~https://example.com/~group-x

… then checked with both an anonymous session, and also by impersonating a non-admin and non group-x member user account. Unfortunately neither preview showed up including this second confirmation one. For my admin account, it looked OK, appearing directly above the “internal” slug category, as expected, with the correct link destination, etc.

We do have some things that aren’t quite normal seeming with respect to category displays, so it’s possible this is related to that, unless other folks end up finding a similar type of non-expected behavior. :slight_smile:

2 个赞

It is odd that it would display for the admin, but not for the other users that should also see it. Just to be sure, your internal category is visible to anons and non group-x users?

3 个赞

Thanks for that clue! I had misunderstood the purpose of the first field in the string. I had been using the “members only category” associated with group membership.

Once I changed the first field to an existing, public, open-to-everyone category, everything worked as expected. :tada:

news~Join Group X!~Come join our formerly top secret group.~/pub/membershipinfo~group-x

TLDR (for how my brain interpreted it) - I needed to understand that the first field is where you want the “preview” advertisement to appear in the category list. (In this case, just above the public “news” category.)

3 个赞

我真的很感谢你这么说。我原以为设置中的分类 slug 是指一个现有的私有分类,我想将其拉入分类菜单。但实际上,我意识到这个主题组件基本上只是允许我们在分类列表中的特定分类上方放置一个自定义链接,而且这个链接实际上不必与现有分类相关。例如,我刚输入了 welcome~访问 Google!~这是分类列表中的一个自定义链接~https://www.google.com,它就生效了。

我认为是我被“分类预览”这个名字搞糊涂了,没有理解它的功能,所以谢谢你指出来。

另外,我注意到这似乎只出现在分类列表视图中,而不是在分类下拉菜单或搜索中。

2 个赞

@tshenry 能否找出如何使此类别具有带框样式的私有化?

2 个赞

运气的是,我刚刚添加了对“带子分类的框”桌面分类页面样式 :slight_smile: 的支持

请注意,“带特色主题的框”尚不支持。

7 个赞

帖子已拆分为新主题:在框选分类列表上方添加一个部分

@tshenry 有办法将这些隐藏起来不让员工看到吗?

看到真实分类和虚假分类在一起非常令人困惑,我们总是点击错误的分类 :man_facepalming:

即使是 CSS 隐藏技巧也可以 :blush:

1 个赞

我明白 slug 是紧邻这个假分类标签下方的分类。然后需要有一个可访问的分类在其下方。
有没有办法将假标签放在列表的底部?有没有像 at-last 这样的特殊 slug,可以将其完全放在所有内容之下?

编辑:我找到了一个解决方法。
我添加了一个虚拟分类,没有人拥有写入权限,但所有人都拥有读取权限。我用 CSS display=\"none\" 隐藏了这个分类,并使其出现在最后。这完全不令人满意,但是……效果很好。

这是一个很棒的组件,但我遇到了一个问题,它没有隐藏实际的类别。我尝试使用非管理员帐户和匿名用户进行测试。下面是我看到的内容以及我的设置。是我做错了什么还是存在 bug?

类别 URL:https://community.naturephotographers.network/c/beginners/147

类别预览条目:

beginners~Beginners Feedback~A place for beginner photographers to share their images and get feedback in a comfortable atmosphere with other beginners. Experienced members of NPN will give feedback to help guide beginners in their photographic journey.~/g/Beginners~Beginners,Beginner_Support
1 个赞

请问 @oca,您是在哪里添加此 CSS 的?

编辑:在此处找到并更改了 ID 以便使用:How to Hide the Staff Category with css? - #3 by Tim_Jefferies

2 个赞

这个主题与可见性设置为“仅群主”的群组不兼容。

@tshenry ,有可能修复/添加此功能吗?:thinking:

1 个赞

您可以配置它以显示用户可以看到的类别。这有点令人困惑(我不得不读了好几遍)。我相信它应该在您的情况下起作用。(请注意配置字段描述中的“重要”一词)

1 个赞

哎呀,两个“重要”消息中的第二个是这么说的:

  • **重要提示:**所选组的配置必须将“谁可以看到此组?”的可见性设置设为“组所有者、成员”或更宽松的设置。

顺便说一句,我认为“组所有者、成员”实际上应该说“组所有者、成员和版主”。

:confused:

我想知道主题是否可以修改为在组设置为“组所有者”时也能正常工作。

1 个赞

您附加消息的类别必须允许人们看到它。您想宣传的类别则不行。或者至少我是这么理解的。

1 个赞

您好 @tshenry

我正在按照您的指示,在不同的用户组中进行测试。除了管理员之外,没有用户可以看到类别预览。我哪里做错了?

private-lounge~Private Lounge Preview~Private lounge reserved for our experts and contributors.~https://example.com~group_a,group_b,group_c

A、B、C 组都可以被所有人查看。

感谢您的帮助!

我看到这似乎与“带有子类别的框”兼容,并且我的安装中已启用该功能,但是,一旦我启用 air 主题,类别预览就会消失。有没有办法让它与该主题一起使用?谢谢!

我已经开始进行一些调试,可以看到它进入了这个块,并且应该将 previewData 添加到渲染中,但它甚至没有出现在页面上的 HTML 输出中。

1 个赞

这看起来正是我所需要的:一个给用户输入分类时的醒目警告。

但这似乎不适用于_子分类_。我尝试输入了以下模式:

  • sub-category
  • parent-sub-category
  • parent:sub-category
  • parent/sub-category

没有一个奏效。但 parent 可以正常工作(只是我不想在那里显示分类预览)。

您知道是否有可用的模式,或者是否可以支持此功能吗?

1 个赞

我认为预览已损坏,因为

2 个赞

您将需要此 Theme component 来选择非盒式分类样式。这曾经集成在核心中,但已被移至主题组件。

1 个赞