Remote blog writing under Drupal 7 - Mars Edit & me

Submitted by Sam Moore on

MarsEdit3Icon256

For several years, I've been using and recommending the excellent Mars Edit for folks who want to write blog posts offline for later uploading.

There are several reasons for people to want to do this - for one thing you can work on several articles at once, without having to flip between browser tabs. Also the better offline editors have good media management, allowing the user to upload images from the desktop easily, and in some cases even pull from iPhoto, or from previously published stories, without breaking the flow of writing. Even the best WYSIWYG editors that work in-browser can't quite match the ease of use and basic unobtrusiveness of a good offline editor.

One user has also points out that she feels safer having a local copy of her posts available as backup, or in case she wants to pull a bunch of posts together for a story collection or a book.

In any case, offline editors are popular, and Mars Edit is one of the best (Mac only, sorry).

So when I recently updated this site to Drupal 7, I figured everything would Just Work, as they say - silly me. There are some configuration issues on the Drupal side that have kept me busy today - nothing that was Mars Edit's fault. It all comes down to setting up BlogAPI correctly.

Just by way of background: Drupal requires the addition of the BlogAPI module in order to provide a web service that allows remote posting in the manner we're looking for here. BlogAPI will accept POST methods, authenticate the user, parse the provided xml, and create or update the node for you. It will also accept images and put them in the Drupal file hierarchy, so that they can be referenced by your post. However, these images need to be encoded as text, because of the xml-based conversation that it's having with the remote client.

Drupal uses the Movable Type API, which is quite well supported generally, and Mars Edit is smart enough to know that - so that when you set up your blog account in Mars Edit for the first time, it generally gets the settings correct.

There are a few gotchas though, and as I spent a good few hours on this, I thought I'd share:

Firstly, you need to get BlogAPI installed. Install it as you would any other Drupal module, but be sure to turn on the supporting API providers - MetaWeblog and Movable Type - in the Modules list. Apparently we need both, as some key functions seem to reside in MetaWeblog.

Next, be sure to grant permissions. This may seem obvious, but I spent a frustrating hour trying to post images as the superuser, and failing. Even if your account is UID=1, you'll still need to create a role, add yourself to it, and give it perms for BlogAPI. If you don't, you'll be able to post text just fine, but BlogAPI will refuse your images, because you won't have a valid file upload limit.

If you'd like to be able to push posts up in Draft (unpublished) status, you'll need "Administer Content" perms as well - grant that to your role, again even if you're user #1.

Finally, if you're getting complaints about the SQL schema, as I was, just uninstall BlogAPI (that means uninstalling the providers first - and I do mean uninstall at /admin/modules/uninstall, not just "turn off"). Turn BlogAPI back on again, and it will re-make the database tables it needs. You will then have to reactive the providers, and set everything up again at /admin/config/services/blogapi. I think this may have something to do with the update - perhaps the BlogAPI updater doesn't quite handle the jump from D6 to D7. Anyhow reinstalling solved it for me.

Drupal 7 update

Submitted by Sam Moore on

Just a short interlude to the series on CGSHR…

 

I've been putting off updating this blog to Drupal 7, but it's time to bite the bullet and do it on several sites I'm responsible for.

Actually this site is simple enough that the data migration was quite straightforward; the time-consuming part of it was the re-making of the theme, since themes can't really be upgraded as such. Good opportunity to make the theme a bit more responsive, anyhow.

One odd glitch was the scrambling of the Administration menu - items disappeared, other items turned up in the wrong place, etc. No amount of re-installing the Admin menu module, rebuilding the menu cache, etc. was of any help.

It turns out this was a known issue (see this d.o post). After hacking some stuff out of the MySQL database as per a suggestion here, the Admin menu was back to normal.

Now that that's done, it's on to Resonetrics.com...

MAIN_Logo.png

A few notes about The Consortium on Gender, Security and Human Rights site

Submitted by Sam Moore on

CGSHR Homepage

The new site for
The Consortium on Gender, Security and Human Rights
had its "soft-launch" yesterday. The site is live and usable, but the owners still have a few things they'd like to tweak.
Little do they know, web sites are never really finished - so for all intents and purposes, this is the real thing.

