![]() |
|
A demo plugin for wp - Printable Version +- ZenphotoCMS Forum (https://forum.zenphoto.org) +-- Forum: Support (https://forum.zenphoto.org/forum-1.html) +--- Forum: General support (https://forum.zenphoto.org/forum-4.html) +--- Thread: A demo plugin for wp (/thread-260.html) |
A demo plugin for wp - WeiChen - 2006-01-31 http://blog.dukechina.org/zen.phps very easy demo to replace the tag [zp]album[/zp] in wp post with five random pictures in this album. it can be easily modified to develop similar plugins. A demo plugin for wp - genosypheus - 2006-01-31 looks very promising, at least from your blog. However, after following your instructions filling in all the required paths (i might have missed something) and puting [zp]"albumname"[/zp], i got this: Quote:Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/gioloves/public_html/wp-content/plugins/zenP.php on line 58 Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/gioloves/public_html/wp-content/plugins/zenP.php on line 63 care to help me out? cheers A demo plugin for wp - WeiChen - 2006-01-31 do not change this line it will get the configure automatically A demo plugin for wp - genosypheus - 2006-01-31 I still can't get it. Same message. In step 2 of your intructions, you mentioned "2, change the following configuration of zenP". Could you specify exactly which lines must i change? So far I've changed line 30: require_once("http://giolovesgod.com/gallery/zen/config.php");// your zenp config file line34: That's it, 2 lines. Are my paths correct? What did i miss? could you post your zen.php here for me to study? A demo plugin for wp - WeiChen - 2006-01-31 use [zp]albumname[/zp], no quotes require_once('/path/to/config.php'), the path of zenphoto config.php in your server, not URL. A demo plugin for wp - genosypheus - 2006-01-31 Sorry WeiChen, I'm still at a lost. Keeps getting the same message. After changing [b]two lines[/b], Here's what i have: Quote:add_filter('the_content', 'zenp'); [b]require_once ("/home/gioloves/public_html/gallery/zen/config.php"); define('zp_DB',$conf['mysql_database']); // database of your zenp [b]define('zp_PATH','http://giolovesgod.com/gallery'); [/b] define('zp_PRE',$conf['mysql_prefix']); // prefix of the tables in db function zenp($text) {
} function wpzp($album,$n=5){
} ?> In my post, i used this tag: [zp]Desktops[/zp] and here's the error message: Quote:Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/gioloves/public_html/wp-content/plugins/zenP.php on line 58 Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/gioloves/public_html/wp-content/plugins/zenP.php on line 63 Album: desktops A demo plugin for wp - Chilifrei64 - 2006-02-01 When I activate the plugin in wordpress i lose my admin panel. once i rename the file to deactivate it, i get everything back.. any ideas A demo plugin for wp - WeiChen - 2006-02-02 You have to change two lines before activating it. A demo plugin for wp - kaiedo - 2006-02-02 where's the file? can't even find the file =/ A demo plugin for wp - genosypheus - 2006-02-02 @kaiedo: it's right at the very top of this thread, after downloading it, change the extention to .php, then open it and edit 2 lines accordingly to your paths, before uploading to the wp-plugins folder and activating it. A demo plugin for wp - Chilifrei64 - 2006-02-03 This is great.. thanks for the code.. I now have it implemented on my site.. and now that I followed the directions.. it worked this time.. Not sure how hard it would be but I host wordpress blogs and zen photoalbums for friends, they would get confused if i tell them to write there own tags.. how hard would it be to add a button to auto insert the tags and prompt them for the album name? I know I am probably asking a bit much but just thought I would put in my 2 centes A demo plugin for wp - kaiedo - 2006-02-03 btw, upload to the zen folder? can specify which folder? A demo plugin for wp - kaiedo - 2006-02-03 oh rofl, i didn't read the intructions =p sorry =D A demo plugin for wp - Claudia - 2006-03-12 @WeiChen: Thanks a lot for the nice and easy plugin. It just took me a while to figure out that you had to use the [zp]-Tag not in the source code and with just these brackets. At first I thought it was an html-tag that had to be used in source code like this: ``. Maybe you'd like to add this to the instructions, for beginners like me ;-). Another issue: If I click on one of the images displayed by the zp-tag and get directed to my gallery, this gallery is unable to show German umlauts, while in fact my gallery does show them. If one then reloads the gallery, the umlauts are shown. Is there any way I can modify the code to have the umlauts shown correctly at once? Thanks in advance, A demo plugin for wp - blankmind - 2006-03-16 WeiChen, This is an awesome plugin. Thanks for making it available to all. Keep up the good work! A demo plugin for wp - Listelle - 2006-03-20 WeiChen - A demo plugin for wp - Luigino - 2007-06-19 Hello WeiChen, I’m trying to use your plugin, I uploaded it on my site (http://jadawin.netsons.org) in the plugins directories and changed the 2 rows it said in the file, but once I call directly that file I get this error: atal error: Call to undefined function add_filter() in /var/www/netsons.org/jadawin/wp-content/plugins/zen.php on line 28 what could be?… I tried to read the old comments to see if it was happened to someone else but not.and I’m using WP 2.2…. Thanks in advance, Luigi A demo plugin for wp - tweety - 2008-05-06 "Plugin could not be activated because it triggered a fatal error." What to do?? A demo plugin for wp - acrylian - 2008-05-06 This plugin is old, please take a look at our extensions page. |