Upgrading a old module Hot or Not to PHPNuke7.6

  Post new topicReply to topicPrintable Version
<< View previous topic View next topic >>
Share: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
#1   Upgrading a old module Hot or Not to PHPNuke7.6
dmac6913
CZ Newbie
dmac6913 has been a member for over 19 year's 19 Year Member
Gender: Male
Status: Offline
Joined: Jul 03, 2005
0.00 posts per day
Posts: 3
Points: 398
   
Original "hot or not" module labeled..

# Download at: [ Register or login to view links on this board. ]
#
# Copyright (C) 2002 by ::Trashbin:: [ Register or login to view links on this board. ]
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.

For those of you's that dont know, its a upload, then rank.
Photo ranking public system.

It was originally written for phpnuke 5.5 - 5.6

Ive managed to successfully convert it to work on 7.6
And from what ive seen it looks just what i wanted.
But ive come across a small snag, (hopefully the last one)

It received the photo, successfully, but doesnt make a thumbnail and stor the thumbnail.

End result after uploading a photo, Is no errors,
And a thumbnail x where there's no photo behind the link..
If you click on the blank link, the full size photo comes up.

So theres just a small bug in the thumbnail creation and storage.

Im fairly new to php, So exscuse me if ive missed the obvious.

copy($img_upnametmp, "$img_upl_path/fullsize/$realname");
} else {
copy($img_upnametmp, "$img_upl_path/$realname");
}

*** I think imm ok up to here, because the full size image does get stored.
***And i think it goes astray here.

//resize the image
if ($img_resize_upl == 1) {
//set source path
$img_resize_src = $HTTP_SERVER_VARS['DOCUMENT_ROOT']."/$img_upl_path/fullsize/$realname";
//set destination path
$img_resize_dest = $HTTP_SERVER_VARS['DOCUMENT_ROOT']."/$img_upl_path/$realname";
exec($img_magick_path." -resize $img_width $img_resize_src $img_resize_dest");

I have checked the $img_magic_path with my server, which im pretty sure is set to /usr/bin/convert

Thanks



Back to top Reply with quote
#2   re: Upgrading a old module Hot or Not to PHPNuke7.6
dmac6913
CZ Newbie
dmac6913 has been a member for over 19 year's 19 Year Member
Gender: Male
Status: Offline
Joined: Jul 03, 2005
0.00 posts per day
Posts: 3
Points: 398
   
Any suggestions? Thanks

^^



Back to top Reply with quote
#3   re: Upgrading a old module Hot or Not to PHPNuke7.6
dmac6913
CZ Newbie
dmac6913 has been a member for over 19 year's 19 Year Member
Gender: Male
Status: Offline
Joined: Jul 03, 2005
0.00 posts per day
Posts: 3
Points: 398
   
Nvm 5-6 hours later got it fixed, The mods 99% working now.
only feature that doesnt work is the admins upload image in the admins panel.

I'll spend a hour or two trying to fix that, Otherwise i'll delete it.
As theirs a working one admins can use to upload as a user.

Not the best solution, but then again im not the best at php



Back to top Reply with quote
#4   re: Upgrading a old module Hot or Not to PHPNuke7.6
dkwds
CZ Active Member
dkwds has been a member for over 20 year's 20 Year Member
uk.gif
Occupation: Student
Age: 38
Gender: Male
Website:
Status: Offline
Joined: Jul 29, 2004
0.04 posts per day
Posts: 282
Points: 12,713
   
i tried to use this module but never quite got it going.

Anyways can you upload the file with the corrections made please. I would like to use it on my site too?




_________________
Back to top Reply with quote
#5   re: Upgrading a old module Hot or Not to PHPNuke7.6
balcar
CZ Newbie
balcar has been a member for over 19 year's 19 Year Member
Gender: Male
Status: Offline
Joined: Sep 26, 2005
0.00 posts per day
Posts: 1
Points: 21
   
I would like to know what you did on the hot or not module to make it work 7.6. I'm running 7.8 now and spent a few hours on it, and can't figure it out. not much of a programmer I guess. LOL
Thanks
Phil



Back to top Reply with quote
#6   re: Upgrading a old module Hot or Not to PHPNuke7.6
quietlycrazy
CZ Newbie
quietlycrazy has been a member for over 18 year's 18 Year Member
Gender: Male
Status: Offline
Joined: Feb 11, 2006
0.00 posts per day
Posts: 1
Points: 448
   
I had just modified the FriendFinder module to run on phpnuke 7.9 patched by Chatserv - so I thought I would tackle the Hot ot Not module as well.

Had a number of problems, all have been solved now except the same that has been mentioned above. The photo upload from admin leaves no thumb. Photo upload from a user account works fine.

So, if anyone comes up with a fix - I'd like to know about it.



Back to top Reply with quote
#7   re: Upgrading a old module Hot or Not to PHPNuke7.6
zerocool
CZ Super Newbie
zerocool has been a member for over 18 year's 18 Year Member
Gender: Male
Status: Offline
Joined: Mar 04, 2006
0.01 posts per day
Posts: 40
Points: 495
   
Hello,

Where do i edited this code?

modules/HotorNot/index.php or some other file

Do you have the file with the correct file. i am using phpnuke 7.9

thanks



Back to top Reply with quote
#8   re: Upgrading a old module Hot or Not to PHPNuke7.6
craigmack
CZ Active Member
 Codezwiz Site Donator
craigmack has been a member for over 19 year's 19 Year Member
usa.gif michigan.gif
Age: 46
Gender: Male
Fav. Sports Team: Pistons
Status: Offline
Joined: Feb 15, 2005
0.02 posts per day
Posts: 147
Points: 6,072
   
To make the hot or not mod copy a thumbnail and a fullsize change this code

Find this

//Now make a fullsize filename!
                     $img_fullsizename = "fullsize/".$username."_".$realname;
                     copy($img_upnametmp, "$img_upl_path/".$img_fullsizename);


Change to this

//Now make a fullsize filename!
                     $img_fullsizename = "fullsize/".$username."_".$realname;
                     copy($img_upnametmp, "$img_upl_path/".$img_fullsizename);
                     copy($img_upnametmp, "$img_upl_path/".$username."_$realname");



Back to top Reply with quote
Display posts from previous:      
Add To: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
<< View previous topic View next topic >>
Post new topicReply to topic

Jump to 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum