PostIT

while scratching my head…

Enable File Upload on FCKEditor (PHP) October 3, 2009

Filed under: Javascript, PHP — Remo @ 7:13 am
Tags: , ,
  • Edit
    fckeditor/editor/filemanager/connectors/php/config.php
  • Modify $Config['UserFilesPath']
    Put your application folder here
    Eg:
    $Config['UserFilesPath'] = ‘/myapp/’ ;
  • Modify $Config['UserFilesAbsolutePath']
    Put your application full path here. Windows users should use double backslash here
    Eg:
    $Config['UserFilesAbsolutePath'] = ‘/var/www/myapp/’ ;

    or

    $Config['UserFilesAbsolutePath'] = ‘C:\xampp\htdocs\myapp\’ ;

  • After that, you can customize other variable, like these

$Config['FileTypesPath']['File']        = $Config['UserFilesPath'] . ‘images/’ ;

$Config['FileTypesAbsolutePath']['File']= ($Config['UserFilesAbsolutePath'] == ”) ? ” : $Config['UserFilesAbsolutePath'].’images/’ ;

$Config['FileTypesPath']['Image']        = $Config['UserFilesPath'] . ‘images/’ ;

$Config['FileTypesAbsolutePath']['Image']= ($Config['UserFilesAbsolutePath'] == ”) ? ” : $Config['UserFilesAbsolutePath'].’images/’ ;

$Config['FileTypesPath']['Flash']        = $Config['UserFilesPath'] . ‘images/’ ;

$Config['FileTypesAbsolutePath']['Flash']= ($Config['UserFilesAbsolutePath'] == ”) ? ” : $Config['UserFilesAbsolutePath'].’images/’ ;

$Config['FileTypesPath']['Media']        = $Config['UserFilesPath'] . ‘images/’;

$Config['FileTypesAbsolutePath']['Media']= ($Config['UserFilesAbsolutePath'] == ”) ? ” : $Config['UserFilesAbsolutePath'].’images/’ ;

You can put different filetype on different upload location. In this example I put all filetype on images folder

 

jQuery Simple Drop Down Menu March 9, 2009

Filed under: Javascript, jQuery — Remo @ 6:54 am
Tags: , ,

I usually use Ger Versluis’ HV Menu which can be downloaded here

I found a bit simpler alternative here, it is based on jQuery.

I said a bit simpler because we only define the menu structure in a UL block.

If you like simplicity, have a visit to the demo page

 

Javascript – Ubah Gambar August 5, 2008

Filed under: Javascript — Remo @ 6:30 am
Tags:

document[img_name].src = img_src;

 

Javascript – Bikin Popup Konfirmasi July 30, 2008

Filed under: Javascript — Remo @ 4:48 am
Tags:

cukup pake kaya gini:

if (confirm(“Are you sure you want to DELETE ALL DATA?”)){

location.href = “http://localhost/delete_all.php”;

}