|
Page 1 of 2
|
Artie 
Joined: January 2007
Posts: 833
Location:  Lone Star State
|
 FAP CUSTOMIZATION - [MOD] FAP Copy
Gives users the ability to place a copy of pics from their own Personal Gallery into other Public Categories.
Description: |
This MOD adds the capability for Admin & Mod to copy pics to categories where upload is authorized. Users can also copy pics from their own Personal Gallery to categories where upload is authorized. Though similar to FAP's move feature |
 Download |
Filename: |
fap_copy_mod.rar |
Filesize: |
4.46 KB |
Downloaded: |
291 Time(s) |
|
#1 Fri 09 Mar, 2007 23:17 |
|
Sponsors

|
Icy Phoenix is an open source project, you can show your appreciation and support future development by donating to the project.
|
|
lefty74 
Joined: January 2007
Posts: 137
|
 Re: [MOD] FAP Copy
very nice artie.
will install this on my board
|
#2 Sat 10 Mar, 2007 12:45 |
|
KugeLSichA 
Joined: August 2006
Posts: 803
Location:  Dresden
|
 Re: [MOD] FAP Copy
thx artie
|
#3 Sat 10 Mar, 2007 23:45 |
|
Mighty Gorgon 
Luca Libralato
Joined: August 2006
Posts: 7192
Location:  Borgo San Michele
|
 Re: [MOD] FAP Copy
Greaaaaaaaaaat!
I told you that becoming a developer would have been the next step!
I've modified a couple of things, fixed a bug and added this to FAP!
About the bug...
for ($i = 0; $i <count($picrow); $i++)
{
// Though each cat entry would work off of the same pic_filename
// we need an actual copy of the pic with a different filename in case of deletetions
$pic_filename = $picrow[$i]['pic_filename'];
$file_split = explode('.', $pic_filename);
$pic_extension = $file_split[sizeof($file_split) - 1];
$pic_filename = substr($pic_filename, 0, strlen($pic_filename) - strlen($pic_extension) -1);
$pic_thumbnail = ($album_config['gd_version'] == 0) ? $pic_filename . '.' . $pic_extension : '';
while (file_exists(ALBUM_UPLOAD_PATH . $pic_filename . '.' . $pic_extension))
{
$pic_filename = $pic_filename . '_' . time() . '_' . mt_rand(100000, 999999);
}
if (!copy(ALBUM_UPLOAD_PATH . $picrow[$i]['pic_filename'], ALBUM_UPLOAD_PATH . $pic_filename . '.' . $pic_extension))
{
message_die(GENERAL_ERROR, 'Could not copy image');
}
$pic_title = addslashes($picrow[$i]['pic_title']);
$pic_desc = addslashes($picrow[$i]['pic_title']);
$pic_time = time() + $i; // Gives each pic a different timestamp
$sql = "INSERT INTO " . ALBUM_TABLE . " (pic_filename, pic_thumbnail, pic_title, pic_desc, pic_user_id, pic_user_ip, pic_username, pic_time, pic_cat_id, pic_approval)
VALUES ('" . $pic_filename . '.' . $pic_extension . "', '$pic_thumbnail', '$pic_title', '$pic_desc', '".$picrow[$i]['pic_user_id']."', '".$picrow[$i]['pic_user_ip']."', '".$picrow[$i]['pic_username']."', '$pic_time', '".intval($_POST['target'])."', '".$picrow[$i]['pic_approval']."')";
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not update album information', '', __LINE__, __FILE__, $sql);
}
}
Thanks for your job once again.
____________ Luca
SEARCH is the quickest way to get support.
Icy Phoenix ColorizeIt - CustomIcy - HON
|
#4 Sun 11 Mar, 2007 14:14 |
|
Artie 
Joined: January 2007
Posts: 833
Location:  Lone Star State
|
 Re: [MOD] FAP Copy
...
I've modified a couple of things, fixed a bug and added this to FAP!
About the bug...
The bug, I don't understand, though I am suprised that there wasn't more of 'em.
|
#5 Sun 11 Mar, 2007 17:22 |
|
Mighty Gorgon 
Luca Libralato
Joined: August 2006
Posts: 7192
Location:  Borgo San Michele
|
 Re: [MOD] FAP Copy
