Advertisement:

Author Topic: How To Make Crown Beside Our Name  (Read 11438 times)

Offline bloodrune

  • Semi-Newbie
  • *
  • Posts: 61
How To Make Crown Beside Our Name
« on: December 05, 2008, 07:25:39 AM »
hey...annyone know how to make crown beside our name like this forum exmaple
http://advanced-scape.110mb.com/forum/index.php?topic=525.0

Offline Kermit

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 4,365
  • Gender: Male
Re: How To Make Crown Beside Our Name
« Reply #1 on: December 05, 2008, 07:34:15 AM »
in Display.template.php

Code: (find) [Select]
// Show information about the poster of this message.
echo '
<div class="floatleft poster">
<h4>', $message['member']['link'], '</h4>

Code: (replace with) [Select]
// Show information about the poster of this message.
echo '
<div class="floatleft poster">
<h4><img src="your image url comes here"/>', $message['member']['link'], '</h4>
My Mods
Please don't PM/mail me for support,unless i invite you
Formerly known as Duncan85
Quote
"Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe."

A. Einstein

Offline bloodrune

  • Semi-Newbie
  • *
  • Posts: 61
Re: How To Make Crown Beside Our Name
« Reply #2 on: December 05, 2008, 07:47:57 AM »
when i do that...all member have crown..i want to make admin only have crown

Offline bloodrune

  • Semi-Newbie
  • *
  • Posts: 61
Re: How To Make Crown Beside Our Name
« Reply #3 on: December 05, 2008, 07:51:28 AM »
Code: [Select]
// Show the member's primary group (like 'Administrator') if they have one.
if (isset($message['member']['group']) && $message['member']['group'] != '')
echo '
<li>', $message['member']['group'], '</li>';
how do i make for admin only

Offline Kermit

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 4,365
  • Gender: Male
Re: How To Make Crown Beside Our Name
« Reply #4 on: December 05, 2008, 07:54:56 AM »
Just for admins,you should do this

in Display.template.php

Code: (find) [Select]
// Show information about the poster of this message.
echo '
<div class="floatleft poster">
<h4>', $message['member']['link'], '</h4>
<ul class="smalltext" id="msg_', $message['id'], '_extra_info">';

Code: (replace with) [Select]
// Show information about the poster of this message.
echo '
<div class="floatleft poster">';
if($message['member']['group_id'] == '1')
echo'
<h4><img src="image url comes here"/>', $message['member']['link'], '</h4>
<ul class="smalltext" id="msg_', $message['id'], '_extra_info">';
else
echo'
<h4>', $message['member']['link'], '</h4>
<ul class="smalltext" id="msg_', $message['id'], '_extra_info">';
My Mods
Please don't PM/mail me for support,unless i invite you
Formerly known as Duncan85
Quote
"Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe."

A. Einstein

Offline N3RVE

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 8,907
  • Gender: Male
    • N3RVE.COM
Re: How To Make Crown Beside Our Name
« Reply #5 on: December 05, 2008, 08:01:39 AM »
And for specific accounts, you can use:

Code: (Find) [Select]
<td valign="top" width="16%" rowspan="2" style="overflow: hidden;">
<b>', $message['member']['link'], '</b>

Code: (Replace with) [Select]
<td valign="top" width="16%" rowspan="2" style="overflow: hidden;">';
if ($message['member']['id'] == 1)
echo '<img src="' . $settings['images_url'] . '/collapse.gif' . '" alt="" />';
echo '
<b>', $message['member']['link'], '</b>

Replace 1 in if ($message['member']['id'] == 1) with the account's ID :)

-[n3rve]
Ralph "[n3rve]" Otowo
Former Marketing Co-ordinator, Simple Machines.
ralph [at] simplemachines [dot] org                       
Quote
“Somewhere, something incredible is waiting to be known.” - Carl Sagan

Offline Kermit

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 4,365
  • Gender: Male
Re: How To Make Crown Beside Our Name
« Reply #6 on: December 05, 2008, 08:06:00 AM »
And for specific accounts, you can use:

