Austin Matzko
Forum Replies Created
-
Forum: Themes and Templates
In reply to: home.php functionality faulty?Hello sampablokuper! Thanks for taking the time to bring up issues about WordPress that concern you. In general that’s how problems get solved and WordPress improves for everyone. But in this case I disagree with your assessment.
What this issue boils down to is that a while back WordPress developers had to decide on a term for the page where the most recent posts appear, which is not always the top-level page. The term they chose was “home.” The term for the top-level page is “front.”
Perhaps there could have been better name choices, but those are the ones that they went with and we’re stuck with. So the
home.phptemplate file is what is used on the “home” page, which is not necessarily the “front” page.You suggest that
home.phpshould show on the “front” page when the “front” and “home” pages are different (when they’re the same, it does). There are several reasons why this isn’t the best idea:- “home” has a particular meaning in WordPress, a meaning that would be confused if it were used on the “front” page.
- We would then lack a template name for the “home” page.
- We already have a means of creating a custom template for the “front” page, thanks to page templates. So a “front-page.php” template would basically just be a limited version of a regular page template.
This contradicts the stated template hierarchy. As we all know, when the docs and the code don’t match, developers suffer. Well, I’d been suffering at least half an hour before I stumbled on that forum thread, because I read the docs and trusted them.
The Codex is a wiki, meaning anybody can edit it. So sometimes there’s stuff on there that’s wrong, imprecise, or just outdated. On the positive side, the Codex is a wiki, meaning you can edit it and fix the problem for the rest of the community!
Forum: Fixing WordPress
In reply to: [htaccess] Permalinks not working after plugin replacementActually, I’m greatly interested in WordPress development and bug-quashing, so if someone has to modify core files to get permalinks to work, not everything is fine.
Forum: Fixing WordPress
In reply to: wp_get_archives year rewriting helpimplode('|', array_values($GLOBALS['wp_locale']->month))That basically makes a string of all the months, like so:
January|February|March...preg_replaceis a function that looks for a pattern—called a “regular expression”—and replaces it with something else. In this case, it looks for a month pattern (from that string above) followed by a four-digit number (presumably a year) and then replaces it with the month followed by the right single quote and the last two digits of the year.In
wp_get_archives('echo=0')theecho=0argument basically just tellswp_get_archivesto return its string instead of printing it; that way we can use it inpreg_replace.Forum: Fixing WordPress
In reply to: get_search_form(); is more heavier?The
get_search_formfilter. I don’t know where or if it’s documented, but it passes to its callbacks the default search form created in that function.Forum: Plugins
In reply to: CMS – question about extreme moddingessentially, is there a way to easily and completely customize what options are available on any of the admin pages?
That’s a little vague. What’s an example of an option that you’re having trouble customizing?
Forum: Fixing WordPress
In reply to: [htaccess] Permalinks not working after plugin replacementall my internal and incoming links got broken
What do you mean by “broken”? What do they look like?
Forum: Fixing WordPress
In reply to: [htaccess] Permalinks not working after plugin replacementFeedburner Feedsmith does not appear to write to the .htaccess file, so you shouldn’t need anything more than the standard WordPress .htaccess, which is provided to you on the permalinks page in the admin. It usually looks like this:
<IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule>When you say the permalinks don’t work, what exactly doesn’t work? What is the error?
Forum: Fixing WordPress
In reply to: Integration with vBulletin – Error with sanitize_url()sanitize_urlis defined inwp-includes/formatting.phpand used only inwp-includes/widgets.php(twice) so just rename it in those places to something else, likewp_sanitize_url.Forum: Plugins
In reply to: LAST 10 Topics in the x categoryThe following will print a list of the last 10 posts for every category:
foreach( (array) get_all_category_ids() as $cat_id ) : query_posts(array('cat' => $cat_id, 'showposts' => 10)); if ( have_posts() ) : ?><h2><?php echo get_cat_name($cat_id); ?></h2> <ul> <?php while(have_posts()) : the_post(); ?> <li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li> <?php endwhile; ?> </ul> <?php endif; endforeach;Forum: Fixing WordPress
In reply to: how to upload multiple posts & assign them to categories?post_categoryneeds to be an array, so something like this should work:$my_post['post_category'] = array(prep($row['category']));Forum: Plugins
In reply to: Integrating WordPress with my custom user system?Yes it is. You can define a custom user table for both WordPress and bbPress with
define('CUSTOM_USER_TABLE', 'your_table_name');If the field names are different, you’ll probably need to redefine some of the pluggable functions.
Forum: Fixing WordPress
In reply to: Comments Template: failed to open streamThat means that you’re missing the
comments.phptemplate file in your default theme’s directory (usuallywp-content/themes/default/).Your active theme should have a
comments.phpfile, but apparently yours is missing.Forum: Fixing WordPress
In reply to: Update plugin: WP asks for FTP info for 1 blog, doesn’t for anotherIt has to do with the file ownership / permissions on the different sites. The site that doesn’t ask for the password is probably more permissive, allowing the PHP user to overwrite files without having to use FTP.
Forum: Fixing WordPress
In reply to: wp_get_archives year rewriting helpHere’s one way to to do it. Replace
wp_get_archives()with the following:echo preg_replace( '#(' . implode('|', array_values($GLOBALS['wp_locale']->month)) . ')\s\d{2}(\d{2})#', '$1 ’$2 /', wp_get_archives('echo=0') );Forum: Fixing WordPress
In reply to: Database Error – Lost all my posts – help!“error 28” means that your installation of MySQL, the database that WordPress uses, has run out of disk space. You need to contact your site’s host to find out what’s happening.