aimeec
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: authors function callThanks a lot. I’ve decided to use wp-people instead of Lennart’s as it seems easier. they have different features though.
Forum: Fixing WordPress
In reply to: registrationYou need to log out first from your admin account. This will then lead you to the new user registration.
AimeeForum: Plugins
In reply to: help with functions.phpthanks anyway, podz. I’m still trying to tweak it, but nothing’s happening. :-(. I should wait for Lennart’s reply
Forum: Plugins
In reply to: help with functions.phpI’ve tried that but it isn’t there. What I would like to know is that if I add a plugin/hack, should I add the function in the functions.php found in wp-includes, or should I make a new file with all plugin functions in it?
Forum: Plugins
In reply to: where to fin myhack.phpJust to check:
I’m working on the get-authors hack. and this is what my my-hacks.php file look
like. Is this correct?
<? php
Press Return twice
<?php
#require_once(ABSPATH . ‘wp-hilite.php’);
add_filter(‘the_content’, ‘hilite’);
?>
<?php
function get_authors($postCount = true, $excludeAdmin = true, $showFullName = false, $detailLink = ”) {
global $tableusers, $tableposts, $wpdb, $author, $siteurl, $blogfilename;
echo “<div id=’authors’>”;
echo “- “;
- “;
if ($detailLink) {
echo ” ID\” title=\”user details for $name\”>$detailLink “;
}
if ($data->ID == $author) {
echo “” . $name . ““;
} else if ($posts == 0) {
echo $name;
} else {
echo “ID\” title=\”Posts by $data->user_nickname\”>$name ” . ($postCount ? ” ($posts)” : ”).”“;
}
echo “
$query = “SELECT ID, user_nickname, user_firstname, user_lastname from $tableusers ” . ($excludeAdmin ? “WHERE user_nickname <> ‘admin’ ” : ”) . “ORDER BY user_nickname”;
$res = $wpdb->get_results($query);
foreach($res as $data) {
$posts = get_usernumposts($data->ID);
$name = ($showFullName ? “$data->user_firstname $data->user_lastname” : $data->user_nickname);
echo ““;
}
echo ““;
echo “</div>”;
}
/////////////////////////////////////////////////////////////////////
function get_user_table($userid) {
if ($userid) {
$data = get_userdata($userid);
if ($data->ID) {
echo “<table id=\”user_table\”>”;
echo “<tr>”;
echo “</tr><tr>”;
echo “<th>Name</th><td>”. ($data->user_firstname . $data->user_lastname ? “$data->user_firstname $data->user_lastname” : ‘ ‘) . “</td>”;
echo “</tr><tr>”;
echo “<th>Nick</th><td>” . ($data->user_login ? $data->user_login : ‘ ‘) . “</td>”;
echo “</tr><tr>”;
echo “<th>Email</th><td>” . ($data->user_email ? “user_email\”>$data->user_email” : ‘ ’) . “</td>”;
echo “</tr><tr>”;
echo “<th>Description</th><td>” . ($data->user_description ? $data->user_description : ‘ ‘) . “</td>”;
echo “</tr><tr>”;
echo “<th>Posts</th><td>” . ($posts ? “ID\”>$posts” : ‘ ‘) . “</td>”;
echo “</tr><tr>”;
echo “</tr>”;
echo “</table>”;
return;
}
}
echo “Unknown user!”;
}
?>
Now enter
?>Forum: Plugins
In reply to: get authorsI’m new at this. But just a question, can I put the function call (function signature) anywhere in index.php? or is there a specific line for this? Again, thanks.
Forum: Themes and Templates
In reply to: Multiple Users – Different TitlesOIC. Thanks a lot for the info. I still need to look at this Wiki though to check it out. 🙂
Forum: Themes and Templates
In reply to: A few questions on changing designshahahaha…Didn’t notice that. And oh! that’s an extremely quick reply. I’m off to bed right now. It’s late in Vietnam. I’ve been looking at the files and realized most of the questions above are so unnecessary because they are just right in front of my face. Stupid, lazy me. Will try again 2-morrow (er, today, later today).
Thanks - “;