ted serbinski – entrepreneur & web architect
  • thoughts
  • about
  • contact



Popular content

  • How to Save and Archive Your Geocities Account (with jQuery + Firebug)
  • How to Keep a Macbook Cool
  • Announcing jCalendar - a jQuery date picker
  • ted 2.0 - a site redesign
  • "Black & Blue" Drupal Theme Released
  • Sudo on the Mac...
  • Sushi Go-Round, from London
  • Getting Textile to work with Digg This button (and other SCRIPT tags)
  • Best Place to Buy Macbook Pro RAM
  • Automatically Extracting Tags from Nodes
more

Recent comments

  • Unfortunately this method
    2 weeks 1 day ago
  • I’m using this method to sort
    7 weeks 37 min ago
  • I was interested in reading
    8 weeks 5 days ago
  • Ah yes this code is a bit out
    12 weeks 2 days ago
  • After using the original code
    12 weeks 2 days ago
more

Recent comments

  • Creating an Alpha Pager with Views 2 and Drupal 6   2 weeks 1 day ago
    Unfortunately this method

    Unfortunately this method doesn’t work if you want a single page for entries starting with digits, like “0-9 | A | B | C …” Still trying to figure out how to accomplish this and where I could even insert custom php to do it.

  • Creating an Alpha Pager with Views 2 and Drupal 6   7 weeks 37 min ago
    I’m using this method to sort

    I’m using this method to sort nodes by the author (uid).

    It’s working pretty well but seems to be case sensitive. my directory is “art”, so when the url path ends with – art/a, it only shows the nodes posted by users who’s username begins in lowercase “a”. When I change the path to – art/A, only nodes by users with uppercase “A”.

    Does anyone know a fix for this? I’m surprised this hasn’t been brought up yet. Seems as though when your searching the A’s you would want both uppercase and lowercase.

  • How often do you change your oil? Maybe too often...   8 weeks 5 days ago
    I was interested in reading

    I was interested in reading this. My old PUG 406 diesel required oil changes at 6k or earlier in bad conditions. The 407 I now own was serviced last Sept at 35578 and 6000 miles later it says next service 15k to go. The 6000 miles includes many short journeys in winter. What has changed since the late 90s to 2006, when my 407 was made, for this big jump in oil change intervals? Is engine oil better? Are oil filters improved? Or is the engine better engineered? The oil looks and smells contaminated and I am tempted to change it but your research suggests it is a waste of time and money. I also thought the turbo was lubricated from the engine oil and cleaner oil would be better for it!

    Regards

    Richard Russell

  • How to prevent duplicate posts?   12 weeks 2 days ago
    Ah yes this code is a bit out

    Ah yes this code is a bit out of date with all the new fancy AJAX like modules adding their own buttons :) Great call Caleb!

  • How to prevent duplicate posts?   12 weeks 2 days ago
    After using the original code

    After using the original code here, I realized that it is too inclusive and causes problems – namely, if there is an upload or imagefield on the page, when the attach button is clicked the JS in the original article will cause the submit button on the node to go away. The solution for this is to make the jQuery more targeted like so:

    1. $(document).ready(function() {
    2.   $('input[type=submit][@value="Post comment"]').click(function() {  
    3.     $('#comment-form :input').hide();
    4.     $('Waiting for response…').insertAfter(this).slideDown('fast');    
    5.   });
    6. });

  • Creating an Alpha Pager with Views 2 and Drupal 6   14 weeks 4 days ago
    Everything comes out

    Everything comes out correctly, except the alpha pager doesnt come out inline. I outputs like this: A B C D E F

    How do I get it horizontally?

    Thanks

  • Creating an Alpha Pager with Views 2 and Drupal 6   22 weeks 3 hours ago
    You can also add some php

    You can also add some php validation to the argument settings — checks for a single alpha character, upper- or lower- case.

    1. <?php
    2. if(preg_match('/^[a-zA-Z]$/',$argument)){
    3. return true;
    4. }
    5. ?>

  • Creating an Alpha Pager with Views 2 and Drupal 6   29 weeks 1 day ago
    Hi, I have used the

    Hi,

    I have used the glossary view in Views2 to get this to work. However, I am having a problem with the default argument. Was wondering if you can help. Currently, the default argument is hardcoded to “a”. So, if I don’t have any results starting with “a”, the results page comes up empty. Instead, I want it to display the results starting with the first letter in the summary. How can I set the default argument so that I can get this functionality? Would appreciate if you can help…

    Thanks!

  • Creating an Alpha Pager with Views 2 and Drupal 6   33 weeks 5 days ago
    thankyou so much and for

    thankyou so much and for those who can’t quite be bothered to fill in the dots:

    1. <div class="alpha-pager">
    2. <a class="alpha-page" href="/directory/a">A</a> <a class="alpha-page" href="/directory/b">B</a> <a class="alpha-page" href="/directory/c">C</a> <a class="alpha-page" href="/directory/d">D</a> <a class="alpha-page" href="/directory/e">E</a> <a class="alpha-page" href="/directory/f">F</a> <a class="alpha-page" href="/directory/f">G</a> <a class="alpha-page" href="/directory/h">H</a> <a class="alpha-page" href="/directory/i">I</a> <a class="alpha-page" href="/directory/j">J</a> <a class="alpha-page" href="/directory/k">K</a> <a class="alpha-page" href="/directory/l">L</a> <a class="alpha-page" href="/directory/m">M</a> <a class="alpha-page" href="/directory/n">N</a> <a class="alpha-page" href="/directory/o">O</a> <a class="alpha-page" href="/directory/p">P</a> <a class="alpha-page" href="/directory/q">Q</a> <a class="alpha-page" href="/directory/r">R</a> <a class="alpha-page" href="/directory/s">S</a> <a class="alpha-page" href="/directory/t">T</a> <a class="alpha-page" href="/directory/u">U</a> <a class="alpha-page" href="/directory/v">V</a> <a class="alpha-page" href="/directory/w">W</a> <a class="alpha-page" href="/directory/x">X</a> <a class="alpha-page" href="/directory/y">Y</a> <a class="alpha-page" href="/directory/z">Z</a>
    3. </div>

  • Rebuilding a BMW intake: S52 to M50 intake manifold conversion, day 1   35 weeks 2 days ago
    It’s typical for the

    It’s typical for the directions to make it sound easy. It seems nothing is ever as easy as they make it out to be.

  • Automatically Extracting Tags from Nodes   40 weeks 5 days ago
    I’m glad to see this review.

    I’m glad to see this review. I was about to embark on writing yet-another module and am glad to know that the Auto Tagging module exists so that I can just plug into that.

    One other module to consider is http://drupal.org/project/inform

  • Preventing Drupal from Handling 404s for Performance   43 weeks 1 day ago
    @Quoc: I’m wondering the same

    @Quoc: I’m wondering the same thing, and am working to try to find a solution. The issue here is that in Drupal 6, the function _phptemplate_variables has been deprecated. Here’s a read on that: http://drupal.org/node/223430.

    I wonder if function _preprocess_page () could be good for this, by injecting some of the same code above (it would also have to be verified to work with Drupal 6, however).

    1. // show custom 404 page
    2. $headers = drupal_get_headers();
    3. if (strpos($headers, 'HTTP/1.1 404') !== <span class="caps">FALSE</span>) {
    4.   // make sure this path = ErrorDocument in .htaccess above
    5.   include_once './sites/all/themes/foundation/404.php';
    6.   exit();
    7. }  

  • Getting Drupal to Play Nice with Your CDN   48 weeks 6 days ago
    Hi Ted/et all, there is an

    Hi Ted/et all, there is an easy way to do CDN on a drupal site which I blogged about a while ago. It kind depends on using simpleCDN or a network that allows mirroring via a URL. The lightning service on simpleCDN + the simpleCDN module do this and they are super cheap. The project and the service share the same name but are not associated.

    There is my write up here: http://www.markparrott.com/blog/drupal-website-performance-improve-your-...

    and the drupal projects here: http://drupal.org/project/simplecdn

    and simpleCDN is here: http://www.simplecdn.com

  • Menu bar 2.0, released from Belgium!   1 year 1 week ago
    Hello, I love this module,

    Hello, I love this module, or rather Simple menu.

    Is it possible to use it for the whole sites navigation instead of only using it for administration?

  • Creating an Alpha Pager with Views 2 and Drupal 6   1 year 3 weeks ago
    The default glossary view in

    The default glossary view in views 2 does not work, the number and alpha pager at the top does nohting.

    This tutorial also does not work for me because the pager is accessing “http://www.mysite.com/directory/” when the page is actually located at “http://www.mysite.com/index.php?q=directory/”

    The first URL results in a 404 not found.

    I do not have clean URLs turned on, my server doesnt support them.

  • RightScale & Drupal - How to Get Internal IP Address   1 year 4 weeks ago
    Yes that would work,

    Yes that would work, however, we don’t need the user’s IP address in particular, we need the IP address of the actually machine in our cluster. During boot time we can use the above script to write the IP address to a file so we have it handy at the PHP level with no other trickier :)

  • RightScale & Drupal - How to Get Internal IP Address   1 year 4 weeks ago
    Hi Ted, If you just want to

    Hi Ted, If you just want to have the remote user ip address and you are using the HA-Proxy configuration from Rightscale then you can just put this on your settings.php, from my point of view is safe enough.

    1. /*
    2. * Support for haproxy, remote ip addres is in the x_forwarded_for
    3. */
    4. $_SERVER['REMOTE_ADDR'] = array_shift(explode(',', $_SERVER['HTTP_X_FORWARDED_FOR']));

    If you need the whitelist configuration for anything else, then your option is the best one, but you need to execute a ssh script towards any already existing Drupal server and you need to have that server list in some place.

    I look forward to know about your new projects that are probably so exciting as your last ones.

  • Preventing Drupal from Handling 404s for Performance   1 year 5 weeks ago
    Hi, Does anyone know how

    Hi,

    Does anyone know how to make this work on Drupal 6.x, to be exact is the Drupal version 6.13?

    I have used this modification on Drupal 5.x flawlessly in the past, but now it doesn’t seem to work on Drupal 6.x.

    Thanks for your help

  • Blueprint Drupal Theme Released   1 year 6 weeks ago
    Right, thanks Ted!

    Right, thanks Ted!

  • Blueprint Drupal Theme Released   1 year 7 weeks ago
    Yes, the whole theme is a

    Yes, the whole theme is a template and met to be editable. Change page.tpl.php to your likening. It reuses Blueprint CSS classes so check the README for the links on how those work.

  • Blueprint Drupal Theme Released   1 year 8 weeks ago
    hey, thanks for the

    hey, thanks for the theme! The only problem I found, I have no idea what can I edit ? style.css is empty and waiting for me, great. But what about grid changes ? Its all in page.tpl.php coded by php variables. Where can I change them ?

    I think I missed something really obvious..

  • Getting Drupal to Play Nice with Your CDN   1 year 8 weeks ago
    Just an update, a better

    Just an update, a better version of this patch is slated to hit core for Drupal 7. Check it out: http://drupal.org/node/499156

  • Reducing Drupal blog spam   1 year 9 weeks ago
    really interesting and well

    really interesting and well written article.

  • Creating an Alpha Pager with Views 2 and Drupal 6   1 year 12 weeks ago
    cloning the

    cloning the

    Default Node view: glossary

    Will do the trick… _

    All you have to do is make a little changes on the arguments and fields depending on what you want…

    _

  • Creating an Alpha Pager with Views 2 and Drupal 6   1 year 13 weeks ago
    vacabindex module (drupal

    vacabindex module (drupal 5/6)

    Once installed you can setup the path here: admin/build/vocabindex

    Best, iA

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • …
  • next ›
  • last »
Code examples and downloadable zip files of code are licensed under a Creative Commons License.
All other content, unless where noted, ©2010 Theodore Serbinski. All Rights Reserved.