vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Programming Articles (https://vborg.vbsupport.ru/forumdisplay.php?f=188)
-   -   Template Editing - All the variables and coding bits you need to know! (https://vborg.vbsupport.ru/showthread.php?t=113489)

Majed37 08-28-2006 11:56 AM

Quote:

Originally Posted by toolblast
Variables you want to be able to use in any template need to be defined globally on vbulletin...

Some urls that may help:
link 1, link 2, link 3

thank you. I will read these pages :) .

The-Ensemble 08-30-2006 12:01 PM

Thanks!
I thought nothing in here would be useful to me but those IF conditions really helped me out.
Cheers! ^_^

toolblast 08-03-2007 01:13 PM

Glad this thread has been helpful to people :D

punchbowl 08-18-2007 02:43 PM

best thread ever!

wisebread 12-24-2007 02:41 AM

Hi all,

What are the variables available in the $foruminfo[] array? I'm looking to linkify the forum description box, so the name of the forum links to the forum.

TIA!

hrk 12-26-2007 03:21 PM

thanks for sharing.
really help me a total newbie get started.
this should incl in the manuals.

i have one doubts .
normally we add standard css inline.

how do i direct the template to external css? and which file in edit in this?
can the standard import command be used ?

thanks

toolblast 12-27-2007 11:17 PM

Hi everyone!

Thanks for reading this thread and I hope you found it helpful. I'm currently putting together an ebook to help people get started with customizing vbulletin with their own pages and products/plugins. Step by step instructions (with screenshots) on how to create your very first custom product (introduction to custom php files, plugins, hooks, style templates, integrating user information, etc), as well as tips, tricks, and code snippets that you can use to get some commonly asked things done... and all in simple to understand english ;)

If interested, shoot me a private message.

Customizing vBulletin can be fun! Let us show you how :)

Update:In the meantime, be sure to check out vb.org's articles section, and the vBulletin Manual.

petteyg359 01-28-2008 03:05 PM

You have $vbulletin->userinfo['username']. Where is $bbuserinfo['field6'] via the function call?

Supramania 01-30-2008 06:39 PM

This is good stuff. I do have a question that isn't covered.

Say I have a multiple choice custom user profile field that is stored bitwise in the database.

Example:

Choice 1 = 1
Choice 2 = 2
Choice 3 = 4
Choice 4 = 8
Choice 5 = 16

So if a user selected choices 4 and 5, the stored value would be 24.

How could I evaluate this easily with an If/Then statement so that I could display the appropriate icons under the username in the postbit based upon each choice.

For example, the for the user above it would need to display two icons that correspond to choices 4 and 5.

If an user had selected ALL fields, the value would be 31, and it would need to display 5 icons.

I've done plenty of the <if condition="is_member_of($post, X)"> logic when it comes to usergroup membership, but this bitwise storage is confusing.

Can anyone show me a quick sample that would help clear this up for me?

Edit: I figured it out. Here's the answer for anyone looking for it:

Code:

<if condition="$post[field11] & 2">
<div><img src="images/badge2.gif"></div>
</if>
<if condition="$post[field11] & 4">
<div><img src="images/badge3.gif"></div>
</if>


zmmmzz 03-02-2008 11:45 PM

this thread helps so much
what about that ebook?


All times are GMT. The time now is 01:22 PM.

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.01099 seconds
  • Memory Usage 1,738KB
  • 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
  • (1)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete