Tag Archives: WordPress

The New Site Is Live!

Let me start by saying a little about what I did.

I installed the plugins. One to help with site administration is Google Analytics by Yoast, and one to help with content presentation is Geo Mashup.

The site I unveil today, is History Basics.

Sometimes, information about the past is very forthcoming, and sometimes it’s not very forthcoming at all. There has been a lot of archaeological work that has happened, but sometimes finding out about it is non-intuitive. Documentation may be in a local, national, or international publication, or in a book, or perhaps it may be entirely unpublished.

There are frequently articles about archaeological finds, and it seems that a lot of them do not mention who’s doing the work.

Also, what we do have isn’t necessarily safe. Sometimes finds corrode or erode quickly after they’ve been discovered. Sometimes care isn’t taken with objects: how much more might we know about ancient Egyptian practices if rich Victorians hadn’t had a penchant for mummy-unwrappings. And in the riots in Egypt a couple of years back, some mummies were destroyed, museums in Iraq were looted during the Coalition invasion, Joseph’s tomb in Israel has been attacked several times, a proposed high-speed rail line in England has archaeologists scrambling to find out what might be in its path.

And so on.

Also, conclusions are drawn from findings, and sometimes new findings generate new conclusions (sometimes new conclusions arrive all by themselves). The conclusions might not manage to accommodate all the available evidence. Like life, it’s kinda messy. So I don’t mind presenting conclusions, but I do want to emphasise that on which the conclusions are based (and that which the conclusions ignore).

So, a disorganised field to organise, a world to save (in the “archive” sense of the word, like Donna Noble in the Library). And hopefully make research easier for anyone who wants or needs to (I’m trying to aim the writing so it can be engaged by teens in school, and anyone older than that).

I’m not strictly limiting myself to archaeological sites, as the messiness rears its ugly head again: there’s a 12th-Century church I know of that’s still in active use, and there’s certainly many archaeological sites contemporary and much more recent, so while I intend to have an archaeological focus, it’s not a criteria I will rigidly adhere to.

So that’s something in the way of the underlying idea behind the project.

I spent much of today cleaning up the showcase entry on the site: I noticed surprisingly little spelling that needed cleaned up, but some bolding, italicising, and rather a lot of making links look not-dorky. It’ll take you a while to read it, but check out the entry on Bushmead Priory over there, to get the feel of what I’m going for.

Why Bushmead Priory, you may ask?

When I was looking for a starting point, I found a list of sites that would make a great base to build from. It was Wikipedia’s list of English Heritage properties. I went through the whole list, finding the co-ordinates on Google Maps (and occasionally Bing, when Google’s image wasn’t quite adequate). Then I started over, gathering the PastScape data. And a few months ago, when I decided I really needed to get a full-fledged post done, that was quite literally the top of the list.

After I got that entry all finished, I had a bit of a battle of wills getting the forum set up. I don’t want to start with too many sections on the thing until there’s a bit more of a demand, but I got some sections set up and described, and a couple of threads started. Such is the state of things, though, that I’m using the Admin account and another account that I’ve set up for myself, and I’ve had to use the Admin account to approve the posts that I have made with the other one (one more to go).

So there, we go, this actually feels like a start, now. To invert a line from a movie (the original line including the movie’s title), “we must go forward… to the past!”

Installing Sections Of The Site

Watch out, today’s going to be technical. I’ll try to not make it too obscure, but I don’t think I’ll be able to avoid all the technical stuff.

So, with the domain name and hosting bought yesterday, and the Internet caught up to the fact that there’s actually something at the web address, today I started turning it into one of those website thingies I’ve been hearing so much about.

First up was the WordPress install, for the bulk of the actual content on the site. WordPress is what this site is built on. Now an issue I have been running into, but haven’t been troubled enough by to fix, is the url. The web address. You’ll notice that on this site, rather than being http://www.thelimeyfrog.com, the site shows as straight http://thelimeyfrog.com. I’m not sure that there’s functionally a lot of difference, but I think the www is more familiar to a lot of people.

