Profile cover photo
Profile photo
Stef Dawson
135 followers -
A hatstand PHP monkey, Textpattern CMS developer, plugin author, musician and part-time resident of planet earth
A hatstand PHP monkey, Textpattern CMS developer, plugin author, musician and part-time resident of planet earth

135 followers
About
Posts

Post has attachment
For those that don't frequent the forum much, please take a look at "Textpattern themes: a plan" and weigh in if you have anything to add. Thanks!

http://forum.textpattern.com/viewtopic.php?id=45752

Post has attachment
In honour of today's UK general election, a look at how the opinion poll shapes the result.
Add a comment...

Post has attachment
Anyone using MailChimp and want a hassle-free way to get subscribers  from your Textpattern site into MailChimp lists? Harness the power of the latest zem_contact_reborn with Drew McLellan and some smd fairy dust. Beta testers wanted!

Alrighty, here's a question that came up on the Issue Tracker (Issue #412) recently to do with the admin side Article list. I'll precis the back-and-forth so far:

1) On the Write panel, when you publish a new article, you see 'Created by' information. You do not see 'Modified by' information until such time as the article is re-saved.
2) On the Articles panel (extended details view) you see a Posted column containing the creation date and a Modified column. The latter column contains the same date as the Created column for articles that have been published yet not subsequently edited.
3) The public tag <txp:if_modified> returns TRUE only if the article has been saved at least once after it was created. i.e. it is FALSE for published-not-yet-modified articles.
4) The public tag <txp:modified> returns the same date as the created date of the article if it has been published and not subsequently edited.

I think 1, 3, and 4 are OK (perhaps you disagree?) but the point under contention is number 2.

When an article is created, Textpattern has (always has) stored the modified date the same as the creation date in the database. That's akin to a file in a filesystem. Windows does the same (created = modified). Linux/Unix/OSX don't have the concept of 'created', just 'last modified', which is set to the creation time because it was 'last modified' by being brought into existence from "nothing".

Back to Txp. One argument is that the Modified column should show the Posted date as it does now: identical values. The article was modified from 'nothing' into existence on the given date, even though the Write panel and the <txp:if_modified> tag don't share that view.

The other argument is that this value should display something else: empty, the word "Never", a dash, "N/A", ...? if the article has yet to be modified. Thus it only gets a date shown when it is subsequently saved.

Because Txp stores the Modified date as the Posted date anyway, in order to alter the displayed value we'd need to do some query magic to eliminate the values from the records. It's no good just clearing out or relabelling the entries in that column, otherwise people who expect such 'empty' (unmodified) entries to appear first when the list is ordered by the Modified column will be disappointed to see them interleaved with other articles (because, as far as the database is concerned, they'd still be in the same order as they were).

Is there another case? Another solution? What are people's thoughts on this? Is it confusing as it is now? Would it be more confusing to change it? Or could it be simplified so someone could see from the admin side which articles have yet to be edited? And if so, how? What would we designate such entries as?

I'd never really given it much thought either way until the issue was raised and I can see both sides of the argument. Just can't decide which way makes sense for best clarity / usability (for new users and veterans).

Help!

Post has attachment
I have a git question. I want to be able to automate releases as much as possible. I'm thinking a workflow like this:

1) Work on code in Txp template format in a local git repo, committing and pushing sporadically to Github.
2) When next version is ready for release, push it to Github and tag it with vX.Y.Z.
3) Trigger some hook that goes "aha, a new release", which locally compiles the plugin.
4) Compiled plugin is bundled using (maybe) https://github.com/aktau/github-release and uploaded to Github as a packaged "release".

The stumbling block is point 3 because there doesn't appear to be a post-tag hook. I don't believe the post-receive callbacks will help since I can't run arbitrary code on Github's server. Maybe git isn't the right tool for hosting released code (despite their recent API improvements), in which case I could skip step 4 and just auto-upload the compiled code to my site or some third party cloud-based storage. Either way, I'd like to trigger compilation and perform some post-release shenanigans in as automated a manner as possible.

The closest I've come is to make a dedicated commit and ensure I put some predefined text in the initial part of the message, like "New version vX.Y.Z". Then, with something like:

git log --oneline -1 | awk 'match($0, /v([0-9\.]+)/) {print substr($0, RSTART, RLENGTH)}'

in the post-commit hook, I can detect if the last commit was a "new release" (awk extracts the version number for use in the compiled output filename: grep would probably do the same but it differs wildly from system to system), perform the compilation and do any post processing such as file it somewhere locally, upload somewhere, etc, as part of the post-commit script.

That workflow also means I can automate the git tag command as part of the hook, which is sort of nice. But if the tag was already present I could use the --decorate switch to display it instead of making an extra commit.

Perhaps there's a better way... maybe some entirely different workflow. Anyone have any ideas, or is this the neatest method?

Been recently helping someone get to grips with the admin side / publishing workflow and how things all fit into Templates, Section, Forms, etc.

To that end I installed the excellent adi_notes and wrote a series of public notes on each major panel giving a high-level overview of how things fit together, with a few simple examples where necessary. It seems a shame to let this effort go to waste so I thought about asking Adi for the ability to export/import notes so that I could "install" these notes in future and new clients could then benefit from being able to have built-in help for each panel.

