68 Classifieds Forums  

Go Back   68 Classifieds Forums > v3.1.x Help & Support > v3.1 Modifications
Register Projects FAQ Members List Calendar Search Today's Posts Mark Forums Read

v3.1 Modifications Questions on modifying 68 Classifieds. Please note these are not supported by 68 Classifieds, and may make future updates more difficult.

 
Thread Tools Display Modes
  #1  
Old 08-31-2007, 03:42 PM
free2take's Avatar
free2take free2take is offline
Senior Member
 
Join Date: Mar 2006
Location: Ireland
Posts: 171
Default Preview thumbnails when users uploading photos

Hi there,

I had a few users request this and got it working by shamelessly ripping off the administration\listinginfo.php file but it works ! although requires developer version.

Remember test on dev and backup your files on live before changing stuff !

In usercheckout.php add the following code for case 5 between just before the line //get the total number of images

PHP Code:
$prodID=$rs['oPackageID'];

//get the images info
$sSQL = sprintf("SELECT id,pid,title,image FROM ".PREFIX."prodimages WHERE pid = %s ORDER BY rank ASC",$listingid );
$result=$db->query($sSQL);
$image=array();
while (
$rs=$result->fetch())
{
      
$rs['title']=safeStripSlashes($rs['title']);
      
$size = @getimagesize('../photos/'.$rs['image']);
      
$rs['width']=$size[0];
      
$rs['height'] = $size[1];
      
$image[]=$rs;
}
                
//get the total number of images
This catches the image info.

Add the following before the line $class_tpl->assign('body','checkout/step4.tpl.php'); in the same section

PHP Code:
          $class_tpl->assign('data', $image);
        
$class_tpl->assign('body','checkout/step4.tpl.php');
This assigns the additional info to the 'checkout/step4.tpl.php' template.

You now need to modify you template to show the images, the file is 'checkout/step4.tpl.php'.
How you choose to display them is up to you now you have all the info in the template, I display them horizontally at the top and use lightbulb so in a cell my code looks like:

PHP Code:
<th colspan="2" valign="top" class="pformleft">        
{if
$data<>""}
{
html_table_adv loop=$data cols=$numimages table_attr='width="100%"' td_attr='align="center"' td_attr='valign="bottom"'}        
<
a href="photos/[[image]]" rel="lightbox[image]" title="[[title]]"><img src="thumbs/small_[[image]]" hspace="5" vspace="5" class="image" border="0" /></a><br />[[title]]
{/
html_table_adv}
{/if}
</
th>
You would have to remove the lighbulb references for your own if not being used. I also use the TH label instead of the TD as on my site it underlines for me.

Here's the result




You'll only ever see your max number of picture -1 in this screen as your automatically forwarded on when you hit your limit.

There you go hope its of use to someone else!
Mully
__________________
www.free2take.net
Don't lose it just reuse it!
V 3.1
Reply With Quote
  #2  
Old 09-01-2007, 06:48 PM
calaf6 calaf6 is offline
Senior Member
 
Join Date: Mar 2006
Location: UK
Posts: 306
Default

Looks great, I may try that once I get a few other bits done
Reply With Quote
  #3  
Old 10-04-2007, 06:22 PM
louad louad is offline
Member
 
Join Date: Feb 2007
Posts: 55
Default

Used this on my site, awesome!
Thanks.
__________________

Wayne - LouAD.com (louisville, ky classifieds) 3.1.5b dev under construction.
Reply With Quote
  #4  
Old 10-06-2007, 05:06 AM
CHRD's Avatar
CHRD CHRD is offline
Member
 
Join Date: Nov 2006
Posts: 92
Default

Nice job, hope to see this as standard in all new releases, I don't know why it wasn't
__________________
Costa del Sol
Spain
v3.1.7 Developer
�Powerful you have become, the dark side I sense in you.�
Reply With Quote
  #5  
Old 10-06-2007, 11:30 AM
Maffo Maffo is offline
Senior Member
 
Join Date: Mar 2006
Location: English in Argentina
Posts: 637
Default

Nice job Mully and thanks for sharing it with the board.

Quote:
Nice job, hope to see this as standard in all new releases, I don't know why it wasn't
Cos Mully only thought of it now one presumes.
__________________
Back and Raring to Go!!!!!!!!!!!!!!

Maffo.co.uk including.. Maffo News Mod - Classified Software
Reply With Quote
  #6  
Old 10-10-2007, 07:48 PM
whoazone whoazone is offline
Junior Member
 
Join Date: Oct 2007
Posts: 22
Question awesome, but...?

can anyone tell me how to format the upload window to automaticall push photos to a new line or new row? I deal in large quantities of images, and after 6 or 8, the window keeps expanding off the right side of the page rather than new-lining and going to the next row. I have tried fooling with the table size, but can't get it to hold its width correctly.

Can someone give me a hand? Thanks -

by the way, this is an incredible addition to 68C !!!
Reply With Quote
  #7  
Old 10-11-2007, 09:28 PM
louad louad is offline
Member
 
Join Date: Feb 2007
Posts: 55
Default

I changed: cols=$numimages
To: cols=4

This starts a new line after 4 images.
__________________

Wayne - LouAD.com (louisville, ky classifieds) 3.1.5b dev under construction.
Reply With Quote
  #8  
Old Yesterday, 12:31 PM
whoazone whoazone is offline
Junior Member
 
Join Date: Oct 2007
Posts: 22
Default

fantastic - thank you!!!

will this still bounce users ahead to the next step in listing an ad after they've used their allotted number of images?
Reply With Quote
  #9  
Old Yesterday, 08:29 PM
louad louad is offline
Member
 
Join Date: Feb 2007
Posts: 55
Default

Yes, for me it does. It shows a preview for all except the last image, because it forwards you at that point.
__________________

Wayne - LouAD.com (louisville, ky classifieds) 3.1.5b dev under construction.
Reply With Quote


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Uploading photos page- change button name zman78 v3.0 Questions & Support 11 08-11-2007 01:33 AM
'Users Awating Email Confirmation� group. SkGold v3.1 Suggestions and Feedback 2 07-18-2006 04:30 PM
Users able to upload photos in excess of package limit civ v3.0 Questions & Support 2 06-02-2006 11:14 AM


All times are GMT -4. The time now is 12:30 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2007, Jelsoft Enterprises Ltd.