...
I've modified a couple of things, fixed a bug and added this to FAP!
About the bug...
The bug, I don't understand, though I am suprised that there wasn't more of 'em. 
The bug is related to image renaming... you weren't considering that you cannot add the random generated digits after the file extension...
____________ Luca
SEARCH is the quickest way to get support.
Icy Phoenix ColorizeIt - CustomIcy - HON
|
#6 Wed 14 Mar, 2007 02:10 |
|
Artie 
Joined: January 2007
Posts: 833
Location:  Lone Star State
|
 Re: [MOD] FAP Copy
The bug is related to image renaming... you weren't considering that you cannot add the random generated digits after the file extension... 
 Oooops, did I do that? I didn't notice, but I am aware this is true.
|
#7 Wed 14 Mar, 2007 02:32 |
|
will_hough 
Joined: February 2007
Posts: 31
Location:  Michigan
|
 Re: [MOD] FAP Copy
Greaaaaaaaaaat!
I told you that becoming a developer would have been the next step!
I've modified a couple of things, fixed a bug and added this to FAP!
About the bug...
code ~
Thanks for your job once again. 
I'm guessing this fix has already been added to the download?
|
#8 Thu 15 Mar, 2007 15:23 |
|
Artie 
Joined: January 2007
Posts: 833
Location:  Lone Star State
|
 Re: [MOD] FAP Copy
I'm guessing this fix has already been added to the download?
Actually no ........ but it has now.
|
#9 Fri 16 Mar, 2007 00:26 |
|
Mighty Gorgon 
Luca Libralato
Joined: August 2006
Posts: 7192
Location:  Borgo San Michele
|
 Re: [MOD] FAP Copy
I'm guessing this fix has already been added to the download?
I didn't add it because this mod is property of Artie.
Anyway this mod will be part of next FAP...
____________ Luca
SEARCH is the quickest way to get support.
Icy Phoenix ColorizeIt - CustomIcy - HON
|
#10 Thu 22 Mar, 2007 01:42 |
|
will_hough 
Joined: February 2007
Posts: 31
Location:  Michigan
|
 Re: [MOD] FAP Copy
I'm guessing this fix has already been added to the download?
I didn't add it because this mod is property of Artie.
Anyway this mod will be part of next FAP... 
I meant the download in this thread
|
#11 Thu 22 Mar, 2007 07:29 |
|
Artie 
Joined: January 2007
Posts: 833
Location:  Lone Star State
|
 Re: [MOD] FAP Copy
Yes, this is what MG meant as well.
He was just explaining that he did not add the fix because it was not his mod to correct.....it was mine.
|
#12 Thu 22 Mar, 2007 22:50 |
|
shane 
Joined: March 2007
Posts: 16
|
 Re: [MOD] FAP Copy
I realize that this is probably a very stupid question, but I am learning on the job. This mod seems to be something that will be very useful on my site. I have downloaded the .rar file, but I have no idea how to install the mod. I've never used a .rar file before.
Guidance?
Site: www.philmontforum.com/forum
phpbb 2.0.22
mods: attachment, FAP, Upload from post, topic calendar
Thanks! You guys are great and I'm learning a lot just reading your messages.
Shane
|
#13 Sun 25 Mar, 2007 21:20 |
|
Artie 
Joined: January 2007
Posts: 833
Location:  Lone Star State
|
 Re: [MOD] FAP Copy
There are no stupid questions, only stupid answers
Treat the .rar file like you would a .zip file....it's just a different format for file compression/archiving.
WinRar is a good tool to use.
|
#14 Sun 25 Mar, 2007 23:36 |
|
dilirum
Joined: March 2007
Posts: 14
|
 Re: [MOD] FAP Copy
Thanks Artie for a beautiful mod!
I think I know the answer to this but just trying to verify. I'm curious if this mod duplicates the actual pic file (creating multiple instances of the same file), or if it ties the original pic to multiple categories in the db. I'd prefer the latter, so as to save disk space.
Thanks!
|
#15 Tue 03 Apr, 2007 18:41 |
|
|
Page 1 of 2
|
Was this topic useful?
Was this topic useful?
Link this topic |
URL |
|
BBCode |
|
HTML |
|
You cannot post new topics You cannot reply to topics You cannot edit your posts You cannot delete your posts You cannot vote in polls You cannot attach files You can download files You cannot post calendar events
|
|
|
|