The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
![]() |
|||||||||||||||||||||||||||
Collapsable First Post using AJAX (or Last Post!)
![]() Developer Last Online: Feb 2012 ![]() ![]()
[hr]-[/hr]
NOTICE: This is for vBulletin v3.6 ONLY. You can find a v3.5 compatible version here. [hr]-[/hr]*** Confirmed working on ALL vBulletin 3.6.x versions! *** [hr]-[/hr] Keywords: FORUMDISPLAY, search, results, collapse, AJAX, collapsable, first, last, unread, post Description: Allows you to expand/collapse the first, last or first unread post of a thread from FORUMDISPLAY and search results without the need to load the entire thread. Details: Upon perusing the wonderful deals over at slickdeals.net, I noticed this nifty feature which caught my eye. I found it quite useful as most people have a bad habit of not being very descriptive with their thread titles. This little trick made my browsing experience much more enjoyable, so naturally I had to borrow [read: shamelessly rip] the idea. Please note that no additional queries are added, unless using the 'First Unread Post' option. Otherwise, the only queries performed are the same as those when a thread is normally viewed. The magic behind this modification is performed by jQuery: The Write Less, Do More, JavaScript Library. [hr]-[/hr] Usage: Simply click the expand icon [+] in front of the thread title to expand, and the collapse icon [-] to collapse. Rocket science, eh? [hr]-[/hr] Installation:
Notes: All template modifications are made automatically. They attach to pretty common text locations, so modified styles shouldn't* be a problem. However, for those who wish (or need) to perform the edits manually, you can find that information here. [hr]-[/hr] Comments: As with all my hacks, this modification is provided free of charge. However, if you find this product useful and have money burning a hole in your pocket, feel free to make a small donation, I won't mind.. really. ![]() Version History:
[hr]-[/hr] Tips, Tricks and Modifications: Currently Known Bugs:
* Please note that this modification was developed on a forum with a userbase of 1 (myself). I've tested it for basic functionality but I cannot guarantee functionality or behavior on your forum. So, please -- make backups before installing this product! Show Your Support
|
Comments |
#362
|
|||
|
|||
![]()
The mod is great!
However it doesn't work with the "Hide Links From Guest" mod: https://vborg.vbsupport.ru/showthread.php?t=123415 Guests are able to see the links in the ajax post. Anything I can do to make it work? |
#363
|
||||
|
||||
![]() Quote:
It's something I can look at when I get some time. |
#364
|
|||
|
|||
![]() Quote:
|
#365
|
||||
|
||||
![]()
In one of the plugins for the link hack, you'll most likely find a bit of code that does all the processing you're looking for. Something that uses a regexp to match for http then replaces it with the specified phrase.
Taking that bit of code, and placing it in vbpost_ajax.php where the message text is retrieved should yield the desired result. |
#366
|
||||
|
||||
![]()
Amazing
|
#367
|
|||
|
|||
![]() Quote:
Code:
if (ereg("(showthread)", $GLOBALS[vbulletin]->scriptpath)) { if ($this->registry->options['hlfg_global']) { $groups = explode(',',$this->registry->options['hlfg_groups']); if ($this->registry->options['hlfg_posts'] AND !$this->registry->userinfo['userid'] OR $this->registry->options['hlfg_posts'] AND (is_member_of($this->registry->userinfo, $groups) OR $groups[0] == 0)) { if (!$forum['forum_hlfg']) { $pattern = '/(<a.*?<*a>)/'; $message_array = preg_split($pattern, $this->post['message'], 65535, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY); if ($this->registry->options['hlfg_misc'] == '') { $this->registry->options['hlfg_misc'] = "\e"; } $ugids = explode(',',$this->registry->options['hlfg_ugids']); if ($ugids[0] == '') { $ugids[0] = '0'; } foreach($message_array as $message_key => $message_value) { if (!preg_match("/" . $this->registry->options['hlfg_misc'] . "/", $message_value) AND (!strstr($this->registry->options['hlfg_users'], $post[musername])) AND ($post['userid'] != $this->registry->userinfo['userid'] OR !$this->registry->options['hlfg_own']) AND (!is_member_of($post['usergroupid'], $ugids))) { $message_array[$message_key] = preg_replace("!<a[^>]*(http|www|mailto)(.*)</a>|\b[A-Z0-9._%-]+@[A-Z0-9._%-]+\.[A-Z]{2,4}\b!siU", $this->registry->options['hlfg_info'], $message_value); } } $this->post['message'] = implode("", $message_array); } } } } |
#368
|
||||
|
||||
![]()
Yep, that looks like it. I had hoped it would've been contained within a function, as that would've been ideal -- however, that will work.
Try this: Open up vbpost_ajax.php, look for: PHP Code:
PHP Code:
|
#369
|
|||
|
|||
![]()
That worked except it blocked the links for everyone, not just guests. Anyway I can add a condition or something so it just blocks it for unregistered users only? Thanks for the help.
|
#370
|
|||
|
|||
![]()
magnus.... could yo see my suggestion ? and is it possible?
|
#371
|
||||
|
||||
![]()
I need more information before I could even remotely begin to address your question. For example, a link to whichever modification you're trying to use in conjuction with this one.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|