vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   some code (https://vborg.vbsupport.ru/showthread.php?t=208005)

externalaw.com 03-11-2009 10:32 AM

some code
 
One more question, well I guess these are two questions!

I want the below to do two things

1) if someone has a car in his garage it shows the below
2) if someone doesnt have a car it shows a link ------> Add your car now

Code:

<if condition="$show['last_seen_online']"><div>$vbphrase[last_seen_online]: $post[lastseen_date] $post[lastseen_time]</div></if>
<br><strong><font color="#FF0000">My Cars:</font></strong><br>
      $template_hook[postbit_userinfo_right_after_posts] <if condition="$post['usertitle']"></if><if condition="$post['rank']">
      <div class="smallfont"></div>
      </if>


Lynne 03-11-2009 02:12 PM

What field are you cars stored in? You would use $post[fieldx] for the car. Something like:

HTML Code:

<if condition="$post[fieldx]">
$post[fieldx]
<else />
<a href="link.php>Add Your Car Now</a>
</if>


externalaw.com 03-11-2009 06:39 PM

I use a garage system from C&D
I do not think it is a field,

Thanks for you help by the way, your always here!

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

I have this now,

Code:

  <if condition="$template_hook[postbit_userinfo_right_after_posts]">
<br><strong><font color="#FF0000">My Cars:</font></strong><br>
      $template_hook[postbit_userinfo_right_after_posts]
<else />
<a href="link.php>Add Your Car Now</a>
    </if>

Now it only shows a car if they have one in the garage, but it doesnt show the link to add a car if they dont...

Lynne 03-11-2009 07:29 PM

You'll have to ask for help in the modification thread since they know what variables to use in the condition.

externalaw.com 03-11-2009 07:35 PM

ahh cool, it is a commercial product.. so I will ask on their site!
Thanks for all!

I have one other questions..

Some forums have the user title as a link to the donate system,
It says something like "want a custom title" and if you click it, donate get moved to a new usergroup and can edit your title.

How do you make this link in the title?

Lynne 03-11-2009 07:41 PM

You can make the usertitle linked.

In Usergroup Manager > Usergroup > User Title, just enter:
HTML Code:

<a href="link-to-wherever.php">want a custom title?</a>
Just link to the subscription area. You may have to update counters after you change it.

externalaw.com 03-11-2009 07:44 PM

Thanks a lot!
Awesome!


All times are GMT. The time now is 11:52 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.01001 seconds
  • Memory Usage 1,724KB
  • 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
  • (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