Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
  #1  
Old 08-13-2011, 06:17 PM
s.sami s.sami is offline
 
Join Date: Mar 2011
Posts: 64
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Admin Name Color (forumhome)

Hi how can i do red admin name color on the forumhome

i tryed this but this is not working
Code:
 <if condition="$lastpostinfo[postusergroupid] == 6">
my forumhome_lastpostby template

Code:
<if condition="$show['lastpostinfo']">
<div class="smallfont" align="$stylevar[left]">
	<div>
		<span style="white-space:nowrap">
		<if condition="$show['icon']"><img class="inlineimg" src="$icon[iconpath]" alt="$icon[title]" border="0" /></if>
		<if condition="$lastpostinfo['prefix']">
			$lastpostinfo[prefix]
			</span><if condition="is_browser('safari')"><!--bug#24775-->&nbsp;</if>
			<span style="white-space:nowrap">
		</if>
		<a href="showthread.php?$session[sessionurl]goto=newpost&amp;t=$lastpostinfo[lastthreadid]" class="hak" style="white-space:nowrap" title="<phrase 1="$lastpostinfo[lastthread]">$vbphrase[go_first_unread_in_thread_x]</phrase>"><strong>$lastpostinfo[trimthread]</strong></a></span>
	</div>

 <if condition="$lastpostinfo[postusergroupid] == 6">
<div style="white-space:nowrap<if condition="is_browser('ie', 6)">; float:$stylevar[left]</if>">
		yazan<a href="member.php?$session[sessionurl]find=lastposter&f=$lastpostinfo[forumid]"> <font color="red">$lastpostinfo[lastposter]</font></a>
	</div>

<else />
<div style="white-space:nowrap<if condition="is_browser('ie', 6)">; float:$stylevar[left]</if>">
		yazan<a href="member.php?$session[sessionurl]find=lastposter&f=$lastpostinfo[forumid]"> $lastpostinfo[lastposter]</a>
	</div></if>

	<div align="$stylevar[right]" style="white-space:nowrap">
		$lastpostinfo[lastpostdate] <if condition="!$show['detailedtime']"><span class="time">$lastpostinfo[lastposttime]</span></if>
		<a href="showthread.php?$session[sessionurl]p=$lastpostinfo[lastpostid]#post$lastpostinfo[lastpostid]"><img class="inlineimg" src="$stylevar[imgdir_button]/lastpost.gif" alt="$vbphrase[go_to_last_post]" border="0" /></a>
	</div>
</div>
<else />
<div class="smallfont" align="$stylevar[right]">
	$lastpostinfo[lastpostdate] <if condition="!$show['detailedtime']"><span class="time">$apostinfo[lastposttime]</span></if>
	<a href="showthread.php?$session[sessionurl]p=$lastpostinfo[lastpostid]"><img class="inlineimg" src="$stylevar[imgdir_button]/lastpost.gif" alt="$vbphrase[go_to_last_post]" border="0" /></a>
</div>
</if>
Reply With Quote
  #2  
Old 08-14-2011, 01:30 PM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The usergroup is not stored in $lastpostinfo...

This is all the info in $lastpostinfo on forumhome:

Code:
[forumid] => 9
    [lastpost] => 1293022161
    [lastposter] => BirdOPrey5
    [lastthread] => losers thread no bump
    [lastthreadid] => 56
    [lasticonid] => 0
    [threadcount] => 2
    [replycount] => 3
    [lastpostid] => 201
    [lastprefixid] => 
    [forumread] => 
    [styleid] => 0
    [title] => Test Forum Y
    [title_clean] => Test Forum Y
    [description] => This is a test forum with a description.
    [description_clean] => This is a test forum with a description.
    [options] => 89799
    [showprivate] => 0
    [displayorder] => 23
    [daysprune] => -1
    [icc_enable] => 0
    [icc_tags] => 
    [icc_dayrate] => 1
    [newpostemail] => 
    [newthreademail] => 
    [parentid] => 8
    [parentlist] => 9,8,1,-1
    [password] => 
    [link] => 
    [childlist] => 9,-1
    [defaultsortfield] => lastpost
    [defaultsortorder] => desc
    [imageprefix] => 
    [excludable] => 1
    [podcast] => 0
    [depth] => 2
    [permissions] => Array
To do what you'd ask you'd need to write code to fetch the usergroup based on the username, which is available... but it would mean an extra query for each forum in the list on forumhome- this would be a lot of overhead for a minor cosmetic change.
Reply With Quote
  #3  
Old 08-14-2011, 07:25 PM
s.sami s.sami is offline
 
Join Date: Mar 2011
Posts: 64
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks fixed
Reply With Quote
  #4  
Old 08-28-2011, 07:52 PM
elzarie elzarie is offline
 
Join Date: Sep 2009
Posts: 11
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

can you please post how you fixed it ?
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:18 PM.


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.04959 seconds
  • Memory Usage 2,185KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (3)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (4)post_thanks_box
  • (4)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (4)post_thanks_postbit_info
  • (4)postbit
  • (4)postbit_onlinestatus
  • (4)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete