![]() |
Quote:
|
This is a wonderful hack. Thanks Logician ;)
|
This is a outstanding hack. It basically lets you use PHP in your templates. I believe everyone should install this. Would make hacking ALOT easier.
|
While the example in the text file worked flawlessly (the code that goes in forumhome), whenever I attempt to put the code inside postbit, it simply prints out the code itself and completely ignores it. For example, if I put:
[[($bbuserinfo[usergroupid]==6)]] Hello [[/($bbuserinfo[usergroupid]==6)]] It doesn't print out "Hello," but it prints out that entire code. Is there a switch or something somewhere that I have to turn off or on? I'm not good with vB, so any help would be most appreciated. Thanks! |
Quote:
|
Quote:
|
We just downgraded back to version 2.2.6, and it works fine now. So sorry for posting that prematurely and thanks for the help!
|
What version were you running where you had problems? I am running 2.2.9 and it works fine.
|
It should work for all versions. Works for my 2.2.9.. :)
|
I don't know how I ever got along without this hack. I think I hack my templates more than I do my php files anymore. :)
|
Quote:
|
Awesome hack, Logician! Thank you so much! You should be on the vB dev team! :) I'm already making use of conditional templates by showing a special message to guests in my header, encouraging them to join. I'm also making use of it in my headinclude template, so that pop-up advertising code is only inserted for guests, but not members! :cool:
I know that you would rather not answer questions about creating conditionals, but I would just like confirmation on whether or not this is possible... Can a conditional be created so that it displays the code only once every 12 hours per visitor? |
Quote:
[[(date("H", time())>0 AND date("H", time())<13)]] condition [[/(date("H", time())>0 AND date("H", time())<13)]] This will apply when time is between 00.00 to 12.00 (server time). |
Quote:
|
does this hack work with vbhome lite?
here is my intended result. stop me at the point where I screwed up... in the index.php for vbhome lite I added forumid to this select statement... Code:
$articlebits = ''; so then in the aritcle bit of vbhome lite I put in [[($articlebits[thread.forumid='3'])]]foo[[(/$articlebits[thread.forumid='3'])]] I have tried numerous concatenations of articlebits articles article as such. I cant figure it out. mostly because Im newbie to all of this... any help? is this possible? |
If your looking for a similar hack like this but works in posts as a vB Code, try here:
https://vborg.vbsupport.ru/showthrea...threadid=48492 |
Logician,
The hack is awesome and works (in 2.2.9) so far ... but this is the effect I'm trying to achieve and was hoping you might offer some insight: I'd like to show certain data in a template on "X" date and show alternative data in a template if the current date is not "X". Any hints? |
Quote:
template content to display if date is 02.19.2003 (server time!) [[/(date("m.d.Y")=="02.19.2003")]] [[(date("m.d.Y")!="02.19.2003")]] template content to display if date is NOT 02.19.2003 (server time!) [[/(date("m.d.Y")!="02.19.2003")]] |
Something is up, it isn't working it is only printing out the lines and not restricting anything.
Running 2.2.9, somewhat modified, it was working earlier. |
try to reapply.. a recent hack might have overwrited the hack somehow..
|
It was because I was putting the first part after not before the code.
Works now. Thanks. |
can u use this in a postbit?
meaning some1 already posted something and use a condition in the post? l8er sonic |
I use it there for all sorts of things. ;)
|
Quote:
|
This is the best hack ive installed for a long time!!!
Thank you so much logician!! /me klicks install! |
I don't understand. So I have to use commands to get it to work? Well if I just want an entire catagory to change for all users, it would probably be easier to just create a new template and apply it to that catagory instead of using this hack right?
|
Have there been any thought on what will happen when we go to 3.0? Should the same basic hack work in 3.0? How do you all plan on making the switch, if you do? Thanks
Jake |
Quote:
Hmm by what i read on the forum, 3.0 already supports it. |
Quote:
Quote:
|
Quote:
The vBulletin 3.0 one supports multiple conditionals and there syntax is: Code:
<if condition="condition"> Code:
<table> |
Ok, thanks. Kind of a shame. This has to be the most clever hack to come out and I hate to see it gobbled up. I would be happy to see all my other hacks incorporated, but not this one. Thanks for your work getting this out to us logician!
JakeC |
I encountered some problems here..
Code:
Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/soccerwi/public_html/forum/admin/functions.php on line 860 Thanks in advance. |
*Bump*
Quote:
|
Quote:
|
Sinan, I have to ask. I've seen some of what they say is the conditionals for 3.0 and to tell you the truth, I don't like them as much as I do yours for this hack. Will you, by chance, be updating this for 3.0 for those of us that are used to your conditionals and the way of doing them like we are now?
|
Quote:
|
Words cannot express the absolute amazement that I have in this extremely awesome hack. Congratulations, Logician - this is absolutely brilliant.
Kaelon |
Logician is a magician. ;)
|
Ya, I did replaced instead of add.
Quote:
PHP Code:
thanks.. :) |
I say check step 1.. After you applied it, the line should look like this:
PHP Code:
PHP Code:
|
All times are GMT. The time now is 06:17 AM. |
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:
|