View Full Version : Show Thread Enhancements - User Collapsable Postbit Info
Cyricx
02-07-2007, 10:00 PM
This hack was originally released by Steve St.Lauren for vb3.0.x in this thread -
https://vborg.vbsupport.ru/showthread.php?t=68043
This is a port of that hack and ALL credit goes to Steve for this modification.
Basically, what this hack does is it takes all the extra user info like join date, location, age, posts etc and slaps them into a table that can be collapsed or expanded. If you collapse it, it'll store that setting in your cookies and all user infos will be collapsed fro then on til you expand it again :)
Your selection WILL carry over to private messages as well :)
Please click da instally thinga magigy ;)
O and you won't have to clear any cookies for this to work, or for it to remember your settings.
For the vbulletin 3.5 version of this mod Click here! (https://vborg.vbsupport.ru/showthread.php?t=94092)
Things To Do:
1. Edit /clientscript/vbulletin_global.js (1 modification)
2. Import new product xml
3. Edit postbit_legacy template
4. Edit postbit template
Updates:
Version 1.1.0
Fixed code to enable collapse in private messages
added functionality to be able to apply modification to both postbit and postbit_legacy templates
Version 1.0.0
Initial release
Cyricx
02-08-2007, 05:18 PM
First post reserved :)
AKapadia
02-08-2007, 06:18 PM
thanx.. it's nice hack :)
Surviver
02-08-2007, 06:21 PM
Thanks, installed :)
Snake
02-08-2007, 06:24 PM
Thanks!
Works well in IE but in Firefox version 2 it doesn't work !?
Cyricx
02-12-2007, 02:22 PM
Unfortunately I do not use firefox at all :(
I'll try to install firefox and see if I can figure out what's going on. The base javascript is unchanged from Steve's code in 3.0, I'll compare it to other functions in that file to see if I can determine where a change would need to be.
Neo_Angelo
02-12-2007, 04:35 PM
i might give this a try and maybe alter a few things on it ^_^ thanks for this hack.
Smoothie
02-12-2007, 11:33 PM
Works well in IE but in Firefox version 2 it doesn't work !?Works fine for me with FF 2.
yingzhou
02-13-2007, 09:14 AM
Can i use this mod to hide something else not only the Addition Info? I have installed the Ishop Mod on my forum then I want to hide all the Iventory in this postbit. Someone have alot of items to show.
fishhub
02-13-2007, 11:50 AM
Good job!:)
Cyricx
02-13-2007, 01:33 PM
Works well in IE but in Firefox version 2 it doesn't work !?
Works fine for me with FF 2.
TTG does firefox still use plugins? If so, please try to disable some of them and determine if one is causing the issue. As smoothie is not experiencing any errors.
Can i use this mod to hide something else not only the Addition Info? I have installed the Ishop Mod on my forum then I want to hide all the Iventory in this postbit. Someone have alot of items to show.
Yes and no.
Yes you can apply the code to collapse and expand in more then one location. (though you'll need to change some of the template code after userinfo_) the issue you'll have those is that collapsing the additional info, will also collapse the ishop inventory and expanding it will expand all.
Now you could add the inventory into the same table as the additional info. And then collapsing the additional info will hide the inventory as well. That would be the better of the two options. Though I donot use ishop so I'm unfamiliar with the layout.
yingzhou
02-14-2007, 11:41 PM
Yes and no.
Yes you can apply the code to collapse and expand in more then one location. (though you'll need to change some of the template code after userinfo_) the issue you'll have those is that collapsing the additional info, will also collapse the ishop inventory and expanding it will expand all.
Now you could add the inventory into the same table as the additional info. And then collapsing the additional info will hide the inventory as well. That would be the better of the two options. Though I donot use ishop so I'm unfamiliar with the layout.
I did it. Change some code then now I can collapse the Ishop inventory. Thank you very much.:up: :up: :up: :up:
You can see it in my forum. Link in my signature. :D
MissKalunji
02-22-2007, 10:12 PM
is there a way to save you the queries on the pages? til somoeone actually presses it?
Cyricx
02-23-2007, 11:32 AM
Just to clarify :) - This mod itself does not add any queries :)
But to answer MissKalunji's question about saving the queries that vbulletin does for the user's info...
Hypothetically you could do it using ajax. I don't know enough about ajax to attempt to code something like that yet. Stress yet :) Ajax is on my list of code structures to study :)
Without using some ajax type code that would run a query without refreshing the page, there would be no way to save the queries without forcing the user to refresh the entire page when uncollapsing a user's info.
Tralala
02-23-2007, 12:20 PM
Great hack, thanks for sharing!
I'd love to see something like this for signatures!
Make it so that it wasn't global (ie: let users collapse some sigs but not all sigs) and it'd be awesome...
MissKalunji
02-23-2007, 03:39 PM
Just to clarify :) - This mod itself does not add any queries :)
But to answer MissKalunji's question about saving the queries that vbulletin does for the user's info...
Hypothetically you could do it using ajax. I don't know enough about ajax to attempt to code something like that yet. Stress yet :) Ajax is on my list of code structures to study :)
Without using some ajax type code that would run a query without refreshing the page, there would be no way to save the queries without forcing the user to refresh the entire page when uncollapsing a user's info.
i see i was more thinking on a way to put all these info into a diff template that would only be used when you click the "uncollapse" icon...wouldnt that be a way to save these queries?
not sure if you get what im saying
Cyricx
02-23-2007, 07:00 PM
I understand what you mean :)
Unfortunately, in order to fill out the information on that template, you'd have to query the database.
You can do that one of three ways :)
1) query the page as it first loads (like it does now)
2) refresh the page and requery (possible, but would cause some stall as the page reloads)
3) use ajax to query and refresh that section of the page without refreshing the whole page (optimal)
That is a great idea that you have and one I will definately try to implement in the future. I just don't know enough yet about AJAX to do it :(
But yes, using ajax, everything would be stuffed into a separate template, and when a user uncollapses it, it would run the queries and load the template. :)
MissKalunji
02-23-2007, 07:20 PM
ok cool wasnt sure if that was possible thanks
dai-kun
02-23-2007, 08:27 PM
Thanks a lot, I also used this along with the iShop which works great. Also, is it possible to make it so that when you expand it, only the one you selected is expanded rather than everyone's else. Thanks!
Cyricx
02-26-2007, 11:57 AM
I'm uncertain if that can be done Dai-kun.
I suspect that since they are all tied to the same cookie, that it would have to track them all individually, which would make for a significant amount of cookie info. But then I could be completely wrong.
I'm rather ignorant when it comes to how info is saved in the cookies still. That's next on my learning curve. ;)
Personally though, I can't see a reason why I would want to code this to open each individually.
The purpose of the hack is to divide your user's into those that want to see all the extra info, and those that do not. While at the same time making it convienant for them to switch back and forth :)
I guess it could be written to always be closed regardless, and not save to your cookies. And that user's have to open it to view the info. But I think you would end up irratating the user's that want to see that info all the time. :(
I'll likely take a look at this down the line and see if there is a way to do that if there is enough interest in that modification, but right now, I won't give an eta on that due to it's priority on my current to-do list :)
tekguru
07-25-2007, 12:01 PM
Chris is this compatable with 3.6.7PL1?
Cyricx
07-25-2007, 08:37 PM
I actually haven't tested it heh :)
The site I currently manage, I haven't added it too yet as the email integration stuff is a priority. It's on my todo list. :)
If you'd like to test it out, rock on :)
If not, when my list finally works down enough I can take a peek at it, then I will :)
As long as /clientscript/vbulletin_global.js hasn't had a serious rewrite, there is no reason why this shouldn't be able to work just fine in the newest version :)
pisliq
07-30-2007, 08:58 AM
very thanks :)
lostgirl815
01-16-2008, 08:38 AM
I would love to use this hack to hide a bunch of stuff on the right side of my postbits, but it's not the same stuff that's in the hack, since I've shifted everything around and added the yet-another-award-system on that side. Is there any chance I can still use this to collapse it all if I shove everything in between these codes?
(Normally I'd just try it out, but this involves database changes, and I don't want to do that unless I have to, since it scares the crap out of me.)
<!-- ##### START MOD - Collapsable Postbit ##### -->
<table class="tborder" cellspacing="1" border="0" width="100%">
<tbody>
<tr>
<td class="thead" nowrap="nowrap">
<a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapseuserinfo('postbit_legacy_userinfo<if condition="THIS_SCRIPT=='showthread' OR THIS_SCRIPT=='showpost'">$post[postcount]<else />99</if>')"><img id="collapseimg_postbit_legacy_userinfo<if condition="THIS_SCRIPT=='showthread' OR THIS_SCRIPT=='showpost'">$post[postcount]<else />99</if>"src="$stylevar[imgdir_button]/collapse_thead$vbcollapse[collapseimg_postbit_legacy_userinfo].gif" alt="" border="0"/></a>$vbphrase[collapse_postbit]
</td>
</tr>
</tbody>
<tbody id="collapseobj_postbit_legacy_userinfo<if condition="THIS_SCRIPT=='showthread' OR THIS_SCRIPT=='showpost'">$post[postcount]<else />99</if>" style="$vbcollapse[collapseobj_postbit_legacy_userinfo]"><tr><td class="alt2" nowrap="nowrap">
<!-- ##### END MOD - Collapsable Postbit ##### -->
(All the stuff I want collapsed...)
<!-- ##### START MOD - Collapsable Postbit ##### -->
</td></tr></tbody></table>
<!-- ##### END MOD - Collapsable Postbit ##### -->
Cyricx
01-17-2008, 08:48 PM
That should absolutely work!
The only thing it could potentially do bad to your site is that it would mess up the tables and make the page look all screwy if you put it in the wrong spots :)
It would not stop any queries or code from running.
Make a backup of your postbit file. Like cut it all and paste it to notepad and save it.
Then mess around. :)
As long as you make a backup, you can't really go wrong in fiddling around with the postbit templates.
lostgirl815
01-18-2008, 03:30 AM
Thanks so much for the help, Cyricx! I really appreciate it!
----------------------------
The boxes worked out beautifully. The collapse part went haywire. Nothing would uncollapse.
I put the original glabal_js back, but it just now occurred to me - could that be because I edited the phrase down to "Info" instead of the original "Additional info"? (Is that a really stupid question? Probably. I can't actually see why that would matter, but what do I know.) :D
Cyricx
01-25-2008, 06:25 PM
It depends, did you edit the phrase in the phrase manager?
Or did you change the html code? If you changed too much in the code it could totally have that effect if you deleted an extra < or >
Karri
06-19-2008, 06:18 PM
any chance this can be updated to work with 3.7?
lostgirl815
11-09-2008, 09:08 AM
Yes, I'd like to give this another shot with 3.7 as well. I see they've got it working on the Fuse, so it must be possible, but when I tried to download it I got a 'version not compatible' message.
lostgirl815
02-15-2009, 08:17 PM
Any chance of this ever being available for 3.7?
Cyricx
07-14-2009, 08:42 PM
Updated for 3.8 -
https://vborg.vbsupport.ru/showthread.php?t=218587
lostgirl815
07-16-2009, 07:14 PM
Well then, I guess I might as well upgrade to 3.8. Thanks!
Cyricx
07-17-2009, 12:36 PM
The 3.8 version "should" work on 3.7
But I haven't tested it yet to say for certain :)
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.