Support Forums

location of thumbs and photos

This is a discussion on location of thumbs and photos within the Customizations forums, part of the Developer Forums category; Originally Posted by MrGForce Hey Guys; Thanks for all your suggestions. But nothing seems to work. It just won't accept ...


Go Back   68 Classifieds Forums > Developer Forums > Customizations

Reply
 
Thread Tools Display Modes
Old 02-08-2010, 01:16 PM   #11
curmudgeon
 
Join Date: Mar 2006
Posts: 5,223
Rep Power: 128
Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light
Default

Quote:
Originally Posted by MrGForce
Hey Guys;

Thanks for all your suggestions. But nothing seems to work. It just won't accept any other path than the ones intended.

And David, Hostgators directory structure, at least in my case, was said to be .... /home/mrgforce/public_html ....... even though all you see is the public_html when you ftp into your site.

Thanks again guys for all your help. If I finally figure it out, I'll post what I did.

.
Instead of saying nothing works, it would be helpful if we knew what you tried. The idea of editing $ppu->path = "photos"; in step5.php is probably your best bet, but how to alter that path depends on your web hosting and what your home path actually is and what scripts that run on your server think their path actually is.

This isnt rocket science but at the same time may take a little trial and error and we cant tell you what to try if your not telling us what you have tried.

If we look at the variable assignment in step5.php we see this..

$ppu->path = "photos";

By that we can assume the path is relative to the documents root. However document root for one site will be different than document root for a site in a different subdirectory.

If you ftp to your site and look inside your /home/mrgforce/public_html folder where are your 2 sites located?


Please post where your index.php files are for your 2 sites....for example.....

site A:
/home/mrgforce/public_html/index.php

site B:
/home/mrgforce/public_html/siteB/index.php
__________________
Larry

Knowledge learned is more valuable than knowledge given.
Lhotch is offline   Reply With Quote
Old 02-08-2010, 01:20 PM   #12
All Hands On Deck
 
 
Join Date: Mar 2008
Posts: 2,666
Rep Power: 65
seymourjames is a jewel in the rough
Default

Give hostgator a call. They will solve it for sure.
__________________
"The fool doth think he is wise, but the wise man knows himself to be a fool.".

TemplateCodes.com for 68 Classifieds
seymourjames is offline   Reply With Quote
Old 02-08-2010, 02:28 PM   #13
Customer
 
Join Date: Jun 2009
Posts: 127
Rep Power: 7
pipelin is on a distinguished road
Default

Larry, you are absolutely right. I think you need to do the same in useraddimages.php and edit the templates (tpls) to point to the new image paths

Last edited by pipelin; 02-08-2010 at 02:50 PM.
pipelin is offline   Reply With Quote
Old 02-09-2010, 06:57 AM   #14
Senior Member
 
MrGForce's Avatar
 
Join Date: May 2009
Posts: 219
Rep Power: 9
MrGForce is on a distinguished road
Default

Here goes.

First I will tell you that I run the purple template, and I have the multi-image module enabled, which also changed the step5 file.

Several weeks ago, I installed a second copy of 68C into a directory in the root of my main site. I simply wanted a different look, but wanted to use the same database for all the info. My directory structure is exactly as Larry stated....

Main site is installed in the root:
/home/mrgforce/public_html/index.php

site B is in a directory in the root:
/home/mrgforce/public_html/siteB/index.php

EVERYTHING, AND I MEAN EVERYTHING works exactly as it should EXCEPT FOR the photos and thumbnails alternative location. If someone puts in a new listing that includes photos, they will show up in siteB, but will show a box with the red X when visiting the main site because it is looking for the thumbs and photos in it's respective directories.

Each install will place them in their respective folders. It has been several weeks of trying off and on, but I'll try and remember what I did and to which files.

The file I've tried changing paths in is the following ....

step5.php

I also originally hardcoded the paths to the photos and thumbs in siteB to display them from the main site when accessing the showlistings and viewlisting templates. Didn't notice the problem until someone found siteb, registered, and put in a new listing with a photo. That's when I saw the error. The photo and thumb were not placed in the main sites directories so they did not show up when visiting siteB because of the hardcoding. If they didn't put in a photo, it was fine because I had the no-photo jpg in both sites. So I removed the hardcoding in the layout, showlistings and viewlisting templates. Now when someone put in a photo when visiting siteB, everything was fine EXCEPT, when visiting the main site, the photos and thumbs were missing again. Been copying back and forth to keep things looking right which is a pain.

1. I contacted the company whose name is in the copyright of 68C's ... class_upload.php ... file which is located in the .... includes\classes\images directory. The first guy I talked to said that the only thing controlling the location of both the photos and thumbs are the $ppu->path and the $sip->pathThumb statements in the ... step5 .... file. I have tried every combination of the stucture shown above from the full absolute path, to partial starting with the public_html to using ../../ schemes to actually putting in the URL to the main sites photo and thumbs directories, and step5 of the checkout program simply ignors anything you put in those path statements.

