Anteprime della categoria

Questo componente ti consentirà di aggiungere “anteprime delle categorie” alla pagina delle categorie, in modo che gli utenti possano vedere che una categoria esiste senza avere accesso alla categoria effettiva. L’anteprima assomiglia a una categoria standard, ma può collegarsi a una pagina specificata dove un utente può essere istruito su come ottenere l’accesso.

Di seguito ho incluso un esempio semplice, ma ci sono molti modi diversi in cui questo componente può essere configurato. Assicurati di leggere tutte le informazioni incluse nelle Impostazioni del tema.

Demo del Creatore di Temi

:warning: Per far funzionare questa funzione, devi essere collegato a un account qui su Meta

  1. Vai su https://theme-creator.discourse.org e accedi utilizzando il pulsante nell’intestazione se non sei già collegato

  2. Utilizza il seguente link per attivare l’anteprima di questo componente: Theme Creator

  3. Scorri l’elenco delle categorie fino a trovare la categoria “anteprima categoria limitata” e prova ad accedervi:

  4. Verrai reindirizzato a una pagina pubblicata con istruzioni su come procedere per accedere alla categoria:

Impostazioni

Ho fatto del mio meglio per spiegare come funziona questo componente nelle impostazioni del tema. La configurazione non è l’esperienza più intuitiva, quindi sentiti libero di fare domande e aggiornerò le istruzioni per fornire maggiore chiarezza.

Note Aggiuntive

Immagino che ci saranno molti casi d’uso specifici. Non posso garantire che questo componente funzioni con tutti, ma feedback e suggerimenti sono benvenuti :slight_smile: Ecco alcune cose da tenere a mente:

  • Attualmente, questo non funziona con gli stili di pagina delle categorie “Box con argomenti in evidenza” o “Sottocategorie con argomenti in evidenza”. Se ci saranno sufficienti richieste, potrei valutare di aggiungere il supporto
  • Sono state aggiunte classi above-$CATEGORY alle anteprime che appaiono sopra una categoria specifica. Questo può essere utilizzato per aggiungere ulteriori stili.
  • Questo non funziona con le sottocategorie visualizzate nella pagina delle categorie
  • Gli utenti dello staff e gli utenti anonimi vedranno sempre le anteprime delle categorie.
  • Presta particolare attenzione alle note IMPORTANTI nelle Impostazioni del tema

Installa questo componente del tema

41 Mi Piace
Private category, visible but hidden topics/threads
How do I allow people to see categories but not access topics?
Discourse Category Lockdown
Non-members and topic security
Premium Categories Visibility
Lock topic content for logged out users
"Will be opened later" status for category
Display locked category but not it's content
Categories as private rooms, that are publicly visible?
New Category Permission
Asking for access to a private category
Tighter integration of account-creation and subscriptions?
Tighter integration of account-creation and subscriptions?
Can Category Names Be Public While Topics Remain Private
Paid Groups
I need a theme to promote some hidden categories
Locked category only for specific members
Have category name visible, but not posts within the category
Paid Groups
Gated Topics in Category
Paid Groups
[PAID] Modify the "Category Previews" theme to make it work with a limited visibility Group
How to properly set up a pinned "user reviews" for my trading category?
How to force existing users to accept ToS
Configuring group access, membership, and visibility
Hide all topics in a specific category but show the category
Enabling category previews for restricted paid access categories
Several questions about management right
Private Group Facebook Like
Login required to see topic info
How to make certain posts visable to users without accounts whilst having the 'login required' setting enabled?
Publicly display a private category
Is it possible for a user to select categories to have in cat list (not only at registration but anytime)
Category, Group, Tag Descriptions as Topics
Configuring group access, membership, and visibility
Preventing non-registered users from viewing posts

Oh, I like this, we just implemented special interest groups this week and we’ve had questions on how people would be able to find them. We do use box category styles, so would request that for sure.

6 Mi Piace

Staff users and anonymous users will always see the category previews.

So, those who dont register on the forum can see inside the category ?

Anon users will not be able to see inside the real, restricted category. They will only see the category preview. Staff can see/access everything. Here’s a breakdown of a hypothetical category list:

Staff User (always sees both)

  • Restricted Category
  • Restricted Category Preview
  • Public Category

Anon User (only ever sees the preview)

  • Restricted Category Preview
  • Public Category

Logged-in User with access to restricted category (preview not needed, so never shown)

  • Restricted Category
  • Public Category
7 Mi Piace

Just here to confirm that this works great with sites that have categories available to anonymous users, and others for logged-in users only. You can use the previews as a push to sign up.

category-slug~Category Title~Member access only~https://discourse.example.com/signup~trust_level_0

4 Mi Piace

Sorry, i make certainly the noob.

But, the 1 is ok. Not complicated.
When i click on the link in the 2 i have that :

When i go in “View Theme” i have an install button :

I dont want click on that, i am afraid to change all my forum.

Can you help me please and sorry again .

Hmm, I’m not getting the same behavior. I just tried running through the demo steps and everything appears to be working properly:

Just to be clear, the demo on our theme-creator site is just a demonstration of a use-case. You will need to install it on your own site using the installation steps at the end of the OP.

4 Mi Piace

Yeah i got it Thanks ! lol

But finally how install it that on our own site ?

As mentioned, there are instructions in the original post:

Then you will need to configure the theme settings, your category restrictions, and your group settings according to your needs.

