Announcement

Collapse
No announcement yet.

How to Edit Widgets and Modules to show Colored Names/HTML Markup?

Collapse
X
 
  • Time
  • Show
Clear All
new posts

  • [CMS] How to Edit Widgets and Modules to show Colored Names/HTML Markup?

    I know how to edit the user groups to show colors with HTML Markup but how can I edit the blocks on my site to show the colored names?

    I wanted to edit stuff on my site to show the colored user groups but I have no idea is there something that needs to be included in blocks or modules to show the HTML Markup?

    I have maybe two or three CMS blocks that the colored user names show but I do not see any pattern that would give me a clue how to edit other blocks to make it work.

    Like for instance I want this to show colored user names:
    Code:
    $lastmembers = 5;
    
    global $db;
    $output = "<div style='margin:3px;'>";
    $wconf = $db->fetch_array($db->query_read("SELECT joinformat FROM ".TABLE_PREFIX."clan_members_config"));
    
    $result = $db->query_read("SELECT u.username, i.joindate FROM ".TABLE_PREFIX."clan_members_info i, ".TABLE_PREFIX."user u WHERE u.userid=i.userid ORDER BY i.joindate DESC LIMIT $lastmembers");
    	while($row = $db->fetch_array($result)){
    		$username = $row['username'];
    		$joindate = $row['joindate'];
    		$output .= "<div style='width:100%height:auto;'><div style='width:40%;float:left;'>$username</div><div style='width:60%;float:right;'>".date($wconf['joinformat'], $joindate)."</div></div>";
    	}
    $output .= "</div><div style='clear:both;'></div>";
    Any help would be appreciated.

    Thank you.

  • #2
    This is something you should be asking over on vbulletin.org, the modification site. You are going to need to get the displaygroupid and usergroupid in your query for the users. You can actually see that in the forum.php page where they get the list of users online. If you need more help, you will need to post over on vbulletin.org

    Please don't PM or VM me for support - I only help out in the threads.
    vBulletin Manual & vBulletin 4.0 Code Documentation (API)
    Want help modifying your vbulletin forum? Head on over to vbulletin.org
    If I post CSS and you don't know where it goes, throw it into the additional.css template.

    W3Schools &lt;- awesome site for html/css help

    Comment


    • #3
      Ok thanks will do!

      Comment

      widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
      Working...
      X
      😀
      🥰
      🤢
      😎
      😡
      👍
      👎