Originally published by me at The CogDog Show » Syndicate This (see it there)

In a post on my approach to building The Daily site am not thinking I was wrong about being wrong… does that make me right? And in a process of working on projects, does, does being right even matter?

To recap, I have been working recently on building another WordPress Theme as a template anyone can use to create a site like the DS106 Daily Create to make a Daily _______ (hence calling it “The Daily Blank”). A limitation of what we did on DS106 was that it limited submissions to media sharing sites and tagging them there- like flickr, SoundCloud (creating more than one group not allowed), YouTube (tags no longer work in search).

My idea was to go back to The Daily Shoot (archive link, current site is DOA where people responded to a tweet from @dailyshoot with a link to their photo and a hashtag specific for an assignment.

The logic was:

  • Making a site you provide credentials for the twitter account you will use to announce and participants respond to, for us, @youshow15
  • Each new challenge was identified by a tag pattern not used in twitter, #ysdailyXX. These are published as scheduled posts, so they go live the same time each day. It gets tweeted every day using dlvr.it which looks for new items via the RSS feed of my site.
  • The site regularly (through a wordpress technique to run a task on a given interval, here every hour) uses the twitter API to check the mentions time for the specified twitter account.
  • It steps through all recent tweets, and keeps tracks of all of them that have a hashtag matching the base pattern (#ysdaily_____).
  • For each of these it checks the one previously saved to see if it exists (each tweet has a unique ID, which is stored on my site, if it does not exist, it saves the new tweet as a Response custom content type. This uses the tweet text as a title, and saves the tweeting author and its unique URL as meta data. It adds as “tags” for the content type all hashtags used in the tweet, and any twitter accounts mentioned as tags as well.

    Because this is a custom content type its data exists outside the scope of normal blog posts.

The way the saved tweets are stored a a custom post type
The way the saved tweets are stored a a custom post type

As described last week things were not working quite well. The script was missing a lot of tweets, plus it seemed like too many things to ask for. Plus another problem is people confused the required @youshow15 account in the tweet and insert a #youshow15 tag (note to self, use a different name for the account than its hash tags).I was requiring a URL for the response to be in the tweet.

I though I was making it too complex and that I could make submissions be on the site via a web form, or essentially, bend the function of the comments to work as a submission.

But in a way, this seems just the same old way to collect responses, a web form. I really wanted something where a response could be a single tweet.

In a fit of curiosity, I gave myself one more go back at sorting out my code logic. The first finding was by removing the logic that checked the API response for links on the URL, I picked up many of the missing tweets. I am pretty sure the way I was testing was wrong, the existence of the array in the data that held the tweets. But it also made the required elements 2; it does mean it might pick up conversational tweets, but oh well.

The other thing I discovered was my logic to match hashtags was problematic, since I started trying to make them stand out by using a pattern like #YSdailyxx. What I noticed was in string matching in PHP I was not taking into account the difference in upper and lower case- in code “YSdaily12″ is not the same as “ysdaily12″. So I made sure that internally in the code and storage of tags on the site, all are converted to lower case.

I am feeling better now that its working as I intended; see Take a photo that metaphorically represents contrasting ideas #YSdaily10 (you can always respond to a past Daily, the site will look for any responses). It even picked up this one

Sheila has actually used the #youshow15 hashtag rather than the account @youshow15 but by retweeting and editing, I was able to nudge her response into the stream.

The current code for the theme is available ongoing at github; it’s not quite complete, and maybe worth considering how github provides an ongoing look into the development process of its contents, not just the final bits. It’s not quite ready for use, and I have yet to write documentation, but it’s in motion.

I added in my usual touch of randomness, this is a page template – a blank page named “Random” is all that is needed to trigger this http://thedaily.trubox.ca/random/.

And another nifty trick, a widget I use to display recent responses across the site, needed help, because listing the information in wordpress form is not useful, so I have a script that redirects a link like http://thedaily.trubox.ca/response/559357097721475072/ to the tweet it represents. Want code? Got it here.

So I think the site is back in business. I have loaded it up with a batch of challenges for this week’s topic in the You Show of design, some drawing tasks, and working with graphics.

Get in on The You Show Daily at http://thedaily.trubox.ca/.

And thus, there is really no right or wrong ways in things we try to create, just the paths you choose, or abandon. And this can change along the way.

The CogDog Show » Syndicate This is a portfolio site built for my time as an Open Learning Scholar at Thompson Rivers University.

1 Comment

Leave a Comment

All fields are required. Your email address will not be published.