News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

How To Make Crown Beside Our Name

Started by bloodrune, December 05, 2008, 07:25:39 AM

Previous topic - Next topic

bloodrune


Kermit

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

bloodrune

when i do that...all member have crown..i want to make admin only have crown

bloodrune

// 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

Kermit

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

N3RVE

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

Kermit

Quote from: [n3rve] 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]



[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

bloodrune

im folowing this tut       // 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

Kermit

#8
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')
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

N3RVE

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.


Quote from: bloodrune on December 05, 2008, 08:10:33 AM
im folowing this tut       // 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

bloodrune


Kermit

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

bloodrune

i make like this
      // 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

Kermit

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


Kermit


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

bloodrune

it work if i want to add my name colour how? this my last answer :D

Kermit

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

bloodrune


Kermit

Quote from: bloodrune on December 05, 2008, 08:55:50 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

Advertisement: