Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: [plugin] [ORPHAN] cxc_templates : front-end template management
The only problem I see with that Mike is that a user would now have to manually install 2 plugins prior to doing the theme installation. No biggie for all of us veterans but I’m trying to make this a simple a process as possible for the noobs, so I would not favour such a split even though I can totally see the logic behind it.
Stuart
In a Time of Universal Deceit
Telling the Truth is Revolutionary.
Offline
Re: [plugin] [ORPHAN] cxc_templates : front-end template management
That’s is a drawback that cross my mind too, Stuart. I totally appreciate your point of view.
Here’s why I came down on the side of breaking it out as a preferred route
- We already have many plugins that need a library or second plugin. zem_contact_reborn, soo_, smd_, wet_, sed_, mem_ all have some or all of their plugins in need of a second/lib plugin
The great thing is that with the new template plugins, cxc_templates in particular, is that installing plugins is simplified. All the necessary plugins are installed and enabled.
The drawback is that it doesn’t help prior to installing the cxc_template. Still, to install and enable two plugins (a lib and cxc_template) seems pretty easy, especially if they are packaged together. If you can install and enable cxc_template, doing one more doesn’t seem like it should be a big issue, even for noobs.
Since cxc_templates and smd_admin_themes are likely to both be installed eventually, having the smaller amount of code seems preferable.
In the vein of simplicity, though, maybe there is a way to install cxc_templates and have it automatically load the needed library plugin from the new Textpattern.org?
Last edited by maverick (2011-01-27 17:28:34)
Offline
#18 2011-01-27 18:53:11
- ~cXc~
- Plugin Author

- Registered: 2010-12-27
- Posts: 39
Re: [plugin] [ORPHAN] cxc_templates : front-end template management
Mike, after Stef explained how it worked (my gratitude is immense for the education) I have started working on making the required adjustments. I have had this one thought the whole time though, you and Zanza still may not be able to get it to work even with this it still requires the PHP ZLIB to function. So I’ve decided I’ll indeed include the error messages discussed earlier and if possible, Stuart, could you send me a copy of the docs for Coda (just the docs) so I can either plagiarize it or get inspiration from it 
The classes Stef encouraged me to use are not as complicated as I had thought after seeing the hooks I think I can get it working :)
So far it unzips and installs properly so I’m back to working on the Zip Project feature, and adding the educational information about PHP ZLIB and how to enable it and if its not possible aggravate the host :P I like covering all the bases with error messages o.O this plugin is more or less targeting new users not the veterans that understand it all ;) they need to be educated and taught the things I’ve learned while refactoring the plugin.
Back to work and see if I can get recursive directory zipping ;)
@Stef, to maintain the namespace I only have to name my classes cxc_ right? I don’t need to bother with function names?
Last edited by ~cXc~ (2011-01-27 18:59:14)
Offline
Re: [plugin] [ORPHAN] cxc_templates : front-end template management
cXc wrote:
it still requires the PHP ZLIB to function.
Yeah. A pain. But more widespread than the Extension.
to maintain the namespace I only have to name my classes cxc_ right? I don’t need to bother with function names?
Correct. Anything globally acessible to TXP needs your prefix: the internal functions are merely private methods.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Hire Txp Builders – finely-crafted code, design and Txp
Offline
#20 2011-01-27 21:53:24
- ~cXc~
- Plugin Author

- Registered: 2010-12-27
- Posts: 39
Re: [plugin] [ORPHAN] cxc_templates : front-end template management
Sorry but I have to postpone this until tomorrow, I’m so sleepy, I just fell out of my chair o.O
I have most of it ready but I’ve created some permission issues, I’m having trouble deleting uploaded files after they are extracted and webroot installation seems to be completely broken :(
Last edited by ~cXc~ (2011-01-27 21:54:30)
Offline
#21 2011-01-30 22:59:51
- ~cXc~
- Plugin Author

- Registered: 2010-12-27
- Posts: 39
Re: [plugin] [ORPHAN] cxc_templates : front-end template management
New version released http://code.google.com/p/cxc-templates/downloads/list please look over and let me know if there are any errors or anything else I need to work on. If there are no new issues I want to move to v0.1.0 and call it a stable beta :D
I want to thank everyone that has been helping by testing and contributing advice and code, Stef I accidentally left you off the thanks and credits list but you will be added in the next release ;)
Sorry it took me three days to figure out how to delete the uploaded files o.O unless something new is discovered the only thing I have left on my ‘to do’ list is recursively delete ‘preimport-data’ before exporting to it during import … I found a few hundred form files from playing around in the ‘preimport-data’ of my test site lol that made me decide I should delete it each time so that it only contains the files and settings that were active at the time of install. That’s all I got or all I can remember that I have left o.O
[ edit ] v0.0.8 added to the SVN but no full release since I’m still making small changes in the help section and other areas and waiting for any issues that might be reported, v0.0.8 adds deletion of ‘preimport-data’ and acknowledgment of Stef’s contribution to my education :) [ /edit ]
Last edited by ~cXc~ (2011-01-31 11:54:12)
Offline
Re: [plugin] [ORPHAN] cxc_templates : front-end template management
Nice! Now it works on my server. I have been able to export my actual template and to load Translucence, then to revert to mine. Everything is ok (except that translucence theme have widgets and variables that doesn’t fit by default with my section naming, but that’s another problem; maybe a problem that could prevent easy theming adoption from basic users, but it’s not the right place to talk about it).
I’ll report back any issue as I use the system. Thank you for your great job so far!
Offline
#23 2011-01-31 12:28:29
- ~cXc~
- Plugin Author

