Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Yes, I just tracked down and fixed the problem in my WP 1.5 installation. In “function list_cats” in wp-includes/template-functions-category.php, the query that’s run if hide_empty=0 does use the sort_column and sort_order values you specify. But the query that’s run if hide_empty=1 does not use the values you specify.

    Look for the assignment to $cat_counts on line 292. On the line before it, add:

    $sort_column = 'cat_'.$sort_column;

    Then, at the end of SQL query, add:

    ORDER BY $sort_column $sort_order

    Then you’re good to go!

    A lot of folks are having the “line 97” problem. There’s a fix posted at http://blog.idahocline.info but it didn’t work for me, and it doesn’t seem to work for many others as well. I did a var_dump on $wpdb inside the psnCPGGetConfig() function, and it comes up NULL. My guess is there’s something about my ISP’s PHP and/or web server configuration that’s making global WP variables like this unavailable in certain contexts. Specifically, they come up null if you follow the instructions and attempt to load the plugin directly in your browser, thus causing the error on line 97. The var_dump does return a positive value as long as I’m not just pointing my browser directly to the plugin.

    I decided to skip past this issue and see if I could get the plugin working anyway. I loaded wp-admin/psnCPGAmin.php in my browser. The page came up blank. I compared its code to my other plugins and noticed it was lacking the line

    require_once('admin.php');

    so I added that at the top of the file and then the page came up correctly. I can now see the albums and photos in the admin page. (I’m using WP 1.5, BTW).

    The psnGallery tags also work for me in my posts. So even though the wp-content/plugins/psnGallery2.php?setup link still doesn’t work for me, the plugin itself does. In looking through the code for psnGallery2.php, I find no reference to the setup argument, so I don’t think it does anything anyway.

    Note on the admin page: if you’re trying to figure out the Picture ID of a picture when viewing it on the admin page, you need to mouse over it so the title info will pop-up – the Picture ID is the first number in the title.

Viewing 2 replies - 1 through 2 (of 2 total)