Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 10-06-2004, 06:54 PM
Kurtie Kurtie is offline
 
Join Date: Aug 2004
Posts: 17
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default problems with placing moderators` icon via Username HTML Markup

i tried those two lines:
<p><img border="0" src="[the url]"></p>
<span><img border="0" src="[the url]"></span>

the first line puts the icon one line below the username
and the other messes it up too.

what can be the problem and how can i fix it? thanks in advance.

btw, can you tell me to which template the userinfo[musername] variable is connected?

thanks again
Reply With Quote
  #2  
Old 10-06-2004, 10:52 PM
peterska2 peterska2 is offline
 
Join Date: Oct 2003
Location: Manchester, UK
Posts: 6,504
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

So you want to have it so that it is something like

peterska2


or

peterska2

The first is done by setting up a user rank for moderators (you can do this for any usergroup)

The second would be by going into your POSTBIT (thats where [musername] is found and adding AFTER this ON THE SAME LINE

Code:
<if usergroupid="x"><img src="URL TO YOU IMAGE /></if>
Reply With Quote
  #3  
Old 10-07-2004, 01:35 PM
Kurtie Kurtie is offline
 
Join Date: Aug 2004
Posts: 17
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i tried that:

<a class="bigusername" href="member.php?$session[sessionurl]u=$post[userid]">$post[musername]<if usergroupid="Administrators"><img src="URL"></if></a>

and it brings me an error, what might be the problem?
Reply With Quote
  #4  
Old 10-07-2004, 03:29 PM
peterska2 peterska2 is offline
 
Join Date: Oct 2003
Location: Manchester, UK
Posts: 6,504
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Use the number for the usergroup not the name so Admins will be usergroupid="6" etc
Reply With Quote
  #5  
Old 10-08-2004, 05:32 PM
Kurtie Kurtie is offline
 
Join Date: Aug 2004
Posts: 17
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

nope, i guess i`m positioning the `if` in the wrong place. can you give me the exact line in th e postbit template? thanks.

the error i get is:
The following error occurred when attempting to evaluate this template:

Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' in /home/virtual/site139/fst/home/testforum/public_html/includes/adminfunctions_template.php(3055) : eval()'d code on line 209

This is likely caused by a malformed conditional statement. It is highly recommended that you fix this error before continuing, but you may continue as-is if you wish.
Reply With Quote
  #6  
Old 10-08-2004, 06:16 PM
miz miz is offline
 
Join Date: Mar 2003
Posts: 416
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Kurtie
i tried that:

<a class="bigusername" href="member.php?$session[sessionurl]u=$post[userid]">$post[musername]<if usergroupid="Administrators"><img src="URL"></if></a>

and it brings me an error, what might be the problem?
try change it to :
<if usergroupid="6">
<a class="bigusername" href="member.php?$session[sessionurl]u=$post[userid]">$post[musername]<img src="URL"></a>

</if>

supuse to work

or in functions_showthread.php do

PHP Code:
if ($bbuserinfo['usergroupid'] == "6" 
// means user is administrator

$adminurl "images/admin.gif"// replace with real url

}

then on templte do


<
class="bigusername" href="member.php?$session[sessionurl]u=$post[userid]">$post[musername]
<if 
condition="$adminurl"><img src="$adminurl"></if></a
there are few more ways to do it
if the ways i said not working just tell...
Reply With Quote
  #7  
Old 10-08-2004, 06:35 PM
Kurtie Kurtie is offline
 
Join Date: Aug 2004
Posts: 17
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

sorry man, it brings me the same mistake. are there any alternate ways you might suggest?

btw, i have another question, are those template changes include the thread_starter inside the forum?
Reply With Quote
  #8  
Old 10-08-2004, 09:43 PM
miz miz is offline
 
Join Date: Mar 2003
Posts: 416
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ok my mistake

if ($userinfo['usergroupid'] != "6")
{ //means he's admin
$adminurl = false;
} else {
$adminurl = true;
}

on templte

<a class="bigusername" href="member.php?$session[sessionurl]u=$post[userid]">$post[musername]<if condition="$adminurl"><img src="URL"></if></a>

and if this 1 not working then

$nfo = $DB_site->query_first("select * from ". TABLE PREFIX ."user where userid='$post[userid]'");

and then

if ($nfo['usergroupid'] != "6")
{ //means he's admin
$adminurl = false;
} else {
$adminurl = true;
}

and then the template thing
Reply With Quote
Reply


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 10:11 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04693 seconds
  • Memory Usage 2,234KB
  • 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
  • (1)bbcode_code
  • (1)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (8)post_thanks_box
  • (8)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (8)post_thanks_postbit_info
  • (8)postbit
  • (8)postbit_onlinestatus
  • (8)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