billsey
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Trackback SpamSo far, so good. I’ve gotten no spam of this variety since.
Forum: Plugins
In reply to: How to get rid of trackback spam?Well, until I (or some kind soul here) can come up with a more equitable solution for 1.2.2, I seem to have solved the problem by moving the wp-trackback file to a different directory, specially created to hold files I’d rather not have to delete. ??
Forum: Fixing WordPress
In reply to: Trackback SpamOK, as a result of some wierdness (my host would not allow me to rename the trackback file on my own site), I have attempted to stop the trackback spam by creating a new directory under my weblog directory and moving the trackback file into that directory. I am still using 1.2.2 as I don’t relish the amount of work involved with upgrading, should the upgrade overwrite the files that give my weblog its appearance.
Since I am a php novice I have a question:
Would it work if I were to replace
<li id="other"><?php _e('Other:'); ?>
<ul>
<li><a href="<?php echo get_settings('siteurl'); ?>/wp-login.php"><?php _e('Login'); ?></a></li>
<li><a href="<?php echo get_settings('siteurl'); ?>/wp-register.php"><?php _e('Register'); ?></a></li>
</ul>
</li>with
<li id="other"><?php _e('Other:'); ?>
<ul>
<?php
global $user_login;
get_currentuserinfo();
if ($user_login) :
?>
<li><a href="<?php echo get_settings('siteurl')
?>/wp-login.php?action=logout" title="<?php _e('Log out of this account') ?>"><?php printf(__('Logout (%s)'), stripslashes($user_nickname)) ?></a></li>
<li><a href="wp-admin/post.php">New Post</a></li>
<?php else ?>
<li><a href="<?php echo get_settings('siteurl'); ?>/wp-login.php"><?php _e('Login'); ?></a></li>
<li><a href="<?php echo get_settings('siteurl'); ?>/wp-register.php"><?php _e('Register'); ?></a></li>
<?php endif; ?>
</ul>
</li>in index.php?
And it seems to work just fine.
OK, so put the user info code between the list items within the existing ul, right? If I read it right, doing it that way would eliminate the empty li tag.
YES!
I tried my version and, after removing the leading “/” from the “/wp-admin/post.php” link it works!
Thank you Kafkaesqui!
I’m thinking of the “log in”/”Register” ul list, adding this as a third item that would only appear when logged in. In such a case, should I put the whole code within the li tags?
Such as:
<li><?php global $user_login; get_currentuserinfo(); if ($user_login) : ?><a href="/wp-admin/post.php">New Post</a><?php endif; ?></li>
Thanks, Kafkaesqui, I wish my search would have found that as quickly as yours did (of course you wrote it, too ?? ). Can I put that between li tags in a ul list?
Forum: Fixing WordPress
In reply to: Error with a database connectionI occasionally run into this problem with my host. When I checked the error messages from the database server it claimed that there were “too many connections”. Apparently too many people were already using the server at that time. This MIGHT be what is going on in your case as well. If it is, all you can do is try back later, or get your host to increase the user limit on the database server.