Posted
Comments None

I have been taking time off from writing my Beginners Guide to actually work on my own theme especially my About Page which I had cobbled together when I first started using Textpattern.

It was just a section with an article using the default page and default article and looked a bit of a mess. It was while doing some research into how to do it properly that I came across this post.

Have section list page show a single article?

The only problem was that I was being told to replace something with somethingelse and I didn’t even have the something.

My default theme is out of date somehow. But How? I have been doing all the updates. Have I been doing something wrong?

OK. I do some more research and find this.

Update 4.6.2 to 4.7.0 missing four-point-zero

Which gives the reason and the solution without having to do a complete re-install. Result.

It is kind of comforting to know I am not the only one, but I may be the last and I feel really foolish that It took me so long to realise. Maybe I should make a new category “I am an Idiot”.

Author
Categories

Posted
Comments None

Want to make some changes to the design of your new Textpattern website?
The best way is not to directly change the default files but to start a new theme.

Using a theme has two main advantages: First you have the original to fall back on if something goes drastically wrong and second, until you are ready, only you can see the changes made – it doesn’t affect the live site.

Preparation

A few steps to do before you start.
  1. Go to the root of your Textpattern installation and if not there add a folder/directory themes.
  2. Login to Textpattern go to Admin > Preferences > Admin. If not already done add themes to Theme directory go further down the page and at Enable development theme preview? select Yes.
  3. Now Save Preferences.

There is a much quicker and easier way to create a new theme, which I shall reveal later. But I think it is worth at least trying to do it the hard way to get a better insight in to the way theming in Textpattern works.

Creating a new theme

A theme in Textpattern is a collection of Pages, Forms and Styles.

  1. Go to Presentation > Themes.
  2. Click on New theme which will bring up a new panel – Edit Theme.
  3. Only the first two fields are necessary.
    • Theme name: Used by system so it shouldn’t contain any special characters or spaces.
    • Theme title: How it looks to users and can contain special characters and spaces.
  4. Click on save. This will return you to the Themes panel and you can now see your new theme added to the list.

Clicking on Theme Name will take you the panel where you can edit the theme information.
Clicking on Preview will take you to the Sections panel for that theme.

Working with a new theme

The Sections panel

The Sections panel lists the sections with their associated pages and properties.

In a new installation there will be just two sections; default and articles.

Under Theme you will see two entries. The first, with a strike-through, is the theme your website is showing and the second is the name of your new theme, that only you will see while logged in.

As we haven’t made any changes yet we have an empty theme so let’s test this out.
  1. View your website now and you will see a blank page.
  2. Either use another browser or log out and view your website again – yep all safe and sound.

Now we need to populate the theme.
So first go to Presentation > Pages.

The Pages Panel

In the Pages Panel we can create new pages, duplicate pages and edit them. Using the drop-down menu we can also navigate between available themes.

With the new theme selected we can now see why previously all that was seen when viewing the website while logged in was a blank page. There may be two pages listed but empty and a completely missing page which we will have to remedy.
  1. If not listed create and save new pages default, error_default and archive.
  2. Use the drop-down list to go to the Default theme, select the archive page and copy all the content.
  3. Return to the new theme select the archive page, paste the content and save.
  4. Rinse and repeat for the default and error_default pages.

Viewing your site will now show a functioning if rather empty and ugly looking website.
Now we need to show some content.
Go to Presentation > Forms

The Forms Panel

A form is a snippet or chunk of text, HTML, and Textpattern tags that is used to display content.
In the Forms Panel we can create new forms, duplicate forms and edit them. It also contains a drop-down menu which enables us to navigate between available themes.

As in the Pages Panel there are listed items that are empty and some completely missing. There are also a lot more of them and they are organized into categories – hence a new drop-down menu Form type.

Apart from the slight increase in complexity though all you need to do is the same as in the Pages Panel.
The only thing that may need mentioning is that you do not need to make a Miscellaneous category. It will show up as soon as a form is assigned to it.

