|
Quotes |
" ... I want to tell you that your thyme product is functional and valuable beyond
words. I cannot imagine why any portal would be without it. It is the cornerstone of our new project ..."
" ... Thanks for such a complete project, its making my job much easier. ..."
" ... I have now deployed 4 different calendars and our users love them ... "
" ... Easy to install and use and a great look/design. ..."
" ... This has to be the easiest to use program I think I've had to deal with at all this year. ..."
|
|
| View previous topic :: View next topic |
| Does this work for your Wordpress integration? |
|
|
| Total Votes : 0 |
|
| Author |
Message |
kevinB
Joined: 20 Jan 2007 Posts: 5
|
Posted: Wed Jan 24, 2007 7:18 am Post subject: improved Wordpress authentication performance |
|
|
When I went to select a background color for a new calendar category and some warning messages told me that headers had already been sent by one of my wordpress plugins, I knew something was wrong with the implementation of this Wordpress authentication.
The module needs Wordpress database config info, and is executing wp-config.php to get it . That works, but also forces A LOT of needless Wordpress config calls (including initializing every Wordpress plugin) with every single Thyme page load. Besides the potential header conflict I discovered, this is a huge performance hit. There was already a manual-entry line for wordpress path, why not just manually paste wordpress DB info instead?
For cleaner authentication, the module auth.php should be changed as follows:
| Code: |
//REMOVE the following line (line 12)
$wp_opts['path'] = '/usr/local/apache/htdocs/wordpress';
//REMOVE the following line (line 52)
require($wp_opts['path']."/wp-config.php");
//ADD the following 5 statements
# Wordpress database config
# (copy from Wordpress wp-config.php)
########################################
// ** MySQL settings ** //
define('DB_NAME', ''); // The name of the database
define('DB_USER', ''); // Your MySQL username
define('DB_PASSWORD', ''); // ...and password
define('DB_HOST', 'localhost');
$table_prefix = 'wp_';
|
That's it! Sooooo much better. Now I know that Thyme really does fly. |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|