Member
Member
itaymesh   2006-12-02, 21:07
#1

When I set the Andreyphoto Theme in Zenphoto and go to view it I get this Messege:

MySQL Query ( SELECT DISTINCT zp_images.filename, zp_images.title, zp_albums.folder FROM zp_images INNER JOIN
zp_albums ON zp_images.albumid = zp_albums.id GROUP BY zp_images.title ORDER BY RAND() LIMIT 1 ) Failed. Error: Table 'zen.zp_images' doesn't exist

When I use the other themes everthing is allright

Any Help? PLEASE....

Thanks Itay

Member
Member
thinkdreams   2006-12-03, 00:28
#2

Itay-

What is your database prefix. Looks like the andreyphoto theme is using a hardcoded DB prefix, which you will probably need to change to match your own, or modify it so it works with whatever prefix you have. I'll post an example shortly of what I mean.

Member
Member
itaymesh   2006-12-03, 07:41
#3

thinkdreams -

I am looking forward for your example

Thanks,

Itay

Member
Member
thinkdreams   2006-12-03, 18:27
#4

Itay-

OK. Here's a snippet from the show latest images script I use:

$images = query_full_array("SELECT images.albumid, images.filename AS filename, images.title AS title, albums.folder AS folder FROM ".prefix('images')." AS images, ".prefix('albums')." AS albums WHERE images.albumid = albums.id AND images.show = 1 ORDER BY images.id DESC LIMIT $number");

Note the ".prefix('images')." section (quotes and periods are important!)

What you'll need to do is structure your query using the prefix('images') portion
OR
you can hardcode your query for your specific prefix. The DB prefix is what is prefaced before your database table reference, i.e. zen_images, zp_images. This varies per database.

I hope that helps.

Member
Member
itaymesh   2006-12-03, 21:09
#5

Andrey Wrote me by e-mail:

Do you have a prefix on your tables "zp_"? If they don't or have a
different one, change the table names in the getRandomImage() function in
index.php to suit your table structure.

Hope this works.

Cheers,
Andrey.

Member
Member
itaymesh   2006-12-03, 21:17
#6

thinkdreams -
Thanks for your replay!!!
I deleted all _zp prefix that appeared index.php (inside the theme folder) in function getRandomImageLinkURL section
It WORKED!!!!
I can see now the HOME page... but
One solution made new problem:
Now I can't see the image pages.
I thought it is relative to mod_rewrite...
I found a section of it at the same page (index.php)
but I don't have a clue what to do....
Thanks in advance!!!

Itay

Member
Member
thinkdreams   2006-12-03, 21:59
#7

Itay, could you post a link to your site so I can look at it?

Also:

Double check that cache and images folders are set to chmod 777 permissions.
You can try turning off mod_rewrite and see if that doesn't make things work better.
You may also want to "disable" the random image function for a test to see if it works without the function in the way.

Member
Member
itaymesh   2006-12-03, 22:42
#8

Thing is I am working OFFLINE with xampp (http://www.xampp.com).

After all that tests I Upload it and send A link to this post chain...

Do I need to set permission offline too?

Where can I Disable random image function?

Thanks

Itay

Member
Member
Andrey   2006-12-04, 00:46
#9

Hi Itay,

To temporarily disable the random image function, just comment out these two variables:

// $randomImage = getRandomImage();
// $randomImageLinkURL = getRandomImageLinkURL($randomImage);

I'll add the auto-prefix for random image function on the TODO list.

Cheers,
Andrey.

Member
Member
pluto459   2007-02-22, 16:13
#10

I had this issue with other theme as well, but I dont remember which one. It had the exact line # to change.

Just delete zp_ from the random images part. Lines 18-25 in index.

I think when Zen newbies start using it, the pros think we know more than we do lol. Line #'s is the easiest way for us to understand.

Member
Member
whiteflyer   2007-09-19, 00:24
#11

I have installed the theme and changed the random image variables and all looks to be working fine.

I have a small problem in that the theme background images are not showing, ie the guitar in the description cell or the header image and the thumbnail background on the index page. Any ideas how to sort this out please.

My site is at http://www.whiteflyer.f2s.com/zenphoto/

Thanks Mark

Administrator
Administrator
acrylian   2007-09-19, 09:47
#12

Whiteflyer:
I think there is something wrong in your code. In the source code it looks like
`

`

The "%3c" and "&gt" seem the point that the php code is not executed. And I think there is a ";" missing after the $_zp_themeroot. It should read:
Does that help?

Member
Member
whiteflyer   2007-09-19, 19:54
#13

Got it sorted now thanks, For some reason I had to put the full URL to the images.

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.