multippt
Forum Replies Created
-
Forum: Installing WordPress
In reply to: where to put the code?Example of the loop with the vote button in it:
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <!-- If the post is in the category we want to exclude, we simply pass to the next post. --> <?php if (in_category('3')) continue; ?> <div class="post"> <h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2> <small><?php the_time('F jS, Y'); ?></small> <div class="entry"> <?php the_content(); ?> <?php DisplayVotes(get_the_ID()); ?> </div> <p class="postmetadata">Posted in <?php the_category(', '); ?></p> </div> <!-- closes the first div box --> <?php endwhile; else: ?> <p>Sorry, no posts matched your criteria.</p> <?php endif; ?>
Forum: Everything else WordPress
In reply to: I like It PluginThat I Like It feature appears to be custom made and integrated to the site (judging from the file paths used), so it’s unlikely that it is publicly available.
If you’d like, you can use a similar plugin which I made (Vote It Up).
Forum: Installing WordPress
In reply to: where to put the code?You can adjust the bar size by editing the CSS style sheet. You may need to experiment with the widths and heights to get the desired size.
Forum: Plugins
In reply to: [Plugin: Vote It Up] Most votedAdd <?php MostVotedAllTime(); ?> to the sidebar.
You may need to tweak the styles in the votestyles.css file.
Forum: Plugins
In reply to: Vote it Up – Fatal Error at InstallI would have renamed the folder if I could. Technical limitation at WordPress.
I may add it, if I managed to translate the page and find the submission link…
Forum: Plugins
In reply to: Vote it Up – Fatal Error at InstallI guess it is then. Well, at least I’ll know who actually reads the readme before installing the plugin. :p
I may change the installation path in due time.
Forum: Plugins
In reply to: Vote it Up – Fatal Error at InstallThe unusual thing is that www.remarpro.com automatically names the folder as such (i.e. “vote-it-up” instead of intended “voteitup”, which is unexpected.
Forum: Plugins
In reply to: Vote it Up – Fatal Error at InstallI’m currently experimenting a method to allow the plugin to be installed in other directories.
For the time-being, the plugin has been modified to remind people to read the readme.
The plugin should be installed in the “voteitup” directory.
This issue only affects one plugin and a fix is pending.Forum: Plugins
In reply to: [Plugin Social Dropdown] Fixing Problems with 2.3.1Thanks for your suggestion, I’ll consider it in the next update.
Forum: Plugins
In reply to: Assigning icons to registered users and adminUsing the above code I’ve mentioned, it can be modified to a function:
function GetUserLevel($user) { global $wpdb; //$user is the display name if ($user != '') { $userdata = $wpdb->get_results("SELECT ID, user_email, user_url, user_registered FROM $wpdb->users WHERE display_name = '".$user."'", ARRAY_N); $user_ID = $userdata[0][0]; //Get the ID of the user $userwpleveldata = $wpdb->get_results("SELECT meta_value FROM $wpdb->usermeta WHERE meta_key = 'wp_user_level' AND user_id = '".$user_ID."'", ARRAY_N); return $userwpleveldata[0][0]; } else { return ''; } }
Then, you call out to that function whenever you want the user level. In your case, it can be made to:
//Assuming comment_wpusername() gives the user display name $wpuserlevel = GetUserLevel(comment_wpusername()); if ($wpuserlevel != '') { //User is registered $wpuserlevel = (int) $wpuserlevel; //convert to number if ($wpuserlevel > 7) { //User in question is administrator echo "<img src='https://www.jenn.nu/wp-content/themes/nov07/images/admin.png' height='16' width='16' alt='Registered member' title='Registered member' class='commentsbyadmin' />"; } else { //User in question is not an administrator but is a registered member echo "<img src='https://www.jenn.nu/wp-content/themes/nov07/images/member.gif' height='16' width='16' alt='Registered member' title='Registered member' class='commentsbyadmin' />"; } }
Forum: Plugins
In reply to: Assigning icons to registered users and adminThe following code might be of use to you. It retrieves the user level of a user when you supply the user’s display name.
global $wpdb; $user = 'admin'; //The name of the user as in display name $userdata = $wpdb->get_results("SELECT ID, user_email, user_url, user_registered FROM $wpdb->users WHERE display_name = '".$user."'", ARRAY_N); $user_ID = $userdata[0][0]; //Get the ID of the user $userwpleveldata = $wpdb->get_results("SELECT meta_value FROM $wpdb->usermeta WHERE meta_key = 'wp_user_level' AND user_id = '".$user_ID."'", ARRAY_N); $userwplevel = $userwpleveldata[0][0];
$userwplevel will be the user level. If it contains a number (i.e. not empty text), it means that the user is registered. If it is more than 7, it means that the user is an administrator.
Forum: Fixing WordPress
In reply to: my feed won’t change to full text!You may need to wait for your feed to update (it updates every once in a while).
Your feed now shows the full-text version.
Forum: Plugins
In reply to: [Plugin Social Dropdown] Fixing Problems with 2.3.1The problem has been fixed [1.4.7], hopefully. Apparently I didn’t test the plugin hard enough (on Linux). This problem affect Linux servers.
—
If you want to edit the plugin file manually, you can replace the GetDropPluginPath() function withfunction GetDropPluginPath() {
$cleanabs = str_replace(“/”,”\\”, ABSPATH);
return str_replace($cleanabs, ”, str_replace(“/”,”\\”, dirname(__FILE__)));
}Forum: Everything else WordPress
In reply to: My old WordPress got hacked!For a start, you can upload the most recent revisions of the themes and plugins to your WordPress installation (if you know which theme or plugins you used in the previous install).
Most security breaches rarely make use of specific plugins nor themes, so updating the main WordPress install should keep out breahes.WordPress 2.0.1 is the latest version of WordPress on February 2006.