Halo mas, saya masih menggunakan SLIMS 14 seulanga saya mau tanya bagaimana :
1. Cara kerja public function setSQLcriteria($str_criteria) di class
biblio_list.inc.php karena saya mencoba mengikuti dengan membuat
news_list.inc.php saya tidak paham bagaimana keluaran dari
simbio_tokenizeCQL($str_criteria, $this->searchable_fields, $this->stop_words,
$this->queries_word_num_allowed); sehingga bingung dimana harus melakukan query
terhadap criteria yang masuk. saya hanya membuat simple search dimana criteria
yang masuk title=namakeywordORdescription=namakeyword . mohon dijelaskan alur
programnya.
2. Ketika ingin menambahkan gambar di content pada SLIMS pada menu tinymce
memang sudah ada button untuk insert gambar, tapi untuk insert harus memasukkan
url. saya kira perlu untuk membuat upload gambar, saya sudah coba menambahkan :
a. kolom image pada database pada tabel content
b. code upload file
// image uploading
if (!empty($_FILES['image']) AND $_FILES['image']['size']) {
// create upload object
$image_upload = new simbio_file_upload();
$image_upload->setAllowableFormat($sysconf['allowed_images']);
$image_upload->setMaxSize($sysconf['max_image_upload']*1024);
$image_upload->setUploadDir(IMAGES_BASE_DIR.'docs');
// upload the file and change all space characters to underscore
$img_upload_status = $image_upload->doUpload('image',
preg_replace('@\s+@i', '_', $_FILES['image']['name']));
if ($img_upload_status == UPLOAD_SUCCESS) {
$data['image'] =
$dbs->escape_string($image_upload->new_filename);
// write log
utility::writeLogs($dbs, 'staff', $_SESSION['uid'], 'content',
$_SESSION['realname'].' upload image file '.$image_upload->new_filename);
utility::jsAlert(__('Image Uploaded Successfully'));
} else {
// write log
utility::writeLogs($dbs, 'staff', $_SESSION['uid'], 'content',
'ERROR : '.$_SESSION['realname'].' FAILED TO upload image file
'.$image_upload->new_filename.', with error ('.$image_upload->error.')');
utility::jsAlert(__('Image Uploaded Successfully'));
}
}
c.menambah form upload image
// news image
if (!trim($rec_d['image'])) {
$str_input = simbio_form_element::textField('file', 'image');
$str_input .= ' Maximum '.$sysconf['max_image_upload'].' KB';
$form->addAnything(__('Upload Gambar'), $str_input);
} else {
$str_input = '<a
href="'.SENAYAN_WEB_ROOT_DIR.'images/docs/'.$rec_d['image'].'"
target="_blank"><strong>'.$rec_d['image'].'</strong></a><br />';
$str_input .= simbio_form_element::textField('file', 'image');
$str_input .= ' Maximum '.$sysconf['max_image_upload'].' KB';
$form->addAnything(__('Upload Gambar'), $str_input);
}
tapi setelah saya upload tidak ada pesan error, dan gambar juga tidak terupload
:D
mohon penjelasannya mas..
Demikian pertanyaan saya, mohon sekali bantuan dari mas :)
terimakasih
wira redi
[Non-text portions of this message have been removed]
------------------------------------
--
Towards cyber libraries to support information society in Indonesia.
Joining ICS-isis by sending mailto:[email protected]
Visit ICS-Portal at http://digilib.binus.ac.id/ics/index.phpYahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/ics-isis/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/ics-isis/join
(Yahoo! ID required)
<*> To change settings via email:
[email protected]
[email protected]
<*> To unsubscribe from this group, send an email to:
[email protected]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/