vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Help with variables (https://vborg.vbsupport.ru/showthread.php?t=181348)

kether1 06-03-2008 03:35 AM

Help with variables
 
I need some help with a bit of code. I need to know the variables to do the following.

I have member A and B on the forum.

Member A is not currently logged into the forum, but is a member who has posted in the past. ( currently viewing forum as a guest)

Member B is logged into the forum. (member)

PART 1: Member B looks at Member A's Postbit data and sees a link called X-LINK.

PART 2: Member B looks as HIS own postbit data and sees a link called Y-LINK.

PART 3: Member A (who is a guest and not logged into the forum right now but is viewing the same thread as Member B) doesn't see either links because he is a guest/visitor.


Summary: So - all logged in members see in each other's postbit: X-Link
But in his or her own postbit, he or she sees only Y-Link. Guest see no links in the postbit.

What are the variables I need to call do this?


Part 3 variable I know. It is

Code:

<if condition="$show['member']">
What are the variables needed in Part 1 and Part 2? Thanks for your help!

Regards,
Kether

Lynne 06-03-2008 02:30 PM

In the templates, I think you can use the following....
The person who's post it is: $post[userid]
The person who is viewing the posts: $bbuserinfo[userid]

So, if in a postbit you only want to show a link if the post is made by the user viewing the post:
Code:

<if condition="$post[userid] == $bbuserinfo[userid]">
Y-Link
</if>


kether1 06-03-2008 06:06 PM

Thanks so much, Lynn!

Regards,
Kether


All times are GMT. The time now is 12:33 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.02639 seconds
  • Memory Usage 1,711KB
  • 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_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)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