Thursday, May 6, 2010

Website Issue: Table picture cannot fit in css format for web header

We have been facing this problem since last week. Our designer send us new image link to be place in our website header.. but in table format ... which is different from the previous format where we just use a single picture for link. For the new one, we need to add a curve black background shape with 2 on-off button for link and one static link for pdf. The designer provide us the picture in slices... which formatted in html table. This should be okey if our web page only use simple html. But in our case, we use .php header with .css style file.

We try for a few days, and still cannot get the correct position. After my boss come and ask me today, suddenly I get a a simple idea to solve this problem. Why don't I just compile those slices to a single picture. Then I cut into three and place it in header as three link, formatted the css style and adjust a bit the position part. And finally it works.

Simple way to do:
  1. Display the original .html(given by designer) file in browser.

  2. Print screen and crop the full picture in Photoshop.

  3. Cut the picture into 3 pieces... follow the previous original picture file size(411 x65).
    Then upload those pictures in img folder in the themes folder.

  4. Then edit the header.php file. Add two more link after the original link. Change the image name with the correct path. I use the mouseover link style, where the picture will swap when mouseover.
    .....................
    [link tag]
    ='link address' class="applynow1" title="Apply On Campus">/img/oncampus_1.png" onmouseover="this.src='/img/oncampus_2.png';" onmouseout="this.src='/img/oncampus_1.png';" border="0" alt="" />
    [close link tag]
    .............................

  5. Then edit the css file. Add 2 more class style for 'applynow' > applynow1 and applynow2.
    .header a.applynow { position: absolute; right: 20px; bottom: 0; top: 36px }
    .header a.applynow1 { position: absolute; right: 153px; bottom: 0; top: 36px }
    .header a.applynow2 { position: absolute; right: 60px; bottom: 0; top: 36px }

  6. Save and preview the changes.
  7. Lastly, I edit the bg.png to repair the bg curve in right position. Then upload back and publish. All work just nice. Alhamdulillah.

.

Wednesday, May 5, 2010

Website Issue: Menu hidden behind flash

Everything works fine in Firefox, but in Internet Explorer my menu is hidden behind my Flash movie.
What to do?

Solution:

Try this as your code for the flash.

Code:

It working fine for me. Happy .. :)


.

Monday, February 1, 2010

HOW TO PATCH Drupal 6.14 to Drupal 6.15

In first place, I try to upgrade my drupal follow the instruction in UPGRADE.txt.. but not successful. I try three time and at last I fade up.

Finally I found this easier way to patch Drupal 6.14 to Drupal 6.15. This case is for Unix based server only.

Just Follow this simple steps;

  1. Backup your drupal database and file system first. Store your backup in other folder(/home/user/)

  2. Download patch file (drupal-6.14-to-6.15.patch ) from this site
    http://fuerstnet.de/en/drupal-upgrade-easier

  3. Open your drupal directory
    #cd your drupal directory

  4. Copy the patch file (drupal-6.14-to-6.15.patch ) into this directory.

  5. Login to drupal admin page. Please login as admin.

  6. Set site to off-line mode. Disable all modules that currently enable.

  7. Run this pact command:
    #patch -p1 < drupal-6.14-to-6.15.patch

    ** Be warned: this may break your Drupal installation so make sure to have a backup at hand.

  8. After finished, Verify the new configuration file to make sure it has the latest and correct information.

  9. Run http://your domain/update.php

  10. After finished, Verify in status report page to make sure your Drupal already upgrade to version 6.15.

  11. Enable back all previous active modules.

  12. Set the site back to online mode. See the site live again.

    Good luck!

    * Use this patch files on your own responsibility. I don't guarantee the proper function of the patch files on Drupal installations other than my own. - fuerstnet.de

.

Tuesday, January 12, 2010

WORDPRESS: NextGEN Gallery Not Function after Upgrade!

My Case:
I upgrade Wordpress 2.7 to wordpress 2.9.1.
The I also upgrade all plug-in that we use in the wordpress includes NextGEN Gallery.

All the previous pictures and gallery still there but the slideshow not working in publish news page.

Solution:
  1. Download JW Image Rotator from here.

  2. Unzip and copy the Imagerotator folder in uploads folder.
    Default path is ../wp-content/uploads/

  3. Open the NextGEN Gallery admin panel page. Setting back the NextGEN Gallery Options. Compare the details with the previous gallery setting to get the same effect.

  4. Save all setting. Try refresh the page again. It' s done.

.

WORDPRESS: How to solve ‘You do not have sufficient permission to access this page.'

Case 1:
We install the same wordpress file in new server.
But we change the prefix of the database. After setup everything, the website page cannot be display. Error occur.