Probably the most interesting part of the project from my point of view was the heavy customization of Apache Solr search results, and the whole search experience. This was mostly accomplished via templates in the site's theme. I'll share a few details in case anyone's interested.

To begin with, this is a Drupal site - specifically D7. The owners had an initial design and a sort of prototype site built by a previous developer in D7, which they handed off to me. That work was done cleanly and competently, but it was clear the client wanted to go so much further than the original builder was prepared to go. I'm not sure what transpired, though I did have a friendly chat with them, but in any case they were out of the picture by the time I got involved.

When I received the site, the first thing I did was to stage it on my Drupion server. Drupion are like family to me, and I've trusted them to help me grow my Drupal business, so it was an easy pick. When the client agreed to host with me for production, that made the decision that much more rational.

Drupion got Solr and Tika set up right away. Solr is a much more powerful search tool than the built-in Drupal search, capable of handling a very large number of indexable items. More info on that here. It runs as a separate server process, and needs about half a Gig of RAM. Tika is an add-on to Solr, which allows searching inside documents such as Word, PDF and other files that are not normally presentable on the web. The client has quite a number of academic research papers and other documents in these formats, so the ability to search inside them was essential.

Once Solr was running and had started indexing the site's content, we looked at what Facets to use for searches. Facets are basically filters - they allow you to limit searches to, say, one content type, or a particular taxonomy term.

Solr_Search

Above, you can see the some of the facets for the overall site search Here we've searched for "Gender" - a term guaranteed to return lots of results on this site.

