Monday, October 26th, 2009
A new WordPress plugin called Headup was released about a week ago by SemantiNet, a startup dedicated to developing Semantic Web technologies and platforms. The plugin works on top of the company’s existing technology, and automatically adds rich content to terms that appear in your blog posts.
I installed it here on WordPress Garage so you can see it in action, but basically the way it works is key terms get a dotted orange underline (which helps differentiate them from your regular links), and when you mouse-over those terms a pop-up window appears with information tabs. These tabs display the following content:
- A short summary about the key-term (Wikipedia style information)
- Related News, Articles & Posts
- Related images from Flickr, Panoramio, Picasa, etc.
- Related Tweets
- Related Videos from Youtube
- Related Products from Amazon
- How your readers Facebook friends relate to the key term (requires readers to approve Facebook connection)
For geographic locations the pop-up will display a Map tab, and for films a Trailer tab will be displayed.
The field of semantic technologies is so new that Headup is only one of 9 WordPress plugins that have “semantic web” as a tag in the plugin directory.
How to install the Headup plugin
- Go to “Add New” in the WordPress plugin menu.
- Enter “headup” as the search term to find the plugin in the directory. There will only be one result for this term.
- Click the “Install” button on the far right, and then activate the plugin.
- You can configure some settings for the plugin under Settings > Headup for WordPress. There you can choose a maximum number of annotations to display on a page, how many times the same term should be annotated, and whether hyperlinks should be annotated as well.
It will take about an hour before the key terms on your site start displaying the dotted orange highlights. Here’s a short video explaining how to install the plugin:
[youtube]http://www.youtube.com/watch?v=3G20whW3yOs[/youtube]
Here’s another video overview of the Headup Blog Widget and WordPress plugin.
Why would you use this plugin?
The creators of the plugin say that by offering this type of content, you can “reduce bounce rates and increase your readers’ engagement.” Since I tend to judge the world by my own preferences, I was a bit skeptical as to whether such a feature could really achieve those goals since I prefer to find my own info rather than have it dictated to me. Luckily, my pal Mike works at SemantiNet so I decided to ask him a few questions about this plugin, their technology, the semantic web in general, and whether he agrees that Cookies and Cream is Ben & Jerry’s best ice cream flavor.
WPG: Mike, tell me a bit about SemantiNet and what you do there.
Mike: Whereas much of the activity related to semantic web is still very much academic and theoretical, SemantiNet’s products are among the few examples of practical applications of next generation web technology anyone can enjoy today.
What our technology does is identify key-terms in publications & blogs and then provide relevant and personalized related content in real-time. For example, say you’ve written a post about Barack Obama recently being elected in Oslo to be honored with the Nobel Peace Prize. What we’ll do is automatically identify the term “Barack Obama” as being president of the US, and suggest content related to him, and identify the term “Oslo” as being a city, and suggest content related to it too.
The big deal here is that the technology realizes that Oslo, the city, has different attributes from Obama, the person, so it will offer different types of information for each. For example, Oslo’s Headup results would include a city map, while Obama’s would not.
As for me, I’m a Project Manager in the company and am responsible for managing the company’s site and blog widget.
WPG: Call me an ignoramus Mike (don’t look so happy about the opportunity), but I still don’t quite get what the semantic web is about. Please explain and make me feel more intelligent.
Mike: What makes companies like SemantiNet exciting is that their understanding of online content goes beyond the basic key-word matching we’re familiar with from current search technologies, and enters the realm of true object identification. This is a fancy way of saying that whereas today, if you search for “Apple” you’ll get results related to the company and the fruit indiscriminately, the vision for Semantic Web is that the same search will deliver results that relate not only to “Apple” but also to “Steve Jobs,” “iPhones,” ”iPods,” etc. even if the word “Apple” isn’t explicitly mentioned in the text results.
For more information about the Semantic Web I recommend seeing Sir Tim Berners Lee’s excellent TED talk on the subject.
WPG: How can bloggers and publishers offer this type of rich information on their own sites?
Mike: To date we have three products people can use to get a better feeling for what this does: the Headup Firefox addon, the Headup publisher and blogger widget, and most recently, the Headup WordPress plugin.
WPG: Why should bloggers install the Headup plugin?
Mike: Bloggers who install our widget will gain longer engagement times and reduced bounce rates. Besides these advantages the widget has the ability, via the “Friends” tab, to enable readers to personalize their reading experience and see how the key terms you blogged about relate to their circle of friends. To the best of my knowledge no other widget out there has this capability.
A significant benefit is the fact that everything I’ve described so far is entirely automated. All you as a blogger need to do is a single one time installation of the plugin and within about an hour your entire archive will be covered. This level of automation is again, to the best of my knowledge, unprecedented.
WPG: How does the widget promote engagement time and reduce bounce rate?
Mike: The widget reduces your reader’s incentive to browse away by letting them access all the related content they need right on top of your pages. Why go somewhere else when you have everything you need right where you are?
In your interview with Lior Haner from Yedda you asked, quite rightly, how Yedda was solving bloggers’ need to have conversations take place in their blog. We don’t deal in conversations, however as far as complementary and related content is concerned, we’ve pretty much guaranteed bloggers that their audience won’t have to open another tab or browse away to get the little extra that was missing.
WPG: Can bloggers contact you with questions?
Mike: For sure! I’m personally available for any support needed both on twitter @headup and via email – miked[at]semantinet[dot]com. Don’t be Shy!
WPG: Anything else you’d care to add?
Mike: I agree that Cookies and Cream is Ben & Jerry’s best flavor.
WPG: Of course you do! That’s why we’re pals.
So there you have it. I’d love it if you, our readers, would check out this new feature here and tell me what you think: is it useful, annoying, or somewhere in between?
Posted in Plugins | Tags: Plugins, search, semantic web | 3 Comments »
Thursday, July 23rd, 2009
In the previous post, we discussed how to hack the search function in Wordpress to have an additional search form that would search subcategories. Now that you have 2 or more search forms on your site, you might need to customize the search results. Thanks to this solution, I learned how to create multiple search result pages.
Let’s say we have 2 search forms on our site:
- General Site-Wide Search
- Recipe Search – searches subcategories of the Recipe Category
The first thing we need to do is tweak the search.php template to use it as a filter that will recognize if a search is coming from the Site-Wide search form or the Recipe Search form.
1. Open Search.php and delete everything. Add the following code:
<?php
/* Template Name: Search Results */
$search_refer = $_GET["site_section"];
if ($search_refer == ‘recipe’) { load_template(TEMPLATEPATH . ‘/recipe-search.php’); }
elseif ($search_refer == ’site-search’) { load_template(TEMPLATEPATH . ‘/site-search.php’); }; ?>
2. Open Header.php or wherever the General Site-Wide Search Form is located and add this line:
<input type=”hidden” name=”site_section” value=”site-search” />
The Site-Wide Search form will look something like this:
<form method=”get” id=”searchform” action=”<?php bloginfo(‘home’); ?>/”>
<div id=”search”>
<input type=”text” value=” ” onclick=”this.value=”;” name=”s” id=”s” />
<input type=”hidden” name=”site_section” value=”site-search” />
<input name=”" type=”image” src=”<?php bloginfo(’stylesheet_directory’); ?>/styles/<?php echo “$style_path”; ?>/search.gif” value=”Go” />
</div><!–/search –>
</form>
3. Open Recipes.php or wherever your second search is and insert this line:
<input type=”hidden” name=”site_section” value=”recipe” />
You can change the value “recipe” to whatever suits your needs. Just make sure it matches the value in search.php.
The Recipe Search form for your second search will look something like this. In my case, this second search is meant to search the subcategories of the Recipe category. See my previous post to learn about hacking the search function to search subcategories.
<form method=”get” id=”rsearchform” action=”<?php bloginfo(‘home’); ?>/”>
<div id=”rsearch”>
<input type=”text” value=”Recipe Search… ” onclick=”this.value=”;” name=”s” id=”rs” />
<?php $categories = get_categories(‘child_of=11′);
$catlist = ”;
foreach ($categories as $cat) {
$catlist.= $cat->cat_ID.’,';
}
$catlist.’11′;
?>
<input type=”hidden” name=”cat” value=”<?php echo “$catlist”?>” />
<input type=”hidden” name=”site_section” value=”recipe” />
<input name=”" type=”image” src=”<?php bloginfo(’stylesheet_directory’); ?>/styles/<?php echo “$style_path”; ?>/search.gif” value=”Go” />
</div><!–/search –>
</form>
4. Customize the Search Results Templates
If you recall, in step 1, we added the following to the search.php page.
if ($search_refer == ‘recipe’) { load_template(TEMPLATEPATH . ‘/recipe-search.php’); }
elseif ($search_refer == ’site-search’) { load_template(TEMPLATEPATH . ‘/site-search.php’); }; ?>
Create recipe-search.php (or whatever you named this template) and customize the layout of the results page to your liking. You can use index.php to start with and customize from there.
Create site-search.php (or whatever you named this template) and customize the layout of the results page to your liking. You can use index.php to start with and customize from there.
Posted in Code Snippets, WordPress as CMS | Tags: customize, multiple, Pages, results, search, wordpress | 1 Comment »
Tuesday, July 21st, 2009
Recently, we had a client who wanted a special recipe search. There were 2 ways to extend the search functionality – manually or dynamically.
1. Search One or More Categories Manually
If we want to search one category, we could have used this solution which lets you manually add category numbers to the search function:
[Replace value="5" with your category number.]
<form method=”get” id=”searchform” action=”<?php bloginfo(‘home’); ?>/”>
<div>
<input type=”text” value=”<?php echo wp_specialchars($s, 1); ?>” name=”s” id=”s” />
<input type=”hidden” name=”cat” value=”5″ />
<input type=”submit” id=”searchsubmit” value=”Search” />
</div>
</form>
2. Search Subcategories Dynamically
However, we wanted to dynamically search only the subcategories of the Recipe Category. The reason being that if you’re already in the Recipes section of the site, seeing a recipe labeled as Recipes is not helpful. However, seeing a recipe labeled as Dessert (mmm..) and Breakfast is helpful. So, each recipe that the client adds will be in a subcategory of recipes (ex. Dessert), but they won’t have to check off the checkbox next to the Recipes category itself.
Anyway, I’ve been looking for this solution for a long time and now, thanks to Ilan Cohen, I present it to you.
[Replace the number 5 with the parent category.]
<form method=”get” id=”searchform” action=”<?php bloginfo(‘home’); ?>/”>
<div id=”search”>
<input type=”text” value=”Search… ” onclick=”this.value=”;” name=”s” id=”s” />
<?php $categories = get_categories(‘child_of=5′);
$catlist = ”;
foreach ($categories as $cat) {
$catlist.= $cat->cat_ID.’,';
}
$catlist.’5′;
?>
<input type=”hidden” name=”cat” value=”<?php echo “$catlist”?>” />
<input name=”" type=”image” src=”<?php bloginfo(’stylesheet_directory’); ?>/styles/<?php echo “$style_path”; ?>/search.gif” value=”Go” class=”btn” />
</div><!–/search –>
</form>
The code searches through all the child categories of Category 5 (Recipes). Then, you’ll see we added an additional “5″ in this line: $catlist.’5′; just in case the client puts a recipe in the Recipes category, and not one of its subcategories.
Posted in Code Snippets, WordPress as CMS | Tags: category, child category, dynamic, function, parent category, search, subcategory, wordpress | 5 Comments »
Sunday, February 22nd, 2009
I just received an email from Matt Mullenweg, founder of Wordpress, letting me know that the “Plugin search no longer sucks”. I was so excited that I didn’t even notice the typo he later reported on Twitter.
According to the official Wordpress site, Wordpress Plugins directory search is no longer a big mess, and can actually help you find the plugin you’re looking for. Last week I think I did a search for “video” and got results like contact form, social bookmarking, etc. and had to resort to a Google search. But now the search brings up much better results and is a great resource.
Wordpress improved the search using Sphinx (a “free open-source SQL full-text search engine”) to power the search from the plugins directory and from your blog’s admin area (Plugins>add new)
All I can say, is, give it another chance and you may just find a great plugin from the 4,245 available.
Posted in News & Views | Tags: directory, Plugins, search, wordpress | 1 Comment »
Tuesday, January 8th, 2008
When developing blogs or sites on WordPress, we often have to search for information or need help solving a problem, and in those times many of us turn to Google. Did you know that Google has zillions of ways that you can focus your searches and make them even better? The major drawback is that you have to remember zillions of queries in order to do that, and in the end it’s just so much easier to do a regular search and see what you get.
That’s when Advanced Dork Firefox Add-on comes to the rescue! All you have to do is right-click it in Firefox, and you get a whole myriad of Google search options.
Here’s what the download page says about the Add-on:
Advanced Dork: Main Functions:
- Highlight any text, right click, and choose from over 15 Advanced Google Operators. This function can be disabled in the options menu.
- Right click anywhere on the page with no text selected to be provided with the active pages HTML title for use with Google’s intitle Operator, and the active pages HTML ALT tags for use with Google’s allintext Operator. This function can be disabled in the options menu.
- Right click on a link and choose from site: links domain, link: this link, and cache: this link. Site: links domain will only search the domain name, not the full url.
- Right click the URL Bar (aka Address Bar) and choose from site, inurl, link, and cache. Inurl works with the highlighted portion of text only. Site will only search the domain name, not the full url.
Sound good? Visit the Advanced Dork download page to learn more and get the Add-on.
Posted in Tips | Tags: Google, search | No Comments »
Monday, December 31st, 2007
Urban Giraffe has a list of amazing plugins that the guy behind the site, John Godley, developed. Many of these plugins are really unique, and I haven’t seen anything like them anywhere else.
Here are the ones that I find most interesting, and I hope to try out soon:
- Filled In – Places a customized form on your site, and stores submitted data in a database. The plugin features email reporting, AJAX support, CAPTCHA support, and file uploads. The data can be exported to CSV or XML.
- Advanced Permalinks – If you decide midway to change your permalink structure to something friendlier, this generally means you have to do it sitewide and for all existing posts, which means redirecting everything. This plugin allows you to say “From now on, all posts will have permalink structure B, while posts until now will retain permalink structure A.” Can save a lot of headache.
- Search Unleashed – Makes searching WordPress blogs more user-friendly by adding the following features:
- Full text search with wildcards and logical operations
- Search posts, pages, comments, titles, URLs, tags, and meta-data (all configurable)
- Search data after it has been processed by plugins, not before
- Search highlighting of all searches, including titles and comments
- Search highlighting of incoming searches from Google, Yahoo, MSN, Altavista, Baidu, and Sogou
- Search results show contextual search information, not just a post excerpt
- Record search phrases and display in a log
- Exclude specific posts and pages from results
- Compatible with WP-Cache
- Supports WordPress 2.0.5 through to 2.3
- No changes required to your theme
- User Permissions – Allows you to assign permissions to specific posts. This sounds like it could be good if you offer premium content on your site.
- Anti-Email Spam – Simple plugin to encode email addresses with either JavaScript or HTML entities and protect yourself against email harvesting scripts. I should have done something like this a loooong time ago.
See ‘em all at: Plugins – Goodies for WordPress | Urban Giraffe»
Posted in Plugins | Tags: forms, multi-user, permalinks, search | No Comments »
Sunday, March 11th, 2007
In default WordPress installations, the search function only yields results for posts. It does not search pages, comments, or anything else.
Search Everything from Dan Cameron solves that problem. Install and activate the plugin, and then go to Options > Search Everything to select what exactly you want to be searched. Here are the options:
- Pages
- Comments
- Only approved comments
- Drafts
- Attachments
- Custom fields (metadata)
I’m not sure why people would want users to see results in drafts or custom fields, but maybe there is a use for that that I’m not aware of.
Search Everything Plugin>>
Posted in Plugins | Tags: comments, file management, Pages, search | No Comments »
Saturday, February 24th, 2007
Update June 6, 2007: There is a problem with closing HTML tags in Kaf’s Excerpt Reloaded Plugin. This means that if you define <ul> as one of the HTML tags you want to preserve in your excerpts, you may end up with a page of excerpts that is one big list, since the closing </ul> may be ommitted. Rob created a mod of the Excerpt Reloaded plugin which preserves closing tags, but after testing it out on this site, I found that the first version still had some problems with formatting. Rob went and fixed his plugin, which I subsequently activated on this site, and now my excerpts look normal! Bless his soul. Read my full review of this new mod.
Update June 5, 2007: Rob from Rob’s Notebook posted a comment, which you can see below, about his mod of the Excerpt Reloaded plugin. There is a problem with the original plugin where very often the closing paragraph tag </p> is missing. Rob says that his plugin fixes that. I have installed his plugin on this site, but haven’t seen any noticeable improvements since the biggest problem that I’ve found with the original plugin, and which still exists with his, is that almost none of the tags are closed. Blockquote, ul, li are all left open, and therefore affect the entire page that follows any excerpts with any of these tags. You can see what I mean by clicking on the archive links in the sidebar.
One of my clients asked me to make sure that links are displayed in excerpts. I don’t know what the advantage of not having links in excerpts is, and why WordPress defaults to removing these links.
After searching extensively on the web, it seems that the only solution to this problem is The Excerpt Reloaded plugin at guffszub.net. This plugin customizes which HTML tags to allow, length of the excerpt (in words), “more…” link, and filtering type.
At first I couldn’t get it to work, but I figured out what the problems were, and I want to share them in case others have trouble too:
- I didn’t download the zip file, and was using the display page instead. No matter what I did, I kept getting an error message when I activated the plugin. It turns out that the display page has a space at the end of the code after the closing php tags. Once I deleted the space, the plugin began to work.
- Guff says to put the function in The Loop. Maybe it’s because I was tired, but I understood that to mean that it just needed to appear anywhere within The Loop to work. What it actually means is that the function needs to appear wherever it is that you want the excerpt text to appear. So for example, if you want the excerpt to appear instead of the content, you need to replace
<?php the_content();?> with <?php the_excerpt_reloaded(); ?>.
- Make sure you put the tag in all the template files that are relevant. Some examples of files that you may want or need to modify are index.php, home.php, archive.php, search.php, and category.php. (Don’t worry if you can’t find some of these files in your theme – some of these files are optional for themes.)
The Excerpt Reloaded is now activated on this site.
Rob’s mod of the Excerpt Reloaded Plugin is now activated on this site.
Kaf’s Original Excerpt Reloaded>>
Rob’s mod of the Excerpt Reloaded Plugin>>
Posted in Plugins | Tags: excerpts, posts, search | 11 Comments »