FAP CUSTOMIZATION - [MOD] FAP Copy


Subject: FAP CUSTOMIZATION - [MOD] FAP Copy
Gives users the ability to place a copy of pics from their own Personal Gallery into other Public Categories.


fap_copy_mod.rar
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: 292 Time(s)

Profile PM  
Subject: Re: [MOD] FAP Copy
very nice artie.
will install this on my board

Profile PM  
Subject: Re: [MOD] FAP Copy
thx artie :mrblue:

Subject: Re: [MOD] FAP Copy
Greaaaaaaaaaat! :mri:

I told you that becoming a developer would have been the next step! :icy_lol_flag:

I've modified a couple of things, fixed a bug and added this to FAP! :mri:

About the bug...

Code: [Download] [Hide] [Select]
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. :mri:

Subject: Re: [MOD] FAP Copy
Mighty Gorgon wrote: [View Post]
...
I've modified a couple of things, fixed a bug and added this to FAP! :mri:

About the bug...



The bug, I don't understand, though I am suprised that there wasn't more of 'em. :oops:

Profile PM  
Subject: Re: [MOD] FAP Copy
Artie wrote: [View Post]
Mighty Gorgon wrote: [View Post]
...
I've modified a couple of things, fixed a bug and added this to FAP! :mri:

About the bug...



The bug, I don't understand, though I am suprised that there wasn't more of 'em. :oops:

The bug is related to image renaming... you weren't considering that you cannot add the random generated digits after the file extension... :wink:

Subject: Re: [MOD] FAP Copy
Mighty Gorgon wrote: [View Post]

The bug is related to image renaming... you weren't considering that you cannot add the random generated digits after the file extension... :wink:


:oops: Oooops, did I do that? I didn't notice, but I am aware this is true.

Profile PM  
Subject: Re: [MOD] FAP Copy
Mighty Gorgon wrote: [View Post]
Greaaaaaaaaaat! :mri:

I told you that becoming a developer would have been the next step! :icy_lol_flag:

I've modified a couple of things, fixed a bug and added this to FAP! :mri:

About the bug...

code ~


Thanks for your job once again. :mri:


I'm guessing this fix has already been added to the download?

Subject: Re: [MOD] FAP Copy
will_hough wrote: [View Post]

I'm guessing this fix has already been added to the download?

Actually no ........ but it has now. :wink:

Profile PM  
Subject: Re: [MOD] FAP Copy
will_hough wrote: [View Post]
I'm guessing this fix has already been added to the download?

I didn't add it because this mod is property of Artie. :LOL:

Anyway this mod will be part of next FAP... :wink:

Subject: Re: [MOD] FAP Copy
Mighty Gorgon wrote: [View Post]
will_hough wrote: [View Post]
I'm guessing this fix has already been added to the download?

I didn't add it because this mod is property of Artie. :LOL:

Anyway this mod will be part of next FAP... :wink:
I meant the download in this thread :P

Subject: 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. :wink:

Profile PM  
Subject: 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

Profile PM  
Subject: Re: [MOD] FAP Copy
There are no stupid questions, only stupid answers :mricy:

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.

Profile PM  
Subject: 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!

Profile PM  

Page 1 of 2


  
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

   

This is a "Lo-Fi" version of our main content. To view the full version with more information, formatting and images, please click here.

Powered by Icy Phoenix based on phpBB
Generation Time: 0.1052s (PHP: 20% SQL: 80%)
SQL queries: 12 - Debug Off - GZIP Enabled