Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Looking to contribute my first module, a TinyMCE plugin for Wysiwyg.
Comment | File | Size | Author |
---|---|---|---|
#17 | pullquoteD7.zip | 2.08 KB | david@thrale.com |
#14 | pullquote.zip | 1.99 KB | david@thrale.com |
#12 | pullquote.zip | 2.2 KB | david@thrale.com |
#3 | pullquote.tgz | 3.35 KB | jun |
Comments
Comment #1
sunsubscribing
Comment #2
apadernoHello, and thanks for applying for a CVS account.
TinyMCE is already supported by Wysiwyg (http://drupal.org/project/wysiwyg). Is there any particular reasons to create another module?
Comment #3
jun CreditAttribution: jun commentedSorry I wasn't precise enough, it is "a" plugin for TinyMCE/Wysiwyg. A pullquote module, which allows to create pullquotes from TinyMCE. Since this is my first module, let me know if it works.
Here's the README.TXT and the module attached. Thanks for your interest!
-- SUMMARY --
The Pull quote module is a TinyMCE Plugin for use with the WysiWyg API. It
adds a button to TinyMCE allowing to create pullquotes according to a
technique described here : http://css-tricks.com/better-pull-quotes/
For a full description visit the project page:
http://drupal.org/project/pullquote
Bug reports, feature suggestions and latest developments:
http://drupal.org/project/issues/pullquote
-- REQUIREMENTS --
* Wysiwyg API
* TinyMCE
* Jquery
-- INSTALLATION --
* Install as usual, see http://drupal.org/node/70151 for further information.
* Go to Administer > Site configuration > Wysiwyg > Profiles, then go edit
a TinyMCE profile and check "Pullquote" in hte Button and plugins section.
-- CONFIGURATION --
* Go to Administer > Site configuration > Wysiwyg > Profiles, then go edit
a TinyMCE profile and check "Pullquote" in the Button and plugins section.
-- TODO --
* Create a second button to allow pulling the quote on the left or on the
right.
* Provide templates and a configuration page allowing to configure the
quote..
* Include in context menu
-- CONTACT --
Current maintainers:
* Jun Matsushita (jun) - http://drupal.org/user/49184
This project has been sponsored by:
* Internews Europe
A European non-profit organisation based in Paris which empowers local
media worldwide by providing them with the tools and skills they need to
inform their societies.
Comment #4
sunTo clarify the confusion: http://css-tricks.com/better-pull-quotes/ is what this client-side editor plugin is about. You write some text as usual, then you select a phrase or sentence, you click the "Pullquote" editor button, and POOF!, that phrase is going to be duplicated and pulled into a nicely looking floating container next to the text.
Code review:
1) The permanently loaded JS should use a proper Drupal behavior.
2) Most of the code is duplicated from Wysiwyg's Teaser break plugin. It's hard to understand, which parts of the code actually belong to this plugin. Other code should be removed. The same applies to code comments, which do not explain anything currently.
3) JS and CSS namespaces should all be "pullquote", not "pulledquote".
4) The plugin language files (only valid for TinyMCE) register strings for a wrong plugin.
5) Make sure you follow Drupal's coding standards, also for JS and CSS: http://drupal.org/coding-standards
In short: This plugin module needs a massive clean-up. Additionally, but that's not really blocking this CVS application, I'm not sure whether it's a good idea to plant many small Wysiwyg 2.x plugins onto drupal.org, as the cross-editor API in 2.x is still weak. The API will hopefully improve soon and incarnate as 3.x, but until then, or perhaps even regardless of that, I'm a bit scared by scattering drupal.org with gazillions of small Wysiwyg plugin modules. I guess it would make more sense to build a single "Wysiwyg plugins" (wysiwyg_plugin) project, in which various plugins of this kind are contained and multiple maintainers care for bug reports, support requests, and feature requests, and also for incorporating new plugins. The only difference to a stand-alone module would be the namespace (wysiwyg_plugin_pullquote), and potentially, some plugins may even be registered through a plugin grouping module (though not necessarily this one, as you need to load JS/CSS on all pages). Lastly, a joint effort would lead to more collaboration among developers and maintainers, eventually also forming a common voice to raise against Wysiwyg core API development.
Thoughts?
Comment #5
david@thrale.com CreditAttribution: david@thrale.com commentedI would love to see a working module that allows pull-quotes to be created in the way that Jun and http://css-tricks.com/better-pull-quotes/ before him envisage. I am not a programmer, so much of Sun's comments mean nothing to me (sorry). However, surely the way forward is to create a simple Drupal module that enables http://css-tricks.com/better-pull-quotes/ JQuery and javascript. The span tags
<span class="pullquote">lorem ipsum</span>
can be injected by manual typing.If a webmaster wants to use markup editor such as MarkItUp, TinyMCE, or any other, this simply requires a separate and unconnected customisation of a command button.
So, am I right in thinking that Jun has unnecessarily complicated this by integrating the pullquote functionality with TinyMCE? I do not know how to create Drupal modules, but I wonder if my thoughts could help Jun or others to get this module off the ground? Thanks
Comment #6
jun CreditAttribution: jun commented[sun] I'll review the module according to your comments, sorry for the lag, but I didn't have a lot of time on my hands to manage this. However about:
3) JS and CSS namespaces should all be "pullquote", not "pulledquote".
There is "pullquote" which identify content that should be pulled. And once the jQeury pulls it, it's then added "pulledquote" which has the proper CSS formatting added.
[stuckagain] surely you can do a module that does this, I think that if you take my module (once it's fits drupal CVS standards) and remove the plugin directory, you have pretty much what you describe. But I'm not sure it would make sense to have a module just to add just a js file and a css file. But feel free to take the code wherever you'd like to!
More soon.
Comment #7
sunIn Drupal, this is normally done by using Drupal's JS behaviors, whereas each behavior may add a
.pullquote-processed
CSS class to the processed DOM elements. That makes you also stay within your namespace. You never know whether there'll be a pullledquote module/project on drupal.org someday.Comment #8
david@thrale.com CreditAttribution: david@thrale.com commentedHi Jun and Sun
I am not a programmer. However, with a little help from a friend, last night I got a basic module working doing what I described in post 5 above. The rendered layout is a little messed-up, but I have CSS skills and will solve this over the next few days. As my first mini-module, I am very proud with this!
I'd like to:
I hope you guys can assist if and when I get stuck (note my name!). If and when, I get this rudimentary (but complex for me) module working and up to to Drupal standards, I am happy to publish, but really would like someone who is more skilled at programming to be a co-maintainer, as I do not have the skills to do this on my own. Any offers?
Comment #9
sunFYI: @stuckagain applied for CVS in #898332: stuckagain [stuckagain]
@jun: Any updates or feedback from your side on #7 and #8?
Comment #10
david@thrale.com CreditAttribution: david@thrale.com commentedI have uploaded my attempt to create this module as per Jun's suggestion at #6. See http://drupal.org/node/898332
Comment #11
jun CreditAttribution: jun commentedHi Stuckagain, I'm glad to co-maintain the pullquote module with you. I think your code could be integrated more or less as is into mine and users would benefit from using it with or TinyMCE, we could add other Wysiwyg editors or a simple input filter.
What do you think?
Jun.
Comment #12
david@thrale.com CreditAttribution: david@thrale.com commentedJun
That would be excellent. I have attached my latest at the code. I'd suggest we keep things simple to star with and put this core code up for CVS review. Then once we have passed that hurdle, the next step could be to adapt to work with wysiwg filters.
As the original CVS application, was yours, you will have to do this, as you would also have to approve me to co-maintain.
Thanks and over to you!
Comment #13
sunAll minor stuff:
Overall, you likely want just this:
...and:
Please never state something like this. Users should always visit update.php without exceptions.
- Unix line endings (LF only)
- UTF-8 without Unicode signature (BOM)
You probably want to skip (remove) the entire section instead.
Rule of thumb: Never ever write something that no one wants to read. If people get tired of reading, they won't RTFM anymore.
Wrong indentation of phpDoc block. See http://drupal.org/node/1354 for details.
You can prepare $path = drupal_get_path(...); once for both lines.
I'll approve this application + stuckagain's now. Happy co-maintaining, friends! :)
Comment #14
david@thrale.com CreditAttribution: david@thrale.com commentedSun.
Thanks for your help and skills. You have certainly helped beyond my skills. I have made all the changes and these are attached. I also worked out that my work does not comply with Drupal CSS standards - but it does now. Just one issue is outstanding. I couldn't work out how to follow Sun's recommendation to (sorry, I am not really a programmer).
Can anyone help me here?
Almost there!
Comment #15
sunThat's:
This application has already been approved. Please go ahead and create your pullquote project. :)
Comment #16
david@thrale.com CreditAttribution: david@thrale.com commentedHi Jun
I am delighted to say that with Sun's kind help, I have published the new Pullquote module and added you as a co-maintainer. If you get a chance do please try things out and let me know what you think.
Next I plan to do some reading on D7, to see what - if anything - needs doing to release a D7 compatible version of this module. I also want to play around with the CSS a bit as I have spotted one or two instances when the CSS doesn't behave consistently.
I hope we will be able to work together to develop this module further.
Comment #17
david@thrale.com CreditAttribution: david@thrale.com commentedI have tried to port the previously accepted pull-quote module for Drupal 6 to Drupal 7. Feedback welcomed on whether this is good enough to upload to the module's CVS for wider use.
Thanks
Comment #18
david@thrale.com CreditAttribution: david@thrale.com commentedSee #17
Comment #19
apadernoThis application has been already approved; the review has been already done.
Comment #20
sunYes, please continue development with new issues + hopefully an increasing user as well as developer base in your project's issue queue: http://drupal.org/project/issues/pullquote
"From here on, you are on your own" ;) Cold water. heheheh
Lastly, I hope both of you discussed the project's maintenance openly? While @jun seems to have CVS write access, he doesn't have other permissions. That's totally fine, as long as you both agreed on that. Happy to have the discussion here, if you still need to talk. Otherwise, happy co-maintaining! :)
Comment #21
david@thrale.com CreditAttribution: david@thrale.com commentedThanks Sun. Can I say a big thank you for your hand-holding. It has been helpful and very generous. As a newbie,it has really helped. I have emailed Jun without any reply. The CVS permissions was an error on my part, which I have since rectified and he has full access. :.)
Comment #23
apadernoComment #24
apadernoComment #25
apadernoI am giving credits to the users who participated in this issue.