Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Editing TXP core files (and the effect it has on upgrading)
Hi all,
I’m a web designer/developer from Wollongong, Australia, doing a commercial job in TXP.
Prior to this job I’d never used Textpattern, but its feature set seemed to be applicable to the job, so I dived in head-first.
Anyway, one request the client has is that the user privilege levels be renamed and adapted to his needs. I understand that a future version of TXP will have more precise end-user level-editing, but until that point, I can only assume the best way to accomplish this is by following the steps outlined here
Now the thing that has me concerned is that this is clearly hacking the Textpattern source files (something I’m more than willing to do; I have plenty of PHP experience, but only very mild experience with the TXP functions). I am just wondering, then, if undertaking this kind of hacking is going to mean the Textpattern installation would be unable to be upgraded when new versions are released. If so, is there some way I can accomplish this without breaking the system?
Up until now, all the problems I’d had were able to be sorted out by writing/editing plug-ins (it’s testament to the quality of the TXP community that I was able to do this without needing to ask any questions of my own until now), but this doesn’t seem to be one of those times, as it relates to changing hard-coded Textpattern functions.
So in short: what’s the best way of doing this?
Offline
Re: Editing TXP core files (and the effect it has on upgrading)
Offline
Re: Editing TXP core files (and the effect it has on upgrading)
Have a look at the revision log for the textpattern/lib/admin_config.php file.
Just one minor change in 2006 which would have been easy to merge manually with your own version.
The plugin approach mentioned by jm is nice, but uses javascript to hide things from users (instead of really disabling them). Editing the admin_config.php file is probably better if you have some experience in PHP.
Offline
Re: Editing TXP core files (and the effect it has on upgrading)
Oh, good, that’s what I like to hear! Of course, admin_config.php itself says loud and clear that it’s mostly deprecated and that its functions will be soon merged into the DB, so there’s a little bit of worry about that, but since 4.0.4 seems otherwise reasonably stable, I might just recommend to the client that he not upgrade TXP.
As a side-note, has anyone ever actually annotated the admin_config permissions list, explaining what each function actually DOES? That would be very useful.
Offline
#5 2006-11-28 21:44:19
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Editing TXP core files (and the effect it has on upgrading)
Permissions are in the database: the txp_priv table. (Or isn’t this table used yet?)
Descriptions here.
Edit: o.k. see what you mean. These are not actual descriptions of the functions.
Last edited by els (2006-11-28 21:53:17)
Offline
Re: Editing TXP core files (and the effect it has on upgrading)
Els wrote:
Permissions are in the database: the txp_priv table. (Or isn’t this table used yet?)
No, not used. Without an interface to edit permissions, it would be a step backwards to push them in the db (harder to edit and an additional query; for hardly any benefit).
Offline
#7 2006-11-28 21:59:21
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Editing TXP core files (and the effect it has on upgrading)
I see. Thanks for clarifying Sencer.
Offline