![]() |
Using if Condition in Forum Option
1 Attachment(s)
I am trying to make a product that will give me a different header based on the forum I am in, that's no problem and complete. My issue lays with using template conditionals inside of said option.
I am currently using a forum option to insert my custom template additions: Attachment 158950 In global complete I am using: PHP Code:
I would like to be able to get the conditionals to work so I can only show things to members or usergroups within the header. Is there a way to get the variable to not ignore the conditions? they are included in the DB entry, just being ignored when rendered to the page. |
Quote:
Glad to see you still here. You should upgrade to vB5, I made the jump and I don't regret it anymore even though my version vB 3.8.11 still runs on a domain name. The customization possibilities are also numerous but they are different. The big advantage of Vb5 is a better usability of posting topics and the different layouts that allow you to add even more content to a forum if you know what content to add. Conditionals can of course also be used on this content. I know you have completed your work and want to do this to deliver a product. So I'm not a coder and I don't know your way of proceeding but the goal of changing the header per forum was achieved on my version vB 3.8.11 simply by copying and pasting the content of the header into the Forumdisplay template and using common conditionals on forums and user groups. vB 3.8.11 is a fast forum, you can do it like this. You can even go further by dynamically changing the header per forum on each page load i.e. three different headers per forum for example by using this PHP function: Code:
$safe_functions[] = 'rand'; Code:
<if condition="rand(0, 1)"> I do the same thing on vB5 but I proceed differently. |
1 Attachment(s)
Glad someone familiar is still around lol, but I'm going to hold my ground on vb3 =P
I do agree the simplest way would be to directly edit the template and create conditions per forumid, but once / if I can achieve what I am trying to do then it would be even easier, and ALOT cleaner way of doing so. Basically the new header (per forum) would be stored in the variable $foruminfo[drc_head], and you would never need to touch the templates. I do have it working properly already in that sense, where in each forums settings (forum manager) all I need to do is put my custom HTML for that forum, the only issue is I can't use conditionals, say... hide this link from this usergroup within that code. I'm not sure how likely I would actually need to use a conditional within a forums header, but I'd like to have the ability to if the need arises, as my headers (per forum) will be pretty complex. Main Header: Attachment 158951 Sample Forum Header: Attachment 158952 |
1 Attachment(s)
Quote:
https://vborg.vbsupport.ru/showthread.php?t=322378 |
Quote:
never mind i just seen you on vb5 |
I think I gave you a pre release of v2, I'm just getting back into things but will be updating everything. including vb3 to php 8 =)
|
1 Attachment(s)
Quote:
Anyway, thank you Puertoblack2003 but as you can see on the following screenshot, I have an alternative since yesterday ... so I'm less interested in this product under vB5. For vB 3.8.X under PHP 8, I'm not interested if there is a tracking, if the version is not 100% responsive and if the addons do not work under PHP 8. My version 3.8.11 is currently 100% responsive... So I don't expect to run vB 3.8.11 and vB5 Connect at the same time within one or two years maximum. vB5 will be much more interesting than vB 3.8x in the next months. This is already the case for me right now... |
Quote:
|
Quote:
I saw your Xenforo forum, it is great but vB5 does it and goes even further as I mentioned above. Everything is possible under vB5 as on vB 3.8.x but you have to get out of the canned vB5 version otherwise it's not visually interesting. |
this thread got wayy de railed, but since I already figured out a solution (and released the product) ill roll with it lol.
lange, not sure what addon you are using, but v2 is actually a little cooler ;) https://i.imgur.com/eHL7U9p.png as for using vb3.8.11 on php 7.4, you should upgrade to my 3.8.14, which fixes a lot of 3.8.11 obsolete coding and adds newer version of some features. I am working on loads of things, but one thing I do plan on is making the default theme fully responsive. not having a separate "mobile" theme like vb4 (it's kind of pointless) responsive is the only way to go. as for addons, i cant update EVERY addon to be compatible with php 8. That is just Ludacris, but developers will have the ability to update if they so wish. And I will update some. I dont understand when you say "im not interested if there is a tracking" if you're referring to the way my products install and report the install to https://dirtrif.com/installs.php, my vBulletin 3.8.14 installs clean just with upgraded files and features. vb3 is the only vBulletin worth a damn to me personally, and if I were going to switch I would use xF before using vb4 or vb5. Which I have a license for as well, and have tried, and although pretty cool with the features, vb3 is still where I want to be =) There is no feature vb4, vb5 or even xF has, that can not be done with vb3. If you look at my site (albeit still working on things) I more features than that of any of the aforementioned. My navbar is a HUGE product, that I am debating with myself to release or not, but the options for it are CRAZY. featuring things like link management for my top links, social links, the user menu links, and the navbar links, as well as instant notifications that offer instant replies within the drop down, and so much more. With all the work I have put into vb3, its not something I will migrate from anytime soon. |
Quote:
Quote:
Quote:
Quote:
Quote:
|
you know thats me xD =P TheLastBatman, I dont think I ever addressed the email issue, ill look into it though.
Ill play around with v5 and php 8 in the next few days Im also fully responsive, and further responsive than any sultanthemes theme, I have over 143 (thats just whats in the style manager) custom templates all converted to bootstrap. the shitty thing is, any product I use, I have to completely re code with how custom my style is. Thats why I tend to just make my own mods which never get released. |
To be clear, I'm not questioning your coding skills. You are a very good coder even an excellent coder. Your work proves it.
Just that I no longer agree with you on the vB3 vs vB5 since I pushed the customization possibilities of vB5. I then realized that vB5 was a more complete, capable, modern forum than vB3. |
Quote:
My main work is actually construction, I just do this stuff when Im able cause in a sense it's still, building lol |
A demo of what? There is a demo you can try. It is available somewhere on the vBulletin.com site.
My forum is private hidden behind placeholders so there's not much to see. I prefer not to give the link for all kinds of reasons but I don't hesitate to give screenshots if necessary. I also left a topic to share the postbits but it seems people are more interested in taking than sharing. https://vborg.vbsupport.ru/showthread.php?t=328873 |
becuase all the developers have moved to xenforo lol, only people left here are the leachers and pretty much yilmaz and I for the developers. It's sad how much vB has crumbled (from a developer standpoint) but i gave xF a chance and I just cant leave my vB.
if youre wanting a more active vB community, https://vbsupport.org is more active. |
I know the reason for the move. It's sad. You forgot Glenn and he is a very good developer. https://vbmods.rocks/ Sorry, I don't understand the Russian language.
I tested the trial version of XF 10 months ago just to see if I could achieve two things what I'm doing with vBulletin. I even asked a question in their pre-sales forum and no, Xenforo is not able to do what vBulletin does by default. You have to use an addon and this addon is not complete even useless for me. . . |
Quote:
Sorry, it's in my first language. https://forum.vbulletin.com/forum/vb...23#post4467623 |
All times are GMT. The time now is 02:20 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|