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
Per far funzionare questa funzione, devi essere collegato a un account qui su Meta
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.
Immagino che ci saranno molti casi d’uso specifici. Non posso garantire che questo componente funzioni con tutti, ma feedback e suggerimenti sono benvenuti 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
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.
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)
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.
Hmm, I’m not getting the same behavior. I just tried running through the demo steps and everything appears to be working properly:
demo
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.
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.
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.
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 ?
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.
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.
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:
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.
Your forum is using boxed categories, so it will not work. From the original post:
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.
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.
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.
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:
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.
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.
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.