On the left are check boxes that allow the user to narrow down the search to a particular Country, Region, etc. There's also a facet for Content type. On this site, content types mostly correspond to the type of document or media being shown - Citations, Research, Films, etc.
But you can restrict your search to one content type equally well by using the tabs along the top of the main content area - Films, Lectures, etc.
Clicking one of these will retain the same search terms, but narrow your results down to a single content type (if you want to search 2 content types, you'll have to use the checkboxes on the "All" tab).

In order to get these individual tabs implemented, I set up a separate search environment for each of the key content types. This allowed me to set facets and Bias for each (which we may want to leverage later).

Screen Shot 2014 03 27 at 2 07 15 PM

Next, I made pages for each content type. Each Page has its own title, and most of them (except "All") are limited to a particular Bundle (bundles are essentially content types, at the machine level. Check out D7's Entity system for more info). Because they all have paths that look like /search/--bundle--, they're showing up as tabs on the /search page. Neat :-)

Screen Shot 2014 03 27 at 2 09 53 PM

In my next post I'll show how Facet blocks are set up, and talk about theming the search results. Finally, I'll show some of the Views on the site, which offer more oaf a browsing experience, which I think complements the Search pages nicely.


Link

Hello Again

Submitted by Sam Moore on

OK, so I've been kind of busy building the business (http://resonetrics.com) and the rescue (http://kittenassociates.org).

So I'm not thinking as much about the general subject of technology for marketers these days, and more about the specifics of technology for my particular clients. Some of this might interest someone, so I've determined to write down some notes here.
Expect less in the way of general opinion, and more on, say, how to get Drupal to do what you want.

I'll be leaving out the Pageflex stuff -that side of the business has basically died.

Seth's Blog: No one ever bought anything on an elevator

Submitted by Sam Moore on

seth.jpg

The best elevator pitch is true, stunning, brief and it leaves the listener eager (no, desperate) to hear the rest of it. It's not a practiced, polished turd of prose that pleases everyone on the board and your marketing team, it's a little fractal of the entire story, something real.


Link

Dangerous Minds | FACEBOOK: I WANT MY FRIENDS BACK

Submitted by Sam Moore on
Zuck background22
Over a Dangerous Minds, a trenchant critique of Facebook's gonad-crushing "Sponsored Stories" strategy:
The worse the platform performs, the more advertisers need to use Sponsored Stories. In a way, it means that Facebook is broken, on purpose, in order to extract more money from users. In the case of Sponsored Stories, it has meant raking in nearly $1M a day.
This will hit small publishers, mom-and-pop businesses, and non-profits like Kitten Associates hardest.
At Dangerous Minds, we post anywhere from 10 to 16 items per day, fewer on the weekends. To reach 100% of of our 50k+ Facebook fans they’d charge us $200 per post. That would cost us between $2000 and $3200 per day—but let’s go with the lower, easier to multiply number. We post seven days a week, that would be about $14,000 per week, $56,000 per month… a grand total of $672,000 for what we got for free before Facebook started turning the traffic spigot down in Spring of this year—wouldn’t you know it—right around the time of their badly managed IPO.

Full Story

Ashkan Soltani introduces MobileScope, an innovative approach to online privacy | TechRepublic

Submitted by Sam Moore on

Ashkan Soltani introduces MobileScope, an innovative approach to online privacy.

According to the Wall Street Journal,

Marketers are tracking smartphone users through "apps" - games and other software on their phones. Some apps collect information including location, unique serial-number-like identifiers for the phone, and personal details such as age and sex. Apps routinely send the information to marketing companies that use it to compile dossiers on phone users.

More, including a data visualization animation, here.

Now one of the researchers involved has announced MobileScope.

MobileScope is implemented as a web service - not as an app on your phone - I'm liking this approach.

Mobile Scope

Why is this kind of service necessary at all?

First off, most users probably do not realize their information is being transmitted to third parties — who they’ve never heard of or had a relationship with. Since there’s little transparency on these platforms, it’s unlikely anyone would know.

Second, these third parties often receive extremely sensitive information, such as your precise location information (latitude/longitude) and your device identifier, which is persistent for the life of your device and can often be tied to your actual identity.

I'll be signing up - see link below - and we'll see what turns up.

(Via Bruce Schneier.)

Signup Page

In U.S. Smartphone Market, Android is Top Operating System, Apple is Top Manufacturer | Nielsen Wire

Submitted by Sam Moore on

June 2011 smartphone share

Here's a chart summarizing Nielsen's recent findings on OS and device share in the US market.

So how does this compare to the worldwide scene? We're not sure yet, but (again according to Nielsen) apparently we're to look for a massive growth in smartphone use in Asia, Real Soon Now.

Nielsen Post

General Electric's Tumblr - actually worth visiting

Submitted by Sam Moore on

GE has this very intriguing Tumblr blog, with pix of various cool stuff from their labs. I have to admit just spending twenty minutes on this site totally changed my attitude about GE. Maybe they do have something going on after all...

Tumblr lm4he0jndb1qk4ealo1 500

In the early 1900s, electric cars outsold gas cars. We found this electric car charger in our archives - it was used in both parking and home garages.

Tumblr lm6akr6jbu1qk4ealo1 500

A pulse-detonation actuator from our Energy & Propulsion lab. It produces high-pressure, pulsating supersonic jets, which help with airflow control in high-speed travel. Active airflow control reduces the drag, noise, and fuel consumption of an aircraft, making for smoother and more efficient flight.
Tumblr llrswzRe2B1qk4ealo1 500
An X-ray control panel from 1921. It was built by Victor, which was owned by GE and became GE Medical Systems.
Tumblr llggfmgjoF1qk4ealo1 500This was one of our very early solar demonstrations - light would shine on a single photovoltaic cell, supplying enough electricity to power a motor. In 1939, GE went on to unveil the “Sun Motor” at The World’s Fair, a slightly larger version of the demo, that signaled GE’s vision for solar as a viable energy source.

China Tightens Electronic Censorship - NYTimes.com

Submitted by Sam Moore on

Nytlogo153x23Looks like the Chinese government is pushing internet controls a lot harder - and perhaps testing to see how much Chinese citizens can tolerate. I'll bet several Middle East governments wish they had this level of control right about now. But the question of when this sort of thing ultimately backfires is a fascinating one. So far in China's case the answer may be, "Not soon, if ever".

A host of evidence over the past several weeks shows that Chinese authorities are more determined than ever to police cellphone calls, electronic messages, e-mail and access to the Internet in order to smother any hint of antigovernment sentiment. In the cat-and-mouse game that characterizes electronic communications here, analysts suggest that the cat is getting bigger, especially since revolts began to ricochet through the Middle East and North Africa, and homegrown efforts to organize protests in China began to circulate on the Internet about a month ago.

“The hard-liners have won the field, and now we are seeing exactly how they want to run the place,” said Russell Leigh Moses, a Beijing analyst of China’s leadership. “I think the gloves are coming off.”


NY Times piece

Pages