Once this has been completed take look and see.
All we have to do now is deal with the ugly.

Go to Presentation > Styles

The Styles Panel

The Styles panel is used to add, duplicate and edit CSS files.
As in the previous panels this has a drop-down menu to navigate between themes.
The list column will contain all style sheets that can be used with the theme.

There is only one empty style sheet listed here and the only one needed for now.

Change the name to avoid confusion by entering it in Style name and save. And then it’s the final copy and paste.

And that is it. Your new theme is now complete.

Of course it looks exactly like the original but you can now make and review changes without worry.

Creating a new theme – the easy way

As promised earlier and something that is going to be very handy later on. Here is the easy way to create a new theme that saves a lot of copying and pasting.

  1. Go to Presentation > Themes.
  2. Tick the checkbox next to default theme.
  3. Go below to the drop-down menu and select Duplicate.
    You will now see a new theme named default_copy.
  4. Click on default_copy to edit theme.
  5. Change Theme name and Theme title then Save

And that’s it. The Themes panel will now show your new theme.

Coming soon:

Deploying your new theme.

Further Reading:

Textpattern CMS gains Themes support

Author
Categories

Posted
Comments None

This is it, finally I am going to start changing the look of this website from the default Textpattern theme.

I started the preliminary work on my home web server some months ago before getting sidetracked and have forgotten a lot of what I did so I will be writing an article about it as I integrate the changes here.

I won’t have the temerity to title it as a How to, there are so many good ones out there. But, as a beginner myself I will have some idea of what others will need to know. Sometimes it is so easy, if you know about a subject, to take the really basic stuff for granted.

I shall also use this as an opportunity to practice writing in a structured data fashion that should make it easier to follow and has the added benefit that it is good for SEO ( Search Engine Optimisation ).

Update 30th May

This took a bit longer than expected.

Not so much the doing, more the explaining. I do not think I am a natural writer, technical or otherwise. But I have finally got the post to the stage where it is worth publishing.

I believe it now works as an article although I have still got a few more things to add and I am not quite sure whether I will do this in the original or write a part 2.

I am quite pleased with the title and its double meaning. It can be seen in it’s whole glory here:

Theming With Textpattern – A Beginners Guide

Author
Categories

Posted
Comments None

After being sidetracked for ages I am finally getting round to restyling this website.

But first I want to reorganise the directory structure so that it is more obvious what files and folders belong to Textpattern and to mirror my home web server setup. This will also have the advantage of making public_html less cluttered.

The first step is to create a new folder in public_html and to copy all my files and folders identified as belonging to Textpattern, including .htaccess, into this.

For the second step I now need to point my domain to this new folder. As it is the main domain the easiest way to do this is to replace the old .htaccess with one like this.

# .htaccess main domain to subfolder redirect
# Copy and paste the following code into the .htaccess file
# in the public_html folder of your hosting account
# make the changes to the file according to the instructions.

# Do not change this line.
RewriteEngine on

# Change yourdomain.com to be your main domain.
RewriteCond %{HTTP_HOST} ^(www.)?yourmaindomain.com$

# Change 'subfolder' to be the folder you will use for your main domain.
RewriteCond %{REQUEST_URI} !^/subfolder/

# Don't change this line.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

# Change 'subfolder' to be the folder you will use for your main domain.
RewriteRule ^(.*)$ /subfolder/$1

# Change yourdomain.com to be your main domain again.
# Change 'subfolder' to be the folder you will use for your main domain
# followed by / then the main file for your site, index.php, index.html, etc.

RewriteCond %{HTTP_HOST} ^(www.)?yourmaindomain.com$
RewriteRule ^(/)?$ subfolder/index.php [L]

The redirect works perfectly.

The only trouble is Textpattern itself is causing a problem for me. It is working but, unfortunately, still pointing to the original folders. The only way to change the paths needed is to add the subfolder to the Site URL in preferences. This appends the subfolder to the route thus negating the redirect that I put in to avoid this in the first place.