Solution:
  1. Open database that have been use for this wordpress using phpmyadmin.
  2. Search url: www.address.edu.my dalam db
  3. Change all address to new address :www4.address.edu.my
    Probably inside:
    wp_options

  4. But after change all the address to the new one, the admin page cannot be open.
    There some error said:'You do not have sufficient permission to access this page.'

How to solve ‘You do not have sufficient permission to access this page.'

After seacrhing all the possible solution from the internet, finally we found the solution in this site: http://beconfused.com

Because we change the prefix of the table names in WordPress after the migration, thats why the error occurs.

In my old database, I used ‘wp_’ as my prefix. As I migrated, I decide to use ‘newprefix_’ instead of ‘wp_’. Unfortunately, the meta_key values are tied down to:
  • wp_user_level
  • wp_capabilities
  • wp_autosave_draft_ids
So, we need to update it to
  • newprefix_user_level
  • newprefix_capabilities
  • newprefix_autosave_draft_ids

The following statements go to ‘meta_key’ and does a string replace from ‘wp_’ to ‘prefix_’.


UPDATE `prefix_usermeta` SET `meta_key` = REPLACE( `meta_key` , 'wp_', 'prefix_' );


(** Dont forget to do backups first! Note that the quotes used for string and field name are different. )


Not finish yet! This another one statement you need to do also.


In the options table, there is ‘wp_user_roles’, make sure you get that changed into ‘prefix_user_roles’.


UPDATE `prefix_options` SET `option_name` = 'prefix_user_roles' WHERE `option_name` ='wp_user_roles' AND `blog_id` =0;



Try it, I tried logging in again and it worked. Thank you very much to http://beconfused.com


After successfully open the admin page, we run the upgrade automatically after deactivate all the current active plugins. All run very well without error.

But after check back all the links inside the website page, we found this error again:

WordPress 404 Not Found Problem

I already post this solution in my last year post. Refer the solution there.
http://salinaitmind.blogspot.com/2009/07/wordpress-move-site-to-new-server-issue.html

After that, every links can work fine. Alhamdulillah...



.

Tuesday, December 15, 2009

How To Embed WMV/MOV video file for multiple browsers

MEDIA PLAYER CODE

{DIV align="center"}{OBJECT ID="MediaPlayer" classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" CODEBASE="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715" standby="Loading Microsoft Windows Media Player components..." TYPE="application/x-oleobject" width="425" height="355"}{PARAM NAME="FileName" VALUE="XXXXXXX"}{PARAM NAME="AnimationatStart" VALUE="false"}{PARAM NAME="TransparentatStart" VALUE="true"}{PARAM NAME="AutoStart" VALUE="true"}{PARAM NAME="ShowControls" VALUE="0"}{PARAM NAME="ShowDisplay" VALUE="0"}{PARAM NAME="ShowStatusBar" VALUE="0"}{PARAM NAME="AutoSize" VALUE="0"}{PARAM NAME="EnableContextMenu" VALUE="false"}{embed TYPE="application/x-mplayer2" pluginspage="http://www.microsoft.com/isapi/redir.dll?prd=windows&sbp=mediaplayer&ar=Media&sba=Plugin&" SRC="XXXXXXX" HEIGHT="355" WIDTH="425" Name="MediaPlayer" AUTOSTART="1" SHOWCONTROLS="0" EnableContextMenu="0"}{/embed}{/OBJECT}{/div}


QUICK TIME CODE


{DIV align="center"}{object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" width="425" height="355" codebase="http://www.apple.com/qtactivex/qtplugin.cab"}{param name="src" value="XXXXXX"}{param name="autoplay" value="true"}{param name="controller" value="false"}{embed src="XXXXXX[code]" width="425" height="355" autoplay="true" controller="false" pluginspage="http://www.apple.com/quicktime/download/"}{/embed}{/object}{/div}


.

Tuesday, December 8, 2009

FPDF - Free PDF Generator



What is FPDF?


FPDF is a PHP class which allows to generate PDF files with pure PHP, that is to say without using the PDFlib library. F from FPDF stands for Free: you may use it for any kind of usage and modify it to suit your needs.

FPDF has other advantages: high level functions. Here is a list of its main features:

* Choice of measure unit, page format and margins
* Page header and footer management
* Automatic page break
* Automatic line break and text justification
* Image support (JPEG, PNG and GIF)
* Colors
* Links
* TrueType, Type1 and encoding support
* Page compression


The tutorials will give you a quick start. The complete online documentation is here and download area is there. It is strongly advised to read the FAQ which lists the most common questions and issues.

What languages can I use?

The class can produce documents in many languages other than the Western European ones: Central European, Cyrillic, Greek, Baltic and Thai, provided you own TrueType or Type1 fonts with the desired character set. Chinese, Japanese and Korean are supported too.

What about performance?

Of course, the generation speed of the document is less than with PDFlib. However, the performance penalty keeps very reasonable and suits in most cases, unless your documents are particularly complex or heavy.

Download FPDF Now.

.