Tag Archives: plugins

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!”

What I Need To Do To Turn My Planned Project Into A Reality

I’ve mentioned before about the site I want to make. I haven’t gone into much in the way of details about what it’s about. Intentionally so, not because I think you’ll steal my idea, but more because I hope the vagueness now, will make the unveiling more exciting.

Here’s basically the things that I need to do to get it going.

1. POSTS
Turn research into content. Lots of research done so far. Try and get to a post a day.
STATUS: Lousy

2. CONTINUE RESEARCH
Accumulate a bunch for making posts easier, keep ahead so you don’t run out.
STATUS: Pretty good on current list. Resources available to continue afterwards.

3. LOOK OF WEBSITE
As long as it’s easy to navigate, how it looks is less important: at the same time, don’t actually want it to look terrible.
Can be worked on after the site is up, but is also less likely to be worked on after the site is up than before.
STATUS: Poor. Think I have a handle on menus.

4. EXTRA CONTENT:
Have some ideas for podiobook-able things, which will also help extend brand. Located microphone, think taking laptop to garage, and recording under blanket, would work.
STATUS: still relatively concept.

5. PREMIUM CONTENT:
Conversion services: software cursorily tested. Results promising, with caveats. No negotiations entered into. More thorough testing required, may benefit from purchasing sample materials for conversion (possible). Conversion process needs tested, particularly master new format (have test document ready and software installed, not progressed far in the conversion efforts yet).
Translation services: Entirely theoretical.
Audiobooks with site/author/reader/(translator) only at the beginning and end, not at the beginning/end of Every File (unless the book’s really short and only one file).

6. OTHER REVENUE:
Advertising. Have some ideas of who to approach. (also see who approaches). Need established site to make it worth their while. Decide number of spots, perhaps decide on genres for these spots.
Membership. Discounts to sponsors, discount to stuff we sell. Discounts to other people. Make it worth more than cost. Also contingent on establishment.

7. OTHER THINGS TO IMPLEMENT:
Community: forum software. PHPBB probably. Making it look right, I don’t want to think about at the moment. I’ve at least played with the software, call it a STATUS of 7%.
Submissions: Anticipate needing to ask for photos. Integration may be the issue. STATUS: concept only.
Amend a plugin to customize images used. STATUS: Started. Back-burner now, needs lots of concentration.
Find a plugin to implement different-language versions of the site. STATUS: A thought.

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.

A Short Experiment In Map Plugins

Today we had a craft day at our house. I saw some rubber-stamping going on, some jewellery-making stuff was out (or, perhaps more accurately, the jewellery had mostly been made beforehand, there may have been stuff that needed fixed). My tiny little niece had her handprints taken.

I tried to keep Youngest occupied downstairs some of the time, with the old Captain Scarlet. the cars, planes and other vehicles zhooming, that helped. Sadly it only worked for about 2 batches of 20 minutes, getting us about 10 minutes into episode 2.

A bit later on, I spent some minutes on some figuring out for a new website project that has been in the background for a while.

I took the XAMPP stack on the laptop, and deleted most of the pages from the WordPress install on there (it was the template for the Transfiguration site, and isn’t needed for that anymore). And of course changed some of the placeholder text to new placeholder text.

The main thing I need to figure out, for a large chunk of the functionality of the site, is which map plugin to use. There’s going to be lots of posts about different places, do each post will need to have a view of that place, but then it would be nice to see all the site markers (or possibly just categories of them) on the map.

There are, of course, many options out there: some free, some paid, some maintained, some long-obsolete. Various pages that reviewed the options had similar issues: some of the recommendations were out-of-date, and so on.

I’d looked these things up before, of course, but I figured it was time to bite the mullet and try something.

Mentioned on only one of the comparison review posts I read, I thought I’d give Geo Mashup a go. Free is always nice, especially when you’re still figuring out just what it is you want.

I did one post with one location. While I told the plugin to where I wanted the map to point, first time I apparently didn’t tell it to actually put the map in the post. This was quickly rectified. The default zoom amount was too far out, but I didn’t go back in and fiddle with it any more at that point.

I need to give the thing a good long workout, with lots of map points. I forget if this was one where you could change what the markers look like for different things, which would be helpful, so when I’m ready to spend more brain on it, I shall burrow into all that.

Still, progress is nice :)

 

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.