brentrv
Forum Replies Created
-
Forum: Requests and Feedback
In reply to: WordPress used for something other than blog?I use it to track the actions of senators and representatives:
Forum: Fixing WordPress
In reply to: 2 Sites, 1 DB, Possible?Right, but there is no need to have the options table locally, it will work just as well on the remote database (so long as the prefix is different), then we avoid any problems with managing different connections (connections to multiple databases might be easier than I’m assuming, I haven’t tried it) If blog2 can access the database on blog1 machine for the post and comment data, it can read the blog2_options table from there as well(assuming appropriate permissions).
If we really want connections to two databases. I believe we have to go to wp-db.php and add a new function wpdb2 that will make a connection to the new database, and make sure it gets initialized along with wpdb. We would then have to change references to wpdb to wpdb2 where applicable, test it, find out it doesn’t work, and go back through and see what we forgot!
Forum: Themes and Templates
In reply to: critique this 3 column layout PleaseI love the structure and layout. Very easy on the eyes and easy to read. Not real crazy about having images in header and footer, but it seems that a lot of people like them. Nothing against your choice of images, they are quite nice, I just personally don’t care for pictures in the header.
Forum: Fixing WordPress
In reply to: 2 Sites, 1 DB, Possible?Can you put both options tables in the same database? Just change the prefix on one (or both) As RustIndy said “In each site’s “wpconfig.php” file, set the table prefix to some unique value, other than the default “wp_” value.” If you hard code the other tables, this prefix will only be read when accessing the options table.
For example your database would have the following tables:
posts
users
categories
post2cat
comments
links
linkcategories
postmeta
blog1_options
blog1_optionsthen in blog1 wpconfig.php (line 9ish) you would have:
$table_prefix = ‘blog1_’;and in blog 2 wpconfig.php you would have:
$table_prefix = ‘blog2_’;and both wp-settings.php would have:
$wpdb->posts = ‘posts’;
$wpdb->users = ‘users’;
$wpdb->categories = ‘categories’;
$wpdb->post2cat = ‘post2cat’;
$wpdb->comments = ‘comments’;
$wpdb->links = ‘links’;
$wpdb->linkcategories = ‘linkcategories’;
$wpdb->options = $table_prefix . ‘options’;
$wpdb->postmeta = ‘postmeta’;Note the only table using $table_prefix is the options table.
I’m currently running a similar setup on my site (http://www.plogress.com) with over 500 blogs. The only common tables are the user table and categories table. Unfortunately, the database has over 2,000 tables! I’m now hacking everything to share all of the same tables and use a blog id to separate each blogs data. Once it’s running properly and tested, I’ll make a seperate post here to describe it in more detail.
Hope this helps (exept that last paragraph, I don’t recommend trying that one at home)
Forum: Fixing WordPress
In reply to: 2 Sites, 1 DB, Possible?Do as RustIndy says above, but edit each sites wp-settings.php around line 40 or so, you’ll see the references for each table name. You can hard code those so that they both point to the same tables for everything except the options table. If you want each site to have its own users, both sites will have to have their own users table, comments table, and post2cat table.
Forum: Installing WordPress
In reply to: WP 1.5.1.2 site problems.I stumbled on one spot last night that concerned me, in /wp-admin/profile.php, around line 74:
$newuser_lastname = wp_specialchars($_POST[‘newuser_lastname’]);
$newuser_nickname = $_POST[‘newuser_nickname’];
$newuser_nicename = sanitize_title($newuser_nickname);$newuser_nickname is the only variable not cleaned (as far as I can tell). I changed mine to:
$newuser_nickname = wp_specialchars($_POST[‘newuser_nickname’]);
I tried to exploit it myself before making the change, however, and was unsuccessfull.
Forum: Fixing WordPress
In reply to: bluehost installation issuesI too, have the blank page in dashboard http://www.plogress.com I also am unable to run my perl scripts that scrape the library of congress from blue host, I get “Access denied” or something. Sounds like something blocking the requests originated by the server.
Forum: Your WordPress
In reply to: Interesting Project…Thanks for the plug brainwidth, and I like the campaign contributions idea too. I checked the link you provided, and from there was able to find the data on the fec.gov site. From what I can tell, it’s not very dynamic (nothing listed for this year) but I’ll keep snooping around.
skippy: The worst thing about the way I’ve done it, is doing administration. I like the potential to customize each politician’s blog (theme, links, etc) that I don’t think I would get from using categories. What I may do is add a field to the tables to hold a blog id, and change all the queries to use that, so I would at least have a single database. Of course, I say this without having searched the code to see what kind of work I’m talking about! I’m off to do that now…(Oh, I grab the urls for the LOC pages so you can read the text of the bill, I just haven’t added it into the content yet!)
-Thanks again for your feedback
Forum: Your WordPress
In reply to: loco theme test previewI agree with vkaryl re: the contrast, but I like the look, and the red color.
Forum: Your WordPress
In reply to: Interesting Project…skippy: I hadn’t thought of using categories to break it down. (I’m not changing it now, but if anyone else is considering something on this scale, it would be worth think about) One thought was with seperate installs, it would be easier to distribute the load (in case both of my visitors hit it at the same time!) The whole thing (with database) is almost 1G!
Denis-de-Bernardy: I scrape the data from the library of congress. (http://thomas.loc.gov/) I’ll note that in my next batch of updates.