Phase III: Fixing an embedding problem in WordPress
One of the things I do with my photos, besides having them in a gallery, is embed them in various posts in my WordPress blog. For example, I have a section on the site dealing with an HR student conference from back in 2002, and I have a small album of photos with the conference docs. Those photos are stored with my Piwigo gallery, and embedded as a hot link in the WordPress pages. Simple, right?. But here’s the problem. The link to each photo currently says:
http://thepandafamily.smugmug.com/yada yada yada
Now that I have the new gallery up and running, if I simply delete the old one, those links won’t work. I have to change ALL of them to say:
http://www.polywogg.ca/pandafamily/yada yada yada
It isn’t a huge challenge, just under 100 posts in total with maybe 400 photos linked. But each photo or video link has to have the SmugMug link deleted and the Piwigo link pasted BEFORE I delete the SmugMug account. If I don’t do it first, then my WordPress site will suddenly have a bunch of broken links all through it and no photos showing from my gallery.
But of course it isn’t as simple as just a search and replace of the opening domain info — the “yada yada yada” is completely different for each site. So they have to be done manually. Since it is easier to do while the two galleries are both running, i.e. so I can view them side-by-side on the screen and copy the links from the new to replace the old, it is still a pain in the patootie. With the uploading and captioning done, I’m about 50% done the re-linking process. But I got my account renewal reminder the other day … SmugMug renews in less than a month and I wanted to be done before then so I won’t get charged for another year.
I did the first few, and they were easy-peasy. So I thought the “rest” would be the same. Strange, but I feel like it was both less work and more work than I expected. How can that be?
Well, I feel like there were “only 98” posts with the cross-linked photos, which seemed like a manageable number. In addition, many of them only had one or two photos, so pretty quick. All in all, that meant I was initially feeling like it was less work than I expected and would go pretty fast.
Right up until I hit some of the photo-rich posts like stories about Being Jacob’s father or various trips we took. Some of them took a LONG time to update. But the weird part is I feel like the photos are somehow “brighter”? That’s weird. I wonder if the filters and themes at Smugmug that I was using were muted somehow. Anyway, I really like how it looks now.
And I’m finally done. It took a bit of time, maybe 6 or 7 hours in total to do the updating of the 98 posts, although in fairness, some of that was because I was sucked into reading my own posts again and editing a bit as I went. 🙂
I was right, uploading took a whack of time. I also don’t much like one aspect of the upload window — if something “fails”, it gives you an error while the screen is still uploading so you can see it, but once the rest of the uploads are done, it just rolls over to a new screen showing the successful uploads. No continued error message to say “64 uploaded, 2 didn’t”. So I wasn’t monitoring as I went, and later in the subsequent phases, I’ve discovered “missing” photos and videos i.e. ones that for some reason didn’t upload successfully the first time. Not a huge problem to fix, just annoying. If the result page showed the “failed” ones, I would have fixed immediately upon upload.
I also underestimated the final size. I thought about 10K in photos, which is about right for the family photos. But with everything else on the site, there are actually 14,147 photos, 500 albums, 24 plugins and 25.1 GB of data. Wow. But that part is “done” (small caveat — there are a few months where there are some special photo collections my wife took, so I’ll need her to figure out which ones of those should be included).
Phase II: Preparing the folders and pictures for viewing
While uploading took time, it was generally mindless, something I could spend a few minutes sorting and adding in the ones to upload, and then clicking the button to start. It could take 60 seconds, or 10 minutes, depending on how many pics or how long of videos, but it was background computer stuff while I do other things.
But once the upload was complete, I also had to start playing with the files and albums online to make them presentable. Oddly enough, one of the first things I had to do is tell it to generate all the “little” thumbnail and square size photos in the background. It does it fast enough, the server I mean, while I wait. Another background task. But I need it done because the second step is to play with the display order, and while doing that, I need to be able to move files around by looking at their little thumbnails. But once uploaded, it’s ON the website, not within a file browser, so there’s no “viewing processor” running to let me see it easily. Instead, the website creates the little thumbnails as extra files and then displays them for manipulation.
In an easier world, the photos I was uploading would all have the exact same filenaming taxonomy, and thus once uploaded, I could sort by the creation date (for example) and everything would be in order.
Except some of the pics come from my DSLR. Others come from Andrea’s iPhone. Others come from a small pocket camera. And still others come from two different apps in my Android phone. Which means they all have their own filenaming convention, and they don’t “sort” easily. And if I edited them at all on the computer, with a crop for example, often the software changes the metainfo so that the file creation date is the date I did the editing, not the original “taken” date. Don’t even get me started on images sent to me by other people where they’ve named them “Dave and Janet at the lake” and then “At the lake with Dave and Janet”. The anal-retentive side of me wanted to impose a filenaming convention, sort them all, get them looking identical, and then upload.
But that is way overkill when it takes me 60 seconds of viewing on my desktop to decide on which photo I’m looking for in a batch. This isn’t a “shared” server where we all have to use the same convention. Ultimately I don’t care what the filename is, other than for quick reference. But, since I can’t rely on the filename or the creation date, I do a manual sort. Most of the time, I do a default filename sort plus the original upload order, and then I just move a few things around. Like putting all the photos of Uncle Dave together, even if I took a couple of other people in between.
However, merely putting them in a good order is not necessarily the biggest job. In most cases, since I already had a working gallery elsewhere, with the same photos already uploaded there (alas, I couldn’t transfer directly), most of the time I’m just matching the new gallery’s order to the old gallery’s order. So, again, most of the time, the order isn’t that time consuming. But for some reason, one of the ones I did today was brutal (about 75 photos in the middle of the batch didn’t get uploaded, and when I did upload them, it gave me a huge batch at the end of the collection that had to be moved — one by one — up to the right space).
At this point, I had a gallery with pictures and videos in them, sounds good, right? Except they had no captions. I mentioned in an earlier post that I was annoyed that I had to put the same info twice in the meta data — once for title so it would appear on the album page, and once for description so it would appear on the single photo pages. I reached out to the Piwigo community, and heard nothing back over the course of a week or two. Okay, I guessed I would have to paste it twice. Then it occurred to me. I had chosen a theme where I *should* be able to alter this in the template, but in reading the template files, I couldn’t find the fields to change. I was looking for something called TITLE or NAME and DESCRIPTION, since that is what the admin pages call them. So I posted on the discussion page for my particular theme, hoping successfully that the creator of the theme would respond.
Which he did. Except his first response was “Good idea, make it a plugin and upload it to the repository”. Except if I *could* do that level of techno programming, I would have already done it. I couldn’t even FIND the fields to work with. So I went looking again, and found two rows of code that looked promising and I posted an update to my question.
So I found picture.tpl and the refs to description include:
data-description=”{$thumbnail.DESCRIPTION}”
in two places. I could change that to $thumbnail.NAME. That would be telling it that the description never gets displayed, I think, just that the field will be the name/title field. It also exists in index.TPL.
Although perhaps I’d be better off trying it as “data-description=”{$thumbnail.NAME}” & “{$thumbnail.DESCRIPTION}” ??
My thought was either to change the template to always show just the TITLE field in both album and picture pages, OR to do a little replacement code to tell it that when it went to display the description, to just first copy the text from the TITLE into it. So either show the title or copy the title into the description and then show the description. Either way, the title would show. Or so I thought. Turns out I was TOTALLY off-base.
The text below the main image is set in [Github] piwigo-bootstrap-darkroom file
template/picture.tpl@L38
No idea why the variable is called $COMMENT_IMG, but it’s the description. If you replace the two $COMMENT_IMGs with $current.TITLE it should do what you want for now.
The data-description stuff is for the PhotoSwipe slideshow.
Of course. The title / description is called COMMENT. Which are not to be confused with the actual comment fields. While the TITLE field means something else. Why didn’t I figure that out on my own? 🙂
Who cares in the end? Not me, cuz I made the tweaks and damned if it didn’t work EXACTLY the way I wanted it to do. Fan-freaking- tastic! No more entering the captions twice. Whew!
Now I still had to set captions for about 10,000 photos, and while some of those were done in batches (i.e. multiple photos with the exact same caption like “Small deer at Parc Omega”), others were variations on a theme (“Day 06 – Trip to Cozumel – Water park” or “Day 06 – Trip to Cozumel – Lighthouse”). Others were individual. A fair amount of work.
The last two things I had to do before each album was ready was to test all the photos and videos to make sure they display or play properly (once in a while, a video wouldn’t play, or I had audio but no video, or the picture was upside down), and then, when all was ready, choose an image from the batch to serve as the image for the album cover.
Generate thumbnails, sort the photos, fix the captions, test the viewing, and choose a cover image. It went a lot faster than I initially thought, but it could not be done quickly or in the background. I had some decent processes in place for a good workflow, but it still required me to do a lot of the grunt work manually.
I finally finished after about two months of work, doing a few albums at a time.
If you’re following me on FB or Twitter, you might have noticed a series of reposts lately, partly as I realized my numbering style for my #50by50 posts were confusing people. Too many subcategories and I would likely not reach 50 items since I was grouping some. So I’ve gone back to numbering them individually where appropriate, and reposting. But with just over two months left, I realized that some of my possible plans are likely not going to happen.
Dye my hair
I put a lot of thought into this, which was probably a mistake. Because that thought was enough to talk me out of it. If I was to dye my hair, I wouldn’t want to look like I was trying to hide grey hair or look younger. I’m fine with the white hairs in the hair on top of my head as well as on my face. I have no vanity about turning 50. Partly as it gets me one step closer to retirement, and I’m really looking forward to retirement. More on that in future posts.
So I didn’t want it to look like a pity party/vanity dye job. So no brown or black to hide my grey, no going blonde probably, and I don’t want to accelerate the grey or white. Which left either red or some bright colours — green, purple, blue?
Fortunately, there’s an app for this. You basically download one of several, most from companies selling home dye kits, take a picture of yourself, and then use the app to mark where your hair is, swapping out other colours to “test” out some dyes. Advanced Photoshop this is not. More just rough approximations to consider. I tried purple and blue and they looked as ridiculous as you might think. I couldn’t find any red that looked right — either it looked ridiculous or would look like I was trying to hide the grey and white.
What did that leave? Green. I could live with green hair. It would be different, as they say. Went through a bunch of apps, and yep, I would look ridiculous. Okay, I’m taking “dye my hair” off the list. Don’t worry — shave my head was never on there. Although I liked the people who have shaved the back of their head with the numbers 150 for Canada, and I thought — briefly! — about doing “50” for my birthday. Umm, okay no.
Time-related ones that likely won’t happen in the next eight weeks
There are a bunch that I had on my list as possibles, but with eight weeks to go, I just don’t feel like they will fit into my timelines:
Use my passport — sure, I could do a quick trip to the U.S., but have no real desire to do so right now for anything…a weekend in Iceland? Probably not;
Make a snow angel — I might get a chance to do that still this weekend, but I kind of hope not…it is either this weekend or it’s dead though!;
Weekend getaway — same as with passport, likely not to happen, but it might;
Weekend retreat — this was more a “solo” thing, and I don’t think I’m going to do that in the timeframe, more something for the late fall for me I think;
Visit a province other than Ont / Quebec — relatively same reasons as above;
Boat cruise, hot air balloon — not on my schedule yet, probably won’t make it there;
Do a ride along with the police — never got around to figuring out if this was even possible, let alone with who and when;
Going cross-country skiing — oops, missed that one;
National park / historic site — I was planning this as a big one somewhere, maybe I’ll do a local one still, but not a priority anymore;
A big combo day for my birthday
I had been thinking of doing a big combo day for my birthday, with a bunch of activities during the day and a party/dinner /something at night. I was toying with the idea of recreating my bachelor party from ten years ago and organizing golf, indoor go-karts, shooting pool, and a nice meal, but leaving it open to be co-ed this time. Yet as I get closer and closer to the date, I feel less and less like a big celebration. I think I just want a simple day, maybe going for a hike somewhere like Bruce Pit or Gatineau Park or down to Chutes de Plaisance, with something like Lone Star for dinner or maybe some food from our favourite Thai place. Something heavily focused on time with Jacob or even just sitting on the back deck reading and relaxing. So I’m dropping:
Indoor go-karts;
Golfing outing (I went already in September anyway);
Escape room
Casino
Birthday “party” for me
Astronomy events
I am doing pretty well on the astronomy side of things, but I had some other ideas on my initial list that I think I’ll drop for now (or rather postpone them past my birthday, so they won’t count):
Astronomy trip — I was going to count the Radio Observatory in Algonquin Park, but they don’t recommend that in the Spring, so off my list for now;
All-night astronomy outing — perhaps in July or August, but not before then;
Messier marathon — as with the all-night one, probably just later in the year, other priorities in the short-term.
Stay tuned, I’ll have the full list of achieved ones updated soon, plus start filling in ones that I’ve done but not written about yet.
The best-laid plans of mice and men sometimes go astray. When I posted the first time about my new job, it was after a pretty extensive internal process for me personally — reflecting extensively on what I had liked about previous jobs, what I was looking for in a new job — and a formal job search across multiple areas.
As I finished that search and said yes to the dress, so to speak, I went with a stakeholder relations job for disability pensions. I liked the way it was framed, there was a formal set of mechanisms in place, not building SR from the ground up, and there was a Round Table that met three times a year that would drive the work cycle.
The interview with the DG had been great, I was excited about the files, and I had touched on things that were important to me in the job search…a chance to innovate, an open management environment, good people to work with, and a solid working relationship with my management team.
On the last two points, he noted two issues that I would face in taking the job. First, there were what we would come to refer to as legacy HR issues in the team. Second, we didn’t know who the director would be as the position was empty, and he was in the process of looking for someone (there were competitions, etc., already underway). We talked about my own career aspirations and I confirmed I wasn’t looking for a promotion — I like my level, and while I’m willing to act when needed, I wasn’t looking to bump up anytime soon, if ever — so this wasn’t a “stepping stone” to something else.
I took the job
Things didn’t go quite as smoothly as I had hoped.
I’m going to start with the environment. I didn’t know anyone in the area before I started so it was hard to do much of a reference check on what it was like working there. The initial environment was borderline toxic in some ways. The directorate was undergoing a change in philosophy, albeit perhaps a needed one, and many of the long-serving members were not happy with the new direction. A reorganization had been pre-announced, i.e. “something was coming”, but for a variety of factors, the file wasn’t moving, and the staff felt they were in limbo for too long. Disengagement, resentment, even open negativity from some members. While I could reassure my team that our work direction was generally the same and that we wouldn’t see much change in our files, I was also an acting director with another team where it was going downhill. From their perspective, it felt like they had poured their life into a file only to be now told their contributions and approaches were no longer what was needed. There were also legacy HR issues. Grievances, misaligned file responsibilities, people having shifted files every six months, little stability or ownership of their own files, fear of innovation in some cases, and fear in general of what was coming.
But you know what? The issues I was seeing were not insurmountable. I’ve worked through them before, I have ways to counteract and mitigate those influences, and I knew the structural re-org was coming which would give us a great “turning point” moment to build around.
Regardless, though, put bluntly, it was not the happiest place on earth.
When it came to the management culture, the openness I sought seemed almost non-existent. The DG seemed to be saying all the right words, but generally speaking, people hardly spoke up at the meetings, and few if anyone volunteered anything beyond what we were already doing. I’m a pretty candid manager, and equally so when I’m acting director. I do NOT need for my view to win the day, but I will make sure the view is heard, and preferably in an environment where it is welcome. I also like to believe, somewhat naively, that you can create that atmosphere from below, it doesn’t have to be driven by the chair. But it wasn’t happening.
On the innovation front, I probably should have poked harder on this one in the interview. One of my strengths at Foreign Affairs, CIDA including the DM’s office, and during my time managing the planning files previously, was the ability to streamline some of the processes, to take out the brain farts and nice-to-haves and focus on getting the job done with as informal of processes as the situations allowed. There were a bunch of pedestrian examples in my time in the job, but I kept hearing the same phrase: “Just do it the same way as last time.” Sorry, that’s not a rallying cry for me when I see things that can be improved within my span of control.
On the file side, I actually liked the stakeholder files I was managing. A good round table with some potential to improve for the future, a chance to expand another two files, and to potentially grow a fourth. I had ideas, people on the team had ideas, we had some options. I wasn’t sure how fast we could get to them with some legacy plus new HR issues, but it would work itself out in time as we got the rhythm going. Or so I thought.
The final challenge was the who factor. As I mentioned above, I didn’t know the team when I started, but I got to know them and work with them, and I was upbeat for the future. I could see some ways to work with them, and I did my normal mentoring / coaching option on HR and competitive processes. Lots of candid conversations. A good basis for the future, I hoped.
Two other managers left, and I was disappointed to lose them. But with the reorg, I would get to work with a third who looked like a good partner to work with in the management realm. Call that one a draw.
The challenge in the end was the director position. As I mentioned above, the DG noted that I would be taking the job blind, since he didn’t know who the director would be. I said I wasn’t too worried about it, since in a mitigation consideration of worst-case possibilities, I had worked for some difficult people in the past and found a way to make it work.
As we got closer to the reorg announcement, there was another director position that was being eliminated and replaced at the manager level, so we would have an “extra” director and an “empty” director box. The math was easy to do for everyone in the Directorate, but when I asked the DG about it, he said no, that wasn’t the plan. Even eight days before the announcement, he reconfirmed that wasn’t the plan. Reconfirmed again a couple of days before. And then announced it was her. Maybe there’s a story in there somewhere, one I didn’t need to know or care about, but it wasn’t a very open management process. Whatever, we keep rolling, cuz that’s the job.
The new director and I never found our rhythm. We both tried, we both failed. In the end, it was clear that neither our management approaches nor communication styles mesh well.
For communications, I tried an early visioning approach, then a work planning approach, followed up with a table of contents for a policy piece, and finally started just giving her the pieces to react to at the end. None of them were what she wanted, but we couldn’t seem to agree on “what” she did want. After a particularly chaotic interchange, she sent me a strongly worded email about something not being what she wanted. Unfortunately, I found the tone completely unacceptable, and so much so that I obsessed about it all weekend. Way beyond the norm. We had a “come to Jesus” conversation on the Monday to discuss it, all very cordial and frank, and the atmosphere improved, but the comms side did not. We were both trying, but it wasn’t working. Four months in and we hadn’t found a solution.
But for me, the problem wasn’t just the miscommunication. I wasn’t comfortable with the environment or the tone either. I reached out to our Employee Assistance Program to talk through my reactions, because I couldn’t quite figure out why I had reacted so strongly. I felt anger, apathy, frustration, sure, but that wouldn’t normally be sufficient to cause me to obsess. The harshness of the feedback I was getting, combined with the organizational uncertainty and some stress, and the frustration that I wasn’t able to solve this conundrum on my own, was producing a different emotion in me. Fear.
Fear that I couldn’t fix it. Fear that the challenges were outside of my control. Fear that I was in the hands of someone else, someone who I didn’t communicate well with, and perhaps I was also fearful that I was out of practice for managing upward since I had been in a “flying solo” role for so long with people who loved my work that it had been a while since I had to sell someone on my approach or my abilities. The EAP counsellor’s advice was crystal clear — find a new job immediately. I wasn’t quite so convinced. Move on, most definitely if we couldn’t work through it, but immediately? I had some files to deliver on before that point. I figured I would work through it, maybe look for something come the summer or fall.
But then, as our comms issues became more evident, our management styles started to clash as well. Questions of accountability and even procedural fairness in our dealing with staff were starting to unravel as we got closer to some deadlines. And while I was considering the ramifications of one of them for my timeline (it was a big enough dealbreaker to accelerate my departure), the decision was accelerated for me — my boss asked me if I was the right fit for my job (I am, but I’m definitely not the right fit with her). Once your boss asks you that, there’s no saving the relationship. You just leave. So I did.
Starting my job search
Since I had drastically under-estimated the “who” factor in my previous job search, I started my job search looking almost exclusively at the people with whom I would be working. I aimed for one group in particular, and added another as I went. The first was to reach out to a DG who had offered me something the year before. I worked for him previously for four years and found him downright awesome. Since last year, he has filled out his management team with two EXs that I like and respect, and for the job in question, another co-manager with whom I’ve worked well in the past. Four bodies in the management hierarchy that I’ve worked with in the past, and it’s all positive. A pretty rich target to acquire, if something worked out.
Then, the overall Budget came down, and there was a small announcement that Treasury Board would be leading a “horizontal skills review” of government programming. It wasn’t clear initially what that would look like, but the day after the Budget, I emailed two DGs most likely to know anything about it to see if there was any sort of team being put together, who would lead internally, etc. One responded with some info, I stopped by his office to chat later that day, and got the low-down. It looked like it might be all done at TBS, but we’d see. I reached out to someone at TBS to find out some info on that side, and got some basic info and some referrals.
Fast-forward another week, and it looked like something would click with the first DG. Except then the details for the skills review were decided upon, and the DG I had chatted with informally was now the Departmental lead for it. And he would need a small team. With my name on his list of likely people. I don’t want to simply brag that I finagled that in advance by being proactive (true!), because I want to equally brag that I was a no-brainer for someone to suggest anyway (equally true!). 🙂
Based on my earlier work on similar corporate exercises, and my 9 years doing corporate stuff in the same Branch, there are only about five people with the branch-related background to do it, another five in the Department who would show up in a broader search, and maybe another 15 who would pop up in an open casting call. Call it 25 people across the department with a combination of skills, knowledge and previous experience. In my case, I have all three. Three other DGs told me when they heard the news, “Well, that makes perfect sense, it’s like the job is tailor-made for you.” And it’s one of the options I was looking for a year ago, but the timing was off by a year.
Now comes the bad part — the skills review would be a short duration project, maybe up to a year, but likely six months. No permanent job, just an assignment maybe. But I knew I wanted out of my current situation and into a permanent home. The DG with the great management team was offering me that permanent home, so I had two great options. One temporary, one permanent.
And so I did what no one should do in these situations. I tried to have my cake and eat it too. Or an extra sundae.
And it worked. My permanent home is set, they’re finalizing paperwork, and I’m moving to the division with the great management team. Like a sundae with ice cream (good files) and whipped cream (good managers).
Then the chocolate sauce was added that I asked about — they’re going to LOAN me to the skills review team for the project. Ka-ching! I get to do both!
Or as my wife pointed out, “It’s pretty impressive that you’re getting everything you asked for.”
Some pointed out I was getting Karmic rewards, but I don’t think that’s true. First, I don’t believe that is the way Karma works; second, the situation I was in wasn’t “bad”. The people weren’t horrible, no good, very bad people. We just had completely different communication and management styles. It happens. And with seven years to go to retirement, I’m not willing to stick around to try and work through that angst. Nor, apparently, was my now-previous boss.
I much prefer to have an ice cream sundae with whipping cream and chocolate drizzle. There may even be a chance at a cherry on top, but maybe I’ve pushed enough for one week.
Way back when I got married, some 10 years ago now, we discussed the fact that we were taking a pretty simplified and organized approach to our planning, somewhat different from what we found online, and perhaps when we were done, we’d write it up and post it too. Well, fast-forward ten years and I’ve never made the time to do it. Lots of other topics intervened, and yet I had it on my list. Partly even just to be able to share some of the photos as examples.
A little over a month ago, I saw a guide online and thought, “Okay, we’re out of date, but maybe somebody out there will find it interesting at least.” And so I added it as a 50by50 item. Sixteen topics broken down into 9 posts:
I feel like I want to go back and edit it down to a one-page “do this” type list, but for now, I’m ticking the box that I told our story. Just in time for our anniversary.