Code: (Find) [Select]
<td valign="top" width="16%" rowspan="2" style="overflow: hidden;">
<b>', $message['member']['link'], '</b>

Code: (Replace with) [Select]
<td valign="top" width="16%" rowspan="2" style="overflow: hidden;">';
if ($message['member']['id'] == 1)
echo '<img src="' . $settings['images_url'] . '/collapse.gif' . '" alt="" />';
echo '
<b>', $message['member']['link'], '</b>

Replace 1 in if ($message['member']['id'] == 1) with the account's ID :)

-[n3rve]



[n3rve] mate,i assume your code is for 1.1.x ,but we're in 2.x support topic  :P
My Mods
Please don't PM/mail me for support,unless i invite you
Formerly known as Duncan85
Quote
"Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe."

A. Einstein

Offline bloodrune

  • Semi-Newbie
  • *
  • Posts: 61
Re: How To Make Crown Beside Our Name
« Reply #7 on: December 05, 2008, 08:10:33 AM »
im folowing this tut
Code: [Select]
      // Show information about the poster of this message.
      echo '
            <div class="floatleft poster">';
            if($message['member']['group_id'] == '1')
            echo'
               <h4><img src="image url comes here"/>', $message['member']['link'], '</h4>
               <ul class="smalltext" id="msg_', $message['id'], '_extra_info">';
            else
            echo'
               <h4>', $message['member']['link'], '</h4>
                  <ul class="smalltext" id="msg_', $message['id'], '_extra_info">';

how do i make more exmaple added globla moderator

Offline Kermit

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 4,365
  • Gender: Male
Re: How To Make Crown Beside Our Name
« Reply #8 on: December 05, 2008, 08:12:40 AM »
for global moderators as group_id you should use 2 instead of 1

also you can do this

Code: (find) [Select]
if($message['member']['group_id'] == '1')
Code: (replace with) [Select]
if($message['member']['group_id'] == '1' || $message['member']['group_id'] == '2')
« Last Edit: December 05, 2008, 08:14:18 AM by Duncan85 »
My Mods
Please don't PM/mail me for support,unless i invite you
Formerly known as Duncan85
Quote
"Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe."

A. Einstein

Offline N3RVE

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 8,907
  • Gender: Male
    • N3RVE.COM
Re: How To Make Crown Beside Our Name
« Reply #9 on: December 05, 2008, 08:13:56 AM »
Quote from: Duncan85 link=topic=278600.msg1827754#msg1827754

[n3rve] mate,i assume your code is for 1.1.x ,but we're in 2.x support topic  :P

I think I had a blonde moment there ::) :P
Thanks.

im folowing this tut
Code: [Select]
      // Show information about the poster of this message.
      echo '
            <div class="floatleft poster">';
            if($message['member']['group_id'] == '1')
            echo'
               <h4><img src="image url comes here"/>', $message['member']['link'], '</h4>
               <ul class="smalltext" id="msg_', $message['id'], '_extra_info">';
            else
            echo'
               <h4>', $message['member']['link'], '</h4>
                  <ul class="smalltext" id="msg_', $message['id'], '_extra_info">';

how do i make more exmaple added globla moderator

I can't remember but I think a Global Moderator's membergroup ID is '2'.
Duplicate the if($message['member']['group_id'] == '1') section and replace 1 with 2.

-[n3rve]
Ralph "[n3rve]" Otowo
Former Marketing Co-ordinator, Simple Machines.
ralph [at] simplemachines [dot] org                       
Quote
“Somewhere, something incredible is waiting to be known.” - Carl Sagan

Offline bloodrune

  • Semi-Newbie
  • *
  • Posts: 61
Re: How To Make Crown Beside Our Name
« Reply #10 on: December 05, 2008, 08:15:06 AM »
gave me bug...

Offline Kermit

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 4,365
  • Gender: Male
Re: How To Make Crown Beside Our Name
« Reply #11 on: December 05, 2008, 08:16:16 AM »
gave me bug...

the code is correct,replace it carefully
My Mods
Please don't PM/mail me for support,unless i invite you
Formerly known as Duncan85
Quote
"Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe."

A. Einstein