- Registered: 2010-12-27
- Posts: 39
Re: [plugin] [ORPHAN] cxc_templates : front-end template management
Sorry about the back to back releases v0.0.8 now available http://code.google.com/p/cxc-templates/downloads/list changes outlined in my previous post, hopefully this will be the final alpha release.
Last edited by ~cXc~ (2011-01-31 12:30:43)
Offline
#24 2011-02-11 10:18:45
- ~cXc~
- Plugin Author

- Registered: 2010-12-27
- Posts: 39
Re: [plugin] [ORPHAN] cxc_templates : front-end template management
Nobody complained about the last couple releases so I went ahead and added language string support (until I can figure out textpacks) and moved the release to public beta. The cxc_templates v0.1.0 plugin is now available at Google Code and I’ve updated the first post of this thread :)
o.O I hate piggy backing my own post o.O sorry for the double … o.O
Last edited by ~cXc~ (2011-02-11 10:20:17)
Offline
Re: [plugin] [ORPHAN] cxc_templates : front-end template management
Doc
It’s really polishing up :)
sorry for the poor timing. late last night I installed v0.8 on a multi-site install and definitely wasn’t newbie friendly. Granted, a newbie isn’t going to probably be setting up Txp as multi-site. So perhaps its not of great importance.
It was late, and I did not have a lot of time to play with around, but among the issues that I found:
- In the case of last night, I was logged in using the main domain, and the standard symlink to the admin (domain.com/admin). It required that I change the hardcoded sitepath.textpattern to admin and that worked
- each muti-site gets its owm tmp directory
- Even though I have php 5.3.x running, the upload of the zip would start and then fail. Several errors telling me it failed mixed with “successfully upload” messages. Weird. I ended up ftping an unzipped file and everything worked.
Offline
#26 2011-02-11 20:08:17
- ~cXc~
- Plugin Author

- Registered: 2010-12-27
- Posts: 39
Re: [plugin] [ORPHAN] cxc_templates : front-end template management
I do not fully understand the multi site set up, I had planned to work on it before beta release but forgot.
I’m going to guess that the upload issue is also related to the multi site feature of TXP, if successfully uploaded is displayed then the upload is successful but there are issues with the export/import. I’m thinking this might also be related to the location of the default template directory.
I’ll try to setup a multi site on my server tonight and see if I can get around the issues, I may end up having to add pref’s to the plugin so that multi sites are supported, sorry for the inconvenience :( thank you very much for the report, I’ll get to work on it as soon as I get multi sites figured out.
Offline
Re: [plugin] [ORPHAN] cxc_templates : front-end template management
cXc wrote:
if successfully uploaded is displayed then the upload is successful but there are issues with the export/import.
The tpl director was empty until I ftp’d. I’m pretty sure it had to do w/ paths. That seems to be the biggest gotchya w/ multi-sites.
I’ll try to setup a multi site on my server tonight and see if I can get around the issues.
No problem on the inconvenience. Just was the first time I tried it on my m.s. install.
When you use the m.s. option you have a lot more flying — you have the public, private, and admin folders, symlinks, and the ability but not the requirement to set up the admin as a separate/subdomain. Plus you can but don’t have to move the websites (and/or sites folder) out of the txp install. Again – it all has to do with how you set up your directory structure on your server, and how good you are with symlinks.
Offline
#28 2011-02-11 21:19:30
- ~cXc~
- Plugin Author

- Registered: 2010-12-27
- Posts: 39
Re: [plugin] [ORPHAN] cxc_templates : front-end template management
maverick wrote:
When you use the m.s. option you have a lot more flying — you have the public, private, and admin folders, symlinks, and the ability but not the requirement to set up the admin as a separate/subdomain. Plus you can but don’t have to move the websites (and/or sites folder) out of the txp install. Again – it all has to do with how you set up your directory structure on your server, and how good you are with symlinks.
You are scaring me, lol only time I have used symlinks on my server is when I’m adding vhosts containers … o.O … and to be honest, that consist of me copy / pasting one of the existing vhost containers and editing paths and domain names to the new vhost, I barely understand my server o.O
… I guess the good news is “I don’t give up” and I’ll eventually have it all figured out (goes for both M.S. and the plugin code) lol
I’ll either update this post with my progress or add a new one if there are posts made between now and then, probably be about 12 – 16 hours before I can get started on this :( so please post any other errors/issues discovered in standard or M.S. installations ;)
[ EDIT ] Which setup do I need to use? Are you using M.S. option A or B setup? [ /EDIT ]
Last edited by ~cXc~ (2011-02-11 21:54:51)
Offline
Re: [plugin] [ORPHAN] cxc_templates : front-end template management
M.S.‘s not hard. Just . . . quirky :)
Yesterday I started a post on some of the ins and outs of multi-site installs
My host allows me to set the path for each domain (the public folder). So I’ve been setting the main url to the public folder, and a subdomain to the admin folder. I’ve just begun to experimenting with moving the each site folder out of textpattern/sites. The site I was using was in textpattern/sites.
symlinks are actually pretty easy using a command line. I usually google one of the online references just to refresh my memory.
I normally use a subdomain for my admin. Which is the case with this. Except I left a symlink intact so I could log in at tld.com/symlink (work around so rvm_privileged would work properly for me).
I’m on another project for work for the next few days, and won’t have much time free. But if I get a chance I’ll try to test it out more. Just can’t promise I’ll get to it.
Thanks, and good luck! :)
Mike
Offline
#30 2011-02-12 03:29:42
- ~cXc~
- Plugin Author

