![]() |
Quote:
But if you want to improve the performance better, here is a code I was already planning to add to the hack: edit functions.php, find: PHP Code:
PHP Code:
BTW. Did my suggestion work for your problem? |
once again thanks for the reply Logician. your sugestion worked for my first problem. didn't even know what that was until you pointed it out!
|
Does anyone know if this adds any additional DB queries?
|
Quote:
Please check 2 posts above.. |
I tried installing this twice! I keep getting this error:
Quote:
|
I tried installing this twice! I keep getting this error:
Quote:
|
Quote:
|
i got it now. sorry. GREAT HACK!!!
|
great hack :)
is there any way to make it show like 'You have relied to this thread' or You have not replied to this thread' somewhere on the showthread page to everybody except guests? |
meh... okay Logician buddy im looking to you for support now :p
anways i get the infamous 6==6 as stated in the past posts... only problem is i don't use debug mode for the templates (i checked) and i even made the appropriate change just incase and it didn't seem to solve my problem ;P either way excellent hack... its probably just something 'stupid' ;) anyways could it have anything to do with php version? thanks in advance man... superb work as always :) g-force2k2 |
@mikey8270:
Quote:
You have to make an SQL query beforehand, to get if visitor is a thread replier and save the result in a variable. Then you can use this variable in your conditional in this hack to achieve what you wanted.. @g-force2k2: Quote:
For example if you wrote it as: PHP Code:
PHP Code:
find: PHP Code:
PHP Code:
|
g-force2k2 - I had the same problem... template debug was turned off, but I still saw the 6==6 stuff, I even added the other hack that Logi mentioned, and that didn't work. Eventually I reviewed the installation with a gun to my head, and finally found the typo.
My mistake was that half the edits went to the wrong server, due to a peculiarity of ssh.com's Secure File Transfer that I used while editing. |
Quote:
|
Hi Logician :)
Have to say that this hack is amazing! Finally gives me the full flexibility in my templates that I've been looking for! Great work :) I was reading the previous posts in this thread (particularly the third page) and came up with a slightly different installation alternative which allows people to have the "Add template name in comments" option on, and makes the script slightly more optimised (using the info you said on the third page) and still makes installation only 2 steps :) (I was very happy when reading through the hack installation details first time round to find there were only 2 installation steps as I was trying to install about 2 hacks at the time :/ ) Back to what I was talking about: Instead of step one being: Code:
1- Edit admin/functions.php, find Change step one to: Code:
1- Edit admin/functions.php, find |
Quote:
In fact I should have already updated the instructions but I have little time and too many hacks to support nowadays.. Fortunately, hack thread is not yet too long, modification is not so crucial and the users of this hack are usually power-users (like yourself) who can achieve things without my help. :) Anyway, I will hopefully update them very soon.. |
Very true :) Well, again, excellent hack! JUst trying to think of the best things to use it for, but there's just so much i wanna change in my forum now!
This is only my second post ya know! :) |
Hi Logician,
i have try insert "Hi $bbuserinfo[username],", but display is that one and not "Hi Wildthinks" or so on... any Hints or impossible? |
Quote:
|
Quote:
Can you give more info? What was your exact conditional and in which template did you use it? |
great
***install*** |
Quote:
i wrote there ... Sorry... |
I run vb 2.2.6 right now, and was always afraid to update to 2.2.7 and then to 2.2.8 because many people said there templates messed up and hacks messed up... is it safe to upgrade a board that has alot of template changes and runs a whole RPG setup complete with itemshop and everything? Cause i really want to install this hack to add more atmosphere to an already interactive board.
|
Quote:
But the good news is this hack does not require 2.2.8 to work. I think I mentioned in the first message of the thread as well: It works with all vb versions. I coded it in 2.2.6 and my board is still 2.2.6 and it has no problems.. ;) So go ahead and install it.. |
whats the conditional for forumid?
Regards - miSt |
Quote:
|
ill do it forumdisplay .
so what will be the conditional code i can use in the template i.e. the one in " [ "'s - mISt |
Quote:
|
so if i put this in my forumdisplay template it would only apply to the forum whose id is 2
PHP Code:
Regards - miSt |
Quote:
|
hehe oops
Right one more question... can you have a global conditional as well as single conditionals Cuz im my forumdisplay template i want to have one template for a specific forum and i want the default template to apply for the rest... Im sick of doing this with extra styles and assigning a forum a specific style set as it gets too confusing I want to use something like this in my forumdisplay template: PHP Code:
Any ideas? Regards - miSt |
Quote:
PHP Code:
|
lol why didn't i think of the " != "
Thanks buddy - miSt |
hey Logician,
Can this hack be use to hide or show certain features such as avatars depending on current server load? If yes, what's the conditionals for that? Thanks! This is a really useful hack! |
Quote:
But if you can add another hack which will assign the server load (or anything you like) to a global variable (like in global.php) then yes it can. After you assign the variable value, you should edit postbit template and find the avatar variable (was it $post[avatar] ?) and replace it with this code: PHP Code:
EDIT: BTW. do not forget that this may not help much since the template modifications is just about the visual design. That is, your db would be still queried for the avatar in this example but just not displayed to the end user inside your template. So it wouldnt help decreasing server load much.. just the bandwidth maybe :) |
Logician - you genius!!
You would not believe the work this hack has saved me, and I installed it in under a minute! Thanks! |
Can i use a condition of the ip of the user? Is there a var that in it is the user-ip?
|
You could try using:
PHP Code:
|
NTDLR's method should work.. The hack is compatible with ALL variables in the memory so if I guess $HTTP_SERVER_VARS[REMOTE_ADDR] will work..
Also vb saves user's IP address in "$ipaddress" variable in global.php, so $ipaddress should work too. However I'm sure you are well aware that IP address is not a good mainstay for conditionals since many users have dynamic IP. |
Excellent Hack! Now even I can feel like a power user!!
JakeC |
I installed this hack and all of a sudden my forums started to show the default templates for every style I have. The template is still the same (in the user cp), but my forums just show the default one... I tried uploading the old functions.php but it did not fix the problem. Any ideas??
|
All times are GMT. The time now is 04:20 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:
|