Offline bloodrune

  • Semi-Newbie
  • *
  • Posts: 61
Re: How To Make Crown Beside Our Name
« Reply #12 on: December 05, 2008, 08:18:43 AM »
i make like this
Code: [Select]
      // Show information about the poster of this message.
      echo '
            <div class="floatleft poster">';
            if($message['member']['group_id'] == '2')
            echo'
               <h4><img src="http://advanced-scape.110mb.com/forum/index.php?action=profile;u=5"/>', $message['member']['link'], '</h4>
               <ul class="smalltext" id="msg_', $message['id'], '_extra_info">';
            else
            echo'
               <h4>', $message['member']['link'], '</h4>
                  <ul class="smalltext" id="msg_', $message['id'], '_extra_info">';

      // Show information about the poster of this message.
      echo '
            <div class="floatleft poster">';
            if($message['member']['group_id'] == '1')
            echo'
               <h4><img src="http://i104.photobucket.com/albums/m187/golddollar12127/Fourm/Admin-Crown.gif"/>', $message['member']['link'], '</h4>
               <ul class="smalltext" id="msg_', $message['id'], '_extra_info">';
            else
            echo'
               <h4>', $message['member']['link'], '</h4>
                  <ul class="smalltext" id="msg_', $message['id'], '_extra_info">';

it give me bug

Offline Kermit

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 4,365
  • Gender: Male
My Mods
Please don't PM/mail me for support,unless i invite you
Formerly known as Duncan85
Quote
"Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe."

A. Einstein

Offline bloodrune

  • Semi-Newbie
  • *
  • Posts: 61

Offline Kermit

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 4,365
  • Gender: Male
Re: How To Make Crown Beside Our Name
« Reply #15 on: December 05, 2008, 08:26:47 AM »

in Display.template.php

Code: (find) [Select]
// Show information about the poster of this message.
echo '
<div class="floatleft poster">
<h4>', $message['member']['link'], '</h4>
<ul class="smalltext" id="msg_', $message['id'], '_extra_info">';

Code: (replace with) [Select]
// Show information about the poster of this message.
echo '
<div class="floatleft poster">';
if($message['member']['group_id'] == '1')
echo'
<h4><img src="image url for admins comes here"/>', $message['member']['link'], '</h4>
<ul class="smalltext" id="msg_', $message['id'], '_extra_info">';
elseif($message['member']['group_id'] == '2')
echo'
<h4><img src="image url for global moderators comes here"/>', $message['member']['link'], '</h4>
<ul class="smalltext" id="msg_', $message['id'], '_extra_info">';
else
echo'
<h4>', $message['member']['link'], '</h4>
<ul class="smalltext" id="msg_', $message['id'], '_extra_info">';
My Mods
Please don't PM/mail me for support,unless i invite you
Formerly known as Duncan85
Quote
"Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe."

A. Einstein

Offline bloodrune

  • Semi-Newbie
  • *
  • Posts: 61
Re: How To Make Crown Beside Our Name
« Reply #16 on: December 05, 2008, 08:36:08 AM »
it work if i want to add my name colour how? this my last answer :D

Offline Kermit

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 4,365
  • Gender: Male
Re: How To Make Crown Beside Our Name
« Reply #17 on: December 05, 2008, 08:41:26 AM »
to colorize membername you should use this mod here

http://custom.simplemachines.org/mods/index.php?mod=111
My Mods
Please don't PM/mail me for support,unless i invite you
Formerly known as Duncan85
Quote
"Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe."

A. Einstein

Offline bloodrune

  • Semi-Newbie
  • *
  • Posts: 61
Re: How To Make Crown Beside Our Name
« Reply #18 on: December 05, 2008, 08:55:50 AM »
how do i check group id?

Offline Kermit

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 4,365
  • Gender: Male
Re: How To Make Crown Beside Our Name
« Reply #19 on: December 05, 2008, 09:02:37 AM »
how do i check group id?

you don't need group id by this mod,you can adjust it via AdminCP..
My Mods
Please don't PM/mail me for support,unless i invite you
Formerly known as Duncan85
Quote
"Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe."

A. Einstein