- Registered: 2010-12-27
- Posts: 39
Re: [plugin] [ORPHAN] cxc_templates : front-end template management
Thanks for all the info, I actually guessed wrong and setup for the other type M.S. but I needed to get it right for both setups anyway so that doesn’t matter much ;) good to know I got a few days to get something ready and do some troubleshooting lol I was trying to have a full fix ready overnight lol that’s usually a bad idea for me o.O it would have worked but it might not have been clean code
this will let me relax a little and work any kinks out of my code, I think I have it working already just need to find better code to do what I’m doing now if there is a better way I can find to do it :P
I’m not sure how I missed that post but I will use it to help set up my other test environment.
As far as my vhost containers go they all had “Options +FollowSymLinks” already anyway so hopefully I’ve done it right.
<VirtualHost *:80>
ServerName coding.zapto.org
ServerAlias www.coding.zapto.org
DocumentRoot "PATH/TO/SERVER/htdocs/cxcedge.com/sites/coding.zapto.org/public"
<Directory "PATH/TO/SERVER/htdocs/cxcedge.com/sites/" >
Options Indexes +FollowSymLinks Includes ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
ScriptAlias /cgi-bin/ "PATH/TO/SERVER/htdocs/coding.zapto.org/cgi-bin/"
ServerAdmin email2chaos@yahoo.com
CustomLog logs/coding.zapto.org.log combined
ErrorLog logs/coding.zapto.org_error.log
LogLevel error
</VirtualHost>
<VirtualHost *:80>
ServerName admin.coding.zapto.org
DocumentRoot "PATH/TO/SERVER/htdocs/cxcedge.com/sites/coding.zapto.org/admin"
<Directory "PATH/TO/SERVER/htdocs/cxcedge.com/sites/" >
Options Indexes +FollowSymLinks Includes ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
ScriptAlias /cgi-bin/ "PATH/TO/SERVER/htdocs/coding.zapto.org/cgi-bin/"
ServerAdmin email2chaos@yahoo.com
CustomLog logs/coding.zapto.org.log combined
ErrorLog logs/coding.zapto.org_error.log
LogLevel error
</VirtualHost>
I really only have a live server for dev and so I can show things to friends or prove to clients I can do what I tell them I can, I am a horribly inexperienced and incompetent sys admin lol
I’ll work on the other setup tomorrow ;)
[ EDIT 1 ] Oh wow what a mess o.O this is going to require quite a bit of thought before I can figure out how to fix these M.S. errors, I’ve got my setup messed up anyway … tomorrow is going to be fun :(
So far I have no admin themes on my M.S. sites and all kinds of errors when I import because its still trying to use my textpattern “tmp” directory and its having trouble moving files to the “tpl” directory its created because the paths are messed up o.O it uses the “tmp” folder in my main textpattern directory and the “tpl” directory from sites/site1/ o.O oh wonderful headaches lol [ /EDIT 1 ]
[ EDIT 2 ] I’ve finally managed to get M.S. option A sites set up and have a modified version of the plugin working for it and standard installs but I can’t even get M.S. option B sites to do anything o.O for some reason M.S option B sites don’t redirect properly for me :(
Maverick, if you are interested let me know and I’ll get you the new version for testing but until I can get a M.S. oB test site up on my server I won’t be able to work on it much
[ /EDIT 2 ]
[ EDIT 3 ] MSsupport Branch added to the project, once fully tested this will be merged back into the main project. [ /EDIT 3 ]
Last edited by ~cXc~ (2011-02-15 01:37:23)
Offline