Download & Extend

Attached is modified version including nesting and custom title support

Project:Collapse Text
Version:6.x-1.0
Component:Code
Category:feature request
Priority:normal
Assigned:pukku
Status:closed (fixed)

Issue Summary

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

Comments

#1

Nice!

#2

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

#3

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

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

I would also be interested in the nesting feature

#6

subscribing. that'll be great

#7

maybe 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?

#8

Hi 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

#9

Status:active» closed (fixed)
nobody click here