But then I thought about our plans for pophelp and how we're considering bundling pophelp files with the core in future so we have less reliance on the RPC server for delivering help content. Not sure how that'll work yet with regards internationalisation: will we permit you to "install" a language's pophelp files like we do with languages? Do they get automatically installed when you install a new language? How do we allow people to easily download help files targeted for a particular Txp version (presumably it'd be linked to a git tag)? How can plugins take advantage of the system for their own pophelp, and so forth.

Anyway, I wondered if it might be beneficial to add a 'pophelp' question mark icon alongside the panel heading which would show the panel's overview help text in some capacity. Not sure where that'd go on the Write panel, but that's just detail.

The upside is that beginners have immediate assistance without having to find it on textpattern.net and it might help orient themselves better. It also means that the high level documentation (at the very least English) is bundled with core, which means it's "correct" for that version and therefore doesn't have any external dependencies which may be out of date, as they are now on .net. And no screenshots are necessary!

Downsides are that it might put more pressure on translators to keep things up to date, and would be a bit more effort on the dev's part to ensure that such inline docs stay up to date with core changes prior to release (but we'll have to do that anyway with the pophelp files, and the fact they're now housed on github means it's more of a collaborative process anyway).

For clarification, I'm not talking about "do this, click that" help, more a bird's eye view of what you use the panel for, any important points of interest, and how it fits with the rest of the Textpattern panels to produce content on the front-facing website.

What do you think? Is inline overview help per panel a good thing, or do the downsides outweigh the benefits? And if anyone has any thoughts on how to handle the whole pophelp ecosystem from an interface / internationalisation viewpoint, please raise your digital paw here too.

Thanks.

Post has attachment
For anyone into Class Design and formal UML whatnot of thingamybobs, this is a nifty tool in beta: https://app.genmymodel.com/. You can export your models as SVG or a graphic file of your choice, and even get it to generate Java or SQL statements for table creation based on the schema.

The only slight niggle is that on a small screen laptop like a 13" MBP, the buttons that allow you to add Association, Aggregation and Composition links are unavailable unless you set the browser to full screen (not just maximised). Flummoxed me for a while, that one.

On Day 1 of my Adobe Edge Animate trial. Just a dumbed down version of After Effects with a few bits added from the old Flash animator. In under three minutes I'd animated a fading-in-logo and published it.

On top of jQuery, Adobe added 126KB to my page weight in 4 separate files (though the biggest one of those could come from their CDN in the real world) and I was in awe that it worked, aside from the fact I could have done it myself in 3 lines of jQuery at a fraction of the download cost.

The price tag seems steep and I can't see myself using it other than to add gimmicky things to sites, which is a bad reason to add something. Has anyone used it in anger for some seriously cool interactive sites, or is it best left alone?

I'm in a Mercurial pickle and wonder if any VCS gurus can help me please. I have a (largely linear) master branch that I've committed stuff to. A few commits ago I fixed an issue. Then a few other commits have been added afterwards (some by other people).

I've since found that the issue I fixed didn't fix the issue fully and the proper solution is going to take longer than I hoped. Since this single commit is only partially-fixed and actually leaves the master branch in a bad state I want to sideline it (into its own branch, probably) and remove it from the master branch so the problem I've introduced doesn't propagate forward any further and pollute anyone else's work. When it's properly fixed, I want to merge the changes into master as normal.

How should I go about fixing this mess? I figured I could do something like this (the tip is r546 at present):

hg update -r 541 (set head to the commit I made which didn't quite fix the issue)

hg branch issue-7 (create new branch at this point, which includes the partial fix of r541 so I can refine it at my leisure)

hg commit -m "Start branch for Issue #7"

hg backout --merge -m "Back out partially fixed issue #7" 541

hg push

Will that do the trick so I can continue to work on Issue 7 away from the master, and merge it in completely when it's ready? Or will it create more mess trying to remove a commit at exactly the point at which I've created a new branch?

Any better approaches? Rebase? Or clone the repo at r541 and then backout r541, merge in remaining changes by other people (r542-r546 only, not r547 which will be the merged backout!) into the clone and eventually do a pull-request to master from the new clone when it's ready?

Anything else that's cleaner? Thanks in advance for any tips.

Post has attachment
Given the designer-centric nature of Textpattern users, are online wowsites like http://www.dudamobile.com/ that promise to take any design and make it mobile friendly going to further erode the perceived value of the craft? We already have one-click products that claim it's "easy" to make a site, now we have services saying it's "easy" to build a responsive site from an existing site.

Regardless that the results are questionable (and may not lead to a demonstrable increase in traffic), do you think web designers are going to continue to have a rough ride in the marketplace? Will such services, as they gain popularity, make it harder to quote for work when clients can "get a site" for less than ten bucks? Or will good design prevail?

And how do you win clients over when competing with software that purports to do your job? Will we end up using these tools as a basis for designs and then value-add, just to cut development time; a bit like using a framework? Or are they the Frontpage of today's world that make messy, hard to maintain code?

btw, somewhat ironically, DudaMobile's site isn't responsive ;-)
Wait while more posts are being loaded