Welcome to Dream.In.Code
Getting PHP Help is Easy!

Join 136,492 PHP Programmers for FREE! Get instant access to thousands of PHP experts, tutorials, code snippets, and more! There are 1,726 people online right now. Registration is fast and FREE... Join Now!




FCK Editor - any users?>

 
Reply to this topicStart new topic

FCK Editor - any users?>

capty99
2 Mar, 2008 - 06:35 PM
Post #1

the real kya
Group Icon

Joined: 26 Apr, 2001
Posts: 9,164



Thanked: 16 times
Dream Kudos: 550
My Contributions
Bout to do an install and for the life of me can not find any install documentation on their website. Pretty amazing its not sticking out in my face.
So, if anyone has used it and want to be my guide if I encounter a problem?
User is offlineProfile CardPM
+Quote Post

Martyr2
RE: FCK Editor - Any Users?>
2 Mar, 2008 - 07:17 PM
Post #2

Programming Theoretician
Group Icon

Joined: 18 Apr, 2007
Posts: 5,212



Thanked: 216 times
Expert In: C/C++, Java, VB, VB.NET, C#, PHP, Web Development, HTML & CSS, Javascript

My Contributions
Yeah I have used it and all the documentation you will need comes in the zip file. It has several example files and if you are doing it through PHP it will be pretty easy. It is a great wysiwyg editor.

Just unzip and take a look around the package before actually installing anything. (Btw, most of the install is just uploading to a server).

smile.gif
User is online!Profile CardPM
+Quote Post

capty99
RE: FCK Editor - Any Users?>
2 Mar, 2008 - 07:39 PM
Post #3

the real kya
Group Icon

Joined: 26 Apr, 2001
Posts: 9,164



Thanked: 16 times
Dream Kudos: 550
My Contributions
it was super simple.
i'm glad i wasted some bandwidth on a request.


User is offlineProfile CardPM
+Quote Post

capty99
RE: FCK Editor - Any Users?>
7 Mar, 2008 - 09:16 AM
Post #4

the real kya
Group Icon

Joined: 26 Apr, 2001
Posts: 9,164



Thanked: 16 times
Dream Kudos: 550
My Contributions
okay, i am having issues with FCK and their support / forum was lacking an answer.

my issue is everything works fine to input text as long as it doesn't contain an apostrophe. an apostrophe kills the query and i get an error.

i have widdled the problem down to just apostrophes so i assume its just closing something it shouldn't be .

how would i go through and replace them with their equivalent. i believe is
CODE

’



User is offlineProfile CardPM
+Quote Post

Martyr2
RE: FCK Editor - Any Users?>
7 Mar, 2008 - 09:30 AM
Post #5

Programming Theoretician
Group Icon

Joined: 18 Apr, 2007
Posts: 5,212



Thanked: 216 times
Expert In: C/C++, Java, VB, VB.NET, C#, PHP, Web Development, HTML & CSS, Javascript

My Contributions
Well the editor itself has no problems with apostrophes, it is just your query has to make sure to escape the apostrophe properly. You can escape it using "\" for mysql and most other databases or "'" for SQL Server (that is, add a single quote aka apostrophe).

You can also do a str_replace on the content coming out of the editor before you execute it in the query. Either way it isn't the editor so much as proper escaping of SQL queries. smile.gif
User is online!Profile CardPM
+Quote Post

capty99
RE: FCK Editor - Any Users?>
7 Mar, 2008 - 09:30 AM
Post #6

the real kya
Group Icon

Joined: 26 Apr, 2001
Posts: 9,164



Thanked: 16 times
Dream Kudos: 550
My Contributions
wrote that before you posted....

i was gonna do a str_replace, i don't entirely understand the first part of your post . would i have to find out how many apostrophes there were and then add some to the query? having one would be different than 2 because then i wouldn't need one.

i guess i'll go with the str_replace .... i'm taking a crack at it but there is a good chance i will ask you to fix my code. ;P

This post has been edited by capty99: 7 Mar, 2008 - 09:34 AM
User is offlineProfile CardPM
+Quote Post

Martyr2
RE: FCK Editor - Any Users?>
7 Mar, 2008 - 09:35 AM
Post #7

Programming Theoretician
Group Icon

Joined: 18 Apr, 2007
Posts: 5,212



Thanked: 216 times
Expert In: C/C++, Java, VB, VB.NET, C#, PHP, Web Development, HTML & CSS, Javascript

My Contributions
It is DIC policy that we require people to show their "best effort" so that we can guide you into solving your problem. We do not do people's work for them. Blah blah blah... jk laugh.gif

Do you need help or do you got it? Just throw out the problem code (and the query) if you need help.

Edit: Sure, but if you post the right problem area, I am sure anyone familiar with SQL will be able to help. smile.gif

This post has been edited by Martyr2: 7 Mar, 2008 - 09:36 AM
User is online!Profile CardPM
+Quote Post

capty99
RE: FCK Editor - Any Users?>
7 Mar, 2008 - 09:40 AM
Post #8

the real kya
Group Icon

Joined: 26 Apr, 2001
Posts: 9,164



Thanked: 16 times
Dream Kudos: 550
My Contributions
php

$info = str_replace("\'", "’", $info);


am i doing that right?

seems to have no effect on the program. same error, but without apostrophes in $info it runs fine.
User is offlineProfile CardPM
+Quote Post

Martyr2
RE: FCK Editor - Any Users?>
7 Mar, 2008 - 09:47 AM
Post #9

Programming Theoretician
Group Icon

Joined: 18 Apr, 2007
Posts: 5,212



Thanked: 216 times
Expert In: C/C++, Java, VB, VB.NET, C#, PHP, Web Development, HTML & CSS, Javascript

My Contributions
Try this...

php

$info = str_replace("'", "’", $info);


No escape sequence necessary when you are doing the str_replace method here. smile.gif
User is online!Profile CardPM
+Quote Post

capty99
RE: FCK Editor - Any Users?>
7 Mar, 2008 - 10:02 AM
Post #10

the real kya
Group Icon

Joined: 26 Apr, 2001
Posts: 9,164



Thanked: 16 times
Dream Kudos: 550
My Contributions
you my friend.
are awesome.

i was trying to be so smart too.

now i can officially change my instruction manual for using our admin center and remove the part saying don't use apostrophes.

User is offlineProfile CardPM
+Quote Post

Martyr2
RE: FCK Editor - Any Users?>
7 Mar, 2008 - 10:05 AM
Post #11

Programming Theoretician
Group Icon

Joined: 18 Apr, 2007
Posts: 5,212



Thanked: 216 times
Expert In: C/C++, Java, VB, VB.NET, C#, PHP, Web Development, HTML & CSS, Javascript

My Contributions
Just to save yourself some trouble later down the road with other characters, take a look at the functions htmlentities() and mysql_real_escape_string(). They might be of use to you in the future.

Glad you got things working. smile.gif
User is online!Profile CardPM
+Quote Post

capty99
RE: FCK Editor - Any Users?>
7 Mar, 2008 - 10:07 AM
Post #12

the real kya
Group Icon

Joined: 26 Apr, 2001
Posts: 9,164



Thanked: 16 times
Dream Kudos: 550
My Contributions
will do.
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 12/2/08 07:43PM

Live PHP Help!

PHP Tutorials

Reference Sheets

PHP Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month