Some searching on the issue yesterday didn’t yield any results, to today I went straight into experimentation, installing to some subfolder that, long story short, didn’t to what I wanted it to. So I deleted the folders, deleted the database, tried to start over. This second time, the installer ran, but loading the site threw up some errors. So I deleted files, deleted the database, tried it again… and the installer threw up errors.

Now this installer is some automatic “we’ll set it up for you” program that the hosting service provides, but that’s not the only way to do it. The easiest, if you don’t overthink things like I do, but not the only way. The other way is to download the WordPress program, edit a configuration file, and upload the whole shebang to where you want it. Then you point your browser to the installation file, and then it’s all set up pretty quickly.

I started uploading the files via a couple of web-based file uploaders that the host provides. There are two File Managers that let me do this (hence the trying with the plural), but they only let me select one. file. at. a. time. Well, to borrow a phrase, “that ain’t working”.

The other way to do it is via FTP, which stands for “File Transfer Protocol”. Practically, this involves downloading a program and installing it on the computer, which you have to set up with the right settings to actually connect to the web server (second time lucky, there), then it’ll let you drag-and-drop files onto the server. But not from the Explorer window you already have open, you have to browse to it again in the program.

In the end, this worked fine, and stood me in good stead for a bit later on in the story. And then I implemented the solution I found to the www issue that I’d found in the meantime.

There’s a setting in WordPress, in the General settings, where it gives you a couple of fields to enter the site URL and the WordPress URL – you can just add the www to it. Which in hindsight should have been obvious, but I was somehow still expecting it to be a folder-based problem.

That part all sorted out, I turn my attention to the other big install that needed doing: the forum. I’ve spent a bunch of time on phpBB forums, and I’ve played around with them a bit, so that seemed like the obvious choice. I set up the subdomain (forum.[I’m not telling you what the site is yet].com), then used the site’s automatic installer to install it there. Worked just fine.

But.

Going into administrator settings revealed that there was a newer version of phpBB (if I remember correctly, it was on 3.0.12 and there was a 3.0.14), so I went to get that. Going to download the newest 3.0.x, it asked me if I didn’t really want the newest 3.1.x. I tried having a look into what the difference was, and a cursory look suggested that the main reasons to keep 3.0.x was that a bunch of add-ons that work on 3.0 wouldn’t work on 3.1.
Not being that interested in these add-ons at this point, I looked up how to upgrade from 3.0 to 3.1. It involved downloading the files (unzipping them and all that), there were three folders and a file to delete from the download, then on the server delete all the forum files except those three folders and the file, then upload everything else. This is where the FTP program came in handy a second time.

Next on the list of things to do for the site, is to add some plugins to WordPress, and set up how I want that to be displayed, and fiddle with some basic settings on phpBB so that at the very least it’s branded as my site, and not the generic defaults.

After that: enough content that I’ll be happy to give people a link to the new site.

Solidifying A Site Concept

Part of the purpose of this blog was to chronicle progress made in website development, with there being a particular idea I’m working towards, and other concepts that can be spun out from it. The concept going for the initial site has a lot going for it, there being an overwhelming abundance of material, without a great deal of organisation. In short, you know a bunch of work has been done, but finding out who did it, when, how the results were published, where specifically you would find that documentation… it’s a challenge.

Hence the opportunity to impose order.

Frustratingly, many days I don’t make much progress at all on the technical side of things, most of which ultimately end up under “presentation”. A lot of work has been accomplished under “data gathering”, and plans have been laid to establish links with the wider community in that subject area.

Following recent prompting, I think I’ve made progress on one particular question that had been thus far a bit baffling.

If all this information is out there, and is generally hard-to-find-unless-you-know-where-to-look, then to those who don’t know where to look the information is inaccessible. The question is, “Who is the site aimed at?”

To some extant, the site exists (conceptually) to help anyone interested in the subject, and interested more in primary sources than the latest book speculating on any specific aspect (of which there haven’t been a shortage). But that left the information I was presenting in very dry form. “Here’s this. More information at some other place.” I wasn’t very happy with that at all, though it was a problem I was deferring.

