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.
| Comment | File | Size | Author |
|---|---|---|---|
| collapse_text_nesting_title.tar_.gz | 7.27 KB | Justyn-1 |
Comments
Comment #1
sza commentedNice!
Comment #2
encho commentedNot working for me, returning 'Page not found error' for pages with [collapse] on. Other port that I've downloaded here worked fine.
Comment #3
pukku commentedHi! 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
Comment #4
Charlie Sibbach commentedAny 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?
Comment #5
castawaybcn commentedI would also be interested in the nesting feature
Comment #6
chris_bbg888 commentedsubscribing. that'll be great
Comment #7
chris_bbg888 commentedmaybe you can tell me if you plan to integrate this function (also working with the header-function). as I have no Idea of coding I'd just like to know if you want to do that in the next time :)
thanks
ok thats very very probably a very stupid question: the textsize module can to that. can I copy that function somehow? ok I guess that a question like : word has a function can I copy that to the open office... if that doesnt make sende please ignore me :)
//edit the only problem with that code above is that title=... syntax doesnt work. so what can I do?
Comment #8
pooneil commentedHi All,
Sorry for the delay here. The new beta I just created (6.x-2.0-beta1) should handle the nesting. Let me know if you find problems with how it works.
Regards,
Anthony
Comment #9
pooneil commented