der
Forum Replies Created
-
Forum: Your WordPress
In reply to: der|Design Website (CMS/Blog)Thanks for your feedback Kevin! I’ll do my best to keep the site interesting with great content and freebies. I really love open source technologies and don’t mind at all sharing knowledge and resources with others.
Forum: Fixing WordPress
In reply to: Calling wp-blog-header.php from inside a PHP functionI was having the same problem you guys are having. After pulling my hair off for a few hours, I got to solve my problem, here it goes…
I was sending some information via AJAX to the functions.php file, under my TEMPLATEPATH directory. On the top of the functions.php file, I was including a function that checked if there was something set in the $_POST variable, then executed a specific action.
And guess what?, the error was the same you guys are having, so I started to get deep into the problem.
For some reason, if you use any php file used by wordpress internally, as the POST action for your AJAX request or form, it doesn’t load the WordPress environment correctly, so I decided to create a separate php file, unrelated to the theme itself, called it postdata.php and added the following code:
// Available actions $actions = Array('request_gallery_slot'); if (count($_POST)) { if ( in_array($_POST['action'], $actions) ) { // Initialize WordPress $wp_root = explode('wp-content', $_SERVER['SCRIPT_FILENAME']); $wp_root = $wp_root[0]; chdir($wp_root); if (!function_exists('add_action')) { if (file_exists('wp-load.php')) { require_once('wp-load.php'); } else { require_once('wp-config.php'); } } // Determine the action switch ( $_POST['action'] ) { case 'request_gallery_slot': $slot = $_POST['slot']; get_gallery_slot($slot); } } }
That is working perfectly, hope this helps.
Forum: Your WordPress
In reply to: Humanack.com (Just started, need opinions)Great work! I’m using Firefox (Linux) on a 1680×1050 resolution, and I noticed 2 things that called my attention:
- The ‘World Music’ dropdown menu when shown, it goes below the google ads block you have. I checked on opera and the menu works ok. Try tweaking the z-index of the dropdown menu so it is above the google ads block.
- There’s a horizontal scrollbar on the fixed layout you have, check out if you have any width: 100% css out there that is causing the scrollbar to show.
Hope this helps!