So, for the time being, it’s back to the original setup and back to the drawing board.

Author
Categories

Posted
Comments None

Yesterday I accidentally closed a browser tab with a topic I hadn’t finished with . Today it was too late to Reopen Closed Tab so I decided to look for it in Browser History and realised there were far too many entries to find it easily.

There is a lot of browser history that serves no purpose. I do not need to record every visit to my web email accounts, Facebook or my own websites to work on them. But I do not want to clear all of my browsing data. I need to selectively delete and stop further recording.

After trying out a few extensions I finally settled on one that suited my requirements, “History AutoDelete”. I love the way it not only stops history entries from websites you select being logged but allows you to erase all previous entries from that site. It is available for two browsers, Chrome and Firefox and can be downloaded here:

History AutoDelete for Chrome

History AutoDelete for Firefox

Caveat: If Syncing across devices is enabled you will need to deselect syncing for History and restart the browser.

Author
Categories

Posted
Comments None

I am slightly behind the times here. And that’s a bit of an understatement.

It all started when I wanted to find some old bookmarks that I had mislaid over the years. Remembering that I had spent ages organising my bookmarks on Delicious I decided to go visit.

I was very confused to find the message that “Your connection is not private”. But I bravely Advanced and clicked on “Proceed to del.icio.us (unsafe)” and was very pleased to see everything still all there. Then it was just a case of clicking on Profile > Settings > Export and I have all my old links with tags and notes.

It was only then that I decided to find out what happened and was surprised to find that Delicious had been shut down and become read-only on June 15 2017.

Author
Categories

Posted
Comments None

I cannot believe it has been nearly two years since I wrote about Choosing a new Wordpress theme for my other site but I have finally got round to changing the old theme.

It is different from the original winner though – called Venice Lite. It is even more cleaner and uncluttered than Nisarg mainly because it doesn’t use those little icons with such things as the date author and category. Talking of which I like the way the category is listed above the post title.

The only thing I want to change at the moment is the font used in the site title. Although very stylish I have got two consecutive o’s in my site title which makes it look like it has a pair of eyes.

There are definitely some style elements I want to use when I eventually get round to making a theme for this website.

Author
Categories

Posted
Comments None

Well I made it – this is my last day of working at Amazon.

I have actually still got a week to go to the end of the assignment but, after taking a while to think about it, decided to take advantage of the offer to use my unused holiday balance.

Yes, I did have to think about it. I was tempted to work the last week, the extra money has come in quite useful and I felt slightly guilty not getting as much as I could. But, on the other hand, Amazon didn’t need me as the the peak period was over and the thought of not having to get up at 5.10 in the morning for another week was so enticing.

Author
Categories

Posted
Comments None

Day Zero is Amazon’s Health and Safety induction session and runs for 5 hours. A nice easy introduction back to full time work for me after so many months off.

I am filled with a bit of trepidation about the next three months though.
I think I am pretty fit for my age but I haven’t done much physical work since I used to help out a friend with his window cleaning round about 8 years ago. 10 hours makes for a very long shift and as for having to get up at 5.10, for me thats the middle of the night.

There is also worry about all those horror stories circulating at the moment about the working conditions in Amazon warehouses.

Oh well, only one way to find out.

Author
Categories

Posted
Comments None

I am back again – in more ways than one.

It had been so long since doing anything with this site that I had not realised that the latest version of PHP broke my Textpattern 4.6.2 and visitors could only see a couple of lines of error codes.

My first port of call was the Installatron Applications Installer, but it’s latest version was still 4.6.2 , so I had to do it the hard way.

After backing up my data I first tried following the upgrade path but I couldn’t get it to work. Most probably because I think on the previous major upgrade I had to move a couple of files to make it work.

Anyway every cloud … For some reason my Textpattern was in the directory textpattern/textpattern/ and to me it looked untidy so at least I had the chance to amend this and have all the files in the right place.

Author
Categories ,

← Older Newer →