HIGHLIGHTED ADMIN & MEMBERS

Post your suggestions for the script here.

HIGHLIGHTED ADMIN & MEMBERS

Postby sy_ » Mon Aug 07, 2006 11:33 am

HEY ....... I DONT KNOW IF THIS IS ALREADY POSSIBLE WITH THIS SCRIPT ... but i think it would be cool if the admins or registered members name in comments would be highlighted to set them apart from the others who are not either an admin or member like on mad4milk >>>>http://mad4milk.net/entry/italy-won-the-world-cup
sy_
 
Posts: 15
Joined: Thu Aug 03, 2006 9:46 am

Postby FI-DD » Mon Aug 07, 2006 11:53 am

You can use $tpl['comment']['if-user'] in your template.



Make a if condition similar to the $tpl['comment']['if-right-have'] condition in the default template.
User avatar
FI-DD
Admin
 
Posts: 2971
Joined: Thu Sep 22, 2005 11:27 am
Location: Germany

Postby sy_ » Mon Aug 07, 2006 12:41 pm

ok i'll try to see if i can work that out ... thanks !
sy_
 
Posts: 15
Joined: Thu Aug 03, 2006 9:46 am

Postby sy_ » Tue Aug 08, 2006 6:28 am

ok .... i understand what you suggested.... but i dont understand how you would set it up to get the color of the admins name on the comment to have a different color ..do you use only those 2 functions ???... sorry for my mis-understanding but do u think you could give an example ?
sy_
 
Posts: 15
Joined: Thu Aug 03, 2006 9:46 am

Postby FI-DD » Tue Aug 08, 2006 8:49 am

Code: Select all
<? if ($tpl['comment']['if-user']){ ?>

<font color="red"><?=$tpl['comment']['author']; ?></font>

<? } else { ?>

<?=$tpl['comment']['author']; ?>

<? } ?>
User avatar
FI-DD
Admin
 
Posts: 2971
Joined: Thu Sep 22, 2005 11:27 am
Location: Germany

Postby sy_ » Tue Aug 08, 2006 9:05 am

oh well damm ... i thought of doin it that way but wasnt sure ... thanks again as usual fi-dd



:D :D :D :D
sy_
 
Posts: 15
Joined: Thu Aug 03, 2006 9:46 am

Postby sy_ » Tue Aug 08, 2006 9:46 am

the code you gave me worked great !! but i have one last question and i'll stop buggin u ..... if i had two admins and wanted both to have a separate color what would i add ??



FI-DD wrote:
Code: Select all
<? if ($tpl['comment']['if-user']){ ?>

<font color="red"><?=$tpl['comment']['author']; ?></font>

<? } else { ?>

<?=$tpl['comment']['author']; ?>

<? } ?>






thanks again for all your help !
sy_
 
Posts: 15
Joined: Thu Aug 03, 2006 9:46 am

Postby FI-DD » Tue Aug 08, 2006 7:20 pm

oh well damm ... i thought of doin it that way but wasnt sure


Why not trying it? You can't break anything. The worst case is that it's not working. :)





sy_ wrote:if i had two admins and wanted both to have a separate color what would i add ??


Code: Select all
if($tpl['comment']['author'] == "admin1"){

  echo '<font style="color:red">'.$tpl['comment']['author'].'</font>';

}

elseif($tpl['comment']['author'] == "admin2"){

  echo '<font style="color:blue">'.$tpl['comment']['author'].'</font>';

}

else {

  echo $tpl['comment']['author'];

}
User avatar
FI-DD
Admin
 
Posts: 2971
Joined: Thu Sep 22, 2005 11:27 am
Location: Germany

Postby sy_ » Wed Aug 09, 2006 2:07 am

well i wanted expert advice from a fellow german ...lol.... i already messed up strawberry once trying to change md5 into the sha1 & sha256 hash ... lol plus i was a little sleepy but once again as always thanks for ur help !
sy_
 
Posts: 15
Joined: Thu Aug 03, 2006 9:46 am


Return to Strawberry Suggestions



Who is online

Users browsing this forum: No registered users and 0 guests