Technical Tuesday
Customizing "View More" Links In Views 1 For Drupal 5
A short, quick and easy tip for views theming and customization.
To customize the text or the destination path/url of a 'view more' link in Views. Add this to template.php in your phptemplate theme and add cases.
<?php
/**
* Override theme_views_more() to set custom link texts and destinations.
* @param $path String
* The destination of the more link.
*/
function _phptemplate_views_more($path) {
$text = 'more';
switch ($path) {
case 'foo/bar':
$text = 'doh';
break;
}
return "<div class='more-link'>" . l(t($text), $path) . "</div>";
}
?>- Bevan Rudge's blog
- Login or register to post comments
- Read more
How To Rebuild The Menu In Drupal 6
To rebuild the menu in Drupal 6 you have to go to admin/build/modules.
In drupal 5 the menu is cached in the cache_menu table, so it is easy to invoke a menu-rebuild by emptying the table with a simple mysql command like TRUNCATE cache_menu;. (I have a handy script that empties all tables starting with cache_).
- Bevan Rudge's blog
- Login or register to post comments
- Read more
Firefox Tip: Changing Default Browser URL Bar Behavior On Click
A few months ago when I started using FF3 beta I was being driven mad by the default behavior of the browser when you clicked on the url in the address bar, a single click would highlight the entire url.
Typically I click on the url with the intention of appending the url with something like "admin/build/views" and the entire url would get wiped out.
Well, Owen heard my plight and taught me out to change this behavior:
How to create a flexible events listing with views and panels 2 and CCK node reference
Tech Tuesday: Clean URLS In CiviCRM Or How To Use Menus to Link to CiviCRM Forms
Ron asked me for a little help on a side project where he was having trouble adding a link to a CiviCRM contribution form to a primary navigation menu. This is a pretty common requirement: you want a "donate now" link in your primary nav. You are using CiviCRM for donations. You figure, "I'll just add the civicrm contribution form url to the path field for my menu item." Well, unfortunately you figured wrong.
Contextual Help in Module Development
One of the findings of the Drupal usability testing at UMN in February was that users like, use and like to use contextual help. Many of the participants explicitly said that they would have liked more of it during their evaluations and in debriefing.
As a developer it is difficult to anticipate where contextual help is appropriate, needed or perhaps why it's even necessary. While usability testing is possibly the only way to effectively determine exactly where contextual help is needed and useful and where it's not, I think this example might help developers understand when where and why contextual help is likely to be helpful. This is part of developing sympathy for the user.
Tech Tuesday: Loading GMaps Asynchronously On The Witness Hub
Last week the Witness Hub was updated with new enhancements and features -- most obviously, the Hub Map is now also on the home page!
Here is a video demonstration:
This feature required asynchronous loading of the Hub Map, including it's full-screen switcher and chunk marker loader code and features, on-load of the 'Map' tab (a Hub-customized version of jQuery tabs).
- Bevan Rudge's blog
- Login or register to post comments
- Read more
Technical Tuesday: Aliasing Your Site's Email Address
Recently I had a client who was irked by the way the "from" email address for messages sent by the subscriptions module appeared in users' inboxes.
Technical Tuesday: IE8 Version Targetting: ALA, Still Undecided
A List Apart's Issue 253 continues discussing and debating the controversial IE version targeting that ALA announced a month ago. CivicActions blogged about this topic then too.
Jeremy Keith and Jeffrey Zeldman provide very realistic and down-to-earth points of view and arguments both for and against version targeting. Although they each reach different conclusions, neither tries to persuade the reader one way or the other. Rather they leave you more enlightened so that you can make your own decision.
'They Shoot Browsers' by Jeremy Keith was better written in my opinion and has more convincing arguments, including this gem;
"The proposed default behavior for version targeting in Internet Explorer solves the problem of “breaking the web” in much the same way that decapitation solves the problem of headaches."
I'm still not 100% decided, but I'm pretty heavily swaying to the side against version targeting. Having said that, I can understand how and why Microsoft, even with mostly good intentions, came to this solution. I can see and appreciate the short term benefits, however I don't believe that Microsoft can pull this off in the long term. As web developers, we have no reason to believe that Microsoft is capable or even intends to follow through with it's promises
Firefox, Mac and Transparency woes - pulling the FOSS strands together
It is often said that 3 things make a 'trend' in the modern world, so here are 3 very sneaky browser bugs triggered by 3 different Drupal modules that have crossed my path in the last few weeks, all (it turns out) quite likely related. Here they are, in the hope that if you see something similar you might be able to locate the problem a little more rapidly.






