1.5 - insert pictures against a topic

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
14 years ago
Thanks Andrei
14 years ago
mike, you can delete an image by ftp (windows explorer does this quite easily)

yes, it's easy to insert an image but there is no functionality for a user to upload one - maybe a simple asp upload button could be put on the page, but baden had the best idea i think :

having a pictures tab, like products, that would allow the user to upload the images.
14 years ago
nopCommerce team | Mike wrote:
Hi..

We are now using the Text editor which is supplied with AjaxControlToolkit. This is a great text editor in my opion as it is lightweight and compact.

You could easlily change this within your application, before FCKeditor was used.. You would need to download or use old files if you upgraded Nop. Make sure you paste the FCKeditor.dll into /bin and change this in web.config

<add tagPrefix="HTMLEditor" namespace="AjaxControlToolkit.HTMLEditor" assembly="AjaxControlToolkit"/>

to

<add tagPrefix="HTMLEditor" namespace="FredCK.FCKeditorV2" assembly="FredCK.FCKeditorV2"/>

Then add this (for image uploading)

<add key="FCKeditor:BasePath" value="~/editors/fckeditor/" /> This is where the editors files are located
<add key="FCKeditor:UserFilesPath" value="~/images/" />

under <appSettings> section of web.config

hope this helps..

mike..




I am getting parsel errors:    Is there any adjustments need to be made with  /Administration/Modules/TopicLocalizedDetails.ascx ??
14 years ago
Getting this error  The base class includes the field 'txtBody', but its type (AjaxControlToolkit.HTMLEditor.Editor) is not compatible with the type of control (FredCK.FCKeditorV2.FCKeditor)
14 years ago
I guess there is more to it.  I can't get it to work.
14 years ago
brokensaber wrote:
I guess there is more to it.  I can't get it to work.


Hi,

The problem will be with the TopicLocalizedDetails.ascx.cs.designer the problem will be this;

        /// <summary>
        /// txtBody control.
        /// </summary>
        /// <remarks>
        /// Auto-generated field.
        /// To modify move field declaration from designer file to code-behind file.
        /// </remarks>
        protected global::AjaxControlToolkit.HTMLEditor.Editor txtBody;



What you need todo is recompile the project in visual studio this will auto change this field for you.
14 years ago
Thanks a ton Mike!
14 years ago
I seem to be getting different, I think the new WSIWIG is stable.
I liked 1.4 more options, flash files, tables and so.


Any Help Thanks

An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: Unknown server tag 'HTMLEditor:Editor'.

Source Error:


Line 67:                     </td>
Line 68:                     <td class="adminData">
Line 69:                         <HTMLEditor:Editor ID="txtBody" runat="server" Height="350" />
Line 70:                     </td>
Line 71:                 </tr>


Source File: /Administration/Modules/TopicLocalizedDetails.ascx    Line: 69

http://www.fabfourstore.com
http://www.beatlesfestwest.com
14 years ago
i got this error
Server Error in '/' Application.
--------------------------------------------------------------------------------

Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: Unknown server tag 'HTMLEditor:Editor'.

Source Error:


Line 32:         </td>
Line 33:         <td class="adminData">
Line 34:             <HTMLEditor:Editor ID="txtFullDescription" runat="server" Height="350" />
Line 35:         </td>
Line 36:     </tr>


Source File: /Administration/Modules/ProductInfoEdit.ascx    Line: 34


--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.3603; ASP.NET Version:2.0.50727.3082


i have done everthing that you guys said...

any idea how i can fix it ?
14 years ago
@Eldar, make sure you have a reference to HTMLEditor in your ascx/aspx file. Like <%@ Register TagPrefix="HTMLEditor"... etc.

EDIT:
Ok, I've just done this. Ignore the statement above. It's right, but for the wrong reason.
You've removed the AJAX editor, so it's irrelevant.
Do the stuff as mentioned above, then add this.

You need to change line 70 in topicLocalisedDetails.ascx, from: <HTMLEditor:Editor ID="txtBody" runat="server" Height="350" /> to: <FCKeditorV2:FCKeditor ID="txtBody" runat="server" AutoDetectLanguage="false" Height="350"></FCKeditorV2:FCKeditor>. This puts the editor in.

You then need to add the assembly reference for FCK (The 'kinda' right bit about the statement at the top of this post), so put: <%@ Register Assembly="FredCK.FCKeditorV2" Namespace="FredCK.FCKeditorV2" TagPrefix="FCKeditorV2" %> at the top of the toplicLocaliseddetails.ascx file.

Make sure you have the FREDCK.FCKEditorV2.dll in the bin, then from the solution explorer, right click on references and add a reference to it so it shows in the lis (This bit is different in VS web developer. Can't remember what you do, but it is in there somewhere).

Next, add a using for FCK in the topicsLocalisedDetails.cs file. I added  'using FredCK;' & 'using FredCK.FCKeditorV2;' but probably only need one really.

Now go back to the topicLocalisedDetails.designer.cs file and make sure you have a reference to the FCK control (called txtBody). If not, put:

        /// <summary>
        /// txtBody control.
        /// </summary>
        /// <remarks>
        /// Auto-generated field.
        /// To modify move field declaration from designer file to code-behind file.
        /// </remarks>
        protected global::FredCK.FCKeditorV2.FCKeditor txtBody;

...in there after the txtLabel reference.

Now if you run, you'll get another error about no definition for content etc. This is because the AJAX editor has a content property that stores all the html from the editor, whereas FCK has a Value property, so you need to replace lines 58, 59 and 60(ish) with 'this.txtBody.Value = localizedTopic.Body;'.

That should be it. Mine compiles and runs, so yours should too :)

/EDIT.

I love nopCommerce, and I like the new Ajax Toolkit editor. Reminds me of the one in Umbraco.

I do think there is a big usability issue with the omission of an image upload though.

Ok, my opinion is this:

The AJAX derived editor is great but lacks some functionality that may reduce the ability of nop derived applications to deliver content for some users.

FCK is ok, but bloated, prone to throwing markup around and has lost content for some of my clients. (And then I get to fix FCK for them, for free. I can't tell them that's how the editor works. I need to provide them with a workable solution. Not good). I love the FCK editor functionality. The file upload and media type selection is awesome.

TinyMCE is, IMHO, the best and most stable, small, free js editor there is. Given a choice, that's the one I'd use. There is a commercial upload component available, but again, it doesn't have this functionality out of the box. I have added an upload to TinyMCE in other projects (not nop) but I can't remember whether it was a download or something I hacked in? (I'm gonna look now).

I'm starting  new nop based build now, and I have just come up against this dilemma. I can't deliver the application without file upload and placement functionality in the editor. It just won't be acceptable for the non-techie client to use.

So my solution is to offer choice. Add the FCK stuff back in (this has the file upload etc) and keep the AJAX stuff there with a new checkbox in the settings that allows you to decide what you want to use. Could even add TinyMCE too and have an option to use that?

Obviously, I am then moving away from the upgrade path, but I've found that, if you keep a regular changelog of your own builds (and a database backup, which is a great new feature in 1.50), it's quite easy to manage change.

/have fun.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.