What's new? | Help | Directory | Sign in
Google
                
Search
for
Updated Oct 13, 2007 by the.sk89q
Labels: Product-QuickEdit, Featured, Phase-Deploy
QuickEdit  
Introduction and installation for Quick Edit

What does this do?

Edit your posts without having to load another post edit page! This emulates the quick edit feature available on most modern forums nowadays.

Tested to work in:

Advantages over other quick edit scripts:

Demonstration

A demonstration of Quick Edit can be found at: http://s3.invisionfree.com/IF_Addons_Demo/

A screenshot:

Installation

The Bare Minimum

The bare minimum should work for most forums. Just copy the code in your administration panel into the footer textbox under Skinning & Styles > Board Wrappers.

<!-- Quick Edit @ http://code.google.com/p/ifaddons/ -->
<script type="text/javascript" src="http://ifaddons.googlecode.com/svn/common/release/common.js"></script>
<script type="text/javascript" src="http://ifaddons.googlecode.com/svn/quickedit/release/3.2.0.js"></script>
<script type="text/javascript">
SKIFS.quickEdit.construct()
</script>

Customized Settings

You can expand on the bare minimum by changing some of the configuration options. See below for an example.

<!-- Quick Edit @ http://code.google.com/p/ifaddons/ -->
<script type="text/javascript" src="http://ifaddons.googlecode.com/svn/common/release/common.js"></script>
<script type="text/javascript" src="http://ifaddons.googlecode.com/svn/quickedit/release/3.2.0.js"></script>
<script type="text/javascript">
with(SKIFS.quickEdit.config) {
button = '<img src="http://ifaddons.googlecode.com/svn/quickedit/release/support/button.png" alt="Quick Edit" /> '
editHistoryEnabled = true
addQuickEditButton = true
hideEditButtons = false
enableDoubleClick = false
}
SKIFS.quickEdit.construct()
</script>

Changing the value of button will change the quick edit button image. Changing editHistoryEnabled to false will disable the edit-by-lines when saving. Changing addQuickEditButton to false will not add a quick edit button. Changing hideEditButtons to true will hide the regular edit button (only if quick edit is supported). Changing enableDoubleClick to true will allow double clicking the post area to edit the post.

Customized Styles

You can expand on the customized settings version by constructing the quick edit add-on with a use custom style option. See below for information.

<!-- Quick Edit @ http://code.google.com/p/ifaddons/ -->
<script type="text/javascript" src="http://ifaddons.googlecode.com/svn/common/release/common.js"></script>
<script type="text/javascript" src="http://ifaddons.googlecode.com/svn/quickedit/release/3.2.0.js"></script>
<script type="text/javascript">
with(SKIFS.quickEdit.config) {
button = '<img src="http://ifaddons.googlecode.com/svn/quickedit/release/support/button.png" alt="Quick Edit" /> '
editHistoryEnabled = true
addQuickEditButton = true
hideEditButtons = false
enableDoubleClick = false
}
SKIFS.quickEdit.construct(true)
</script>

Notice that true has been added to SKIFS.quickEdit.construct(). Put the necessary CSS code into the header:

<style type="text/css">
.quick-edit { border: 3px solid #000000; padding: 4px; line-height: 100% }
.quick-edit textarea { width: 100%; border: 1px solid #999999; padding: 5px; color: #000000; background: #FFFFFF; font-family: Verdana, sans-serif }
.quick-edit .editor { margin-bottom: 3px; }
.quick-edit .right-buttons input { width: 30px; background: #EFEFEF; border: 1px solid #999999; border-top: 0; margin: -4px 0 0 3px; cursor: pointer }
.quick-edit .right-buttons input:hover { background: #CCCCCC; }
.quick-edit .break { height: 1px; margin: -1px 0 0 0; clear: both }
.quick-edit .save { font-weight: bold }
.quick-edit .full { margin-left: 20px }
</style>

Play with the CSS to see what you can get.

Incompatibilities

Member Info Above Post by Stefan

If you are using Member Info Above Post by Stefan, try the following code. If you are not already using a barebones version, merge the differences.

<!-- Quick Edit @ http://code.google.com/p/ifaddons/ -->
<script type="text/javascript" src="http://ifaddons.googlecode.com/svn/common/release/common.js"></script>
<script type="text/javascript" src="http://ifaddons.googlecode.com/svn/quickedit/release/3.2.0.js"></script>
<script type="text/javascript">
with(SKIFS.quickEdit.config) {
postCellCount = 6
}
SKIFS.quickEdit.construct()
</script>

Known Issues

There are currently no known issues.


Comment by flareia, Feb 23, 2008

Is there a way to remove "This post has been edited by" when using the quick edit?

Comment by the.sk89q, Feb 23, 2008

Use the "Customized Version" and change "editHistoryEnabled = true" to "editHistoryEnabled = false"

Comment by flareia, Feb 23, 2008

Can the quick edit enable word wrap?

Comment by flareia, Feb 23, 2008

Oh nevermind @@; Sorry if I ask too many questions. Thank you the replies. Excellent code.

Comment by the.sk89q, Feb 23, 2008

You mean the edit box? It's a browser-specific thing, but I think you can force it a certain way for some browsers. However, you would have to change the code and host the file yourself. IE doesn't word-wrap by default, if I remember right.

Comment by pinest...@netzero.net, Mar 25, 2008

It sort of lags quite a bit on IE. Is it possible to fix that?

Other than that, it's very efficient.

Comment by the.sk89q, Mar 25, 2008

I'm not sure. :/


Sign in to add a comment