bluedauber
Forum Replies Created
-
@themeboy Thanks! After testing the login screen with my previous changes, I found the plugin still wasn’t working. It looks like login_enqueue_scripts doesn’t run early enough to deregister open-sans.
I’ve found that running replace_open_sans at wp_loaded works better, as it runs a little earlier and works on site, admin, and login pages. The upgrade and install pages still call the remote font, but I don’t think plugins can change that.
I’ve submitted my change for inclusion!
Forum: Fixing WordPress
In reply to: Using Other Databases in TemplatesI found an alternate solution for calling another MySQL database in a WordPress template. You need to use a new link. From Scriptygoddess’s original example:
$databaseConnection = mysql_connect($databaseServer, $databseUsername, $databasePassword) or
die (’I can’t connect to the database.’);
mysql_select_db($databaseName,$databaseConnection);
$query = “SELECT * from tablename;”;
$result = mysql_query($query);blockquoteYou just need to add the new_link parameter in the mysql_connect call, which should work in 4.2 and above, like so:
$databaseConnection = mysql_connect($databaseServer, $databseUsername, $databasePassword,new_link) or
die (’I can’t connect to the database.’);
mysql_select_db($databaseName,$databaseConnection);
$query = “SELECT * from tablename;”;
$result = mysql_query($query);It took me hours to find this solution, but it works perfectly for me – WordPress switches back to using its own database after the mysql_close() as it should. Hopefully this helps others in the future who are having the same problem and don’t want to have to define the database for each query.
Forum: Fixing WordPress
In reply to: resetting database connection back to WP dbI found an alternate solution for calling another MySQL database in a WordPress template. You need to use a new link. From Scriptygoddess’s original example:
blockquote
$databaseConnection = mysql_connect($databaseServer, $databseUsername, $databasePassword) or
die (’I can’t connect to the database.’);
mysql_select_db($databaseName,$databaseConnection);
$query = “SELECT * from tablename;”;
$result = mysql_query($query);blockquote
You just need to add the new_link parameter in the mysql_connect call, which should work in 4.2 and above, like so:
blockquote
$databaseConnection = mysql_connect($databaseServer, $databseUsername, $databasePassword,new_link) or
die (’I can’t connect to the database.’);
mysql_select_db($databaseName,$databaseConnection);
$query = “SELECT * from tablename;”;
$result = mysql_query($query);blockquote
It took me hours to find this solution, but it works perfectly for me – WordPress switches back to using its own database after the mysql_close() as it should. Hopefully this helps others in the future who are having the same problem and don’t want to have to define the database for each query.
Forum: Everything else WordPress
In reply to: Could this site be produced in WP?Thanks, good to hear! I get the feeling I’ll be writing a plugin or two to get the level of features I want, but it sounds like a good project for a rainy weekend. I started it as a small site and the content just sort of exploded from there, so it’s about time for some management. Also about time for a new theme, which would be a good thing to do while converting it to WordPress.
Forum: Everything else WordPress
In reply to: Choosing a hostI agree about overselling – it is not necessarily bad but has the potential to be very bad. The problem comes in when too many people on the same server are fighting for the CPU time – I had an account at one host whose CPU usage typically went up to 12 (it should be no more than around 1 for each processor the server has, so two or four max). It often got the point where it took forever to send any page, and if you were to trying to make a database call, you could forget about it.
Forum: Everything else WordPress
In reply to: Choosing a hostThat may be a good way to go then. One of the most important things to check is that customers are satisfied with the host’s reliability and support. I’ve been through a few hosts myself and I can tell you, if it seems too good to be true, it is. That price seems about right for that offer, but you should also make sure to check with people who are hosted there (and keep an eye on some sites hosted there too for speed, uptime, etc.). You might also want to look at “reseller” packages from other companies…they basically let you host unlimited domains with unlimited databases. The static IPs and free domains in that package are nice features, though, so it might be a good way to go, especially if you ever plan on using SSL.
Forum: Everything else WordPress
In reply to: Choosing a hostIt shouldn’t matter too much. Most affordable web hosting is on linux servers. Also, depending on what you plan to do with your hosting, that plan might be overshooting what you need. I’m with Surpasshosting, and if you’re just going to be hosting a blog on a single domain name you could easily get hosting for $48/year. They’re inexpensive, reliable, and they have great support. And that’s about what you’d pay for two months with the other host.