Attached is modified version including nesting and custom title support

Justyn - March 13, 2008 - 17:58
Project:Collapsible Text
Version:6.x-1.0
Component:Code
Category:feature request
Priority:normal
Assigned:pukku
Status:active
Description

Attached is a modified version of the module for Drupal 6 that incorporates the D6 porting by sze and adds two new features:

1) Nesting. The regexp function is rewritten based on the recursive BB code example from http://uk.php.net/manual/en/function.preg-replace-callback.php (example #3).
This allows collapsible boxes to placed inside each other.

2) Custom title. Allows for an optional title="my custom title" parameter in opening tag, ie [collapse title="My custom title"] or [collapse collapsed title="My custom title"]. I find this useful because I like to name the collapsible sections without having a header inside. The title must be after the "collapsible" option if used.

This should be backwards compatible with previous versions of the module.

Please note that I have not fully tested it, but it does work on my site. I hope it is useful to people.
Pukku, if you like the additions please add them to an official release!

Regards,
Justyn.

AttachmentSize
collapse_text_nesting_title.tar_.gz7.27 KB

#1

sza - March 16, 2008 - 10:32

Nice!

#2

encho - June 7, 2008 - 13:29

Not working for me, returning 'Page not found error' for pages with [collapse] on. Other port that I've downloaded here worked fine.

#3

pukku - December 15, 2008 - 16:29
Version:5.x-1.0» 6.x-1.0
Assigned to:Anonymous» pukku

Hi! I'm going to release a new version today that doesn't include the recursive matching. I still don't quite understand it, and I'm leery of committing any changes I don't understand.

I do, however, appreciate greatly that you made a recursive version, and once I understand it, I will definitely commit it.

Ricky

#4

Charlie Sibbach - August 20, 2009 - 23:56

Any updates on this?

Edit: This works great on my site, but it doesn't support the title= syntax, only the h1 syntax, which is bad since I have a lot of stuff using that already.

Any chance of merging in the recursive nesting into maybe, a Dev version?

#5

castawaybcn - November 22, 2009 - 11:06

I would also be interested in the nesting feature

 
 

Drupal is a registered trademark of Dries Buytaert.