Ozh
Forum Replies Created
-
Forum: Requests and Feedback
In reply to: next / previous linksHmm… what the hell with this forum ? I’m pretty sure I pressed the “Post Message” button in this thread before going to bed ??
So, my answer was : I gave it a quick try and something like this is a good start :
RewriteEngine On
RewriteBase /wp_root
RewriteRule ^page/([0-9]+)$ /wp_root/index.php?paged=$1 [QSA]
It will work fine for “wp_root/page/2” instead of “wp_root/index.php?paged=2”
But there can be more complicated queries, like “index.php?category_name=linux&paged=2” so this RewriteRule is not complete.
Basically, if I find a list of all possible query cases, I could write a rewriterule that deals with every case.Forum: Requests and Feedback
In reply to: [Req] better accents conversion in permalinksgreat, thanks ??
Forum: Fixing WordPress
In reply to: page nav urlsA start would be :
RewriteEngine On
RewriteBase /wp_root
RewriteRule ^page/([0-9]+)$ /wp_root/index.php?paged=$1 [QSA]
Works for yoursite.com/wp_root/page/2 instead of index.php?paged=2
Except that it’s ok as long as you’re only requesting for more complicated query strings like ?category_name=linux&paged=2Forum: Fixing WordPress
In reply to: How to move links and categories1. Not sure I got it … you want the category list to be displayed before the links list ??
Well … you just edit the index.php, there are somewhere a few lines with<?php get_archives('monthly'); ?>
(probably between some
and
), somewhere else there are a few lines with
<?php get_links([parameters]) ?>
Now guess what ? You swap them. woot.
2. Your index.php contains something like<div class="storycontent"><?php the_content(); ?></div>
So to modify the look of your posts, edit your wp-layout.css where lines begin with.storycontent
.
Or for the whole site, modifying thep
attributes.
3. There’s no 3 ? Yes, there is. Read at least *a bit* of the docs and the code dude ??Forum: Fixing WordPress
In reply to: How to query specific categorieshttps://wiki.www.ads-software.com/index.php/ShowOneCategory should enlighten you
Forum: Fixing WordPress
In reply to: To show all posts in a catagary ?I’ve written a few lines to list all permalinks from all categories (result here : https://frenchfragfactory.net/ozh/index.php?a=archives )
(there may be a way with built-in templates, but to be honest I didnt really search, I’m more like doing little things myself so I understand how php and mysql work)
The code to do so is :
-
<?
$drafts=0;
$posts = $wpdb->get_results("SELECT ID, post_author, post_date, post_title, post_category, post_excerpt, post_name, post_status FROM $tableposts ORDER BY post_date DESC");
foreach ($posts as $post) {
if ($post->post_status == "publish") {
?>
<li class="even"><? the_time('d/m/y') ?> : " rel="bookmark" title="Permanent link : <? the_title_rss() ?>"><? the_title(); ?>
<li class="odd"><? the_excerpt(true); ?> <span class="meta">In: <? the_category(", ") ?> <? edit_post_link("Edit this"); ?></span>
<?
} else { $drafts++;}
}
if ($drafts) {print "<li class=\"even\">... And still $drafts drafts to be published :)
";}
?>
This needs to be included in a page with the proper header info ($blog=1, include wp-header, etc…, just like the top of index.php)
To list only one category, addWHERE post_category=[number]
in the SQL query string.Forum: Themes and Templates
In reply to: Please C&C my blog Antifit (CSS version)in MSIE, except for the so-called-nicer-link-titles-I-absolutely-hate, renders quite nice.
In FF indeed there’s a bg problem, which can be partially resolved with #rap {position: absolute}, don’t know really why. But then you have another problem ??Forum: Fixing WordPress
In reply to: Two questions from a newbiesearching the Wiki ( https://wiki.www.ads-software.com/ ) for both matters will give you all the answers, promised ??
Forum: Installing WordPress
In reply to: Advice on directorystructure of siteWell, as I said I don’t know MT, but yes, I think old links would then remain correct.
Note that “/index.php/archives/%year%%monthnum%/” is not a “permalink” : in WP it’s not pointing to *one* post, but to posts written this month and year. A permalink, i.e. pointing to one particular postForum: Installing WordPress
In reply to: Advice on directorystructure of siteDont know about MT so I’ll skip the first part.
As for your second question, my advice would be :
– yes, keep everything simple, that is all images in one dir, all swf in another dir, and so on. Of course this can get quite big, but painless. The web server doesnt care if there are 500 files in a dir, and the user isn’t supposed to crawl that dir, so as I understand it, it’s ok.
– linking relatively can lead to errors especially with permalinks, read below
– how do permalinks work ? Physically, there is no directory structure : one index.php, and posts in an sql base. No other files.
If you want permalinks to be like /archives/2004/05/08, all it does is redirecting this request to index.php?year=2004&month=05&day=08
So, when your index.php refers to a file, say, “images/image.gif” (relative link), from “archives/2004/05/08” this relative path becomes “archives/2004/05/08/images/image.gif”, which is not correct and thus wont display the image.
So, my advice would be : link everything absolutely from your wordpress home dir.Forum: Your WordPress
In reply to: have a look at…lol at the HTML Garbage validator ??
Forum: Your WordPress
In reply to: Well, hows it look?hey, where do you see that I take anything as a personal insult ? ??
Forum: Requests and Feedback
In reply to: Categories and SectionsIs it me or is TXP just 10 times more complicated than WP ?
Forum: Requests and Feedback
In reply to: Configurable ‘(more…)’ tagnothing “unwelcoming” in my comment
Forum: Fixing WordPress
In reply to: Sitemeterlol
Everybody please set up an account at https://uptime.openacs.org/uptime for NuclearMoose’s friend ??