7
Hi X-Ception,
Really this is very simple. First make a backup of the file module/system/admin/smilies/main.php
Open the file and look at line 64 or search for
case "SmilesAdd":
In the upload code, change the line:
Quote:
$uploader = new XoopsMediaUploader(XOOPS_UPLOAD_PATH, array('image/gif', 'image/jpeg', 'image/pjpeg', 'image/x-png'), 100000, 120, 120);
for:
Quote:
$uploader = new XoopsMediaUploader(XOOPS_UPLOAD_PATH.'/smile', array('image/gif', 'image/jpeg', 'image/pjpeg', 'image/x-png'), 100000, 120, 120);
and the line:
Quote:
$smile_url = $uploader->getSavedFileName();
for:
Quote:
$smile_url = 'smile/'.$uploader->getSavedFileName();
Now, on the line 106 (case "SmilesSave":)
Change the upload area again
Quote:
$uploader = new XoopsMediaUploader(XOOPS_UPLOAD_PATH, array('image/gif', 'image/jpeg', 'image/pjpeg', 'image/x-png'), 100000, 120, 120);
for:
Quote:
$uploader = new XoopsMediaUploader(XOOPS_UPLOAD_PATH.'/smile', array('image/gif', 'image/jpeg', 'image/pjpeg', 'image/x-png'), 100000, 120, 120);
and the line:
Quote:
$smile_url = $uploader->getSavedFileName();
for:
Quote:
$smile_url = 'smile/'.$uploader->getSavedFileName();
Save the file. Now, create the folder uploads/smile and change the write permissions. (chmod 777).
Move all smilies files to the new folder and change in the table prefix_smiles the field smile_url. Only add the smile/ before the name of the file for all the smilies.
Done. Now, all new smile will be saved in the new folder and normally shown in your site.
Hope it helps
TheRplima