The solution, as it came to me, was to aim young for the site. Then it’s accessible to everyone. I can put a short “Cheat Sheet” on each page, with a short (but hopefully engaging) Who/What/Where/When/Why sort of thing, then have a “Further Reading” section for those who want (or need) to go more in-depth. So aim teen, with functionality for older researchers, but hopefully nothing to prevent younger (who can read) from learning something as well.

After spinning my wheels thinking about extending the functionality of a plugin, I realised that extra functionality doesn’t need to be a Day 1 thing: the modification is rather minor at the end of the day (hence my confidence that I could actually do it), but I need a bit more brain space to do it than I’ve been getting. So if that can be backburned, what can be brought forward to move this thing from theory to “released into the wild” more quickly?

The figuring out of the “Cheat sheet” helped with that, and helped with thinking about how to organise the site. I’ve made some notes, but I haven’t implemented any of it in the test site, yet.

Still, nice getting the feeling that I might get somewhere with this after all.

Adventures In Coding: Some Idea Of Direction

I mentioned a little bit ago about looking at map plugins for WordPress, as a significant element in a website I’ve been doing some groundwork for, and want to launch several months ago. Realistically, that last part is getting less likely every day, but you never know. If you happen to develop time travel, get in touch.

Anyway, I was trying out the plugin Geo Mashup. I think that actually trying something out (on a local machine) has given me a better sense of what features I actually want, and more of a sense where plugins fall short. Fortunately, Geo Mashup has some flexibilities, in the documentation it gives you sample code to put in your theme to add a feature that has some similarity to a feature that I want to add.

The features I’m very much liking at the moment, are that you can put a map on a post, and limit the number of items that appear there. Then you can have a page with a map that includes the map markers from all the posts you’ve ever done.

What would be a big step forward, would be the ability to assign particular markers to particular places. The documentation mentions the possibility of doing that based on the Category of the location, but what I’m doing, occasionally thing would fit into multiple categories, which suggests things getting messy. The code the documentation points you to, can change the marker based on the date you set for the location, and can be adapted to work with the categories.

So naturally, I want to do better, and I think it ought to be relatively straightforward to create a plugin that lets you assign a map marker to a particular location.

I say “relatively”, compared to making a full plugin that does everything from scratch. It would involve creating two database tables, a page in the admin end to set what you want the marker options to be, and to assign one of those chosen markers to the places you’ve put into the database, and finally to force the chosen markers to be displayed.

I say “ought”, because I haven’t actually made a plugin before. So I’ve been poking around in the Geo Mashup code, to see how it does things.

The most helpful file I found initially, was the “uninstall” file. I’d poked around in the database, and seen the tables that Geo Mashup had already created. In uninstall, I saw how it removed them. More of a challenge was finding where it had added them in the first place. This involved figuring out how to convince Windows to search for file contents, a feature I was happily using in XP, but from Vista on has been very helpfully hidden. Not removed, just made hard to find.

With the help of a brief web search, I found out how to search for file contents, and how to include .php files in that sort of search, and then I believe I found where the tables were created.

Now it gets more complicated, because while there’s an obvious “uninstall”, there’s not an obvious “install”: got quite a bit of figuring out where things are called and how, to follow that procedure to get my own plugin to set itself up.

Then the next challenge is to follow how plugins create their own options pages in the admin area of WordPress, and get that page set up. The contents should be uncomplicated, because I have a concept of what I want displayed and how, but I haven’t even looked at how plugins make their own pages yet.

The last thing will be to force the right markers to display on the map. So if I want red pins for some things, green pins for other things, and purple pins for still other things, and I’ve set them to do that in my plugin, how to stop the default Geo Mashup marker from displaying, and putting these up instead. I’ve a notion of how this works, but it’s a ways off. And at least there’s the sample code, that should give some hints, right?

Code is kind of like a big Cat’s Cradle. One big tangle of string. For it to work, it needs to remain a big tangle of string, but for you to do anything with it, you need to be able to follow it. Not necessarily from beginning to end as such, but what bit’s going where and why, and follow the string through a knot where lots of sections have been tied up together. It’s not always easy to just set down and pick up again.

