Icy Phoenix

     
 


This forum is locked: you cannot post, reply or edit topics.  This topic is locked: you cannot edit posts or make replies. 
Page 1 of 2
Goto page 1, 2  Next
 
Reply with quote Download Post 
Post 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: 291 Time(s)

 



 
ArtieSend private message  
Back to topPage bottom
Icy Phoenix is an open source project, you can show your appreciation and support future development by donating to the project.

Support us
 
Reply with quote Download Post 
Post Re: [MOD] FAP Copy 
 
very nice artie.
will install this on my board
 



 
lefty74Send private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: [MOD] FAP Copy 
 
thx artie  
 




____________

Play Games at GamesCampus!
 
KugeLSichASend private messageVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post 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: [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.
 




____________
Luca
SEARCH is the quickest way to get support.
Icy Phoenix ColorizeIt - CustomIcy - HON
 
Mighty GorgonSend private messageSend e-mail to userVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post Re: [MOD] FAP Copy 
 
Mighty Gorgon wrote: [View Post]
...
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.  
 



 
ArtieSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post 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!

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
 
Mighty GorgonSend private messageSend e-mail to userVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post 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...


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



 
ArtieSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: [MOD] FAP Copy 
 
Mighty Gorgon wrote: [View Post]
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?
 



 
will_houghSend private messageVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post 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.  
 



 
ArtieSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post 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.

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




____________
Luca
SEARCH is the quickest way to get support.
Icy Phoenix ColorizeIt - CustomIcy - HON
 
Mighty GorgonSend private messageSend e-mail to userVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post 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.

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



 
will_houghSend private messageVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post 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.  
 



 
ArtieSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post 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
 



 
shaneSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post 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.
 



 
ArtieSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post 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!
 



 
dilirumSend private message  
Back to topPage bottom
This forum is locked: you cannot post, reply or edit topics.  This topic is locked: you cannot edit posts or make replies.  Page 1 of 2
Goto page 1, 2  Next


Display posts from previous:    

HideWas this topic useful?

Link this topic
URL
BBCode
HTML




 
Permissions List
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


  

 

  cron