View Full Version : Banners Review - Bug? - Edit Details loses image details
Mark Brookes
11-28-2006, 02:33 PM
Ver PRO 2.0.01
about: Admin-Panel > Manage-Banners > edit
every time you wish to view or edit some the details of a banner by "editing" the banner, the value in the Choose File to Upload field is lost. Therefore once you have changed a detail such as the banner-title you also need to re-upload the banner, even if the banner has not changed.
Recommend:
change the code so that it only requires the file to be uploaded if the administrator has entered a new value in the upload-field
(Rank 3/5 This is annoying, but only affects the administrator)
ALSO: Should the "edit Banner" button not be labelled "Save Changes"
Regards
Mark
Samhan
01-09-2007, 07:00 PM
Mark Brookes,
same problem!
John Turner
01-10-2007, 04:37 AM
Hi Mark and Samhan,
Here the solution:
Open your '../admin/manage-banners.php'
***find following code
if(is_uploaded_file($_FILES['uploadfile']['tmp_name'])) {
if(array_key_exists($_FILES['uploadfile']['type'],$imgtypes)) {
$imageOk = true;
}
elseif($_FILES['uploadfile']['type'] == 'application/x-shockwave-flash') {
$flashOk = true;
$type = 'flash';
}
else {
$error = true;
$msg = $gDirLang['incorrect_filetype'];
}
}
else {
$error = true;
$msg = $gDirLang['unknown_upload'];
}
***replace with following code
if(is_uploaded_file($_FILES['uploadfile']['tmp_name']))
{
if(array_key_exists($_FILES['uploadfile']['type'],$imgtypes))
{
$imageOk = true;
}
elseif($_FILES['uploadfile']['type'] == 'application/x-shockwave-flash')
{
$flashOk = true;
$type = 'flash';
}
else {
$error = true;
$msg = $gDirLang['incorrect_filetype'];
}
}
elseif(!empty($_POST['image'])&&$_FILES['uploadfile']['error']==4)
{
$error = false;
$imageOk = false;
}
else
{
$error = true;
$msg = $gDirLang['unknown_upload'];
}
It might helps.
Mark Brookes
01-10-2007, 08:53 AM
Hello John
That seems to do the trick - I have tested it and it seems to work.:D
As usual ... Thank you.
Obviously I think it would be a good idea for this to be included in a future version/release of eSC.
* Would it help if I add threads where you have provided a fix to the Suggest-a-Feature forum?
* or will someone at eSC have made a note?
Regards
Mark
John Turner
01-10-2007, 11:06 AM
You are welcome Mark.
Always at your services.
This 'bug' will be fixed in our V2.1 PRO
CyprusGate
03-30-2007, 02:44 PM
Hello John,
I am having this problem too... image are not uploading...
Bakyt N.
03-30-2007, 05:33 PM
CyprusGate
Please wait a little bit (the patch #3 is coming)
vBulletin® v3.7.0, Copyright ©2000-2009, Jelsoft Enterprises Ltd.