cobusbo
Forum Replies Created
-
Forum: Hacks
In reply to: Mxpress edit to change color of a specific user role name and messageThank you very much I understand its always easier to do it via css but in this case it wasn’t possible. thank you once again. Is there maybe a way where I can give you positive rating on the forum?
Forum: Hacks
In reply to: Mxpress edit to change color of a specific user role name and messageWoW finally it worked! thank you very much and with all the patience. Theres only one more question how can I make the text in bold?
Thank you very much it works perfectly.
Forum: Hacks
In reply to: Mxpress edit to change color of a specific user role name and messageHi the mxpress plugin works via an apliacation called mxit. On the browsser it uses a normal theme but when you use mxit it use the plugin. the changes cannot be reviewed through a normal browser and only through mxit platform. I made a an API through mxit named imagecrab that links to the website and uses the mxpress plugin. the normal themes of the website have nothing to do with the mxpress plugin itself. the modifications is needed in the plugin theme itself
Forum: Hacks
In reply to: Mxpress edit to change color of a specific user role name and messageHi all those posts by admin and moderator were made by the div tag with inline editing when typing a message.
please look into Contact admin or moderator topic I made a comment there via Cobus which is a moderator account and if the help user account which is an Administrator post a message it doesn’t show the color as well. Ive tested it via opera browser, google chrome and via mobile. the current colors displaying was manually inserted when typing the comment.
When I type any new comment it wont change the color automatic to green for moderator and red for administrator…
please test it by making a new comment or by checking my latest reply made by Cobus user
Forum: Hacks
In reply to: Mxpress edit to change color of a specific user role name and messageHi yes only inline div tag works with the colors but not through the css
I have tried the !important modifier but it did not work. I have only one .css file it is as follow
.mxblock {margin:0; padding:2em 0 0;} .mxpsection {display:block;margin:0; background: #CCC; padding:0} .mxpsection-detail {display:block;margin:0; background: #EEE; padding:0} .mxpsection-detail p {margin:0} .mxpsection h3{margin: 0; padding:0} .mxpsection h3 a{display:block;margin: 0; padding:0.5em ; } #mxpress_sections_menu{display:block; height: 3em; clear:both; } .mxptab{display:block;background:#eee; float:left; margin:0.25em;} .mxptab a{display:block;margin:0;padding:1em 0.25em 0;} .mxptab a:hover{background:#fff;} .mxspacer{margin:0} .doShow { display: inherit; } .doHide { display: none; } .comment_text {margin: 0 0;} .moderator {color: #00e500 !important;} .administrator {color: #ff0000;} .editor {color: #000000;} .author {color: #000000;} .contributor {color: #000000;}The website is here
I want the colors as specified above moderator in lime green and administrator in red the rest can be default colors.
[Login credentials redacted]
Please do not post login credentials to your site on a public forum.
mxpress is under the plugins…Forum: Hacks
In reply to: Mxpress edit to change color of a specific user role name and messageHi Thank you very much Ive implemented it but, there is no change in color …
There is no errors but the colors just don’t appear. In the case above the.moderator is red but no message we type or send in the comments are read its still black…
when i type the comment as following into the comment box
<div style="color:#ff0000">My message</div>my message appears in red though but not via the .css to make it default…
Forum: Hacks
In reply to: Mxpress edit to change color of a specific user role name and messageCan you maybe help me by indicating where Exactly in which document I should place what code or replace witch item. I feel like I’m going in circles since I don’t understand what part to place where. I’m totally confuse. Thank you for your patience with me. I appreciate it.
Forum: Hacks
In reply to: Mxpress edit to change color of a specific user role name and messageI searhed for the line
echo $comment->comment_content;and replaced it with
$class = cob_user_role( $comment->user_id ); echo "<div class=\"comment_text $class\">\n"; echo $comment->comment_content; echo "\n</div>\n";and added the css mentioned above then it gave me that error
Forum: Hacks
In reply to: Mxpress edit to change color of a specific user role name and messageHi ive added that line you specified onto my script and got the following error.
Fatal error: Call to undefined function cob_user_role() in /home/u506124311/public_html/chatwp/wp-content/plugins/mxpress/functions_comments.php on line 247
ive added the following codes to my CSS aswell
.Moderator { color:#ff0000; } .comment_text { color:#ff0000; }another question is how and where should I specify what the color of the specific user role should be? Or is this correct like I did in the CSS?
Forum: Hacks
In reply to: Mxpress edit to change color of a specific user role name and messageim really sorry but im a beginner with coding. I understand the issue about updating the plugin will cause the modifications to be lost, but its the only way for it to work since the plugin is being used as the theme aswell.
Must I input this code
<div class="existing_ class <?php cob_user_role( $comment->user_id ); ?>">
into the comments.php witch is indicated underneath and where precisely in the code?<?php /** * The template for displaying Comments. * * The area of the page that contains both current comments * and the comment form. The actual display of comments is * handled by a callback. * */ ?> <br><div id="comments"> <?php if (post_password_required()) : ?> <p class="nopassword"><?php _e('This post is password protected. Enter the password to view any comments.', 'twentyten'); ?></p> </div><!-- #comments --> <?php /* Stop the rest of comments.php from being processed, * but don't kill the script entirely -- we still have * to fully load the template. */ return; endif; // You can start editing here -- including this comment! global $doMxpressComment, $mxpress_options; if ((have_comments())) : if (!$doMxpressComment) { ?><br><br><?php mxpress_comment_link(); footer_nav(); ?><br><br><?php //mxpress_debug('have comments, not leaving one'); $limit_comments = ($mxpress_options['limitCommentsTo']) ? $mxpress_options['limitCommentsTo'] : get_option('comments_per_page'); $reverse_order = $mxpress_options['orderComments']; //oldest first = 1 $order = ($reverse_order) ? 'ASC' : 'DESC'; $post_id = $post->ID; $comments = get_comments(array( 'post_id' => $post_id, 'status' => 'approve', //Change this to the type of comments to be displayed 'order' => $order, /* 'number'=>null, */ )); /* if(!$reverse_order ){ $comments = array_reverse($comments); } */ /* var_dump($comments); */ ?> <br> <div class="commentlist"> <?php /* Loop through and list the comments. */ //wp_list_comments('avatar_size=0&style=div&type=comment&callback=mxpress_comment' . $reverse_order . '&per_page=' . $limit_comments . $reverse_order); wp_list_comments(array( 'callback' => 'mxpress_comment', 'avatar_size' => 0, 'style' => 'div', 'type' => 'comment', 'per_page' => $limit_comments, //Allow comment pagination 'reverse_top_level' => false /* !($mxpress_options['orderComments']) */ //Show the latest comments at the top of the list*/ ), $comments); ?> </div> <div class="commentlist"> <?php //Display the list of comments ?> </div> <?php // Are there comments to navigate through? //$cpage_count = get_comment_pages_count(); $cpage_count = ceil(count($comments) / $limit_comments); /* var_dump('count($comments)',count($comments)); var_dump('$cpage_count',$cpage_count); var_dump('$limit_comments)',$limit_comments); */ if ($cpage_count > 1 && $limit_comments) : $cpage = get_query_var('cpage'); // figure out nomenclature if (!$reverse_order) { //newest first $comments_pagelink_titles = array( 'first' => 'Newest', 'prev' => 'Newer', 'next' => 'Older', 'last' => 'Oldest' ); } else { //oldest first $comments_pagelink_titles = array( 'first' => 'Oldest', 'prev' => 'Older', 'next' => 'Newer', 'last' => 'Newest' ); } ?> <div class="navigation"> <?php $comment_nav_links = array(); if ($cpage > 1) { // $comment_nav_links[] = '<a href="' . esc_url(get_comments_pagenum_link(1)) . '"><< ' . $comments_pagelink_titles['first'] . '</a>'; } else { $comment_nav_links[] = '<< ' . $comments_pagelink_titles['first']; } $prev = get_previous_comments_link('< ' . $comments_pagelink_titles['prev']); if ($cpage > 1) { $comment_nav_links[] = '<a href="' . esc_url(get_comments_pagenum_link($cpage - 1)) . '"><< ' . $comments_pagelink_titles['prev'] . '</a>'; } else { $comment_nav_links[] = '< ' . $comments_pagelink_titles['prev']; } $next = get_next_comments_link(__($comments_pagelink_titles['next'] . ' >')); if ($cpage < $cpage_count) { $comment_nav_links[] = '<a href="' . esc_url(get_comments_pagenum_link($cpage + 1)) . '">' . $comments_pagelink_titles['next'] . ' >></a>'; } else { $comment_nav_links[] = $comments_pagelink_titles['next'] . ' >'; } ?> <?php if ($cpage < $cpage_count) { // $comment_nav_links[] = '<a href="' . esc_url(get_comments_pagenum_link($cpage_count)) . '">' . $comments_pagelink_titles['last'] . ' >></a>'; } else { $comment_nav_links[] = $comments_pagelink_titles['last'] . ' >>'; } echo implode(' | ', $comment_nav_links); echo ' (of ' . get_comments_number() . ')'; ?> </div> <!-- .navigation --> <?php endif; // check for comment navigation ?><br><br> <?php } else { // have comments but leaving one mxpress_comment_form(); } else : // or, if we don't have comments: if (!comments_open()) : // we do nothing else: if ($doMxpressComment) { mxpress_comment_form(); } endif; // end ! comments_open() endif; // end have_comments() ?> </div><!-- #comments -->and the cob_user_role must I change it to my username like cobus_user_role or to the type of user role like moderator_user_role?
Like I said im totaly new into this wordpress code and mxpress plugin doesn’t make it easier since its very different then a normal template, but only the mxpress plugin works via the app im using…
can you please have a look at the files the mxpress plugin can be found here
Forum: Hacks
In reply to: Mxpress edit to change color of a specific user role name and messageor should I indicate a specific user? like
function Cobus_user_role( $user_id ) { $user = new WP_User( $user_id ); echo $user->roles[0];or like
function Mods_user_role( $user_id ) { $user = new WP_User( $user_id ); echo $user->roles[0];Forum: Hacks
In reply to: Mxpress edit to change color of a specific user role name and messagein which functions.php file should I fill it in because I cant find a line. Ive got the following different types of functions.php documents
mxpress/template_static_front_page.php
mxpress/template_page.php
mxpress/functions_comments.php
mxpress/functions_tracking.php
mxpress/mxpress_footer.php
mxpress/admin_options.php
mxpress/mxpress_header.php
mxpress/template_static_home_page.php
mxpress/template_single_post.php
mxpress/mxpress_comments.php
mxpress/functions_template_tags.php
mxpress/recycle_bin.php
mxpress/mxpress_index.php
mxpress/functions_admin.php
mxpress/functions_admin_selectlogo.php
mxpress/mxpress.php
mxpress/functions_content_filtering.php
mxpress/template_archive_cat_or_terms.php
mxpress/functions_config.php
mxpress/readme.txt
mxpress/functions_navigation.php
mxpress/style.css
mxpress/config.php
mxpress/admin.php
mxpress/lib/simple_html_dom.php
mxpress/lib/ga.phpmxpress_comment()
and in the code
function cob_user_role( $user_id ) { $user = new WP_User( $user_id ); echo $user->roles[0]; }where do I Indicate the user role?
I made a user Role Mods which I want to make a different color and for Admin aswell.Forum: Hacks
In reply to: Mxpress edit to change color of a specific user role name and messageHi im sorry but it doesnt work I triend implementing it but dont know how exactly it works…