Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2008-01-29 04:53:29
- MusingQ
- New Member
- Registered: 2008-01-29
- Posts: 1
I'm sure you've heard this one before....
You know it’s been a long time since I’ve actually looked at anything “code related” and felt like a total retard, that was until I decided I’d start a blog and use TextPattern. After spending the last two nights on the verge of throwing things, I had to break and down and register in the forums and finally post.
Is there some sort of SDK-like documentation available for TxP or a site with some good examples on customization. Just basic stuff like having a category listing show up with an article count that’s only showing categories with articles in them and respecting the parent child relationship between categories in display? Ok that doesn’t sound basic, but it seems like a no-brainer to me and I was sort of left scratching my head looking around for examples on how to do similar things.
I’ve found sites that have a lot of plug-ins to do this or that, but although I commend the people who’ve created the plug-ins, I’m really someone that wants to see the code behind it so that I can understand how to put it together myself. I know I know never remake the wheel and all with regards to code-reuse, but I’m always angling to build a better mousetrap.
So… TextPattern seems like a pretty cool blogging tool and if anyone out there can suggest a site or two with some good sample code or explanations on how some of the more elementary customization can be done, I’d whole-heartedly appreciate it.
Thanks in advance,
-Q
Offline
Re: I'm sure you've heard this one before....
- Textpattern.org
- Textbook tag listing
- welovetxp.com – for inspiration.
Cheers!
Offline
#3 2008-01-29 07:00:51
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: I'm sure you've heard this one before....
Just basic stuff like… examples on how to do similar things.
And quite often, someone else has already asked how to achieve one thing or another, so searching the forum can turn up answers as well.
Offline
Re: I'm sure you've heard this one before....
If you find a plugin that does what you want, download it and during the install process (before the final step), you can see the plugin code.
Offline
Re: I'm sure you've heard this one before....
MusingQ wrote:
After spending the last two nights on the verge of throwing things …
I started the same way, except the period of baffled frustration was closer to two weeks. But I’m glad I stuck it out. And there’s a lot more (and better) documentation nowadays. I refer to the Textbook tag list all the time.
Just basic stuff like having a category listing show up with an article count that’s only showing categories with articles in them and respecting the parent child relationship between categories in display? Ok that doesn’t sound basic, but it seems like a no-brainer to me …
Textpattern doesn’t store article counts in the category table, so while it seems like a basic thing to ask, this is indeed just the sort of thing that gets left to plugins. For a CMS Textpattern has a very small code base. For better or worse, and I think it’s overwhelmingly for the better, Textpattern’s default functionality has deliberately been kept fast and light. That said, the core functionality does increase from version to version, and a new version is right around the corner.
By the way, I use cbs_category_list to get category lists that only show categories with articles in them. It can also display the article count, and is section-sensitive. However, it doesn’t distinguish between parent and child categories.
I’ve found sites that have a lot of plug-ins to do this or that, but although I commend the people who’ve created the plug-ins, I’m really someone that wants to see the code behind it so that I can understand how to put it together myself. I know I know never remake the wheel and all with regards to code-reuse, but I’m always angling to build a better mousetrap.
As ruud said, you can check the code of any plugin before you install it. Also, you can install a plugin without activating it. Finally, you can also easily modify plugins from within the Textpattern interface, by clicking the edit link in the plugin list.
Code is topiary
Offline