vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   I want to make admin's colour red in last subject and last message (https://vborg.vbsupport.ru/showthread.php?t=285361)

vBMerkezi 07-09-2012 05:32 PM

I want to make admin's colour red in last subject and last message
 
I just want to be red colour who write last message or answer message. If admin who write answer message to subject be red colour, I did that code
<if condition="in_array($gthread[usergroupid], array(6))"> <a href="member.php?$session[sessionurl]u=$gthread[userid]" target="_blank"><font color="#FF0000">$gthread[username]</font></a> <else /> <a href="member.php?$session[sessionurl]u=$gthread[userid]" target="_blank">$gthread[username]</a> </if>
I made that code like this if admin write subject.
<if condition="in_array($gthread[usergroupid], array(6))"> <a href="member.php?$session[sessionurl]u=$gthread[postuserid]" target="_blank"><font color="#FF0000">$gthread[postusername]</font></a> <else /> <a href="member.php?$session[sessionurl]u=$gthread[postuserid]" target="_blank">$gthread[postusername]</a> </if>
but i got error. this code didnt work if user write subject. for example user write subject and admin write message colour is red but users colour is red too. can you help me for this failure?

--------------- Added [DATE]1341873061[/DATE] at [TIME]1341873061[/TIME] ---------------

???

vBMerkezi 07-10-2012 06:02 PM

????

BirdOPrey5 07-11-2012 11:52 AM

First we can simplify the code a bit if it's just the administrator your looking for:

Code:

<if condition="$gthread[usergroupid] == 6">

*CODE FOR ADMINS

<else />

*CODE FOR EVERYONE ELSE

</if>

That assumes that $gthread contains a value called "usergroupid".

vBMerkezi 07-11-2012 05:57 PM

As you say I applied excatly these codes, but when an user opened a thread (topic) and administrator wrote a reply to thread, the colour of user is also turning to red??

Vaq 07-11-2012 06:35 PM

Where would you put that code

vBMerkezi 07-11-2012 06:48 PM

Eklenti Adı : [AJAX] DZMods Pro - Top X

Template : dzm_latest_post_bit

Vaq 07-11-2012 06:50 PM

Thank you

BirdOPrey5 07-11-2012 08:18 PM

Then maybe $gthread[usergroupid] isn't the usergroupid of the user who posted the thread. Maybe it doesn't even exist.


All times are GMT. The time now is 07:07 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02468 seconds
  • Memory Usage 1,718KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete