deko
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: PHPMyAdmin 2.7.0-pl2 restore procedureThere is a helpful PDF document located here:
http://codex.wordpress.org/Backing_Up_Your_Database
(click the [1] at the beginning of the codex article)Is there a plug-in available that will catch open tags in comments?
That should not be too hard to write… just strip any unmatched tags.
The maxim “Never trust the client” comes to mind here.
The fact is, we cannot trust the client to close markup tags when making comments in our blogs.
If a user does not close a tag, then the appearance of our blog gets screwed up. This is clearly a bug, and effectively eliminates the option to allow use of tags in comments.
It seems this support forum is immune to this bug, however.
this text is prefaced by a strong tag with no closing tag.
Notice that all the text on the page (outside this comment) below this post is NOT bold.
If the wp folks can fix it here, why can’t they provide a fix for the rest of us?
Forum: Fixing WordPress
In reply to: Commentsyikes. I’m surprised that disallowing comments does not disallow comments. I would run a delete query against the table rather that drop it.
Have you tried the badbehavior plugin?
That w3c page is a start, but it’s not very descriptive.
FIELDSET ... form control groupThat doesn’t exactly tell me what my text will look like if I use that tag in a post 🙂
Perhaps I’ll make a PDF reference for the wp community if I have the time.
As for your suggested fix my original problem, I tried it, but I still get the same results.
Seems to me kses is the place to catch that kind of thing. Let’s get Ulf on the phone…
I thought it was a security filter (from the description) and hence my expectations.
On a related topic:
I’ve noticed the list of allowed post tags in the kses file:
address
a
abbr
acronym
b
big
blockquote
br
button
caption
code
col
del
dd
div
dl
dt
em
fieldset
font
form
h1
h2
h3
h4
h5
h6
hr
i
img
hspace
ins
kbd
label
legend
li
pre
q
s
strike
strong
sub
sup
table
tbody
textarea
tfoot
thead
title
tr
valign
tt
u
ul
ol
varDo you know of any reference for these? I can gess what most of them do, but not all. And some, like
kbd, seem to do the same thing as others (likecode).Some have directives in the stylesheet, and some do not. Does this mean I can apply my own rules to these tags by entering a directive in the stylesheet?
Thanks for the tip. So apparently this is a bug.
You’re suggesting those changes to:
wp-includes/default-filters.phpand
wp-includes/formatting.phpas a fix.
I thought the kses file was supposed to handle this stuff?
What then does the kses file do?
Forum: Fixing WordPress
In reply to: How to number comments?This line of code, inserted in the foreach loop in comments.php, seems to do the trick:
<?php $i++; echo "<span class='comment_number'>Comment # ".$i."</span>"; ?>Forum: Fixing WordPress
In reply to: How to get posts to appear in Ascending order by date?Thanks for the tip.
Forum: Fixing WordPress
In reply to: Why does get_posts() go to wrong database?Thanks for the tip, I’ll give it a shot.
I was able to id the link with this code:
$cnx = mysql_connect('localhost','username','password');
if ($cnx)
{
$link = mysql_list_dbs($cnx);
while ($objdb = mysql_fetch_object($link))
{
$db = $objdb->Database;
}
mysql_select_db('wp11');
...
}
mysql_select_db($db); //back to orig link
mysql_close;but if $wbdb is specifying the link, something else needs to be adjusted.
still developing…
Forum: Fixing WordPress
In reply to: Why does get_posts() go to wrong database?I didn’t include the code that made the connection. Here’s a less abbreviated version:
$db = mysql_connect(...);
if ($db)
mysql_select_db('wp11');
$sql = "select ...";
$result = mysql_query($sql);
while ($var = mysql_fetch_array($result))
...So I am making my own connection.
Apparently template tags do not specify a link and, as the manual points out, use the last link opened by mysql_connect (which is the one my script makes to wp11). It is clear now that this is the case. So I need to select wp12 (or whatever) before my script concludes.
What makes this cumbersome is that the script uses categories retrieved from wp11 to create a navbar that is common to all blogs. So I never know which db needs to be switched back to. If I use that work-around I posted, that means establishing another connection just to select the right db.
Perhaps I can find a way to determine what the current link is at the start of my script, then just switch back to it before I close that connection.
developing…
Forum: Fixing WordPress
In reply to: wp default HTML editor missingoy vey. Did I mention I HATE JavaScript….
thanks for the tip.
Forum: Fixing WordPress
In reply to: wp default HTML editor missingIf you took out everything between the word “post” and the post box in your screenshot, that’s what I have.
There is just the title field and the post box – no toolbar.
Even if I enable the WYSIWYG editor, still nothing is there.
So I have to manually type every html tag, which is a pain in the neck.
Forum: Fixing WordPress
In reply to: wp default HTML editor missingDoes anyone know of a plugin that provides a nice HTML (not WYSIWYG) editor? Something that looks like this:
http://www.solo-technology.com/images/old_wp_editor.png
but maybe has a few more features?
Forum: Fixing WordPress
In reply to: Why does get_posts() go to wrong database?I tried using this:
$wpdb->flush();instead of code to re-select database wp12
no luck.