To switch analogies, have you ever fiddled with the cords in the back of your computer? You need to plug something into the power strip, but all the slots are full, You know you’re not using the printer, so can unplug that for the time being. You follow the cord from the printer to the power strip, and unplug it, only to find you’ve unplugged the monitor or the router instead. Code’s like that, only much more so. One missed comma or semicolon, and things just don’t work right.

I think it’s doable, lots of people have made plugins, much more complicated than I hope to. Just a big string to untangle. Though in the last few years I’ve been learning weaving, there’s quite a few threads I’ve had to untangle, so I’ve had some practice.

Integrating WooCommerce Into Your Theme

I have been working on a WordPress-based website for a friend.

This endeavour has been something of a crash course into the intricacies of theme modification, PHP and style sheets. I had already started learning PHP and MySQL together, but I hadn’t got as far as style sheets. I do have a background in fiddling with programming, so I did have a bit of a comfort level – knew I could always change things back, could follow code reasonably well, could guess at what to change based on the helpful names people give things.

Skipping lots of details about messing with the Twenty Twelve and Twenty Fifteen themes, deciding on Noteskine theme, modifying that and begging the author to find out how to remove some of the functionality, I found out that WooCommerce wasn’t co-operating with my theme.

This had me stumped for weeks. I’d forced Noteskine’s footer bar to be active on all pages (something I may end up not doing on the full site – note to self: need to make decisions about that), and the background of that was not displaying, and the background for the shop content was also invisible. I’m running the Simple Full Screen Background Image plugin, so the placeholder product image was straight on a fairly detailed background, and the text was hard to see as well.

WooCommerce documentation says that their .css files are one long line, a human-readable version has the same filename but .scss is the extension.

Working from that basis, I dequeued woocommerce.css and woocommerce-layout.scss. I also copied wrapper-start.php from a WooCommerce subfolder into a theme subfolder: [theme]/woocommerce/global – that overrides the original.

I fiddled with the above, and just wasn’t seeing the results I was expecting. After lots of trying things, I thought I would start from (more or less) scratch.

Woo has built-in compatibility for WordPress’s default Twenty-named themes. I mentioned earlier that I’d messed with Twenty Twelve and Twenty Fifteen – I hadn’t achieved much by trying child themes “by the book”, I took each theme, copied it into a renamed folder, and changed the name of the theme in all the files (otherwise there would be a certain amount of clash with the original – found that out the hard way. Something couldn’t be declared twice…). This turned out to be an advantage – I could activate a butchered Twenty Fifteen. Woo wouldn’t recognise it, so then I could intentionally direct Woo to use its own code, but in my theme, not the plugin.

Telling wrapper-start.php to use Woo’s own styling for Twenty Fifteen worked. (Worked in the modified Noteskine as well, but didn’t solve the footer menu problem).

Dequeuing the style sheets from the plugin and enqueuing the .scsses (renamed to .css) in the theme, again didn’t achieve what it should have done. It’s supposed to be the same code, right? It should do the same thing?

After getting absolutely nowhere on various forums (you can probably find my posts if you search not-particularly-hard – though one forum they had me reword twice before just closing the thread), and contacting the theme author (not something I’d particularly wanted to do having already troubled him to modify his theme, and it turned out WooCommerce was outside his experience and wasn’t really the theme’s intent), I tried something I should have tried long before.

I took the original woocommerce.css and woocommerce-layout.css, and added line breaks and indentation.

They were very different to the .scss versions. Copying and modifying those (or not, to start out with), magically started yielding the kind of results I’d expected before.

Because you start wondering, “Am I enqueuing these the right way?” (I’d tried several ways). Or a more general “What am I doing wrong?”

The answer is only that the .css and the .scss aren’t (or possibly weren’t, who knows if they’ve fixed it) the same code.

If you run into the same trouble, I hope you find this blog, because I went searching high and low: I found other people with similar problems (none seemed terribly recent), but I didn’t find anyone with a solution.