Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2013-03-09 23:54:37

Szorstki
Member
From: Poland
Registered: 2012-05-27
Posts: 20

TXP Modules, nice JS handling, Foundation/jQuery integration

Hi there! I have some suggestions and find them extremely useful… ;)

First: Plugins and Modules Repo
I posted some time ago in g+ a comment what I found hard in TXP – in brief It was plugins repo, like we have with languages now.
I also suggested developing some more important functionality from plugins to something called modules. It could be for example shop, forum, etc. – bigger parts of websites we sometimes connect with TXP. Now we have sometimes more than one plugin for each functionality – why not to develop better modules together?

Second: Menu generating tag
Adi_menu should be included nicely to the core I think, to give developers easy and clean way to create menu – which is very confusing for beginners. txp:menu would solve almost all problems.

Third: JavaScript
Now there is /js folder and jquery.js in /textpattern… Quite a mess. There is also a separate plugin to include scripts on the txp pages (spf_js) – no to make anything too easy :P TXP should check jQuery version and give users possibility to easy update (just like mentioned languages). And there must be nice and clean built in functionality to manage scripts in consistent way (like files, images, articles, etc) – spf_js makes “JavaScript” entry in “presentation” menu, which is not even always displayed… (for example from administration>plugins you can’t see the “JavaScript” entry).

Fourth: Responsiveness integration
I know that there is much improvement with that lastly (thanks to Phil Wareham) – but why inventing the circle again? Just use Foundation for example. I made some research lastly and started to redesigning my txp-site with that. Very easy to use, give many possibilities and it is so powerful tool… Amazing. One of the best CSS frameworks if not the best from them.
I just don’t like the feeling that it is connected to the TXP by the duckt tape (like my jQuery with the spf_js and there is a second copy of it in /textpattern…) ;)
Just check it out, Foundation is worth giving it a chance.

Fifth: OOP
I was trying few times to get something done with TXP core but this structural code isn’t making things easier ;) It’s easier to rewrite everything using Yii or other PHP framework than dig into all these functions :D

I saw topic about moving themes from database to files – can’t wait for that, because codemirror is not the same as regular editors (not only Notepad++ but Dreamweaver… and you can easily controll everything in web-designing software, not in browser ;) ). Ok I think it is enough for now, but I have still some ideas of txp improvements in my mind ;)

Regards
Szorstki

Offline

#2 2013-03-10 00:47:12

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: TXP Modules, nice JS handling, Foundation/jQuery integration

Szorstki wrote:

Now we have sometimes more than one plugin for each functionality – why not to develop better modules together?

Plugins can be called as well module. They can as large as they want, and introduce any type of functionality. If one would want to do some type of bigger module that acts as a forum, or as a shop they can. Third-party integrations are possible too. It’s just up to if someone wants to do one, or sees one as beneficial.

for example from administration>plugins you can’t see the “JavaScript” entry

The Plugins panel is sandboxes so that you can delete and uninstall any plugin that goes to rampage. Due to this very important security feature plugins can not run there. The other spot that is sandboxed is the login form, so that you can log in when and if some plugin breaks.

TXP should check jQuery version and give users possibility to easy update (just like mentioned languages)

We only use jQuery for the admin-side. It’s a core dependency and is updated with Textpattern releases. The version needs to stay consistent due to compatibility reasons. We must ensure that plugins can expect the same jQuery base from each installation. Same goes for any other library included with Textpattern.

On the public-side the default theme doesn’t use jQuery, or much of JavaScript even. If you need different version of a library for your site, you don’t have to use the included jQuery library. In fact, the jQuery library isn’t intended for your site due to it changing with Textpattern releases; it’s just for the core and plugins. I wouldn’t recommend linking to it from your templates.

I just don’t like the feeling that it is connected to the TXP by the duckt tape

I would call that everything, but a duct tape solution. Textpattern should be used that way; to build your own sites the way you want it. Textpattern tries to be as much of an empty canvas as possible, avoiding widgets or bundling stuff with the installation. The less Textpattern does without you specifically asking, the better.

Where we do offer libraries and widgets are admin-side interfaces, but on the frontend it’s all up to end developers and teams that build the sites using Textpattern. We try our best to keep our distance from that side of the installation, allowing the biggest freedom of customization.

Adi_menu should be included nicely to the core I think, to give developers easy and clean way to create menu – which is very confusing for beginners. txp:menu would solve almost all problems.

That’s a nice plugin indeed, but pretty much a definition of a widget. One structure doesn’t fit all and attribute driven widgets can become hard to understand, yet still limiting. Textpattern has a steep learning curve, but that comes with the freedom of customization and template language.

