Pages (4):    1 2 3 4   
Member
Member
Daxeno   09-06-2006, 08:24
#41

Anyway ive fixed it, Check this code :

Member
Member
thinkdreams   09-06-2006, 12:27
#42

You're most welcome Daxeno.

Member
Member
climberusa   09-06-2006, 18:44
#43

Can either of you explain a bit more in detail what I need to do to fix the mysql error that daxeno was getting

"Error: Table 'akclimber.images' doesn't exist"
I'm getting the same error but don't quite understand how to remedy it.

Also, should my table prefixes be zen? Currently they are zp

Thanks for your help and for creating this function!

Member
Member
thinkdreams   09-06-2006, 19:38
#44

climberusa-

first off, i can't take credit for the scripts. they were all obtained mostly from this thread.

daxeno rebuilt his db. by default the db uses a prefix of zen_ (i think). I usually set up a separate db, but some people don't have that luxury.

I believe you have to use the prefix function to place the prefix before every query in the sql statement. you could hardcode it to i suppose, but that might lead to problems if you ever share your scripts out to others.

anybody from the dev team want to comment? am i close, or way off?

Member
Member
Daxeno   10-06-2006, 09:06
#45

climberusa, all you need to do is remove the prefix zp_. But doing this, you need to reset your database.
Go to config.php, and edit it, look for this $conf['mysqlprefix'] = "zp", then just delete the said prefix. it will then look like this $conf['mysql_prefix'] = "". Save it afterwards.
Now to reset you DB, delete your database from your phpmyadmin. place the setup.php back to the folder zen, then reinstall it.

Member
Member
climberusa   11-06-2006, 04:14
#46

Thanks! I got it working. Would it be easy to have three random, but different photo's? I tried the obviou copy/paste but it just gives me the same three images each time. This is very cool.

Member
Member
Skwid   13-06-2006, 15:23
#47

The prefix problem has been fixed in the Thinkdreams Theme release. It uses the prefix() function to query the right tables.

Unregistered
Unregistered
Guest   24-01-2007, 14:08
#48

My wordpress and Zenphoto use the same database but different prefix, so I can easily make my plugin, and insert the following code into sidebar.php winthin folder of /wp-content/themes/default/.



there are 3 parameters you should pay attention to.
1.zen_
2.http://lidan.info/photo/
3._100_cw85_ch85.jpg

demo: http://lidan.info (see leftbar)

Good luck.

Member
Member
amucklow   12-02-2007, 18:15
#49

up1m, thanks for your code. I'm also trying to get a random image from my zenphoto albums to appear in my sidebar, but my wordpress and zenphoto installs DON'T use the same db.

Is this possible? Most of the posts above offer instructions of how to align wordpress to the zenphoto code, changing dbs en route, but not vice versa i.e. switching dbs from within the wordpress file structure.

I've tried to require_once(--hostdetails--/zen/functions.php) but this causes a fatal error message.

Member
Member
amucklow   15-02-2007, 16:45
#50

Hey - I gave up with going the hard way round, and installed my tables in the same db. Now it works great. Check out The Daily Pixel at http://www.strangerpixel.com. Thanks again up1m!

Member
Member
thinkdreams   15-02-2007, 18:40
#51

As an aside, you can also use Zenshow to integrate random image functionality into wordpress, and is available on the wiki at:

http://www.zenphoto.org/trac/wiki/ZenphotoPlugins

It works fine on my wordpress install, which is 2.1 currently.

Member
Member
gwmbox   11-04-2007, 14:30
#52

Hi all

Pardon my less learned abilities but trying to get a random image to come up in a static HTML page but keep getting mysql error messages - and really looking though the forum I am not really sure what code I should be using - any help appreciated.

Cheers

Junior Member
Junior Member
catyack   30-04-2007, 15:43
#53

I see this thread is quite old, but I managed to get the random.php script working.

The problem is, I can not call the script from within another page using either javascript or img src , but if you click on the box empty box that shows up. It will display the image. I think it is almost working, can someone please tell me what I am doing wrong.

I have tried calling the random.php like this:
img src=""http://www.foolishcat.com/gallery/zen/random.php"">

and like this:

I would really like to use the img src - I think the problem is the last part of the script with the url encode. - here is the random.php script I am using:

Member
Member
zucye   13-07-2007, 13:51
#54

This does not seem to work. Can anyone post an update on this mod??... Pleeeaaaseee!

I am using version 1.0.8.2, and it works wonderfully (www.zucye.net) and I would love to display a random picture (or pictures) of ONLY one category in my main blog page (I am NOT using word press, but sNews)

Member
Member
dspnorman   09-08-2007, 22:53
#55

I've installed the ZenShow plugin off the Wiki, but it's not working... anyone else have trouble getting it to display properly? I keep getting errors which say the ZenShow functions are not defined, and when I edit the ZenShow config, it seems buggy and my changes don't stick...

Might be a problem with using Wordpress 2.2...

Member
Member
dspnorman   09-08-2007, 23:41
#56

Well, it looks like others are able to use ZenShow with WP 2.2, so I'm not sure where I went wrong. thinkdreams, how do you call the plugin in your Wordpress pages? I've tried simply issuing a call to randomPhotos(); but I get a "function undefined" fatal error.

The plugin seemed to install okay, but it's as if it isn't making it's methods available to my WP installation. Is there any additional manual config needed?

Member
Member
thinkdreams   10-08-2007, 14:24
#57

I'm calling the zenshow function with ``

You are correct in that it works on my Zenphoto and Wordpress installation just fine. Running SVN Zenphoto and WP 2.2.1. http://www.bushwoodworking.com

I'll be happy to help you work through it if you need help. Zenshow has always been fairly stable for me.

Member
Member
devilsoulblack   24-09-2007, 05:38
#58

thanks thinkdreams for put how calling the zenshow function

Member
Member
thinkdreams   24-09-2007, 12:48
#59

You're welcome. That function hasn't had a lot of documentation, so I've tried to keep it alive as long as I can.

Member
Member
sairuh   09-11-2007, 19:17
#60

Using ZenShow's randomPhotos() function works great for displaying a random thumbnail on my WordPress (v2.3.1) blog... The problem, though, is that no image is showing, only the alt text. I suspect it has something to do with weirdness with the .htaccess file in either (both?) my WP or ZenPhoto (v1.1.2) installations.

Setup info: I'm doing this in a local dev environment (MAMP, Mac OS X 10.4.10), where the domain is localhost:8888 for both WP and ZenPhoto.

Apache 2.0.59


MySQL 5.0.37


PHP 5.2.1


One thing I notice under the WP options for ZenShow is that Table Prefix is always "zen_", which I cannot seem to change. In my case, my zenphoto tables are in their own db, and don't have a prefix --afaik, as my SQL knowledge is rather limited. Not sure if this would prevent the image from displaying.

Thanks in advance!

Pages (4):    1 2 3 4   
  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.