vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   How to call a user through a template (https://vborg.vbsupport.ru/showthread.php?t=185983)

Platinumgamer 07-22-2008 02:47 AM

How to call a user through a template
 
Hey,

I've got a question that should be relatively simple (I used to know this myself, but it's been quite some time since I've done any real modding) -- how do you call an individual user through a template?

For example, I'm trying to find a way to have a certain posticon display for one user, by default, that has somewhat become their trademark (in this instance, let's say it's the sad posticon). So, through conditionals, I should be able to have something along the lines of the following inside the show[messagicon] tag:

HTML Code:

<if condition="$*HEREISWHEREWECALLTHEUSER*">PATH_TO_IMAGE <else /> $post[iconpath]</if>"
Shouldn't I?

Well, the question is more related to, how do I call that specific user, rather than the validity of the tag. I know $bbuserinfo will display the names, but I'm looking to call a user, rather than name them. Is there a way to do that?

Thanks!

RLShare 07-22-2008 02:53 AM

I don't understand your question, what do you mean call a user?

Platinumgamer 07-22-2008 02:59 AM

I'm phrasing it wrong, I know.

I mean, I'm trying to set up a condtional wherein a specific user has a posticon display for them in the postbit in place of any other posticon. As in, a custom posticon that only one user will have. I still don't think I'm explaining it right, but it's something to that effect.

Let me explain it this way -- I've got a user that posts using the same posticon over and over, every time. I'm trying to set it up so that that posticon displays beside all of their posts without it being selected. So, I need the template to single out that user's id, and no other groups or users.

blind-eddie 07-22-2008 03:05 AM

Look in the following link's, to see if this point's you in the right directing.

https://vborg.vbsupport.ru/showthrea...within+postbit

https://vborg.vbsupport.ru/showthrea...within+postbit

https://vborg.vbsupport.ru/showthrea...within+postbit

Platinumgamer 07-22-2008 03:09 AM

That first one somewhat works, as the user is currently the only member of a group, so that should work for the time being; however, as more users will likely wind up within the group he is currently in, can we single out a userid in a template, or is that not possible?

(I seem to remember doing something very similar to this a long time ago, so I would assume it's possible, I just can't remember how)

Just the same, thanks for the links!

RLShare 07-22-2008 03:21 AM

If its in the postbit you can use



HTML Code:

<if condition=''$post[userid]==1">
posticon code
</if>

Replace 1 with the users userid.

Platinumgamer 07-22-2008 03:23 AM

Excellent, thanks to both of you for the help!


All times are GMT. The time now is 03:40 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.00999 seconds
  • Memory Usage 1,725KB
  • 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
  • (2)bbcode_html_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)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