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
if i want to change all the editors to fck

i have to go one by one ?




i will try to do that u said and will keep you post later on..

thanks for the reply..
14 years ago
Eldar wrote:
if i want to change all the editors to fck...


Yes, the editor is used in half a dozen places at least, so the reference to the AJAX one will need updating wherever it turns up. I haven't changed any other bits, except in topics as yet, but I know it'll need to be updated in the categories, products, messgage templates etc. This should just be the same process repeated, so I would imagine you'll fly through the process once one has worked once.

As for the 'select an editor' option, I think it would be nice to have a wrapper library that includes FCK, MCE and the AJAX derived editor so you just reference an assembly and add a 'control' to anywhere you need it. This masks the different decaration types from the ascx page, handling the process of presenting the actual control that is displayed in a single control that renders based on a 'setting'.

This would allow it to be easier to deploy the functionality or add back to upgrades.

Utilising the nop settings functionality would make it really easy to handle the selection of editor type without moving from the nop base structure. So you'd just have something like Editor -> AJAX in the Settings table. This could also expand to something like TopicsEditor -> FCK, EmailEditor -> AJAX, so you could define the usage by functionality or module.

I'm pretty busy right now, so I can't see me doing this for a while at least, but something in a library that is minimum disruption to the core nop version/build would really work.
14 years ago
you helped me alot
thanks !!!!
14 years ago
It's unfortunate that a key piece of functionality was removed (easy handling of images when editing content) between 1.4 and 1.5.  

Having said that, could someone please post a detailed step by step on how to change the editor within NC1.5?
14 years ago
mwoffenden wrote:
It's unfortunate that a key piece of functionality was removed (easy handling of images when editing content) between 1.4 and 1.5.  

Having said that, could someone please post a detailed step by step on how to change the editor within NC1.5?


this post provides all the info you need - go to the 1st page and follow through
14 years ago
haydie wrote:
this post provides all the info you need - go to the 1st page and follow through

It's rather scattered about various posts -- and certainly may not be at all clear for someone new to nopCommerce.  A concise, step by step guide in a single post would be helpful to all.
14 years ago
mwoffenden wrote:

It's rather scattered about various posts -- and certainly may not be at all clear for someone new to nopCommerce.  A concise, step by step guide in a single post would be helpful to all.


The problem with forums, posts and techie stuff is, you could be Scott Guthrie or you could be some poor, unfortunate guy out of his depth on day 1 of .net.

If somebody asks a question, people tend to throw snippets and ideas and 'have you tried' messages and 'I fixed it by' posts at the thread in a pretty casual, free-form (and often rushed, trying not to be patronising) manner.

This means things do get a little disjointed, as in this case.

You also have to accept that people are helping you for free on here. You are often receiving pearls of wisdom that allow you to fix, add or change something in 10 minutes that they have spent hours, days or even weeks to figure out.  

If I get a little time today, I'll format and tidy a 'how-to' from this thread.
14 years ago
Step 1: /Bin folder
Make sure you paste the FCKeditor.dll into /bin and change this in web.config

Step 2: Web.config
Change
<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.
Step 3: Find all files to replace editor
Search for "HTMLEditor:Editor" in entire solution.  For 1.5, there are approximately 16 instances that will need to be updated, if you want to be consistent throughout the application.
Step 4: Change file
Follow these steps for each file:
- Add
<%@ Register Assembly="FredCK.FCKeditorV2" Namespace="FredCK.FCKeditorV2" TagPrefix="FCKeditorV2" %>
to top of .ascx/.aspx file.
- Replace the "<HTMLEditor:Editor.." control with this:
        
<FCKeditorV2:FCKeditor ID="txtBlogPostBody" runat="server" AutoDetectLanguage="false" Height="350"></FCKeditorV2:FCKeditor>
Remember to change the ID to be the same as it was previously!
- Save.  This will update the designer file.
- Right-click, and select "View Code"
- Add
using FredCK.FCKeditorV2;

- At this point, you will begin to see error messages referencing "Comment" in your error list.  Double-click on each entry, which will take you to (controlname).Comment.  Replace "Comment" with "Value".

Step 5: Update image upload permissions

You may experience an error message that upload is disabled, and a reference to this file:
\editors\fckeditor\editor\filemanager\connectors\aspx\config.ascx
If you receive this error message, it is referencing the change in how logged-in users are detected. On line 41, change
this.Page.User != null && this.Page.User.IsInRole("Admin");

to
NopContext.Current.User != null && !NopContext.Current.User.IsGuest;


OK, I think that's everything - let me know if something's missing or awry, and I'll edit this.  Now back to implementing this, so my client can add images to blogs, categories, etc.
13 years ago
I don't know how stale this post is, but not being able to easily (no HTML knowledge necessary) add images and media objects is bad in terms of usability. I know this isn't necessarily a "Content Management System" but the addition of better image handling in the editor would make a huge difference in the quality of this system.

With that said, if you have some development chops you can actually extend the AjaxControlToolkit.HTMLEditor to integrate an image manager. I like this editor and I am going to extend it when I have time, but if you are in need now here are a few links that may help you get started:

http://vincexu.blogspot.com/2009/06/how-to-add-custom-button-on-toptoolbar.html
http://www.thecodepage.com/post/Change-the-default-state-of-an-AJAXControlToolkit-HTMLEditor-Toolbar-Button.aspx
http://www.codeproject.com/KB/aspnet/AjaxLatestTools.aspx?fid=1542669&df=90&mpp=25&noise=3&sort=Position&view=Quick
13 years ago
How can we add third party HTML Editors like Telerik etc.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.