
Originally Posted by
chungbs
i also have the problem when i using it...
so i try some ways to fix it
1) the easy way is change two file at below, but everytime when you edit the story, you must upload the image.
file : /templates/yget/editlink_edit_center.tpl
<form action="" method="post" id="thisform">
change to
<form action="" method="post" id="thisform" enctype="multipart/form-data">
file : /editlink.php
$linkres->store();
add this line ---> check_actions('image_upload_process');
header('Location: ' . getmyurl('story', $_POST['id']));
2) this way is better, don't need to upload image when edit, but more file to change.
file : /templates/yget/submit_extra_fields.tpl
<input type="file" name="link_field1" id="link_field1" size="20" class="form-full" />
add this line ---> <input type="text" name="image_field" id="image_field" value="{$submit_link_field1}" size="60"/>
</p>
file : /templates/yget/editlink_edit_center.tpl
<form action="" method="post" id="thisform">
change to
<form action="" method="post" id="thisform" enctype="multipart/form-data">
file : /editlink.php
$linkres->link_field1 = trim($_POST['link_field1']);
change to
$linkres->link_field1 = trim($_POST['image_field']);
...........................
$linkres->store();
add this line ---> check_actions('image_upload_process');
header('Location: ' . getmyurl('story', $_POST['id']));
file : /modules/image_upload/image_upload_main.php
$smarty->plugins_dir[] = image_upload_plugins_path;
add this line ---> if ($_FILES[module_imageupload_filename_field]['name'] != ""){
// Get the image real name, temp name, submission ID
..........................
$db->query("UPDATE ".table_links." set ".module_imageupload_filename_field."='$destFi le' WHERE link_id='$linkID'");
}
add this line ---> }
when edit finished after submit, you will see the story page, but some time i found that the picture no change? why... because the cache... just F5 to refresh navigator(IE) then the correct result will show.
remember to backup your file when you change, because i am not sure it 100% correct