It looks like you modified the templates so the correct anchors are no longer being generated. Check out the original template, particularly the div with id="post-$ID".
It looks like you modified the templates so the correct anchors are no longer being generated. Check out the original template, particularly the div with id="post-$ID".
I thought wordpress was going to use the kind of permalinks like b2 can be modified to use, eg: http://www.mydomain.com/archives/p/1 ect ect
eeeek i really do not this whole bbcode thing... i mean:
?php permalink_anchor() ;? enclosed in the usual < > characters
Thanks! I must have deleted that piece of code.
I think this is actually entirely missing from the template... I can't get it working anyway.
Eudaimic is correct, the permalink anchor code is missing from the default template that WP comes with.
Sorry, I meant, change index.php to:
<h3 class="storytitle"><br>
"><br>
" rel="bookmark"><?php
the_title(); ?><br>
<span class="meta">
?>" title="Category: <?php the_category() ?>">[<?php
the_category() ?>]<br>
</span><br>
</h3>
There's already a function that echos out the ID, the_ID(). Use that instead.
This has been corrected in the CVS. I would not recommend the above method. The correct way is to change the h3 story title to <h3 class="storytitle" id="post-<?php the_ID(); ?>">. The post- is important for the anchors to be valid XHTML. Check out the new template function in the CVS as well.
Gosh, what's the secret for putting code in a minibb post?
Gosh, perhaps my previous post wasn't too clear. I think minibb chewed up some of my post.
I used the cvs code, all the code between the start h3 and end h3.
In my output, the id=post-22 while the a href is equal to a href="index.php?m=200306#22″
There seems to be a mismatch. And btw, why is post- necessary for validation? rj
The reason for having the post- in front of the id is that in CSS1 Id could not begin with digits. THe restriction has been lifted for CSS2 but... *shrugs*
Anyway, I have this code in my template
<h3 class="storytitle" id="post-<?php the_ID(); ?>">
" rel="bookmark"><?php the_title(); ?>
</h3>
which results in the following xhtml
<h3 class="storytitle" id="post-1">
Hello world!
</h3>
Mike
Mike,
The same template code here results in:
...
as opposed to #post-12
-j
Sorry, to be a pain, Mike L, but how did you get your code in miniBB?
Mike, if I'm implementing the htaccess-lovely-urls, this wouldn't be a big concern right?
Ok, firstly an apology, I hadn't realised that the fix to make these css1 compliant id's was put into CVS *after* the last release. Sorry :-(
The diffs to fix this are here: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/cafelog/wordpress/b2-include/b2template.functions.php.diff?r1=1.20&r2=1.21
Secondly, in order to put code in miniBB I just replace all the < with ampersand lt semi-colon and all the > with ampersand gt semi-colon
Thirdly, looking at the function it does use the correct code to allow for friendly urls
Mike
works great. Thanks!
This topic has been closed to new replies.