The file that I believe actually controls the paths is the .... class_upload.php .... file, but the people who wrote the file won't help now when I call back. They say it's 68C's job to help not theirs. And I'm not familiar enough with php to tackle that one, so that is where I'm at.

Sorry I can't tell you more.


.
__________________
MrGForce

Currently running 68Classifieds v4.1.5 Developer Edition ... Purple Template
MrGForce is offline   Reply With Quote
Old 02-09-2010, 08:05 AM   #15
Customer
 
Join Date: Jun 2009
Posts: 127
Rep Power: 7
pipelin is on a distinguished road
Default

In the step5.php and useraddimages.php

find:
$ppu->path = "photos";

change
$ppu->path = "/home/mrgforce/public_html/photos";

and find:
$sip->pathThumb = "thumbs";

change:
$sip->pathThumb = "/home/mrgforce/public_html/thumbs";

If you arent sure about the path create a page (ANYTHING.php) with the following code in it, and view from your browser, and it will show you all you need to know about the PHP environment.

<? phpinfo(); ?>

Last edited by pipelin; 02-09-2010 at 08:11 AM.
pipelin is offline   Reply With Quote
Old 02-09-2010, 08:28 AM   #16
curmudgeon
 
Join Date: Mar 2006
Posts: 5,223
Rep Power: 128
Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light
Default

Quote:
Originally Posted by MrGForce
Sorry I can't tell you more.

.
Dont need any more, all we really ever needed was the full path to where your sites are located. Then, if you did try path changes, where and what paths you tried would prevent us from making suggestions you may have tried.


Try pipelins absolute path suggestions and if they dont work we will give you a relative path to try.
__________________
Larry

Knowledge learned is more valuable than knowledge given.
Lhotch is offline   Reply With Quote
Old 02-09-2010, 11:58 AM   #17
Senior Member
 
MrGForce's Avatar
 
Join Date: May 2009
Posts: 219
Rep Power: 9
MrGForce is on a distinguished road
Default

Sorry.

I did try .....

/home/mrgforce/public_html/photos
/mrgforce/public_html/photos
/public_html/photos
../photos
../../photos
and the main sites complete url followed by the /photos

did the same for the thumbs also.

The script doesn't seem to see these path statements, or they are being changed immediately by something in the .... class_upload.php file.

Don't know how much different php is from html, but for the last 12 years I've done this type of thing many many times with html and cgi scripts, and I've always been able to see things like path, hidden instructions, etc when I go to the page that displays the form and look at the source code. But when I look at the source code for step5, all I see is a <scr reference simply to /thumbs. Shouldn't we be seeing these paths in the source code for step5? Just curious.


.
__________________
MrGForce

Currently running 68Classifieds v4.1.5 Developer Edition ... Purple Template
MrGForce is offline   Reply With Quote
Old 02-09-2010, 01:17 PM   #18
curmudgeon
 
Join Date: Mar 2006
Posts: 5,223
Rep Power: 128
Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light
Default

there is also a fullpath variable which uses the $_SERVER['PHP_SELF'] and appends the $path to it so that may be mucking things up.

I would find this line in the class_upload.php file...

$this->fullPath = '/'.substr($_SERVER['PHP_SELF'], 1, strrpos($_SERVER['PHP_SELF'], '/')).$this->path.'/';

and change it to something like tjis....

$this->fullPath = '/siteB/' . $this->path.'/';

and see if that help.

To troubleshoot whats going on open /checkout/step5.php and find the list of variables

$ppu->


and under the list of them ad this in...

print_r($ppu);

then place an ad and upload a file, when its done uploading you should get a bunch of data on the screen showing the contents of the ppu array and you should be able to see if the fullpath element of the array is correct.
__________________
Larry

Knowledge learned is more valuable than knowledge given.
Lhotch is offline   Reply With Quote
Old 02-09-2010, 01:25 PM   #19
All Hands On Deck
 
 
Join Date: Mar 2008
Posts: 2,666
Rep Power: 65
seymourjames is a jewel in the rough
Default

Just to be sure - you are not using the multiple image upload module are you?
__________________
"The fool doth think he is wise, but the wise man knows himself to be a fool.".

TemplateCodes.com for 68 Classifieds
seymourjames is offline   Reply With Quote
Old 02-09-2010, 02:28 PM   #20
Senior Member
 
MrGForce's Avatar
 
Join Date: May 2009
Posts: 219
Rep Power: 9
MrGForce is on a distinguished road
Default

Yes David I am. I mentioned that a couple of posts back. Does that change what Larry indicated to do? I'll wait to hear before applying his suggestion, which sounds very promissing.
__________________
MrGForce

Currently running 68Classifieds v4.1.5 Developer Edition ... Purple Template
MrGForce is offline   Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
photos oteenc Pre Sales Questions 2 07-31-2008 06:15 PM


All times are GMT -4. The time now is 01:13 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0