vBulletin Mods

The Official vBulletin Modifications Site
https://www.vbulletin.org/forum/showthread.php?t=231525

smooth-c 02 Feb 2011 20:10

Hello there :) Thank you Digital Jedi!

I'm currently running a board under vB3.8 and will be upgrading shortly to the vB4.1.x series. Right now, we use a fluid banner.

We would like to approach our upgrade with a new design but still retain certain features that our members love, one of which - the fluid banner.

I've created a radio button in the user profile fields, so members can switch between which header style they'd like.

This is the code I've edited/changed in the header template.


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

In theory, that should work? But I think the variable is wrong for the condition. Unless the field is specifically set to 'Yes' (default being 'No'..) then it should show the standard logo, correct?

Any help appreciated! :)

Greg

BirdOPrey5 02 Feb 2011 20:51

$post won't work in the header, $post is only defined inside a post... Also it the value of the poster not the value of the person viewing.

What you want is $bbuserinfo[field8], that holds the value of field8 for the user currently logged in.

As for the logic it would show

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Only if the user specifically set this option to Yes. If it's set to "No" OR they never set the option it will show:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

instead.

This is good logic if you want users to have to "opt in" to this. If you wan't them to "opt-out" though (that is, display the first line unless they specifically said "No" then you'd be better off using the condition:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

There's also the underlying issue that the header HTML is completely different than VB3 and I doubt any code you have for VB3 could work for VB4. VB4 has a stylevar for the banner background.

Solution!!
by wpeloquin
02 Feb 2011 21:35

I would like to thank Valter for his contribution to solving my problem, even though he does not realize he helped! (I will PM him a thank you, as i found my working solution while browsing through a plugin written by him), and to you BirdOfPrey for your help as well.

My Solution:

First, i added another table with the data for the <select>. This will actually serve 2 purposes, 1st being solving my issue, and the 2nd allows me to create another admin page that will allow me to update the data in that table.


Inside the plugin code i added

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Then in my template, i added the following code:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


smooth-c 03 Feb 2011 01:01

Thank you so much, BirdOPrey5 - That worked perfect :)

ahmednadir 15 Feb 2011 15:55

Nice post, very useful thank you very much
I just updated again to vb 4 and things got a little complicated, thanks for this great post

wonderfulwat 05 Mar 2011 03:24

How would you clean this up into an array?


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


BirdOPrey5 05 Mar 2011 12:47

try...


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

and so on with your script names....

wonderfulwat 05 Mar 2011 19:25

Thanks! :)

Essam 14 Mar 2011 16:29

i have been trying to use $threadinfo[forumid] and $forum[forumid] in threadbit in a condition but it doesnt work .. is there any other vars i can use ?

BirdOPrey5 14 Mar 2011 16:58

In threadbit it looks like the variable is just:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


jschvili 16 Mar 2011 14:56

Hi,
I want to show an add in a specific forum, BUT I don't want it to show in the "SHOWTHREAD" under that specific forum. This is what I got:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

What shall I change/add to to make this happend? Thanks!

BirdOPrey5 16 Mar 2011 15:16

If you just want it to show in POSTS within a specific forum try:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


jschvili 16 Mar 2011 15:32

Thank!
But with that code it doesn't show at all.

I want it to show on this page:
http://support.elot.se/forum/hide-lite/

But not on this one:
http://support.elot.se/forum/hide-li...ng-av-led.html

What do you think?

BirdOPrey5 16 Mar 2011 15:42

My bad, you said DON'T show it in SHOWTHREAD, I mis-read the question.

Try one of these...


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

or

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


jschvili 16 Mar 2011 15:58

I'm very greatful for your kind help. But these didn't work either. It doesn't show.

Any other suggestions? ;-)


All times are GMT. The time now is 14:50.

Powered by vBulletin® Version 3.8.14
Copyright © 2021, MH Sub I, LLC dba vBulletin. All Rights Reserved. vBulletin® is a registered trademark of MH Sub I, LLC
Copyright ©2001 - , vbulletin.org. All rights reserved.