Things to do after a series of upgrade in wordpress

Well.. just recently upgraded the whole wordpress from 2.8 to 2.8.3 ..
Hmm.. the changelog doesn’t tell much..
except some part of fixing for dynamic themes control…
( which is not applied to me… as being used to stay with this static custom theme ..)

However.. there are some other thing in plugin that might also need upgrading..
such as wp-syntax , wp-useronline..
this time.. in cPanel provided by the .. just worked fine..
via the Admin Dashboard of wordpress interface..
can just click upgrade automatically..
and if everything goes fine.. it will do all the necessary thing accordingly..
except some part.. due to customization or hard-coding thing might have to re-do again..

one of the thing that I really want to do after upgrading the wordpress plugin is..
to minify all the java script file all over again.. it reduce the ‘time to wait’ drastically ..

and also this type of message ..

Always remember the birthday of the girl..
and also ALL the anniversary  date that you had together ..

else you would started up.. the WW III

this one is particularly done with the customization of wp-syntax file with the following content in wp-sytax.php

function wp_syntax_highlight($match)
    global $wp_syntax_matches;

    $i = intval($match[1]);
    $match = $wp_syntax_matches[$i];

    $language = strtolower(trim($match[1]));
    $line = trim($match[2]);
    $escaped = trim($match[3]);
    $header = trim($match[4]);
    $code = wp_syntax_code_trim($match[5]);       /* added by .namran 9 august 2009 */
    /* $code = wp_syntax_code_trim($match[4]); */ /* original changed by .namran 9 august 2009 */

    if ($escaped == "true") $code = htmlspecialchars_decode($code);

    $geshi = new GeSHi($code, $language);
    do_action_ref_array('wp_syntax_init_geshi', array(&$geshi));

    $output = "\n
"; if($header) { $output .= "
" . $header . "
"; }
[ad#postad] and ..

/* added by .namran for the header 9 august 2009 */
function wp_syntax_before_filter($content)
    return preg_replace_callback(

and somemore is .. to edit the css file to reflect something like this.

/* -- Code Highlighting --*/
.wp_syntax { 
  color: #100;
  background-color: #f9f9f9;
  border: 1px solid silver;
  margin: 0 0 1.5em 0;
  overflow: auto;
/* IE FIX */
.wp_syntax { 
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: expression(this.scrollWidth > this.offsetWidth ? 15 : 0);
.wp_syntax table {
  border-collapse: collapse;
.wp_syntax .wp_syn_hdr {
	border-bottom:1px dotted silver;
.wp_syntax div, .wp_syntax td { 
  vertical-align: top;
  padding: 2px 4px;
.wp_syntax .line_numbers {
  text-align: right;
  background-color: #def;
  color: gray;
  overflow: visible;
/* potential overrides for other styles */
.wp_syntax pre {
  margin: 0;
  width: auto;
  float: none;
  clear: none;
  overflow: visible;
.right-me {

..that’s all for this one..
And now your wp-syntax plugin would then able to show the header with just ..


ok.. now for the Javascipt / css minify part...

Downloaded the Smart Optimizer from

then..extract the content.. put all the php script under a folder "jsmart"

changed the permission for jsmart/cache to be 777 ..
and all the php file as 755 ..

take a peek at the config.php in there..

mine just look something like this..

 * SmartOptimizer Configuration File
//base dir (a relative path to the base directory)
$settings['baseDir'] = '/home/namran/src/blog_namran_net/docroot/';
//Encoding of your js and css files. (utf-8 or iso-8859-1)
$settings['charSet'] = 'utf-8'; 
//Show error messages if any error occurs (true or false)
$settings['debug'] = false;
//use this to set gzip compression On or Off
$settings['gzip'] = true;

edited the jsmart/index.php to become as such..

if (!$settings['clientCache'] || !$settings['clientCacheCheck'] || !isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) || $_SERVER['HTTP_IF_MODIFIED_SINCE'] != $mtimestr) {
  if ($settings['clientCache'] && $settings['clientCacheCheck']) {
    /* changed by .namran for the far ahead expiry on js/css file */
    //header("Last-Modified: " . $mtimestr);
    //header("Cache-Control: must-revalidate");
       header("Expires: " . gmdate("D, d M Y H:i:s", $mtime + 604800) . " GMT");
       header("Cache-Control: max-age=604800, public, must-revalidate", true);
  } elseif ($settings['clientCache']) {
  } else headerNoCache();

edited the .htaccess to become as such..

# BEGIN JS optimize

  RewriteEngine on
  RewriteRule ^(.*\.(js|css))$ jsmart/index.php?$1

# END JS optimize

and that's it.. all the javascript and css file should now has been minified and also with far ahead expiry..
cacheable by user..
The by using !YSlow Firebug plugin can check if the header hack
really working..

p/s : i will be out-of-KL for a week.. starting tomorrow morning..
dunno if the internet access is available on-the-go..

else.. expect no update for the next 1week.. ehhehehe 😎

References :

Related Post

17 Responses

  1. April bishop says:

    Nice article for anyone who need plan for wedding. I like it very much. Thank you for writing such type article. I will arrange a wedding ceremony very soon and this site helped me.

  2. boxJapyboilia says:

    I’m linking this webpage from my private blog . this has all the usefull information necessary.

    amoxicillin capsules 500mg

  3. DennisLaureijs says:

    Ridiculous article with LOADS of spelling errors. Author obviously copied more than half of the text from other websites.

  4. PlaulaVixfff says:


  5. click here says:

    This piece of writing will assist the internet visitors for
    building up new web site or even a weblog from start to end.

  6. this game says:

    Mу partnеr and I stumbled ovеr here frоm a different web pagе and thought I may as well check thіngѕ out.
    I like what Ӏ ѕee so noω i am folloωing you.
    Look forωard to going οveг your ωeb page yet

  7. Perfume Malaysia says:

    It’s amazing designed for me to have a web site, which is beneficial designed for my knowledge. thanks admin

  8. the diet solution isabel says:

    Neat blog! Is your theme custom made or did you download it from somewhere?
    A design like yours with a few simple adjustements
    would really make my blog shine. Please let me know where you
    got your design. Many thanks

  9. Car Town Hack 2013 says:

    This paragraph is really a fastidious one it helps new
    web users, who are wishing in favor of blogging.

  10. Currently it seems like Expression Engine is the best blogging platform out there right now.
    (from what I’ve read) Is that what you’re using on your blog?

  11. .UdaUIzv0HjL says:

    http://ufc162freeonline.blogspot Watch UFC 162 live free

  12. Coasterville Hack says:

    Good blog post. I absolutely appreciate this website.
    Stick with it!

  13. Longchamp Bags says:

    Well I truly enjoyed studying it. This subject offered by you is very useful for proper planning.

  14. Dez Bryant Jersey says:

    Nice blog here! Additionally your site loads up fast! What host are
    you the use of? Can I get your affiliate hyperlink for your host?
    I wish my website loaded up as fast as yours lol.

  15. Texans Jerseys says:

    Yes! Finally something about 2013 nfl season.

  16. New York Jets Jersey says:

    Do you mind if I quote a couple of your articles as long as I provide
    credit and sources back to your blog? My blog site is in the very same area of
    interest as yours and my users would really benefit from a lot of
    the information you present here. Please let me know if
    this okay with you. Regards!


Leave a Reply

Your email address will not be published. Required fields are marked *