vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Help with pseudocode -> vbulletin code (https://vborg.vbsupport.ru/showthread.php?t=220585)

DeanLag 08-10-2009 03:43 PM

Help with pseudocode -> vbulletin code
 
Hello.
I've tried googling and everything but can't really find what I need.
On threadbit, I want to change the background colour of my threads.

The pseudocode is:
<if condition = threadstarter = userid> then
<td class = etc>
<if condition="$thread['sticky'] == 1">
<td class="stickybg" id="td_threadtitle_$thread[realthreadid]" title="$thread[preview]">
<else />
<td class="alt1" id="td_threadtitle_$thread[realthreadid]" title="$thread[preview]">
</if>
</if>

I only need help for the first bit in that code.

I was also wondering if theres any code along those lines:
<if condition= first-5characters-of-thread-title = [#B50] and thread is in X forum and threadstarter = user id> then ...

where [# are constant; B50 is variable; ] constant. So [#variable-variable-variable]

Thanks to anyone who helps :)

RTMdotORG 08-10-2009 04:06 PM

<a href="https://vborg.vbsupport.ru/showthread.php?t=202916&highlight=threadstarter" target="_blank">https://vborg.vbsupport.ru/showt...=threadstarter</a>

try implementing that mod.

DeanLag 08-10-2009 04:18 PM

Thanks for that, but doesn't really suit my need as theres there will be more than 3 people who will be having custom threadbit backgrounds and the MOD you just posted can only be used by one usergroup, limited to only 1 type of CSS.

Thanks tho :)

Lynne 08-10-2009 04:18 PM

If you look at the thread table in the database, you'll see the fields postuserid and postusername. So you should be able to use those - $thread['postuserid'] == xx . forumid is also in that table, so $thread['forumid'] == yy .

DeanLag 08-10-2009 04:40 PM

Thanks so much Lynne :) <3

Still need help on 2nd part of my question D:


All times are GMT. The time now is 01:10 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.01244 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
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)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