Development
Threads by month
- ----- 2026 -----
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
September 2005
- 78 participants
- 615 discussions
[drupal-devel] [feature] Prevent accidentally navigating away from pages where content has changed
by nedjo 16 Sep '05
by nedjo 16 Sep '05
16 Sep '05
Issue status update for
http://drupal.org/node/30220
Post a follow up:
http://drupal.org/project/comments/add/30220
Project: Drupal
Version: cvs
Component: base system
Category: feature requests
Priority: normal
Assigned to: Anonymous
Reported by: m3avrck
Updated by: nedjo
Status: patch (ready to be committed)
Attachment: http://drupal.org/files/issues/formcheck_7.js (2.12 KB)
Thanks for noting that it wasn't working. The problem isn't using
autoattach, it's just that I'd sloppily put formcheckIsSubmit = false
in the attached function instead of formcheckIsSubmit = true. Here's
the fixed js to go with update #30, using the autoattach behaviour.
nedjo
Previous comments:
------------------------------------------------------------------------
Thu, 01 Sep 2005 22:47:42 +0000 : m3avrck
How many times have you been posting a comment or working on a new post
when you click on a link in another application and you navigate away
from the content you are editing, losing all of your changes?
Well I say we introduce a script, much similiar to that of Blogger,
that uses the Javascript window.onbeforeunload handler to prevent this
from happening. We can set this handler to call a function that
compares the contents of all forms when the page loads and then quickly
compares that to the current contents just before the user is about to
leave the page. If they have changed, we should prompt the user so they
don't lose their work. This would save many headaches and degrade nicely
for users without Javascript.
Additionally, this script should work with the newly introduced
JS-based upload feature to prevent navigating away as a file is being
uploaded as well.
If I have sometime I'll start work on a patch tomorrow, just wanted to
get the idea into the queue right now :)
------------------------------------------------------------------------
Sat, 10 Sep 2005 23:48:33 +0000 : StuartDH
Sounds like a great feature to me. We regularly get authors and editors
telling us that they've lost the last hour of work by accidentally
navigating away, and I've even just had one of them email me about it a
few minutes ago, so it'd be great if you could put something together
for this.
Cheers
------------------------------------------------------------------------
Mon, 12 Sep 2005 14:33:58 +0000 : MichelleC
Sounds great to me, too. I often have several tabs open doing stuff and
it's easy to lose my place and leave a page with unfinished edits.
Would this alert you when you're going to close an unsaved tab/window
as well?
Michelle
------------------------------------------------------------------------
Mon, 12 Sep 2005 14:34:19 +0000 : MrMattles
Great for us multitaskers that rush and click the wrong thing
------------------------------------------------------------------------
Mon, 12 Sep 2005 14:36:52 +0000 : chx
Very strong -1 as this is IE only.
------------------------------------------------------------------------
Mon, 12 Sep 2005 14:38:40 +0000 : praseodymium
Konqueror already does this, +1 for the idea in general.
------------------------------------------------------------------------
Mon, 12 Sep 2005 15:07:21 +0000 : webchick
Yeah, I think chx is correc that onbeforeunload is an extension
developed by MS [1] (it's not in the ECMAScript specification [2].
However, I found out that this is implemented in Mozilla since 1.7 [3]
(which corresponds to Firefox 1.0, I think?) and I've tested
Blogger.com's version of this functionality in:
Firefox 1.0.6 (working)
Firefox Deer Park Alpha 1 (working)
Opera 8.0.2 (working)
Safari 1.3 (does NOT work)
Safari 2.0.1 (working)
So it seems to be a 'de facto' standard if nothing else.
[1]
http://msdn.microsoft.com/workshop/author/dhtml/reference/events/onbeforeun…
[2]
http://www.ecma-international.org/publications/standards/Ecma-262.htm
[3] http://www.mozilla.org/status/2004-03-01.html
------------------------------------------------------------------------
Mon, 12 Sep 2005 15:09:15 +0000 : webchick
Also, I should clarify... that "does NOT work" in Safari doesn't display
any errors or anything, it just doesn't save the form results as
expected (so pre-Tiger Safari users are going to be used to this). So I
don't see any harm in including this functionality since it seems to
degrade gracefully in non-supporting browsers.
------------------------------------------------------------------------
Mon, 12 Sep 2005 21:10:18 +0000 : m3avrck
Attachment: http://drupal.org/files/issues/node.module_11.patch (951 bytes)
And a patch is ready! Code was based on many example, including this [4]
and this [5] along with adding my own thoughts and what not ;)
[4]
http://www.codestore.org/store.nsf/cmnts/451FA051398A9AF486256EE0000FB7D1?O…
[5] http://www.blogger.com/app/scripts/formcheck.js
------------------------------------------------------------------------
Mon, 12 Sep 2005 21:10:45 +0000 : m3avrck
Attachment: http://drupal.org/files/issues/formcheck.js (1.54 KB)
And here is the JS to throw in misc/.
------------------------------------------------------------------------
Mon, 12 Sep 2005 21:22:56 +0000 : m3avrck
Attachment: http://drupal.org/files/issues/formcheck_0.js (1.61 KB)
Better JS file attached without tabs. Also, tested and working great in
FF and IE6. Doesn't work in Opera 8, however no errors are present, I
believe this is just because the event handler is not supported. If
there is a work around for Opera, please let me know!
------------------------------------------------------------------------
Mon, 12 Sep 2005 21:24:18 +0000 : m3avrck
Attachment: http://drupal.org/files/issues/formcheck_1.js (1.61 KB)
One more try with those tabs.
------------------------------------------------------------------------
Mon, 12 Sep 2005 21:32:48 +0000 : moshe weitzman
hmmm. i usually find these prompts annoying. any chance we can attach
the behavior only to the node and comment forms? those are the "high
risk" areas. what do others think?
------------------------------------------------------------------------
Mon, 12 Sep 2005 21:42:39 +0000 : m3avrck
Yes, the JS is only loaded on the node edit/create pages, won't affect
any admin/login/etc form. Also, the prompt is unobstrusive and if you
goto save a node you don't get a warning that the contents have changed
because you are explicity saving the node (hence no reason!).
------------------------------------------------------------------------
Mon, 12 Sep 2005 21:53:01 +0000 : Dries
I want some JS-folks to review the code.
------------------------------------------------------------------------
Mon, 12 Sep 2005 22:09:10 +0000 : m3avrck
Attachment: http://drupal.org/files/issues/drupal_15.patch (1.94 KB)
After talking with Drumm on IRC, this patch makes the integration with
Drupal much simpler and it's off by default. Only turned on for the
node edit/change page right now but any module/form can easily add this
by passing a 'TRUE' parameter.
------------------------------------------------------------------------
Mon, 12 Sep 2005 23:38:35 +0000 : nedjo
+1 on idea, js looks generally good, a few suggestions:
1. Instead of writing onsubmit via PHP, use a js addLoadEvent call.
2. Shouldn't the return false in isElementChanged be at the end
(outside the switch block)?
3. It's be nice to find a way to make messages like 'You have unsaved
changes.' translatable. Pass in global js variables via a t('') call?
4. onbeforeunload event should probably be in a if isJsEnabled test,
and should parallel drupal.js's event adding (see addLoadEvent).
5. Comments should be in standard format and in present tense, e.g.,
/**
* Checks to see if a form has been changed after the page loads
*/
6. e_ should be just e to match other js files, e.g., autocomplete.
------------------------------------------------------------------------
Tue, 13 Sep 2005 13:54:35 +0000 : m3avrck
Attachment: http://drupal.org/files/issues/formcheck_2.js (1.58 KB)
Ok here is an updated JS file.
A few notes, I couldn't get the addSubmitEvent() in drupa.js to
reliably work so I had to set the isSubmit() true in the PHP creation
of the form. If you look at Blogger.com, they do this as well... so
either we both missed an obvious way to do this, or that is the most
practical. Hopefully some wise JS gurus will chime in with an answer.
Same goes for onbeforeunload event, which is completely different then
addEvent defined in drupal.js.
As for the t('') I agree this would be useful but I'm not sure of the
best way to do this. One way would be to put in form() a t('') passed
in, and then write this to a var in formcheck.php which returns a JS
file type. Thoughts?
------------------------------------------------------------------------
Tue, 13 Sep 2005 14:06:44 +0000 : Junyor
FWIW, Opera doesn't support the onbeforeunload event. However, this
issue doesn't affect Opera anyway: form contents are retained in
history as long as the page isn't closed. IOW, this feature doesn't
work in Opera, but it isn't needed either.
------------------------------------------------------------------------
Tue, 13 Sep 2005 14:15:56 +0000 : m3avrck
Attachment: http://drupal.org/files/issues/formcheck_3.js (1.64 KB)
Updated JS styling and JS-killswitch after talking with Unconed on IRC.
------------------------------------------------------------------------
Tue, 13 Sep 2005 14:39:15 +0000 : m3avrck
Just to build on Junyor's comment [6] this functionality is built into
Opera 8 and it *doesn't* produce any errors.
[6] http://drupal.org/#comment-44066
------------------------------------------------------------------------
Tue, 13 Sep 2005 15:04:37 +0000 : m3avrck
Attachment: http://drupal.org/files/issues/drupal_16.patch (2.1 KB)
Updated patch to fix possible problem of overwriting onsubmit event
handler thanks to Thox on IRC.
------------------------------------------------------------------------
Tue, 13 Sep 2005 15:13:59 +0000 : webchick
I tested this and can confirm that it works in *both* versions of Safari
that I have access to: 2.0.1 (OS X Tiger) and 1.3 (OS X Panther). So
looks like this code goes one better over the Blogger.com stuff,
because their stuff doesn't workk in 1.3. Nice job! ;)
------------------------------------------------------------------------
Tue, 13 Sep 2005 15:25:21 +0000 : m3avrck
Well I'm gonna set this to commit then. Tested and working on IE, FF,
Safari. Doesn't work or break Opera or Konqueror but not needed in
these cases. Thox and Unconded have offered thoughts and I've modified
code as needed. Doesn't seem like there is anything else left except a
commit :)
------------------------------------------------------------------------
Tue, 13 Sep 2005 17:13:48 +0000 : Bèr Kessels
In general I dislike the feature. Konqueror somehow dies this, and that
is the way it /should/ be. Browsers should take care of this, not the
web app.
But, since it is only konq. this patch has a good enough additional
value :)
I would like to see this patch tested with, tinyMCE and HTMLAREA, at
least. For I am quite sure this will break these modules so bad that
they are near unusable.
Which brings me to the next point: using the textarea hook a simple
module could take care of this.
I would very very much prefer this living in a contrib, or even a core
module. Just not "enforced" on me.
And the last point: if this is for core, please use that textarea hook
too. This is where that hook is for: extending the textareas.
------------------------------------------------------------------------
Tue, 13 Sep 2005 17:32:25 +0000 : m3avrck
Attachment: http://drupal.org/files/issues/drupal_18.patch (2.23 KB)
Updated patch after talking with Thox and Uncloned to attach this event
only to forms with a specific class (hence avoiding the problem of
being on an edit page with other admin/search forms).
------------------------------------------------------------------------
Tue, 13 Sep 2005 17:32:55 +0000 : m3avrck
Attachment: http://drupal.org/files/issues/formcheck_4.js (1.67 KB)
Updated JS file.
------------------------------------------------------------------------
Tue, 13 Sep 2005 17:45:21 +0000 : m3avrck
Berkes, this patch *does not* break TinyMCE, just tried. However,
TinyMCE does not take into account this script. This should be an easy
patch to TinyMCE.
Also, this doesn't affect just textareas, it affects all fields within
a given form (e.g., text fields, check boxes, etc...). Sure the blunt
of editing/creating a node is in the textarea, but there are still all
of those other changes that can be made (new title, revision status,
front page promotion, etc...) so this needs to account for them all
which it does.
This script is unobtrusive and degrades perfectly well. It is tested
and working in FF, IE, Safari and doens't cause problems in Opera or
Konqueror which don't need this feature anyways (since they already
have it).
The usability boost of this script is too enormous *not* to include in
core. As a contributed module, it is really too flaky, and along those
lines, autocomplete.js, inlineuploads.js and related should be in their
own contributed modules :)
I do see your points and I hope this clears it up. It doesn't cause any
problems and only attaches to specified forms, and is off by default.
Any module can easily make use of this script when they use: form(...,
TRUE). This is the same behavior as the other JS files included with
HEAD as well.
Once this is in core I'll work on a patch to TinyMCE to get that up to
speed ;-) (and as such, TinyMCE still works fine, no probs/errors/etc,
and good reason too if you look at how the code *actually* works ;-)).
------------------------------------------------------------------------
Tue, 13 Sep 2005 17:54:37 +0000 : Bèr Kessels
I see. the "why" for not using form textarea is perfectly valid. And I
tried to explain that, eventough I feel this belongs in the Agent, it
is a usability enhancement for all the others using sillier browsers
;).
And you are right about that part of contributions, exp since you
cannot use hook_texarea, having this in a contrib cannot be achieved.
I hereby retract my hesitations. (though I have no time to reapply the
latest patch and test it on konq. The last JS updates broke drupal on
konq, which Steven fixed, right away though!)
------------------------------------------------------------------------
Thu, 15 Sep 2005 16:31:11 +0000 : m3avrck
Ready to go!
------------------------------------------------------------------------
Thu, 15 Sep 2005 20:50:06 +0000 : nedjo
Attachment: http://drupal.org/files/issues/formcheck.patch (1.37 KB)
Nice work m3avrck. I've made some tweaks to minimize code additions on
the PHP side and improve the js. Mainly, it's now enough to set the
'formcheck' class attribute for a form. function form() will add the
js file, and the needed onsubmit event will be added dynamically to
forms. This is consistent with other core js files, which don't
hard-code event calls but add them dynamically, based on js support.
The useful functionality is unchanged.
------------------------------------------------------------------------
Thu, 15 Sep 2005 20:50:44 +0000 : nedjo
Attachment: http://drupal.org/files/issues/formcheck_5.js (2.12 KB)
The revised js file.
------------------------------------------------------------------------
Thu, 15 Sep 2005 22:52:08 +0000 : m3avrck
Attachment: http://drupal.org/files/issues/drupal_19.patch (1.56 KB)
nedjo, nice! However, the addSubmitEvent does not actually set the
variable true, does not work in any browser I tried, already looked
into this issue. After some research I found out that Blogger.com
actually sets this variable in the form element as I did. I have
updated the patch to reflect this, while still incorporating all of
your changes. Code is sexy and sleek, ready for commit ;-)
------------------------------------------------------------------------
Thu, 15 Sep 2005 22:52:39 +0000 : m3avrck
Attachment: http://drupal.org/files/issues/formcheck_6.js (1.78 KB)
And the new JS with the attach event taken out.
------------------------------------------------------------------------
Thu, 15 Sep 2005 22:59:43 +0000 : m3avrck
Attachment: http://drupal.org/files/issues/drupal_19_0.patch (1.59 KB)
Fixed tab issue with patch.
1
0
[drupal-devel] [feature] Admin option to toggle between headline, teaser, and full text in RSS feeds
by walkah 16 Sep '05
by walkah 16 Sep '05
16 Sep '05
Issue status update for
http://drupal.org/node/3986
Post a follow up:
http://drupal.org/project/comments/add/3986
Project: Drupal
Version: cvs
Component: node.module
Category: feature requests
Priority: critical
Assigned to: walkah
Reported by: Boris Mann
Updated by: walkah
Status: patch (code needs review)
Attachment: http://drupal.org/files/issues/feeds_1.patch (10.27 KB)
ARGH! sorry for the spam, but nobody's gonna like array_merge'ing an
array and a string. *sigh*
last one i promise.
walkah
Previous comments:
------------------------------------------------------------------------
Fri, 07 Nov 2003 00:22:51 +0000 : Boris Mann
As the title says. It might be nice to add a feed.module to Drupal that
consolidates all feed-related info in one place, so that this can be
toggled for different types of nodes all in one place.
------------------------------------------------------------------------
Tue, 14 Jun 2005 23:44:20 +0000 : Boris Mann
I love the fact that this has been active forever :P
One day we will have a feed.module to rule them all...
------------------------------------------------------------------------
Wed, 14 Sep 2005 14:41:10 +0000 : Boris Mann
Attachment: http://drupal.org/files/issues/node_4.module (70.01 KB)
What the heck, let's make this critical. Google launched blogsearch [1]
today -- it reads feeds, so if you're not outputting full feeds, it
means Google's not indexing everything you put out.
Attached is an updated node.module which sets options for this, as well
as includes an option for RSS or Atom feeds (but doesn't implement this
yet). If someone could refactor and turn into a patch, we could still
get this into 4.7.
[1] http://google.com/blogsearch
------------------------------------------------------------------------
Wed, 14 Sep 2005 14:58:08 +0000 : Dries
Would this be your first core patch? ;)
------------------------------------------------------------------------
Wed, 14 Sep 2005 15:21:02 +0000 : Boris Mann
It would/will be if I were better at rolling patches against HEAD and
didn't stuff so much stuff into it...
...back to non-coding work.
------------------------------------------------------------------------
Wed, 14 Sep 2005 16:00:21 +0000 : walkah
Attachment: http://drupal.org/files/issues/node-feed-length.patch (3.95 KB)
so, Boris is a wimp... but this is a pretty cool feature. attached is a
re-worked patch. all working 'n' stuff.
------------------------------------------------------------------------
Thu, 15 Sep 2005 21:51:34 +0000 : walkah
Attachment: http://drupal.org/files/issues/feeds.patch (10.25 KB)
at Dries' request - here's an updated patch (where I hereby admit to
sneaking in some other things I'd wanted to do). Hopfeully it's worthy
to be snuck in at the deadline. (it's even still the 15th in .be for
another couple minutes).
So this patch does the following:
* adds a "feed settings" section to admin/settings where 2 new settings
are introduced:
* number of items per feed
* default length of feed descriptions (title only, teaser, full)
* patches all of core to obey the above - including the new aggregator
(out) feeds
* adds support for adding namespaces in _nodeapi('rss item') - which
means things like iTunes RSS and yahoo's media rss can be implemented
by the appropriate modules (i.e. audio.module)
* includes some additional info in the default node feed - specifically
the element (links directly to comments) - and dc:creator - to show
node author information.
------------------------------------------------------------------------
Thu, 15 Sep 2005 22:09:43 +0000 : sepeck
+1 on the features. This is one of those things that gets mentioned and
or requested in the forums enough and I sure would like it.
------------------------------------------------------------------------
Thu, 15 Sep 2005 22:30:51 +0000 : walkah
oh yeah, i forgot to mention one other little thing, that I think is
nice... if you're using the teaser length (as is the default) it
inserts a read more link in the description... which makes it obvious
to your readers that there is more to the post :)
(and a good way to drive traffic back to your site, i suppose)
------------------------------------------------------------------------
Thu, 15 Sep 2005 23:47:30 +0000 : walkah
Attachment: http://drupal.org/files/issues/feeds_0.patch (10.27 KB)
d'oh. cleaning up some little boo boos in that last version. should be
commit ready now - if i may be so bold ;)
1
0
[drupal-devel] [feature] Admin option to toggle between headline, teaser, and full text in RSS feeds
by walkah 16 Sep '05
by walkah 16 Sep '05
16 Sep '05
Issue status update for
http://drupal.org/node/3986
Post a follow up:
http://drupal.org/project/comments/add/3986
Project: Drupal
Version: cvs
Component: node.module
Category: feature requests
Priority: critical
-Assigned to: Anonymous
+Assigned to: walkah
Reported by: Boris Mann
Updated by: walkah
Status: patch (code needs review)
Attachment: http://drupal.org/files/issues/feeds_0.patch (10.27 KB)
d'oh. cleaning up some little boo boos in that last version. should be
commit ready now - if i may be so bold ;)
walkah
Previous comments:
------------------------------------------------------------------------
Fri, 07 Nov 2003 00:22:51 +0000 : Boris Mann
As the title says. It might be nice to add a feed.module to Drupal that
consolidates all feed-related info in one place, so that this can be
toggled for different types of nodes all in one place.
------------------------------------------------------------------------
Tue, 14 Jun 2005 23:44:20 +0000 : Boris Mann
I love the fact that this has been active forever :P
One day we will have a feed.module to rule them all...
------------------------------------------------------------------------
Wed, 14 Sep 2005 14:41:10 +0000 : Boris Mann
Attachment: http://drupal.org/files/issues/node_4.module (70.01 KB)
What the heck, let's make this critical. Google launched blogsearch [1]
today -- it reads feeds, so if you're not outputting full feeds, it
means Google's not indexing everything you put out.
Attached is an updated node.module which sets options for this, as well
as includes an option for RSS or Atom feeds (but doesn't implement this
yet). If someone could refactor and turn into a patch, we could still
get this into 4.7.
[1] http://google.com/blogsearch
------------------------------------------------------------------------
Wed, 14 Sep 2005 14:58:08 +0000 : Dries
Would this be your first core patch? ;)
------------------------------------------------------------------------
Wed, 14 Sep 2005 15:21:02 +0000 : Boris Mann
It would/will be if I were better at rolling patches against HEAD and
didn't stuff so much stuff into it...
...back to non-coding work.
------------------------------------------------------------------------
Wed, 14 Sep 2005 16:00:21 +0000 : walkah
Attachment: http://drupal.org/files/issues/node-feed-length.patch (3.95 KB)
so, Boris is a wimp... but this is a pretty cool feature. attached is a
re-worked patch. all working 'n' stuff.
------------------------------------------------------------------------
Thu, 15 Sep 2005 21:51:34 +0000 : walkah
Attachment: http://drupal.org/files/issues/feeds.patch (10.25 KB)
at Dries' request - here's an updated patch (where I hereby admit to
sneaking in some other things I'd wanted to do). Hopfeully it's worthy
to be snuck in at the deadline. (it's even still the 15th in .be for
another couple minutes).
So this patch does the following:
* adds a "feed settings" section to admin/settings where 2 new settings
are introduced:
* number of items per feed
* default length of feed descriptions (title only, teaser, full)
* patches all of core to obey the above - including the new aggregator
(out) feeds
* adds support for adding namespaces in _nodeapi('rss item') - which
means things like iTunes RSS and yahoo's media rss can be implemented
by the appropriate modules (i.e. audio.module)
* includes some additional info in the default node feed - specifically
the element (links directly to comments) - and dc:creator - to show
node author information.
------------------------------------------------------------------------
Thu, 15 Sep 2005 22:09:43 +0000 : sepeck
+1 on the features. This is one of those things that gets mentioned and
or requested in the forums enough and I sure would like it.
------------------------------------------------------------------------
Thu, 15 Sep 2005 22:30:51 +0000 : walkah
oh yeah, i forgot to mention one other little thing, that I think is
nice... if you're using the teaser length (as is the default) it
inserts a read more link in the description... which makes it obvious
to your readers that there is more to the post :)
(and a good way to drive traffic back to your site, i suppose)
1
0
[drupal-devel] [feature] Prevent accidentally navigating away from pages where content has changed
by m3avrck 16 Sep '05
by m3avrck 16 Sep '05
16 Sep '05
Issue status update for
http://drupal.org/node/30220
Post a follow up:
http://drupal.org/project/comments/add/30220
Project: Drupal
Version: cvs
Component: base system
Category: feature requests
Priority: normal
Assigned to: Anonymous
Reported by: m3avrck
Updated by: m3avrck
Status: patch (ready to be committed)
Attachment: http://drupal.org/files/issues/drupal_19_0.patch (1.59 KB)
Fixed tab issue with patch.
m3avrck
Previous comments:
------------------------------------------------------------------------
Thu, 01 Sep 2005 22:47:42 +0000 : m3avrck
How many times have you been posting a comment or working on a new post
when you click on a link in another application and you navigate away
from the content you are editing, losing all of your changes?
Well I say we introduce a script, much similiar to that of Blogger,
that uses the Javascript window.onbeforeunload handler to prevent this
from happening. We can set this handler to call a function that
compares the contents of all forms when the page loads and then quickly
compares that to the current contents just before the user is about to
leave the page. If they have changed, we should prompt the user so they
don't lose their work. This would save many headaches and degrade nicely
for users without Javascript.
Additionally, this script should work with the newly introduced
JS-based upload feature to prevent navigating away as a file is being
uploaded as well.
If I have sometime I'll start work on a patch tomorrow, just wanted to
get the idea into the queue right now :)
------------------------------------------------------------------------
Sat, 10 Sep 2005 23:48:33 +0000 : StuartDH
Sounds like a great feature to me. We regularly get authors and editors
telling us that they've lost the last hour of work by accidentally
navigating away, and I've even just had one of them email me about it a
few minutes ago, so it'd be great if you could put something together
for this.
Cheers
------------------------------------------------------------------------
Mon, 12 Sep 2005 14:33:58 +0000 : MichelleC
Sounds great to me, too. I often have several tabs open doing stuff and
it's easy to lose my place and leave a page with unfinished edits.
Would this alert you when you're going to close an unsaved tab/window
as well?
Michelle
------------------------------------------------------------------------
Mon, 12 Sep 2005 14:34:19 +0000 : MrMattles
Great for us multitaskers that rush and click the wrong thing
------------------------------------------------------------------------
Mon, 12 Sep 2005 14:36:52 +0000 : chx
Very strong -1 as this is IE only.
------------------------------------------------------------------------
Mon, 12 Sep 2005 14:38:40 +0000 : praseodymium
Konqueror already does this, +1 for the idea in general.
------------------------------------------------------------------------
Mon, 12 Sep 2005 15:07:21 +0000 : webchick
Yeah, I think chx is correc that onbeforeunload is an extension
developed by MS [1] (it's not in the ECMAScript specification [2].
However, I found out that this is implemented in Mozilla since 1.7 [3]
(which corresponds to Firefox 1.0, I think?) and I've tested
Blogger.com's version of this functionality in:
Firefox 1.0.6 (working)
Firefox Deer Park Alpha 1 (working)
Opera 8.0.2 (working)
Safari 1.3 (does NOT work)
Safari 2.0.1 (working)
So it seems to be a 'de facto' standard if nothing else.
[1]
http://msdn.microsoft.com/workshop/author/dhtml/reference/events/onbeforeun…
[2]
http://www.ecma-international.org/publications/standards/Ecma-262.htm
[3] http://www.mozilla.org/status/2004-03-01.html
------------------------------------------------------------------------
Mon, 12 Sep 2005 15:09:15 +0000 : webchick
Also, I should clarify... that "does NOT work" in Safari doesn't display
any errors or anything, it just doesn't save the form results as
expected (so pre-Tiger Safari users are going to be used to this). So I
don't see any harm in including this functionality since it seems to
degrade gracefully in non-supporting browsers.
------------------------------------------------------------------------
Mon, 12 Sep 2005 21:10:18 +0000 : m3avrck
Attachment: http://drupal.org/files/issues/node.module_11.patch (951 bytes)
And a patch is ready! Code was based on many example, including this [4]
and this [5] along with adding my own thoughts and what not ;)
[4]
http://www.codestore.org/store.nsf/cmnts/451FA051398A9AF486256EE0000FB7D1?O…
[5] http://www.blogger.com/app/scripts/formcheck.js
------------------------------------------------------------------------
Mon, 12 Sep 2005 21:10:45 +0000 : m3avrck
Attachment: http://drupal.org/files/issues/formcheck.js (1.54 KB)
And here is the JS to throw in misc/.
------------------------------------------------------------------------
Mon, 12 Sep 2005 21:22:56 +0000 : m3avrck
Attachment: http://drupal.org/files/issues/formcheck_0.js (1.61 KB)
Better JS file attached without tabs. Also, tested and working great in
FF and IE6. Doesn't work in Opera 8, however no errors are present, I
believe this is just because the event handler is not supported. If
there is a work around for Opera, please let me know!
------------------------------------------------------------------------
Mon, 12 Sep 2005 21:24:18 +0000 : m3avrck
Attachment: http://drupal.org/files/issues/formcheck_1.js (1.61 KB)
One more try with those tabs.
------------------------------------------------------------------------
Mon, 12 Sep 2005 21:32:48 +0000 : moshe weitzman
hmmm. i usually find these prompts annoying. any chance we can attach
the behavior only to the node and comment forms? those are the "high
risk" areas. what do others think?
------------------------------------------------------------------------
Mon, 12 Sep 2005 21:42:39 +0000 : m3avrck
Yes, the JS is only loaded on the node edit/create pages, won't affect
any admin/login/etc form. Also, the prompt is unobstrusive and if you
goto save a node you don't get a warning that the contents have changed
because you are explicity saving the node (hence no reason!).
------------------------------------------------------------------------
Mon, 12 Sep 2005 21:53:01 +0000 : Dries
I want some JS-folks to review the code.
------------------------------------------------------------------------
Mon, 12 Sep 2005 22:09:10 +0000 : m3avrck
Attachment: http://drupal.org/files/issues/drupal_15.patch (1.94 KB)
After talking with Drumm on IRC, this patch makes the integration with
Drupal much simpler and it's off by default. Only turned on for the
node edit/change page right now but any module/form can easily add this
by passing a 'TRUE' parameter.
------------------------------------------------------------------------
Mon, 12 Sep 2005 23:38:35 +0000 : nedjo
+1 on idea, js looks generally good, a few suggestions:
1. Instead of writing onsubmit via PHP, use a js addLoadEvent call.
2. Shouldn't the return false in isElementChanged be at the end
(outside the switch block)?
3. It's be nice to find a way to make messages like 'You have unsaved
changes.' translatable. Pass in global js variables via a t('') call?
4. onbeforeunload event should probably be in a if isJsEnabled test,
and should parallel drupal.js's event adding (see addLoadEvent).
5. Comments should be in standard format and in present tense, e.g.,
/**
* Checks to see if a form has been changed after the page loads
*/
6. e_ should be just e to match other js files, e.g., autocomplete.
------------------------------------------------------------------------
Tue, 13 Sep 2005 13:54:35 +0000 : m3avrck
Attachment: http://drupal.org/files/issues/formcheck_2.js (1.58 KB)
Ok here is an updated JS file.
A few notes, I couldn't get the addSubmitEvent() in drupa.js to
reliably work so I had to set the isSubmit() true in the PHP creation
of the form. If you look at Blogger.com, they do this as well... so
either we both missed an obvious way to do this, or that is the most
practical. Hopefully some wise JS gurus will chime in with an answer.
Same goes for onbeforeunload event, which is completely different then
addEvent defined in drupal.js.
As for the t('') I agree this would be useful but I'm not sure of the
best way to do this. One way would be to put in form() a t('') passed
in, and then write this to a var in formcheck.php which returns a JS
file type. Thoughts?
------------------------------------------------------------------------
Tue, 13 Sep 2005 14:06:44 +0000 : Junyor
FWIW, Opera doesn't support the onbeforeunload event. However, this
issue doesn't affect Opera anyway: form contents are retained in
history as long as the page isn't closed. IOW, this feature doesn't
work in Opera, but it isn't needed either.
------------------------------------------------------------------------
Tue, 13 Sep 2005 14:15:56 +0000 : m3avrck
Attachment: http://drupal.org/files/issues/formcheck_3.js (1.64 KB)
Updated JS styling and JS-killswitch after talking with Unconed on IRC.
------------------------------------------------------------------------
Tue, 13 Sep 2005 14:39:15 +0000 : m3avrck
Just to build on Junyor's comment [6] this functionality is built into
Opera 8 and it *doesn't* produce any errors.
[6] http://drupal.org/#comment-44066
------------------------------------------------------------------------
Tue, 13 Sep 2005 15:04:37 +0000 : m3avrck
Attachment: http://drupal.org/files/issues/drupal_16.patch (2.1 KB)
Updated patch to fix possible problem of overwriting onsubmit event
handler thanks to Thox on IRC.
------------------------------------------------------------------------
Tue, 13 Sep 2005 15:13:59 +0000 : webchick
I tested this and can confirm that it works in *both* versions of Safari
that I have access to: 2.0.1 (OS X Tiger) and 1.3 (OS X Panther). So
looks like this code goes one better over the Blogger.com stuff,
because their stuff doesn't workk in 1.3. Nice job! ;)
------------------------------------------------------------------------
Tue, 13 Sep 2005 15:25:21 +0000 : m3avrck
Well I'm gonna set this to commit then. Tested and working on IE, FF,
Safari. Doesn't work or break Opera or Konqueror but not needed in
these cases. Thox and Unconded have offered thoughts and I've modified
code as needed. Doesn't seem like there is anything else left except a
commit :)
------------------------------------------------------------------------
Tue, 13 Sep 2005 17:13:48 +0000 : Bèr Kessels
In general I dislike the feature. Konqueror somehow dies this, and that
is the way it /should/ be. Browsers should take care of this, not the
web app.
But, since it is only konq. this patch has a good enough additional
value :)
I would like to see this patch tested with, tinyMCE and HTMLAREA, at
least. For I am quite sure this will break these modules so bad that
they are near unusable.
Which brings me to the next point: using the textarea hook a simple
module could take care of this.
I would very very much prefer this living in a contrib, or even a core
module. Just not "enforced" on me.
And the last point: if this is for core, please use that textarea hook
too. This is where that hook is for: extending the textareas.
------------------------------------------------------------------------
Tue, 13 Sep 2005 17:32:25 +0000 : m3avrck
Attachment: http://drupal.org/files/issues/drupal_18.patch (2.23 KB)
Updated patch after talking with Thox and Uncloned to attach this event
only to forms with a specific class (hence avoiding the problem of
being on an edit page with other admin/search forms).
------------------------------------------------------------------------
Tue, 13 Sep 2005 17:32:55 +0000 : m3avrck
Attachment: http://drupal.org/files/issues/formcheck_4.js (1.67 KB)
Updated JS file.
------------------------------------------------------------------------
Tue, 13 Sep 2005 17:45:21 +0000 : m3avrck
Berkes, this patch *does not* break TinyMCE, just tried. However,
TinyMCE does not take into account this script. This should be an easy
patch to TinyMCE.
Also, this doesn't affect just textareas, it affects all fields within
a given form (e.g., text fields, check boxes, etc...). Sure the blunt
of editing/creating a node is in the textarea, but there are still all
of those other changes that can be made (new title, revision status,
front page promotion, etc...) so this needs to account for them all
which it does.
This script is unobtrusive and degrades perfectly well. It is tested
and working in FF, IE, Safari and doens't cause problems in Opera or
Konqueror which don't need this feature anyways (since they already
have it).
The usability boost of this script is too enormous *not* to include in
core. As a contributed module, it is really too flaky, and along those
lines, autocomplete.js, inlineuploads.js and related should be in their
own contributed modules :)
I do see your points and I hope this clears it up. It doesn't cause any
problems and only attaches to specified forms, and is off by default.
Any module can easily make use of this script when they use: form(...,
TRUE). This is the same behavior as the other JS files included with
HEAD as well.
Once this is in core I'll work on a patch to TinyMCE to get that up to
speed ;-) (and as such, TinyMCE still works fine, no probs/errors/etc,
and good reason too if you look at how the code *actually* works ;-)).
------------------------------------------------------------------------
Tue, 13 Sep 2005 17:54:37 +0000 : Bèr Kessels
I see. the "why" for not using form textarea is perfectly valid. And I
tried to explain that, eventough I feel this belongs in the Agent, it
is a usability enhancement for all the others using sillier browsers
;).
And you are right about that part of contributions, exp since you
cannot use hook_texarea, having this in a contrib cannot be achieved.
I hereby retract my hesitations. (though I have no time to reapply the
latest patch and test it on konq. The last JS updates broke drupal on
konq, which Steven fixed, right away though!)
------------------------------------------------------------------------
Thu, 15 Sep 2005 16:31:11 +0000 : m3avrck
Ready to go!
------------------------------------------------------------------------
Thu, 15 Sep 2005 20:50:06 +0000 : nedjo
Attachment: http://drupal.org/files/issues/formcheck.patch (1.37 KB)
Nice work m3avrck. I've made some tweaks to minimize code additions on
the PHP side and improve the js. Mainly, it's now enough to set the
'formcheck' class attribute for a form. function form() will add the
js file, and the needed onsubmit event will be added dynamically to
forms. This is consistent with other core js files, which don't
hard-code event calls but add them dynamically, based on js support.
The useful functionality is unchanged.
------------------------------------------------------------------------
Thu, 15 Sep 2005 20:50:44 +0000 : nedjo
Attachment: http://drupal.org/files/issues/formcheck_5.js (2.12 KB)
The revised js file.
------------------------------------------------------------------------
Thu, 15 Sep 2005 22:52:08 +0000 : m3avrck
Attachment: http://drupal.org/files/issues/drupal_19.patch (1.56 KB)
nedjo, nice! However, the addSubmitEvent does not actually set the
variable true, does not work in any browser I tried, already looked
into this issue. After some research I found out that Blogger.com
actually sets this variable in the form element as I did. I have
updated the patch to reflect this, while still incorporating all of
your changes. Code is sexy and sleek, ready for commit ;-)
------------------------------------------------------------------------
Thu, 15 Sep 2005 22:52:39 +0000 : m3avrck
Attachment: http://drupal.org/files/issues/formcheck_6.js (1.78 KB)
And the new JS with the attach event taken out.
1
0
[drupal-devel] [feature] Prevent accidentally navigating away from pages where content has changed
by m3avrck 16 Sep '05
by m3avrck 16 Sep '05
16 Sep '05
Issue status update for
http://drupal.org/node/30220
Post a follow up:
http://drupal.org/project/comments/add/30220
Project: Drupal
Version: cvs
Component: base system
Category: feature requests
Priority: normal
Assigned to: Anonymous
Reported by: m3avrck
Updated by: m3avrck
-Status: patch (code needs review)
+Status: patch (ready to be committed)
Attachment: http://drupal.org/files/issues/formcheck_6.js (1.78 KB)
And the new JS with the attach event taken out.
m3avrck
Previous comments:
------------------------------------------------------------------------
Thu, 01 Sep 2005 22:47:42 +0000 : m3avrck
How many times have you been posting a comment or working on a new post
when you click on a link in another application and you navigate away
from the content you are editing, losing all of your changes?
Well I say we introduce a script, much similiar to that of Blogger,
that uses the Javascript window.onbeforeunload handler to prevent this
from happening. We can set this handler to call a function that
compares the contents of all forms when the page loads and then quickly
compares that to the current contents just before the user is about to
leave the page. If they have changed, we should prompt the user so they
don't lose their work. This would save many headaches and degrade nicely
for users without Javascript.
Additionally, this script should work with the newly introduced
JS-based upload feature to prevent navigating away as a file is being
uploaded as well.
If I have sometime I'll start work on a patch tomorrow, just wanted to
get the idea into the queue right now :)
------------------------------------------------------------------------
Sat, 10 Sep 2005 23:48:33 +0000 : StuartDH
Sounds like a great feature to me. We regularly get authors and editors
telling us that they've lost the last hour of work by accidentally
navigating away, and I've even just had one of them email me about it a
few minutes ago, so it'd be great if you could put something together
for this.
Cheers
------------------------------------------------------------------------
Mon, 12 Sep 2005 14:33:58 +0000 : MichelleC
Sounds great to me, too. I often have several tabs open doing stuff and
it's easy to lose my place and leave a page with unfinished edits.
Would this alert you when you're going to close an unsaved tab/window
as well?
Michelle
------------------------------------------------------------------------
Mon, 12 Sep 2005 14:34:19 +0000 : MrMattles
Great for us multitaskers that rush and click the wrong thing
------------------------------------------------------------------------
Mon, 12 Sep 2005 14:36:52 +0000 : chx
Very strong -1 as this is IE only.
------------------------------------------------------------------------
Mon, 12 Sep 2005 14:38:40 +0000 : praseodymium
Konqueror already does this, +1 for the idea in general.
------------------------------------------------------------------------
Mon, 12 Sep 2005 15:07:21 +0000 : webchick
Yeah, I think chx is correc that onbeforeunload is an extension
developed by MS [1] (it's not in the ECMAScript specification [2].
However, I found out that this is implemented in Mozilla since 1.7 [3]
(which corresponds to Firefox 1.0, I think?) and I've tested
Blogger.com's version of this functionality in:
Firefox 1.0.6 (working)
Firefox Deer Park Alpha 1 (working)
Opera 8.0.2 (working)
Safari 1.3 (does NOT work)
Safari 2.0.1 (working)
So it seems to be a 'de facto' standard if nothing else.
[1]
http://msdn.microsoft.com/workshop/author/dhtml/reference/events/onbeforeun…
[2]
http://www.ecma-international.org/publications/standards/Ecma-262.htm
[3] http://www.mozilla.org/status/2004-03-01.html
------------------------------------------------------------------------
Mon, 12 Sep 2005 15:09:15 +0000 : webchick
Also, I should clarify... that "does NOT work" in Safari doesn't display
any errors or anything, it just doesn't save the form results as
expected (so pre-Tiger Safari users are going to be used to this). So I
don't see any harm in including this functionality since it seems to
degrade gracefully in non-supporting browsers.
------------------------------------------------------------------------
Mon, 12 Sep 2005 21:10:18 +0000 : m3avrck
Attachment: http://drupal.org/files/issues/node.module_11.patch (951 bytes)
And a patch is ready! Code was based on many example, including this [4]
and this [5] along with adding my own thoughts and what not ;)
[4]
http://www.codestore.org/store.nsf/cmnts/451FA051398A9AF486256EE0000FB7D1?O…
[5] http://www.blogger.com/app/scripts/formcheck.js
------------------------------------------------------------------------
Mon, 12 Sep 2005 21:10:45 +0000 : m3avrck
Attachment: http://drupal.org/files/issues/formcheck.js (1.54 KB)
And here is the JS to throw in misc/.
------------------------------------------------------------------------
Mon, 12 Sep 2005 21:22:56 +0000 : m3avrck
Attachment: http://drupal.org/files/issues/formcheck_0.js (1.61 KB)
Better JS file attached without tabs. Also, tested and working great in
FF and IE6. Doesn't work in Opera 8, however no errors are present, I
believe this is just because the event handler is not supported. If
there is a work around for Opera, please let me know!
------------------------------------------------------------------------
Mon, 12 Sep 2005 21:24:18 +0000 : m3avrck
Attachment: http://drupal.org/files/issues/formcheck_1.js (1.61 KB)
One more try with those tabs.
------------------------------------------------------------------------
Mon, 12 Sep 2005 21:32:48 +0000 : moshe weitzman
hmmm. i usually find these prompts annoying. any chance we can attach
the behavior only to the node and comment forms? those are the "high
risk" areas. what do others think?
------------------------------------------------------------------------
Mon, 12 Sep 2005 21:42:39 +0000 : m3avrck
Yes, the JS is only loaded on the node edit/create pages, won't affect
any admin/login/etc form. Also, the prompt is unobstrusive and if you
goto save a node you don't get a warning that the contents have changed
because you are explicity saving the node (hence no reason!).
------------------------------------------------------------------------
Mon, 12 Sep 2005 21:53:01 +0000 : Dries
I want some JS-folks to review the code.
------------------------------------------------------------------------
Mon, 12 Sep 2005 22:09:10 +0000 : m3avrck
Attachment: http://drupal.org/files/issues/drupal_15.patch (1.94 KB)
After talking with Drumm on IRC, this patch makes the integration with
Drupal much simpler and it's off by default. Only turned on for the
node edit/change page right now but any module/form can easily add this
by passing a 'TRUE' parameter.
------------------------------------------------------------------------
Mon, 12 Sep 2005 23:38:35 +0000 : nedjo
+1 on idea, js looks generally good, a few suggestions:
1. Instead of writing onsubmit via PHP, use a js addLoadEvent call.
2. Shouldn't the return false in isElementChanged be at the end
(outside the switch block)?
3. It's be nice to find a way to make messages like 'You have unsaved
changes.' translatable. Pass in global js variables via a t('') call?
4. onbeforeunload event should probably be in a if isJsEnabled test,
and should parallel drupal.js's event adding (see addLoadEvent).
5. Comments should be in standard format and in present tense, e.g.,
/**
* Checks to see if a form has been changed after the page loads
*/
6. e_ should be just e to match other js files, e.g., autocomplete.
------------------------------------------------------------------------
Tue, 13 Sep 2005 13:54:35 +0000 : m3avrck
Attachment: http://drupal.org/files/issues/formcheck_2.js (1.58 KB)
Ok here is an updated JS file.
A few notes, I couldn't get the addSubmitEvent() in drupa.js to
reliably work so I had to set the isSubmit() true in the PHP creation
of the form. If you look at Blogger.com, they do this as well... so
either we both missed an obvious way to do this, or that is the most
practical. Hopefully some wise JS gurus will chime in with an answer.
Same goes for onbeforeunload event, which is completely different then
addEvent defined in drupal.js.
As for the t('') I agree this would be useful but I'm not sure of the
best way to do this. One way would be to put in form() a t('') passed
in, and then write this to a var in formcheck.php which returns a JS
file type. Thoughts?
------------------------------------------------------------------------
Tue, 13 Sep 2005 14:06:44 +0000 : Junyor
FWIW, Opera doesn't support the onbeforeunload event. However, this
issue doesn't affect Opera anyway: form contents are retained in
history as long as the page isn't closed. IOW, this feature doesn't
work in Opera, but it isn't needed either.
------------------------------------------------------------------------
Tue, 13 Sep 2005 14:15:56 +0000 : m3avrck
Attachment: http://drupal.org/files/issues/formcheck_3.js (1.64 KB)
Updated JS styling and JS-killswitch after talking with Unconed on IRC.
------------------------------------------------------------------------
Tue, 13 Sep 2005 14:39:15 +0000 : m3avrck
Just to build on Junyor's comment [6] this functionality is built into
Opera 8 and it *doesn't* produce any errors.
[6] http://drupal.org/#comment-44066
------------------------------------------------------------------------
Tue, 13 Sep 2005 15:04:37 +0000 : m3avrck
Attachment: http://drupal.org/files/issues/drupal_16.patch (2.1 KB)
Updated patch to fix possible problem of overwriting onsubmit event
handler thanks to Thox on IRC.
------------------------------------------------------------------------
Tue, 13 Sep 2005 15:13:59 +0000 : webchick
I tested this and can confirm that it works in *both* versions of Safari
that I have access to: 2.0.1 (OS X Tiger) and 1.3 (OS X Panther). So
looks like this code goes one better over the Blogger.com stuff,
because their stuff doesn't workk in 1.3. Nice job! ;)
------------------------------------------------------------------------
Tue, 13 Sep 2005 15:25:21 +0000 : m3avrck
Well I'm gonna set this to commit then. Tested and working on IE, FF,
Safari. Doesn't work or break Opera or Konqueror but not needed in
these cases. Thox and Unconded have offered thoughts and I've modified
code as needed. Doesn't seem like there is anything else left except a
commit :)
------------------------------------------------------------------------
Tue, 13 Sep 2005 17:13:48 +0000 : Bèr Kessels
In general I dislike the feature. Konqueror somehow dies this, and that
is the way it /should/ be. Browsers should take care of this, not the
web app.
But, since it is only konq. this patch has a good enough additional
value :)
I would like to see this patch tested with, tinyMCE and HTMLAREA, at
least. For I am quite sure this will break these modules so bad that
they are near unusable.
Which brings me to the next point: using the textarea hook a simple
module could take care of this.
I would very very much prefer this living in a contrib, or even a core
module. Just not "enforced" on me.
And the last point: if this is for core, please use that textarea hook
too. This is where that hook is for: extending the textareas.
------------------------------------------------------------------------
Tue, 13 Sep 2005 17:32:25 +0000 : m3avrck
Attachment: http://drupal.org/files/issues/drupal_18.patch (2.23 KB)
Updated patch after talking with Thox and Uncloned to attach this event
only to forms with a specific class (hence avoiding the problem of
being on an edit page with other admin/search forms).
------------------------------------------------------------------------
Tue, 13 Sep 2005 17:32:55 +0000 : m3avrck
Attachment: http://drupal.org/files/issues/formcheck_4.js (1.67 KB)
Updated JS file.
------------------------------------------------------------------------
Tue, 13 Sep 2005 17:45:21 +0000 : m3avrck
Berkes, this patch *does not* break TinyMCE, just tried. However,
TinyMCE does not take into account this script. This should be an easy
patch to TinyMCE.
Also, this doesn't affect just textareas, it affects all fields within
a given form (e.g., text fields, check boxes, etc...). Sure the blunt
of editing/creating a node is in the textarea, but there are still all
of those other changes that can be made (new title, revision status,
front page promotion, etc...) so this needs to account for them all
which it does.
This script is unobtrusive and degrades perfectly well. It is tested
and working in FF, IE, Safari and doens't cause problems in Opera or
Konqueror which don't need this feature anyways (since they already
have it).
The usability boost of this script is too enormous *not* to include in
core. As a contributed module, it is really too flaky, and along those
lines, autocomplete.js, inlineuploads.js and related should be in their
own contributed modules :)
I do see your points and I hope this clears it up. It doesn't cause any
problems and only attaches to specified forms, and is off by default.
Any module can easily make use of this script when they use: form(...,
TRUE). This is the same behavior as the other JS files included with
HEAD as well.
Once this is in core I'll work on a patch to TinyMCE to get that up to
speed ;-) (and as such, TinyMCE still works fine, no probs/errors/etc,
and good reason too if you look at how the code *actually* works ;-)).
------------------------------------------------------------------------
Tue, 13 Sep 2005 17:54:37 +0000 : Bèr Kessels
I see. the "why" for not using form textarea is perfectly valid. And I
tried to explain that, eventough I feel this belongs in the Agent, it
is a usability enhancement for all the others using sillier browsers
;).
And you are right about that part of contributions, exp since you
cannot use hook_texarea, having this in a contrib cannot be achieved.
I hereby retract my hesitations. (though I have no time to reapply the
latest patch and test it on konq. The last JS updates broke drupal on
konq, which Steven fixed, right away though!)
------------------------------------------------------------------------
Thu, 15 Sep 2005 16:31:11 +0000 : m3avrck
Ready to go!
------------------------------------------------------------------------
Thu, 15 Sep 2005 20:50:06 +0000 : nedjo
Attachment: http://drupal.org/files/issues/formcheck.patch (1.37 KB)
Nice work m3avrck. I've made some tweaks to minimize code additions on
the PHP side and improve the js. Mainly, it's now enough to set the
'formcheck' class attribute for a form. function form() will add the
js file, and the needed onsubmit event will be added dynamically to
forms. This is consistent with other core js files, which don't
hard-code event calls but add them dynamically, based on js support.
The useful functionality is unchanged.
------------------------------------------------------------------------
Thu, 15 Sep 2005 20:50:44 +0000 : nedjo
Attachment: http://drupal.org/files/issues/formcheck_5.js (2.12 KB)
The revised js file.
------------------------------------------------------------------------
Thu, 15 Sep 2005 22:52:08 +0000 : m3avrck
Attachment: http://drupal.org/files/issues/drupal_19.patch (1.56 KB)
nedjo, nice! However, the addSubmitEvent does not actually set the
variable true, does not work in any browser I tried, already looked
into this issue. After some research I found out that Blogger.com
actually sets this variable in the form element as I did. I have
updated the patch to reflect this, while still incorporating all of
your changes. Code is sexy and sleek, ready for commit ;-)
1
0
[drupal-devel] [feature] Prevent accidentally navigating away from pages where content has changed
by m3avrck 16 Sep '05
by m3avrck 16 Sep '05
16 Sep '05
Issue status update for
http://drupal.org/node/30220
Post a follow up:
http://drupal.org/project/comments/add/30220
Project: Drupal
Version: cvs
Component: base system
Category: feature requests
Priority: normal
Assigned to: Anonymous
Reported by: m3avrck
Updated by: m3avrck
Status: patch (code needs review)
Attachment: http://drupal.org/files/issues/drupal_19.patch (1.56 KB)
nedjo, nice! However, the addSubmitEvent does not actually set the
variable true, does not work in any browser I tried, already looked
into this issue. After some research I found out that Blogger.com
actually sets this variable in the form element as I did. I have
updated the patch to reflect this, while still incorporating all of
your changes. Code is sexy and sleek, ready for commit ;-)
m3avrck
Previous comments:
------------------------------------------------------------------------
Thu, 01 Sep 2005 22:47:42 +0000 : m3avrck
How many times have you been posting a comment or working on a new post
when you click on a link in another application and you navigate away
from the content you are editing, losing all of your changes?
Well I say we introduce a script, much similiar to that of Blogger,
that uses the Javascript window.onbeforeunload handler to prevent this
from happening. We can set this handler to call a function that
compares the contents of all forms when the page loads and then quickly
compares that to the current contents just before the user is about to
leave the page. If they have changed, we should prompt the user so they
don't lose their work. This would save many headaches and degrade nicely
for users without Javascript.
Additionally, this script should work with the newly introduced
JS-based upload feature to prevent navigating away as a file is being
uploaded as well.
If I have sometime I'll start work on a patch tomorrow, just wanted to
get the idea into the queue right now :)
------------------------------------------------------------------------
Sat, 10 Sep 2005 23:48:33 +0000 : StuartDH
Sounds like a great feature to me. We regularly get authors and editors
telling us that they've lost the last hour of work by accidentally
navigating away, and I've even just had one of them email me about it a
few minutes ago, so it'd be great if you could put something together
for this.
Cheers
------------------------------------------------------------------------
Mon, 12 Sep 2005 14:33:58 +0000 : MichelleC
Sounds great to me, too. I often have several tabs open doing stuff and
it's easy to lose my place and leave a page with unfinished edits.
Would this alert you when you're going to close an unsaved tab/window
as well?
Michelle
------------------------------------------------------------------------
Mon, 12 Sep 2005 14:34:19 +0000 : MrMattles
Great for us multitaskers that rush and click the wrong thing
------------------------------------------------------------------------
Mon, 12 Sep 2005 14:36:52 +0000 : chx
Very strong -1 as this is IE only.
------------------------------------------------------------------------
Mon, 12 Sep 2005 14:38:40 +0000 : praseodymium
Konqueror already does this, +1 for the idea in general.
------------------------------------------------------------------------
Mon, 12 Sep 2005 15:07:21 +0000 : webchick
Yeah, I think chx is correc that onbeforeunload is an extension
developed by MS [1] (it's not in the ECMAScript specification [2].
However, I found out that this is implemented in Mozilla since 1.7 [3]
(which corresponds to Firefox 1.0, I think?) and I've tested
Blogger.com's version of this functionality in:
Firefox 1.0.6 (working)
Firefox Deer Park Alpha 1 (working)
Opera 8.0.2 (working)
Safari 1.3 (does NOT work)
Safari 2.0.1 (working)
So it seems to be a 'de facto' standard if nothing else.
[1]
http://msdn.microsoft.com/workshop/author/dhtml/reference/events/onbeforeun…
[2]
http://www.ecma-international.org/publications/standards/Ecma-262.htm
[3] http://www.mozilla.org/status/2004-03-01.html
------------------------------------------------------------------------
Mon, 12 Sep 2005 15:09:15 +0000 : webchick
Also, I should clarify... that "does NOT work" in Safari doesn't display
any errors or anything, it just doesn't save the form results as
expected (so pre-Tiger Safari users are going to be used to this). So I
don't see any harm in including this functionality since it seems to
degrade gracefully in non-supporting browsers.
------------------------------------------------------------------------
Mon, 12 Sep 2005 21:10:18 +0000 : m3avrck
Attachment: http://drupal.org/files/issues/node.module_11.patch (951 bytes)
And a patch is ready! Code was based on many example, including this [4]
and this [5] along with adding my own thoughts and what not ;)
[4]
http://www.codestore.org/store.nsf/cmnts/451FA051398A9AF486256EE0000FB7D1?O…
[5] http://www.blogger.com/app/scripts/formcheck.js
------------------------------------------------------------------------
Mon, 12 Sep 2005 21:10:45 +0000 : m3avrck
Attachment: http://drupal.org/files/issues/formcheck.js (1.54 KB)
And here is the JS to throw in misc/.
------------------------------------------------------------------------
Mon, 12 Sep 2005 21:22:56 +0000 : m3avrck
Attachment: http://drupal.org/files/issues/formcheck_0.js (1.61 KB)
Better JS file attached without tabs. Also, tested and working great in
FF and IE6. Doesn't work in Opera 8, however no errors are present, I
believe this is just because the event handler is not supported. If
there is a work around for Opera, please let me know!
------------------------------------------------------------------------
Mon, 12 Sep 2005 21:24:18 +0000 : m3avrck
Attachment: http://drupal.org/files/issues/formcheck_1.js (1.61 KB)
One more try with those tabs.
------------------------------------------------------------------------
Mon, 12 Sep 2005 21:32:48 +0000 : moshe weitzman
hmmm. i usually find these prompts annoying. any chance we can attach
the behavior only to the node and comment forms? those are the "high
risk" areas. what do others think?
------------------------------------------------------------------------
Mon, 12 Sep 2005 21:42:39 +0000 : m3avrck
Yes, the JS is only loaded on the node edit/create pages, won't affect
any admin/login/etc form. Also, the prompt is unobstrusive and if you
goto save a node you don't get a warning that the contents have changed
because you are explicity saving the node (hence no reason!).
------------------------------------------------------------------------
Mon, 12 Sep 2005 21:53:01 +0000 : Dries
I want some JS-folks to review the code.
------------------------------------------------------------------------
Mon, 12 Sep 2005 22:09:10 +0000 : m3avrck
Attachment: http://drupal.org/files/issues/drupal_15.patch (1.94 KB)
After talking with Drumm on IRC, this patch makes the integration with
Drupal much simpler and it's off by default. Only turned on for the
node edit/change page right now but any module/form can easily add this
by passing a 'TRUE' parameter.
------------------------------------------------------------------------
Mon, 12 Sep 2005 23:38:35 +0000 : nedjo
+1 on idea, js looks generally good, a few suggestions:
1. Instead of writing onsubmit via PHP, use a js addLoadEvent call.
2. Shouldn't the return false in isElementChanged be at the end
(outside the switch block)?
3. It's be nice to find a way to make messages like 'You have unsaved
changes.' translatable. Pass in global js variables via a t('') call?
4. onbeforeunload event should probably be in a if isJsEnabled test,
and should parallel drupal.js's event adding (see addLoadEvent).
5. Comments should be in standard format and in present tense, e.g.,
/**
* Checks to see if a form has been changed after the page loads
*/
6. e_ should be just e to match other js files, e.g., autocomplete.
------------------------------------------------------------------------
Tue, 13 Sep 2005 13:54:35 +0000 : m3avrck
Attachment: http://drupal.org/files/issues/formcheck_2.js (1.58 KB)
Ok here is an updated JS file.
A few notes, I couldn't get the addSubmitEvent() in drupa.js to
reliably work so I had to set the isSubmit() true in the PHP creation
of the form. If you look at Blogger.com, they do this as well... so
either we both missed an obvious way to do this, or that is the most
practical. Hopefully some wise JS gurus will chime in with an answer.
Same goes for onbeforeunload event, which is completely different then
addEvent defined in drupal.js.
As for the t('') I agree this would be useful but I'm not sure of the
best way to do this. One way would be to put in form() a t('') passed
in, and then write this to a var in formcheck.php which returns a JS
file type. Thoughts?
------------------------------------------------------------------------
Tue, 13 Sep 2005 14:06:44 +0000 : Junyor
FWIW, Opera doesn't support the onbeforeunload event. However, this
issue doesn't affect Opera anyway: form contents are retained in
history as long as the page isn't closed. IOW, this feature doesn't
work in Opera, but it isn't needed either.
------------------------------------------------------------------------
Tue, 13 Sep 2005 14:15:56 +0000 : m3avrck
Attachment: http://drupal.org/files/issues/formcheck_3.js (1.64 KB)
Updated JS styling and JS-killswitch after talking with Unconed on IRC.
------------------------------------------------------------------------
Tue, 13 Sep 2005 14:39:15 +0000 : m3avrck
Just to build on Junyor's comment [6] this functionality is built into
Opera 8 and it *doesn't* produce any errors.
[6] http://drupal.org/#comment-44066
------------------------------------------------------------------------
Tue, 13 Sep 2005 15:04:37 +0000 : m3avrck
Attachment: http://drupal.org/files/issues/drupal_16.patch (2.1 KB)
Updated patch to fix possible problem of overwriting onsubmit event
handler thanks to Thox on IRC.
------------------------------------------------------------------------
Tue, 13 Sep 2005 15:13:59 +0000 : webchick
I tested this and can confirm that it works in *both* versions of Safari
that I have access to: 2.0.1 (OS X Tiger) and 1.3 (OS X Panther). So
looks like this code goes one better over the Blogger.com stuff,
because their stuff doesn't workk in 1.3. Nice job! ;)
------------------------------------------------------------------------
Tue, 13 Sep 2005 15:25:21 +0000 : m3avrck
Well I'm gonna set this to commit then. Tested and working on IE, FF,
Safari. Doesn't work or break Opera or Konqueror but not needed in
these cases. Thox and Unconded have offered thoughts and I've modified
code as needed. Doesn't seem like there is anything else left except a
commit :)
------------------------------------------------------------------------
Tue, 13 Sep 2005 17:13:48 +0000 : Bèr Kessels
In general I dislike the feature. Konqueror somehow dies this, and that
is the way it /should/ be. Browsers should take care of this, not the
web app.
But, since it is only konq. this patch has a good enough additional
value :)
I would like to see this patch tested with, tinyMCE and HTMLAREA, at
least. For I am quite sure this will break these modules so bad that
they are near unusable.
Which brings me to the next point: using the textarea hook a simple
module could take care of this.
I would very very much prefer this living in a contrib, or even a core
module. Just not "enforced" on me.
And the last point: if this is for core, please use that textarea hook
too. This is where that hook is for: extending the textareas.
------------------------------------------------------------------------
Tue, 13 Sep 2005 17:32:25 +0000 : m3avrck
Attachment: http://drupal.org/files/issues/drupal_18.patch (2.23 KB)
Updated patch after talking with Thox and Uncloned to attach this event
only to forms with a specific class (hence avoiding the problem of
being on an edit page with other admin/search forms).
------------------------------------------------------------------------
Tue, 13 Sep 2005 17:32:55 +0000 : m3avrck
Attachment: http://drupal.org/files/issues/formcheck_4.js (1.67 KB)
Updated JS file.
------------------------------------------------------------------------
Tue, 13 Sep 2005 17:45:21 +0000 : m3avrck
Berkes, this patch *does not* break TinyMCE, just tried. However,
TinyMCE does not take into account this script. This should be an easy
patch to TinyMCE.
Also, this doesn't affect just textareas, it affects all fields within
a given form (e.g., text fields, check boxes, etc...). Sure the blunt
of editing/creating a node is in the textarea, but there are still all
of those other changes that can be made (new title, revision status,
front page promotion, etc...) so this needs to account for them all
which it does.
This script is unobtrusive and degrades perfectly well. It is tested
and working in FF, IE, Safari and doens't cause problems in Opera or
Konqueror which don't need this feature anyways (since they already
have it).
The usability boost of this script is too enormous *not* to include in
core. As a contributed module, it is really too flaky, and along those
lines, autocomplete.js, inlineuploads.js and related should be in their
own contributed modules :)
I do see your points and I hope this clears it up. It doesn't cause any
problems and only attaches to specified forms, and is off by default.
Any module can easily make use of this script when they use: form(...,
TRUE). This is the same behavior as the other JS files included with
HEAD as well.
Once this is in core I'll work on a patch to TinyMCE to get that up to
speed ;-) (and as such, TinyMCE still works fine, no probs/errors/etc,
and good reason too if you look at how the code *actually* works ;-)).
------------------------------------------------------------------------
Tue, 13 Sep 2005 17:54:37 +0000 : Bèr Kessels
I see. the "why" for not using form textarea is perfectly valid. And I
tried to explain that, eventough I feel this belongs in the Agent, it
is a usability enhancement for all the others using sillier browsers
;).
And you are right about that part of contributions, exp since you
cannot use hook_texarea, having this in a contrib cannot be achieved.
I hereby retract my hesitations. (though I have no time to reapply the
latest patch and test it on konq. The last JS updates broke drupal on
konq, which Steven fixed, right away though!)
------------------------------------------------------------------------
Thu, 15 Sep 2005 16:31:11 +0000 : m3avrck
Ready to go!
------------------------------------------------------------------------
Thu, 15 Sep 2005 20:50:06 +0000 : nedjo
Attachment: http://drupal.org/files/issues/formcheck.patch (1.37 KB)
Nice work m3avrck. I've made some tweaks to minimize code additions on
the PHP side and improve the js. Mainly, it's now enough to set the
'formcheck' class attribute for a form. function form() will add the
js file, and the needed onsubmit event will be added dynamically to
forms. This is consistent with other core js files, which don't
hard-code event calls but add them dynamically, based on js support.
The useful functionality is unchanged.
------------------------------------------------------------------------
Thu, 15 Sep 2005 20:50:44 +0000 : nedjo
Attachment: http://drupal.org/files/issues/formcheck_5.js (2.12 KB)
The revised js file.
1
0
[drupal-devel] [feature] Admin option to toggle between headline, teaser, and full text in RSS feeds
by walkah 16 Sep '05
by walkah 16 Sep '05
16 Sep '05
Issue status update for
http://drupal.org/node/3986
Post a follow up:
http://drupal.org/project/comments/add/3986
Project: Drupal
Version: cvs
Component: node.module
Category: feature requests
Priority: critical
Assigned to: Anonymous
Reported by: Boris Mann
Updated by: walkah
Status: patch (code needs review)
oh yeah, i forgot to mention one other little thing, that I think is
nice... if you're using the teaser length (as is the default) it
inserts a read more link in the description... which makes it obvious
to your readers that there is more to the post :)
(and a good way to drive traffic back to your site, i suppose)
walkah
Previous comments:
------------------------------------------------------------------------
Fri, 07 Nov 2003 00:22:51 +0000 : Boris Mann
As the title says. It might be nice to add a feed.module to Drupal that
consolidates all feed-related info in one place, so that this can be
toggled for different types of nodes all in one place.
------------------------------------------------------------------------
Tue, 14 Jun 2005 23:44:20 +0000 : Boris Mann
I love the fact that this has been active forever :P
One day we will have a feed.module to rule them all...
------------------------------------------------------------------------
Wed, 14 Sep 2005 14:41:10 +0000 : Boris Mann
Attachment: http://drupal.org/files/issues/node_4.module (70.01 KB)
What the heck, let's make this critical. Google launched blogsearch [1]
today -- it reads feeds, so if you're not outputting full feeds, it
means Google's not indexing everything you put out.
Attached is an updated node.module which sets options for this, as well
as includes an option for RSS or Atom feeds (but doesn't implement this
yet). If someone could refactor and turn into a patch, we could still
get this into 4.7.
[1] http://google.com/blogsearch
------------------------------------------------------------------------
Wed, 14 Sep 2005 14:58:08 +0000 : Dries
Would this be your first core patch? ;)
------------------------------------------------------------------------
Wed, 14 Sep 2005 15:21:02 +0000 : Boris Mann
It would/will be if I were better at rolling patches against HEAD and
didn't stuff so much stuff into it...
...back to non-coding work.
------------------------------------------------------------------------
Wed, 14 Sep 2005 16:00:21 +0000 : walkah
Attachment: http://drupal.org/files/issues/node-feed-length.patch (3.95 KB)
so, Boris is a wimp... but this is a pretty cool feature. attached is a
re-worked patch. all working 'n' stuff.
------------------------------------------------------------------------
Thu, 15 Sep 2005 21:51:34 +0000 : walkah
Attachment: http://drupal.org/files/issues/feeds.patch (10.25 KB)
at Dries' request - here's an updated patch (where I hereby admit to
sneaking in some other things I'd wanted to do). Hopfeully it's worthy
to be snuck in at the deadline. (it's even still the 15th in .be for
another couple minutes).
So this patch does the following:
* adds a "feed settings" section to admin/settings where 2 new settings
are introduced:
* number of items per feed
* default length of feed descriptions (title only, teaser, full)
* patches all of core to obey the above - including the new aggregator
(out) feeds
* adds support for adding namespaces in _nodeapi('rss item') - which
means things like iTunes RSS and yahoo's media rss can be implemented
by the appropriate modules (i.e. audio.module)
* includes some additional info in the default node feed - specifically
the element (links directly to comments) - and dc:creator - to show
node author information.
------------------------------------------------------------------------
Thu, 15 Sep 2005 22:09:43 +0000 : sepeck
+1 on the features. This is one of those things that gets mentioned and
or requested in the forums enough and I sure would like it.
1
0
Issue status update for
http://drupal.org/node/27364
Post a follow up:
http://drupal.org/project/comments/add/27364
Project: Drupal
Version: cvs
Component: filter.module
Category: tasks
Priority: normal
Assigned to: Bèr Kessels
Reported by: Bèr Kessels
Updated by: m3avrck
Status: patch (ready to be committed)
Attachment: http://drupal.org/files/issues/filter.module_13.patch (20.33 KB)
One more cleanup, fixed a 'hairy' issues. Code is solid, implementation
110% (to the best of my abilities over the past 2 days, devoted way too
much time to this patch I think ah well). Ready to go!
m3avrck
Previous comments:
------------------------------------------------------------------------
Sun, 24 Jul 2005 09:30:54 +0000 : Bèr Kessels
This is a mockup for the Filter UI. Currently it is soo complex, that I
dare to call it broken.
Please comment on this, for I will not ake any patches, when the
general idea is disliked.
The idea is t split filters and input formats better. Filters are
filters, defined in modules. Input formats are bundles of filters. This
is how we have it ATM, but the interface fails to communicate that. I
tried to develop a consistent (with the rest of Drupal) interfce that
makes it clearer what is what.
The menu is as follows:
* administer
** ....
** settings
*** input formats
*** filters
** ...
------------------------------------------------------------------------
Sun, 24 Jul 2005 09:37:10 +0000 : Bèr Kessels
Attachment: http://drupal.org/files/issues/input-formats_list1.png (16.34 KB)
* administer
** ....
** settings
*** input formats >> see attachement 1
*** filters
**
------------------------------------------------------------------------
Sun, 24 Jul 2005 09:39:02 +0000 : Bèr Kessels
Attachment: http://drupal.org/files/issues/input-formats_add.png (23.42 KB)
* administer
** ....
** settings
*** input formats >> see attachement 2, tab 2
*** filters
**
Note: The default checkbox lmay seem a bit odd. But checking it will
remove the "default status" from the current "default" one and make
this one "default". The help text, and a drupal_set_message should
explain this.
------------------------------------------------------------------------
Sun, 24 Jul 2005 09:40:08 +0000 : Bèr Kessels
Attachment: http://drupal.org/files/issues/input-formats_edit_format.png (22.17 KB)
* administer
** ....
** settings
*** input formats >> clicking a 'configure' link in the table of
attachement 1
*** filters
**
------------------------------------------------------------------------
Sun, 24 Jul 2005 09:40:55 +0000 : Bèr Kessels
Attachment: http://drupal.org/files/issues/input-filters_list.png (36.24 KB)
* administer
** ....
** settings
*** input formats
*** filters >> see attachement 4
**
------------------------------------------------------------------------
Sun, 24 Jul 2005 09:41:40 +0000 : Bèr Kessels
Attachment: http://drupal.org/files/issues/input-formats_edit.png (22.63 KB)
* administer
** ....
** settings
*** input formats
*** filters >> clicking a 'configure' link in the table of attachement
4
**
------------------------------------------------------------------------
Mon, 25 Jul 2005 14:46:27 +0000 : Bèr Kessels
IMO this makes the interface easier. But other disagree. And because it
also removes one feature: (being able to use E.g. HTML in different
input formats, with different settings)
I'll simply wont fix this :(
------------------------------------------------------------------------
Thu, 28 Jul 2005 13:36:12 +0000 : Bèr Kessels
Attachment: http://drupal.org/files/issues/filter_module_UI_consistancy.patch (10.28 KB)
I decided to go for it anyway. Be it in a slightly different way then my
initial mockups. The difference is that I left the filters where they
are, hidden beneath the formats.
So, here is the patch that makes the filter UI more consistent with
screens like blocs, menus, vocabularies et al
also nice to note is that:
93 lines are added, 104 are removed. So netto we have less code :)
(cvs diff filter.module | grep ^+ | wc -l)
------------------------------------------------------------------------
Thu, 28 Jul 2005 13:37:02 +0000 : Bèr Kessels
Attachment: http://drupal.org/files/issues/input-formats_list_html.png (44.64 KB)
Here is how the listing now looks.
------------------------------------------------------------------------
Thu, 28 Jul 2005 13:37:57 +0000 : Bèr Kessels
Attachment: http://drupal.org/files/issues/input-formats_edit_format_html.png (113.71 KB)
And the "configure" screen.
The 'add' screen looks exactly the same, only with the default values
pre-filled.
------------------------------------------------------------------------
Thu, 28 Jul 2005 13:39:19 +0000 : Bèr Kessels
Attachment: http://drupal.org/files/issues/input-formats_edit_format_too_long.png (121.82 KB)
Oh, And here is a really nice example of why the current screen is no
good.
And here I "only" have four roles. I run a site with 12 roles, imagine
this screen then!
------------------------------------------------------------------------
Thu, 28 Jul 2005 13:48:35 +0000 : Bèr Kessels
Attachment: http://drupal.org/files/issues/filter_module_UI_consistancy_HEAD.patch (10.24 KB)
And here is a pathc for HEAD (I forgot that I developed this on a 4.6.2
codebase. Sorry)
------------------------------------------------------------------------
Thu, 28 Jul 2005 13:55:25 +0000 : stefan nagtegaal
I like this very, very much!
This is - indeed - much better than the current UI. This always fits,
and makes the life of people who use a fixed width theme much nicer..
Ber, FYI (you probably know this too), 'admin/access' does also break
fixed width themes due to the fact that it expands the width of the
table when more roles are being added..
Good catch! I like it much more this way..
+1 from me...
------------------------------------------------------------------------
Fri, 29 Jul 2005 07:27:34 +0000 : Dries
The code style needs work (spaces, tabs, 'as' -> 'AS'), the code
comments need work, and debug statements should be removed.
Screenshots look good to me. db_query('UPDATE {filter_formats} SET
cache = %d, name = \'%s\', roles = \'%s\' WHERE format = %d',
(int)$cache, $name, $roles, $format); can be written better/shorter
quote-wise.
------------------------------------------------------------------------
Fri, 29 Jul 2005 09:04:16 +0000 : Bèr Kessels
Attachment: http://drupal.org/files/issues/filter_module_UI_consistancy_HEAD_0.patch (10.37 KB)
Dries, thanks a lot for the review. OI fixed your comments. Or so I
hope. code-style.pl was of no use (can that *please* be removed from
core?) because it chokes on the help texts. It also pointed out a lot
of old formatting isues, whic, when fixed wuold flood this patch with
unrelated fixes. I tried to narow my style-searching to the areas I
touched. And I made the comments more verbous.
The query is fixed. it saves no characters, but looks better now.
Thanks for the tip.
The print_r..... blush. thats what I get for not running my default
grep -r print_r on my code after finishing up...
I could not find a lot of spaces and tabs. So it lmight be that i
missed one. I triple checked it though.
------------------------------------------------------------------------
Fri, 29 Jul 2005 09:32:21 +0000 : Steven
Moving the role settings inward does fix the wide-table problem, but it
makes the filter configuration much more opaque. We could perhaps fix
this by showing the roles as a comma-separate list in the input formats
table. Such a list can wrap and will not stretch the table.
Other than that:
* Having the instructions for the Roles and Filters form_group() at the
bottom is a bit weird. The distance is too big.
* The table that was used for toggling filters on/off was much more
compact before, and IMO a lot clearer. Why change to a flat list with
the description staggered below each item?
------------------------------------------------------------------------
Fri, 29 Jul 2005 10:31:30 +0000 : Bèr Kessels
consistancy, consistancy and more consistancy.
There really is nothing worse that having a different 'concept' of UI
for every thing in Drupal. We are going in the right direction, with
the blocks being editable objects, menus acting like that, taxonomy,
users, etc..
I wanted to make this act similar. I am not at all happy with the fact
tah the list is still a form. But we need this, for setting the
default.
A big -1 for a comma-separate list. That is extremely hackish, even
worse useabilitywise and just silly
* we should avoid typing when not needed.
* we should avoid errors on input, when they can be avoided (a typo
is made very easy, I know all about it) Form set errors won't fix that
usability -wise.
I agree that you sort-of loose the overview. But IMO that is a minor
loss comared to what we gain, usability-wise.
The wtoo-wide was onlywhat triggered me. But do not think that I am
noly making this patch to fix that issue. This patch is there to
improve usability, through consistancy. o make drupal behave the same
in most places in admin. If you know one screen, you know most of them.
We really should move away from custom-hacks for every page, because
that is useability rule #1: consistancy. Stadardisation, even if
sometimes a custom hack might make things easier in that single case,
it will reduce your overall usability so much that nearly ever it is
worth that hack.
That select-boxes instead of the table issue: consistancy. As well that
it completely broke fluid CSS layouts, my solution is more consistant,
and uses forms the way they are meant. If we cannot use $descritption
in checkboxes they should be removed. but IMO it feels much more
consistant. Tables are for tabular data, and this is simply a list of
items, with additional data.
And i do not really get what you mean with "too far down". Do you mean
that you would like to see the order of the groups different?
------------------------------------------------------------------------
Fri, 29 Jul 2005 13:31:24 +0000 : Dries
I haven't tested Ber's patch yet but looking at the screenshots, it like
what I see. I remember being confused by the current filter UI, and
often, I still am.
------------------------------------------------------------------------
Fri, 29 Jul 2005 19:53:26 +0000 : moshe weitzman
I dislike the recent movement away from overview pages. I think we can
still provide and overview while allowing editing to happen in a
dedicated form. An example in the wrong direction is 'content types'
admin. It is impossible to get an overview, and the listing page is
worthless. I agree with Steven on this one.
It is true that consistency is desirable. But consistent crap is not.
------------------------------------------------------------------------
Fri, 29 Jul 2005 20:02:39 +0000 : killes(a)www.drop.org
I agree with Moshe. Getting a quick overview about what is set how is
essential for an admin.
------------------------------------------------------------------------
Sat, 30 Jul 2005 00:27:15 +0000 : Robrecht Jacques
Overall I like the screenshots. Did not test the patch.
Bèr, what I think Steven (#15) meant by "showing the roles as a
comma-separate list in the input formats table" is that as an overview
page it would be better if you added a list (not an input box!) to
screenshot "input-formats_list1.png" (comment #1). Add a column that
reads "Roles" (or "Enabled for") and then for each row a comma
seperated list of the roles that can use this input format (or maybe
even better a HTML list). You would still need to click "configure" to
_change_ the roles.
The "Default" text (not a radio button) you already show in the
"Options" column is something similar: it immediately shows that this
input format is the default without you having to go to the "configure"
page. Why not do the same for "roles"?
If this is what Steven meant, then I tend to agree with him.
And to help moshe and killes: maybe you could even add a column that
_lists_ the used input filters. Again, only a list, not a way to change
it. That's what the "operations" column is for.
A table like that will "fluid" better than what we have now, still it
is a _complete_ overview of the settings.
I could have misunderstand someone... I have the tendency to do that...
------------------------------------------------------------------------
Mon, 22 Aug 2005 08:21:32 +0000 : Bèr Kessels
Attachment: http://drupal.org/files/issues/filter_interface_improvements.patch (14.52 KB)
by popular demand: a comma separated list.
------------------------------------------------------------------------
Mon, 22 Aug 2005 08:24:31 +0000 : Bèr Kessels
Attachment: http://drupal.org/files/issues/format_now_contains_roles.png (22.09 KB)
and a screenshot
------------------------------------------------------------------------
Mon, 22 Aug 2005 18:39:44 +0000 : Dries
Please check your use of print theme('page', $output). Normally, you
just return $output.
------------------------------------------------------------------------
Mon, 29 Aug 2005 18:54:28 +0000 : Bèr Kessels
All instances of theme('page',...) in filter.module are now changed to
return ... ;
furthermore, the patch is the same.
------------------------------------------------------------------------
Mon, 29 Aug 2005 20:04:02 +0000 : Uwe Hermann
Bèr, I think you forgot to attach your updated patch.
------------------------------------------------------------------------
Mon, 29 Aug 2005 20:27:39 +0000 : Bèr Kessels
Attachment: http://drupal.org/files/issues/filter_interface_improvements_2.patch (13.52 KB)
my email client has this nice warning system for attachements. Maybe
drupal should search for the word attachement too, and when no att.
found give an error ;). Or maybe i should just learn to pay attention.
Guess that is easier.
Anyway, here it is.
------------------------------------------------------------------------
Thu, 08 Sep 2005 20:22:54 +0000 : Dries
I wanted to apply this patch but:
1. I can't change the default input format. 'Save'-button doesn't
work.
2. I got confused by the fact I can't change the roles of the default
filter. I think the form group description should explain this.
3. form_group(t(filter)) should be form_group(t('filter'), ...).
------------------------------------------------------------------------
Thu, 08 Sep 2005 20:51:24 +0000 : m3avrck
Found a few more issues:
If I go into 'Configure' for 'PHP Code' and click the 'Configure' tab
at the top and then click 'list filters' link in the text, I get this
warning with PHP5 warning: Missing argument 1 for filter_admin_format()
in \drupal\modules\filter.module on line 378.
Also, it is sort of confusing as to what the 'List' tab implies. For
example, if I click on 'input formats' in the admin menu, I get a list
of the current filters. When I click 'configure' for one of those, I
see the options for that filter. However, it says 'list' in one of the
tab, which doesn't really mean much. I thought that was the list of
filters, not the options for that filter. That should be cleaned up.
Also, there is no way to get back to the full list of filters unless
you click on 'input formats' in the admin menu. A setting/link to fix
this would be great.
Also, where is the link to add filters???
I think the options/layout/tabs should mimic of that of admin > users.
So on admin > input formats, it has the tabs 'list', 'add format' ...
very clear and consistent.
On a configure page for a filter, it should have 'list', 'view',
'configure', 'rearrange' ... this would make it easier to navigate and
get back to the original list of filters.
Make sense? I think this and Dries' comments put this patch over the
top :)
------------------------------------------------------------------------
Fri, 09 Sep 2005 01:48:55 +0000 : tag
In my initial battle to figure out this module's (quite nice)
functionality, what tripped me up the most was actually the
nomenclature.
The way I keep it straight in my head now is to translate "input
format" to "filter set". If you view those (the current) screens with
this in mind, I think it's a lot easier to understand what's what. It
sort of describes this in the help text, but the terms "filter" and
"input format" don't really convey the relationship between the two --
there's no way to intuit that an "input format" is a collection of
"filters". Not to my mind at least... and well, we know nobody reads
instructions...
Are there any technicalities that make renaming "input format" to
"filter set" not accurate? Or does someone have a better term/terms to
better show the relationship of these elements? (I'm aware of filters
in servlet architectures but I don't think there's much of a collision
with that usage).
Anyhow, I guess this doesn't quite address the UI controls and/or
layout, but would still help a lot.
------------------------------------------------------------------------
Fri, 09 Sep 2005 06:35:34 +0000 : Bèr Kessels
I prefer filter set. In fact: I like it a lot. Anyone else ideas on
this?
------------------------------------------------------------------------
Fri, 09 Sep 2005 10:18:18 +0000 : Dries
I too had problems with the terminology; it took me months to get used
to 'input formats' versus 'filters'. Using 'filter sets' might improve
the situation -- especially from an administrator's point of view when
you have to wrap your head around the UI/difference. I'm not native
English, but 'filter set' sounds more explanatory, yet slightly more
geeky so I'm not sure if it flies for users who don't need to
understand the underlying concepts (eg. under the node and comment
submission forms).
------------------------------------------------------------------------
Fri, 09 Sep 2005 11:00:05 +0000 : Bèr Kessels
a heads up: I ma redoing the patch. But decided no to change the name
yet. That is a too big change. IT should be in a separate issue, IMO.
------------------------------------------------------------------------
Fri, 09 Sep 2005 15:27:43 +0000 : Bèr Kessels
Attachment: http://drupal.org/files/issues/filter_module_UI_consistancy_2.patch (13.57 KB)
* Bugs as reported by dries fixed.
* The [add] tab not appearing is due to your menu caching, refresh that
please.
* Fixed an additional bug: Some agents do not send TRUE for disabled
checkboxen. Also in current filter admin.
and people: we have a problem. Deleting a filter trows errors, due to
the revisions changes. that happens in filter module now, but also
after this patch. I have too little knowledge of the filter system to
fix that, and IMO that is a separate issue. It should be fixed right
after this patch is committed.
------------------------------------------------------------------------
Fri, 09 Sep 2005 15:57:18 +0000 : Bèr Kessels
FYI: the delete bug is waiting here: http://drupal.org/node/30781
------------------------------------------------------------------------
Fri, 09 Sep 2005 18:18:17 +0000 : m3avrck
Get this warning in PHP5: Warning: Missing argument 1 for
filter_admin_format() in \modules\filter.module on line 379
I have traced this error back to line 240. Why are there no callback
arguments like above on line 235? Looks like a source of a problem/bug
here so needs to be addressed, not sure exactly how to fix it myself
(otherwise I would). Should be easy it seems.
Also, for a quick and easy usability improvement, on line 239, change
t('list') to t('view') ... makes the menus less confusing.
After those fixes, looks like this patch is ready to be committed :)
------------------------------------------------------------------------
Fri, 09 Sep 2005 18:23:27 +0000 : m3avrck
Also, this dialog is a bit confusing:
"Choose which roles may use this filter format
You are editing the default format. For the default format, all roles
must be enabled. Therefore you cannot change them.
"
Maybe make it so that first line doesn't appear there on that page?
------------------------------------------------------------------------
Tue, 13 Sep 2005 13:35:50 +0000 : Bèr Kessels
Attachment: http://drupal.org/files/issues/filter_module_UI_consistancy_2_0.patch (13.59 KB)
changed that line of help.
Can this please still be taken in consideration before the freeze?
------------------------------------------------------------------------
Tue, 13 Sep 2005 18:29:28 +0000 : m3avrck
Can't apply patch, getting error:
Patch malformed at line 287
------------------------------------------------------------------------
Tue, 13 Sep 2005 19:10:07 +0000 : Bèr Kessels
Attachment: http://drupal.org/files/issues/filter_interface_improvements_2_0.patch (14.19 KB)
strange. the dowloaded one breaks too, yet the one i uploaded stll
works.
anyway, rerolled
------------------------------------------------------------------------
Tue, 13 Sep 2005 19:25:25 +0000 : Dries
IMO, the form function needs more work. You need to group the form
construction and the form saving. Right now, when you don't provide a
title, you are given an error and an emptied form. This may be a
left-over from the original code though but it would be cool if you
could tidy this up.
The form_group() description still need a trailing point.
There is a broken link in the following help text on the 'add input
format'-page: /If you notice some filters are causing conflicts in the
output, you can [rearrange] them./.
------------------------------------------------------------------------
Tue, 13 Sep 2005 19:30:12 +0000 : Bèr Kessels
dont have time anymore. sorry.
------------------------------------------------------------------------
Tue, 13 Sep 2005 20:50:34 +0000 : m3avrck
new patch soon!
------------------------------------------------------------------------
Tue, 13 Sep 2005 22:10:25 +0000 : m3avrck
Attachment: http://drupal.org/files/issues/filter.module_10.patch (20.27 KB)
Ok here's a new patch. Lot's of fixes in this one (all of the ones from
above except the one noted below), including support for the new
revisions patch.
Additionally, 'input formats' has been renamed to 'input filters'.
After debate on IRC, and the above comments in this post, it seems that
'input formats' is somewhat misleading and doesn't make sense. 'input
filters' clears this up and makes sense to both native and non-native
English speakers (as tested in IRC anywho ;)). This also makes more
sense since Drupal refers to everything as 'filters' and not 'formats'.
However, there is one issue still left unresolved: If you create a new
input filter, and don't specify a title, page reloads clearing all
filled in fields and prompts the error message. Additionally, a blank
filter is created.
Wanted to get this patch posted, I'll look at it later today but if
someone can get this fixed easily, please do, thanks!
------------------------------------------------------------------------
Tue, 13 Sep 2005 22:38:05 +0000 : Bèr Kessels
Attachment: http://drupal.org/files/issues/filter_interface_improvements_3.patch (21.49 KB)
this patch should fix the issue m3 rasies abuot amepty formats being
created.
Yes, i use a simple drupal_goto, in case of a for error. And no, it is
not very easy to get the old posted data back.
------------------------------------------------------------------------
Tue, 13 Sep 2005 23:44:26 +0000 : moshe weitzman
the most visible place for this 'input format' term is on the node form.
thats where ordinary users see this stuff. in that context, i don't
think 'input filters is an improvement over input formats. the question
we are asking our users is 'what is the format of your post'?, not what
filters do you want applied ... just my .02. sorry i wasn't in IRC when
this came up. this need not hold up the whole patch.
------------------------------------------------------------------------
Wed, 14 Sep 2005 06:48:03 +0000 : Bèr Kessels
Moshe. I agreed with you, and was against the name change. In this patch
at least.
However, it slipped in.
Stetting code to be committed for it has gone trough so many review
cycles that this patch has MUCH better code than the rest of the filter
module, which REALLY needs a big overhaul :)
------------------------------------------------------------------------
Wed, 14 Sep 2005 13:37:27 +0000 : Dries
Are you saving the data before validating it? If we want to convert
this form to the new form API, we have to fix this cleanly. Sorry.
I agree with Moshe that 'input filters' is suboptimal. People want to
select how their text is going to be /processed/. The word/filter/
sounds rather technical to me. Also, the difference between a single
filter and a set of filters becomes rather blurry to the point it could
be very confusing.
------------------------------------------------------------------------
Wed, 14 Sep 2005 13:41:42 +0000 : m3avrck
Well I was the one that changed 'input filters' to 'input formats' as
that seemed to be the best thing we could come up. I guess it got
confusing because people wanted this to change but maybe not in this
patch. So I will revert that change in a forthecoming patch.
Additinally, this patch is *not* ready. I was going through the form
logic last night and it is a bit off, hence why errors are displayed
along side a an empty form.
I'm going to work as hard as I can and as fast to clean this patch up
like I mentioned I would yesterday. I'll have some ready soon enough
that will be commit worthy.
------------------------------------------------------------------------
Wed, 14 Sep 2005 14:22:41 +0000 : Bèr Kessels
according to me its a go or leave. if m3 or anyone else wants to take
over fine. I am out. no time.
------------------------------------------------------------------------
Wed, 14 Sep 2005 21:30:45 +0000 : m3avrck
Attachment: http://drupal.org/files/issues/filter.module_11.patch (28.03 KB)
Ok new patch! Everything is fixed. Code has been reworked and lots of
bugs fixed. Code should also be simpler to read (or at least follow in
terms of logic now). Ready to go!
------------------------------------------------------------------------
Wed, 14 Sep 2005 22:02:26 +0000 : Souvent22
+1. I honestly have not played around with the filter formats ever. I
looked at them, adn they were a mess. Did the patch, and everything was
clear as day. Anything that makes drupal easier to use...AND makes it
easier to understand and make sense should def. be included.
------------------------------------------------------------------------
Thu, 15 Sep 2005 21:36:17 +0000 : m3avrck
Attachment: http://drupal.org/files/issues/filter.module_12.patch (20.31 KB)
Updated patch with Dries fixes in.
1
0
[drupal-devel] [feature] Admin option to toggle between headline, teaser, and full text in RSS feeds
by sepeck 16 Sep '05
by sepeck 16 Sep '05
16 Sep '05
Issue status update for
http://drupal.org/node/3986
Post a follow up:
http://drupal.org/project/comments/add/3986
Project: Drupal
Version: cvs
Component: node.module
Category: feature requests
Priority: critical
Assigned to: Anonymous
Reported by: Boris Mann
Updated by: sepeck
Status: patch (code needs review)
+1 on the features. This is one of those things that gets mentioned and
or requested in the forums enough and I sure would like it.
sepeck
Previous comments:
------------------------------------------------------------------------
Fri, 07 Nov 2003 00:22:51 +0000 : Boris Mann
As the title says. It might be nice to add a feed.module to Drupal that
consolidates all feed-related info in one place, so that this can be
toggled for different types of nodes all in one place.
------------------------------------------------------------------------
Tue, 14 Jun 2005 23:44:20 +0000 : Boris Mann
I love the fact that this has been active forever :P
One day we will have a feed.module to rule them all...
------------------------------------------------------------------------
Wed, 14 Sep 2005 14:41:10 +0000 : Boris Mann
Attachment: http://drupal.org/files/issues/node_4.module (70.01 KB)
What the heck, let's make this critical. Google launched blogsearch [1]
today -- it reads feeds, so if you're not outputting full feeds, it
means Google's not indexing everything you put out.
Attached is an updated node.module which sets options for this, as well
as includes an option for RSS or Atom feeds (but doesn't implement this
yet). If someone could refactor and turn into a patch, we could still
get this into 4.7.
[1] http://google.com/blogsearch
------------------------------------------------------------------------
Wed, 14 Sep 2005 14:58:08 +0000 : Dries
Would this be your first core patch? ;)
------------------------------------------------------------------------
Wed, 14 Sep 2005 15:21:02 +0000 : Boris Mann
It would/will be if I were better at rolling patches against HEAD and
didn't stuff so much stuff into it...
...back to non-coding work.
------------------------------------------------------------------------
Wed, 14 Sep 2005 16:00:21 +0000 : walkah
Attachment: http://drupal.org/files/issues/node-feed-length.patch (3.95 KB)
so, Boris is a wimp... but this is a pretty cool feature. attached is a
re-worked patch. all working 'n' stuff.
------------------------------------------------------------------------
Thu, 15 Sep 2005 21:51:34 +0000 : walkah
Attachment: http://drupal.org/files/issues/feeds.patch (10.25 KB)
at Dries' request - here's an updated patch (where I hereby admit to
sneaking in some other things I'd wanted to do). Hopfeully it's worthy
to be snuck in at the deadline. (it's even still the 15th in .be for
another couple minutes).
So this patch does the following:
* adds a "feed settings" section to admin/settings where 2 new settings
are introduced:
* number of items per feed
* default length of feed descriptions (title only, teaser, full)
* patches all of core to obey the above - including the new aggregator
(out) feeds
* adds support for adding namespaces in _nodeapi('rss item') - which
means things like iTunes RSS and yahoo's media rss can be implemented
by the appropriate modules (i.e. audio.module)
* includes some additional info in the default node feed - specifically
the element (links directly to comments) - and dc:creator - to show
node author information.
1
0
[drupal-devel] [feature] Admin option to toggle between headline, teaser, and full text in RSS feeds
by walkah 15 Sep '05
by walkah 15 Sep '05
15 Sep '05
Issue status update for
http://drupal.org/node/3986
Post a follow up:
http://drupal.org/project/comments/add/3986
Project: Drupal
Version: cvs
Component: node.module
Category: feature requests
Priority: critical
Assigned to: Anonymous
Reported by: Boris Mann
Updated by: walkah
Status: patch (code needs review)
Attachment: http://drupal.org/files/issues/feeds.patch (10.25 KB)
at Dries' request - here's an updated patch (where I hereby admit to
sneaking in some other things I'd wanted to do). Hopfeully it's worthy
to be snuck in at the deadline. (it's even still the 15th in .be for
another couple minutes).
So this patch does the following:
* adds a "feed settings" section to admin/settings where 2 new settings
are introduced:
* number of items per feed
* default length of feed descriptions (title only, teaser, full)
* patches all of core to obey the above - including the new aggregator
(out) feeds
* adds support for adding namespaces in _nodeapi('rss item') - which
means things like iTunes RSS and yahoo's media rss can be implemented
by the appropriate modules (i.e. audio.module)
* includes some additional info in the default node feed - specifically
the element (links directly to comments) - and dc:creator - to show
node author information.
walkah
Previous comments:
------------------------------------------------------------------------
Fri, 07 Nov 2003 00:22:51 +0000 : Boris Mann
As the title says. It might be nice to add a feed.module to Drupal that
consolidates all feed-related info in one place, so that this can be
toggled for different types of nodes all in one place.
------------------------------------------------------------------------
Tue, 14 Jun 2005 23:44:20 +0000 : Boris Mann
I love the fact that this has been active forever :P
One day we will have a feed.module to rule them all...
------------------------------------------------------------------------
Wed, 14 Sep 2005 14:41:10 +0000 : Boris Mann
Attachment: http://drupal.org/files/issues/node_4.module (70.01 KB)
What the heck, let's make this critical. Google launched blogsearch [1]
today -- it reads feeds, so if you're not outputting full feeds, it
means Google's not indexing everything you put out.
Attached is an updated node.module which sets options for this, as well
as includes an option for RSS or Atom feeds (but doesn't implement this
yet). If someone could refactor and turn into a patch, we could still
get this into 4.7.
[1] http://google.com/blogsearch
------------------------------------------------------------------------
Wed, 14 Sep 2005 14:58:08 +0000 : Dries
Would this be your first core patch? ;)
------------------------------------------------------------------------
Wed, 14 Sep 2005 15:21:02 +0000 : Boris Mann
It would/will be if I were better at rolling patches against HEAD and
didn't stuff so much stuff into it...
...back to non-coding work.
------------------------------------------------------------------------
Wed, 14 Sep 2005 16:00:21 +0000 : walkah
Attachment: http://drupal.org/files/issues/node-feed-length.patch (3.95 KB)
so, Boris is a wimp... but this is a pretty cool feature. attached is a
re-worked patch. all working 'n' stuff.
1
0