I was trying few times to get something done with TXP core but this structural code isn’t making things easier ;) It’s easier to rewrite everything using Yii or other PHP framework than dig into all these functions :D

We do update the existing code base where we can, and add newer stuff to it, but we can not simply replace it as a whole. Gradually yes, but it won’t turn into OOP overnight. We have our backwards compatibility to keep and requirements to hold.

Offline

#3 2013-03-10 10:25:10

philwareham
Core designer
From: Haslemere, Surrey, UK
Registered: 2009-06-11
Posts: 3,564
Website GitHub Mastodon

Re: TXP Modules, nice JS handling, Foundation/jQuery integration

Firstly, I do like Foundation. However, it would be a really bad idea to use it as the shipping front-side of Textpattern – you are being slightly mistaken about what we want to offer.

The default front-side theme has been purposely simplified in design from something like Foundation and Bootstrap (even more so in v4.6), so that it’s a basic starting point for anyone that wants to build a their own bespoke site upon it. Why would be force all our users to install Foundation when a good majority of them won’t want it?

Certain restrictions are placed on us for default front-side theming such as:

  1. No images to be used
  2. No JavaScript libraries (the only reason there is currently a public side ‘js’ folder at all is because we have to still support IE8 for a couple more years or so – otherwise that wouldn’t be there either)
  3. No over-arching complex CSS that takes days to strip back (I’m looking at you in particular Bootstrap)
  4. No plugins used, only native Textpattern tags

Of course, a lot of users will be doing their own designs from scratch anyway and never use the default theme. And they can install Foundation themselves, or Bootstrap, or Skeleton etc. – any of the pre-made frameworks.

I’ve got a Foundation Textpattern theme in my GitHub repo that I’ll work on as time allows – just don’t expect it in core, will never happen.

And you shouldn’t be using the bundled copy of jQuery for your front-side either – that is only intended for admin-side use (keep front-side and admin-side completely independent of each other).

Offline

#4 2013-06-15 17:25:44

hilaryaq
Plugin Author
Registered: 2006-08-20
Posts: 335
Website

Re: TXP Modules, nice JS handling, Foundation/jQuery integration

Yeah not to be down on anyone and it’s nice to see community members coming up with ideas.. I think what you want here is a few theme offerings based on responsive frameworks it’s not something that should be built into some core function, as mentioned txp is a light, barebones cms, and that’s why it’s the best, it’s not clunky and you have total control over it.. for example all of my responsive designs are hand coded not using frameworks and txp lets me do whatever I want, whether html5 or xhtml or framework or custom it’s up to me..

Recently had to help someone wrap a static html bootstrap.js responsive site into Joomla and oh my good God. Nightmare. Themes are so tightly integrated into core that you must almost create custom tpl pages for anything you want to control the output on. Even then there were two tpl pages to override, one for article list, one for individual article, I ended up with almost the entire thing recreated page by page with custom files for everything. Time-consuming nightmare. If he had offered Textpattern to his client, I could have re-created the whole thing including the bootstrap.js in a day, it just made me appreciate the fact that txp is so easy and trusts me to know what I’m doing..

I’d suggest looking properly at the functionality of txp and how it really works, maybe you haven’t discovered forms fully, or presentation pages, forms will do anything you want.. also curious as to why you’re using a plugin for jquery integration? Great google code to include jquery and jquery ui, and you control how to plugin to that with your own js file so just curious as to what the plugin does?

For plugin dev I so agree, we desperately need plugin devs to upgrade existing plugins and improve new ones coming up – if you can help with that there’s always some chat going on in the plugins forum and the ‘wanted’ forum, you don’t need to be a top programmer, I made a very simple google maps plugin that was just compatible with v3 as all that was available for txp was v2, with an extra marker allowed and a few things, I thought very simple although hard to find info on, but people have found it massively useful so do contribute anything you can no matter how small the community can build on it and people are at different levels some total beginners do need some simple plugins..


…………………
I <3 txp
…………………

Offline

#5 2013-06-15 17:29:46

hilaryaq
Plugin Author
Registered: 2006-08-20
Posts: 335
Website

Re: TXP Modules, nice JS handling, Foundation/jQuery integration

And I must agree on nav output, the one thing that drives me mad is not being able to do dropdown lists with txp:section_list which might display linked article titles on hover but it only works if on that page, otherwise txp shows everything for all sections.. just a little tweak needed, and it is possible to workaround but takes more code and I’m sure it could be easy to cycle through each section getting a list of article for each one on hover rather than for all sections.. I think if that worked a bit better menu plugins would be fairly redundant..


…………………
I <3 txp
…………………

Offline

Board footer

Powered by FluxBB