Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2024-12-06 03:13:02
- hidalgo
- Member
- From: Australia
- Registered: 2008-02-05
- Posts: 80
Show development theme preview to other logged in users
The development theme function is wonderful for working on changes, but where I get stuck each time is when I’ve finished development theme changes and would like to present the preview to logged in users (e.g. Clients) for approval, prior to making it public.
Currently it appears to be limited to:
‘users with sufficient privileges [initially Publisher and Designer roles] can safely develop and preview a new theme while all other users will still see the old theme (until the new one is deployed)’.
My clients only have ‘Staff Writer’ access, but it appears the preview function is hard coded in to Publisher and Designer roles. I’ve tried adjusting ‘Privs’ in smd_user_manager
but there appears to be no preference or function for development theme previews to other users?
How does everyone else work around this?
Offline
Re: Show development theme preview to other logged in users
hidalgo wrote #338428:
there appears to be no preference or function for development theme previews to other users?
Weird. You should see skin.preview
as an editable priv level. Even though it is added late, it should still be picked up by the plugin.
Failing that, for now, you can edit lib/admin_config.php and change the default privs right at the bottom of the file to 1,2,3,6 but the plugin would be the better route if you can get it to work.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
#3 2024-12-06 08:00:15
- hidalgo
- Member
- From: Australia
- Registered: 2008-02-05
- Posts: 80
Re: Show development theme preview to other logged in users
Bloke wrote #338429:
Weird. You should see
skin.preview
as an editable priv level. Even though it is added late, it should still be picked up by the plugin.
Thanks for this information, I did see skin.preview
, but adding this priv to a group doesn’t appear to make any difference in my testing? (It’s also not checked by default for the designer
group so thought I was on the wrong track.)
And yes, would prefer not to edit the core file.
Offline
Re: Show development theme preview to other logged in users
Was the user (recently) logged-in while testing?
It actually looks like you need to edit the global $txp_options
at some early step too, because level 3 users have no access to enable_dev_preview
pref.
I don’t remember why these pluggable privs have to be so complicated.
Offline
Re: Show development theme preview to other logged in users
etc wrote #338431:
I don’t remember why these pluggable privs have to be so complicated.
Haha, because none of us have got round to making them better yet. I did have plans to add a couple of tables to the database for linking privs and roles to user accounts. Did a load of work on it in a long-lost branch somewhere but never completed it, for reasons I now can’t recall.
In any case, this particular priv is more complex because it’s behind a pref so can’t be set immediately like the rest.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
Re: Show development theme preview to other logged in users
Bloke wrote #338432:
In any case, this particular priv is more complex because it’s behind a pref so can’t be set immediately like the rest.
And the pref can not be set because it’s behind some other permissions. Cute!
Anyway, now that plugins are so easy to compile, you can try this one. If enabled, it should give (unconditional) access to dev preview to every logged in user, except freelancers.
# Name: abc_devpreview v0.1
# Type: Public site only plugin
# No description
# Author: Oleg Loukianov
# URL: http://localhost/textpattern/
# Recommended load order: 5
# .....................................................................
# This is a plugin for Textpattern CMS - https://textpattern.com/
# To install: textpattern > admin > plugins
# Paste the following text into the 'Install plugin' box:
# .....................................................................
H4sIAAAAAAAACl2Q3YqDMBCFr3dh3yGEgi1INWp/jOwbLLsPsCwSdbSh1oQkul1K330nrb3p
RWDOyczwzRGcMX6xPOO0Vg3QwnKWoTDQSevAlLXo+0rUx2U7DrWTaiDLBUwwuJAssEGvyOXt
9aXrVSV6snBnXWowJ2ktttoCv56978Ae5bDWBiYJv8EPeScBC5MwDbNwG+DENSQB/jo4uwBL
fGxVeLAdpxMYv8SrlNN4zXyFuO5PI7vkMcoNp8o0YLxOUW85FaM7KHM/jtOvHjryocajFIOa
bm786ClHI72T5JwenNM8inqFGRyUdZFH0sJhLEN0G2OcNmBrI7Wbqfz+T0WeXERqe9HZByI2
DeIEjwFR1WUD0xzJA6hXoinnS9DhdDOffWruVYIJsDSv0hw2kO/jthZ1AlWya3fZPoY9axJa
XP8BtYyvvOIBAAA=
Offline
#7 2024-12-07 23:45:22
- hidalgo
- Member
- From: Australia
- Registered: 2008-02-05
- Posts: 80
Re: Show development theme preview to other logged in users
etc wrote #338437:
Anyway, now that plugins are so easy to compile, you can try this one. If enabled, it should give (unconditional) access to dev preview to every logged in user, except freelancers.
Oh excellent! I’ve just tested this and it works perfectly, just what I’ve been trying to do, thank you so much!
Offline