View Full Version : some code
externalaw.com
03-11-2009, 10:32 AM
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
<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:
<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 1236800801 at 1236800801 ---------------
I have this now,
<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:
<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!
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.