4 Mi Piace

Yeah my bad, didnt see the github link. Thank you very much for your time

2 Mi Piace

So now, can you explain how use that please. English is not my native langage so its complicated.

Lets say i want to convert a public category in restricted category. Its possible ?

So can you give an example to put instead “Add item…”. Tell me if i right ?

category-slug : Name of category we want restricted
Preview name : Example : My restricted category
Preview Description : Exemple : “This a a restricted category”
URL : https://example.com/c/ category-slug /12
Group : Its for group name who access to the restricted category.

2 Mi Piace

You are doing a good job with your English :slight_smile: The set-up for this is tricky even when English is your native language.

Yes, you will want to follow this guide: Understanding groups and category permissions (security settings)

Close!

If it helps, here is what I have in my theme setting for the demo:

junk~restricted category preview~This category is only available to members of the "joinable-group" user group. Select for more information.~https://theme-creator.discourse.org/pub/logged-in-user-access~joinable_group

And how it relates to the description of the theme setting:

Theme Setting Part Value
category-slug junk
Preview Name restricted category preview
Preview Description This category is only available to members of the "joinable-group" user group. Select for more information.
https://example.com https://theme-creator.discourse.org/pub/logged-in-user-access
group joinable_group

And here is a diagram to show how the different parts relate:

In the image, “ :lock: restricted” is the real category that can only be accessed by the joinable_group user group (and staff by default).

9 Mi Piace

Thank you for your time dude. Ok ok it’s much clearer that way. And actually it was not obvious ^^

So lets do that ! and thanks again :slight_smile:

1 Mi Piace

Hi, its me again ^^

So, i put the settings here :

I have some questions :

1 : How build URL ?
2 : When we write the settings close to “category previews” after i confirm that. Its finish ?
3 : I did that but impossible to see the private category. I need to create that manually or not ?

Thansk and again sorry, its too hard for me.

1 Mi Piace

Hi :slight_smile:

  1. Which URL? Can you share the full value of the category previews theme setting in your screenshot? I should be able to give you suggestions based what you have entered into that setting.

  2. When you make a change to the category previews setting, click outside of the text field and you should see two buttons appear. Use the green one to save changes. After you save the changes, you will need to refresh any open browser tabs/windows to see the effect.

  3. Assuming Groupe privee is a category you have already created, you need to find and use the slug for it. It will most likely be something like group-privee. You can confirm this by navigating to the Groupe privee category and looking at your browser’s address bar. For example, the theme category here on Mete uses theme as the slug:

1 Mi Piace

Thanks for your reply.

So here is the category preview : Groupe privee~Parlons societe offshore~Cette catégorie est seulement disponible aux utilisateurs ayant rejoint le groupe.~https://forum.objectifhijra.com/pub/logged-in-user-access~groupe_joignable

If i understand correctly, the category must be created earlier ? I tried with existing category and same thing, nothing happen.

Yeah, i spoke about of URL in the categroey preview. How we build this URL ? Or if we need to create the category before, so i take the URL which is created by discourse.

1 Mi Piace

There are a few things to address:

  1. Your forum is using boxed categories, so it will not work. From the original post:

  2. The first part of your setting (Group privee) needs to be the slug of an existing, public category. The preview will display above this category. It should not be the name of the category you are trying to preview.

  3. It doesn’t look like URL you are using (https://forum.objectifhijra.com/pub/logged-in-user-access) is a real published page. You would need to create a published page using the instructions at Page Publishing and use the generated link to that page.

  4. Make sure you actually have a group with the name groupe_joignable

Unfortunately, I’m not sure how much more I will be able to help you. It’s fairly difficult to explain on its own and I think our language barrier isn’t helping. What I might recommend is posting in our marketplace category to see if you can hire someone to log into your site and help you directly.

3 Mi Piace

Its ok dude. I understood everything ! Thanks.

Im so sad it doesnt work with boxed categories style :frowning:

How can i do…

Anyway, thanks for everything. Im sure that will help other people.

2 Mi Piace

Ho appena scoperto questo componente del tema e sono entusiasta perché potrebbe semplificare alcuni workaround che stavo utilizzando. Ho alcune domande: non riesco a capire se siano al di là della mia comprensione di come funzionano le cose o se semplicemente non siano ancora state implementate:

  1. Gli utenti anonimi (non registrati) dovrebbero poter vedere l’elemento di anteprima della categoria nell’elenco /categories? Speravo che potessero vedere cosa è disponibile per incoraggiarli a creare un account, ma nei miei test finora non sono riuscito a far sì che ciò accadesse.

  2. Gli amministratori possono vedere l’anteprima della categoria anche se fanno parte del gruppo specificato che non dovrebbe vederla? Io sono in group-x come specificato nella stringa, ma vedo comunque l’anteprima sopra la categoria effettivamente riservata.

4 Mi Piace

Assolutamente sì, è uno degli scenari più importanti che questo componente dovrebbe coprire! Assicurati di utilizzare lo slug della categoria sopra la quale dovrebbe apparire l’anteprima. Se può essere utile, questo post analizza le impostazioni un po’ più in dettaglio rispetto all’OP.

Sì, volevo assicurarmi che il personale (moderatori/amministratori) vedesse sempre l’anteprima, così da essere sempre consapevoli della sua esistenza e collocazione. È meglio utilizzare un account utente di prova quando si testa il componente.

4 Mi Piace