In some cases, you would want to display a notice for specific usergroups on specific page(s).
You would normally do this by adding a Notice in AdminCP and then choosing a usergroup in the "User belongs to usergroup" dropdown. But this has the following limitations:
Enter this mod...(trumpet sound)
Add this custom CSS in css_additional template in AdminCP or in Sitebuilder > Style > CSS Editor.
The style I used is the same style used in the Notice by default. Depending on how many usergroups and pages you want to display a notice for and to, choose from one of these:
For single usergroup on a single page: (Change XX and YY to corresponding page id and usergroup id, respectively)
For single usergroup on multiple pages: (Change XX/ZZ and YY to corresponding page id and usergroup id, respectively)
For multiple usergroups on a single page: (Change XX and YY/ZZ/AA to corresponding page id and usergroup id, respectively)
For multiple usergroups on multiple pages: (Change XX/YY/ZZ and AA/BB/CC to corresponding page id and usergroup id, respectively)
To find the page id, right click on the target page, and choose "Inspect element" (or equivalent), search for the <body> tag. The <body> tag has a class attribute that has a value that includes "pageXX" (e.g. page19).
To find the usergroup id, go to AdminCP > Usergroups > Usergroup Manager. Each usergroup displays the id in the Edit Usergroup dropdown.
Enjoy!
You would normally do this by adding a Notice in AdminCP and then choosing a usergroup in the "User belongs to usergroup" dropdown. But this has the following limitations:
- You can only select one usergroup. If you need to select multiple usergroups, you'd have to create a separate notice and duplicate it and then change the usergroup. This is cumbersome and hard to maintain especially if you need this for 3 or more usergroups.
- The "User is browsing channel" dropdown doesn't have the option for all pages on the forum. For example, if you want to display a notice in the "Create New Topic" page, there's no option to display a notice there.
Enter this mod...(trumpet sound)
Add this custom CSS in css_additional template in AdminCP or in Sitebuilder > Style > CSS Editor.
The style I used is the same style used in the Notice by default. Depending on how many usergroups and pages you want to display a notice for and to, choose from one of these:
For single usergroup on a single page: (Change XX and YY to corresponding page id and usergroup id, respectively)
Code:
#vb-page-body.pageXX[data-usergroupid="YY"] .page-title-widget .module-title:after { content: 'NOTE: Your post will be moderated.'; /* Update the message accordingly */ border: 1px solid #E1D47E; background: #FCF7D7; font-weight: normal; font-size: 13px; display: block; padding: 6px 10px; margin-top: 15px; border-radius: 3px; }
Code:
#vb-page-body.pageXX[data-usergroupid="YY"] .page-title-widget .module-title:after, #vb-page-body.pageZZ[data-usergroupid="YY"] .page-title-widget .module-title:after { content: 'NOTE: Your post will be moderated.'; /* Update the message accordingly */ border: 1px solid #E1D47E; background: #FCF7D7; font-weight: normal; font-size: 13px; display: block; padding: 6px 10px; margin-top: 15px; border-radius: 3px; }
Code:
#vb-page-body.pageXX[data-usergroupid="YY"] .page-title-widget .module-title:after, #vb-page-body.pageXX[data-usergroupid="ZZ"] .page-title-widget .module-title:after, #vb-page-body.pageXX[data-usergroupid="AA"] .page-title-widget .module-title:after { content: 'NOTE: Your post will be moderated.'; /* Update the message accordingly */ border: 1px solid #E1D47E; background: #FCF7D7; font-weight: normal; font-size: 13px; display: block; padding: 6px 10px; margin-top: 15px; border-radius: 3px; }
Code:
#vb-page-body.pageXX[data-usergroupid="AA"] .page-title-widget .module-title:after, #vb-page-body.pageYY[data-usergroupid="BB"] .page-title-widget .module-title:after, #vb-page-body.pageZZ[data-usergroupid="CC"] .page-title-widget .module-title:after { content: 'NOTE: Your post will be moderated.'; /* Update the message accordingly */ border: 1px solid #E1D47E; background: #FCF7D7; font-weight: normal; font-size: 13px; display: block; padding: 6px 10px; margin-top: 15px; border-radius: 3px; }
To find the usergroup id, go to AdminCP > Usergroups > Usergroup Manager. Each usergroup displays the id in the Edit Usergroup dropdown.
Enjoy!
Comment