_____________________________________________________________________________________
Many bug fixes in the Preview.. Thanks Fred... the only complaint really i have is the extreme difficulty in adding plug-ins... I tried and tried and tried and TRIED to use the way that MANY persons in here have said and suggested (most of the ----if not all) were for the previous version. not for this current release.
Yes i tried the exact steps and then executed the packager.. and it crashed.. just one prob after another.. so...
after about 3 days of messing with the dern code.. (i.e. was not as much of a problem- it was that damned Gecko (fire fox-mozilla) browser.
I could not use the plug in directory way because well shoot . i have no idea why.. (because of the packager wouldnt finish running before crashing - maybe) but I used the old hack method.
My mod for for a popup window (like the anchor tag) and product a drop down list (pulled from the database) of options (formatted txt) and to be inserted just like the anchors.
I hope this helps someone....
STEPS PERFORMED....mod as necessary:
_____________________________________________________________________________________
Actions Performed:
_____________________________________________________________________________________
OPEN: fckeditorcode_ie_2.js AND fckeditorcode_gecko_2.js
FIND: break;case 'Anchor':oCommand=new FCKDialogCommand('Anchor',FCKLang.DlgAnchorTitle,'dialog/fck_anchor.html',370,170);
and after ADD:
break;case 'Classify':oCommand=new FCKDialogCommand('Classify',FCKLang.DlgClassifyTitle,'dialog/fck_classify.php',370,170);
FIND: break;case 'Anchor':oItem=new FCKToolbarButton('Anchor',FCKLang.Anchor);
INLINE AFTER IT ADD: break;case 'Classify':oItem=new FCKToolbarButton('Classify',FCKLang.Classify);
NOTE: FCKToolbarButton('Classify' = your image name.
_____________________________________________________________________________________
OPEN: fckcontextmenu.js
FIND: if ( this.Groups['Anchor'] ) this.Groups['Anchor'].SetVisible( bIsAnchor ) ;
and Below it paste:
if ( this.Groups['Classify'] ) this.Groups['Classify'].SetVisible( bIsClassify ) ;
_____________________________________________________________________________________
OPEN: fcktoolbaritems.js
FIND: case 'ImageButton' : oItem = new FCKToolbarButton( 'ImageButton' , FCKLang.ImageButton ) ; break ;
AFTER ON NEW LINE ENTER:
case 'Classify' : oItem = new FCKToolbarButton( 'Classify' , FCKLang.ClassifyButton ) ; break ;
_____________________________________________________________________________________
OPEN: fckconfig.js
FIND: FCKConfig.ContextMenu = ['Generic','Link','Anchor',
AFTER IT INLINE INSERT: 'Classify',
FIND: FCKConfig.ToolbarSets
in the same group of entries add: 'Classify' besure to put a comma after it - sperating them. unless of course if you put it at the end.
_____________________________________________________________________________________
OPEN en.js
FIND: DlgLnkTypeAnchor : "Anchor in this page",
NEXT LINE UNDER ADD: DlgLnkTypeClassify : "Classify in this page",
FIND: DlgLnkAnchorSel : "Select an Anchor",
NEXT LINE UNDER ADD: DlgLnkClassifySel : "Select an Classification",
FIND: DlgLnkAnchorByName : "By Anchor Name",
NEXT LINE UNDER ADD: DlgLnkclassifyByName: "By Classification Name",
FIND: DlgLnkAnchorById : "By Element Id",
NEXT LINE UNDER ADD: DlgLnkClassifyById : "By Classify Id",
FIND: DlgLnkNoAnchors : "<No anchors available in the document>",
NEXT LINE UNDER ADD: DlgLnkNoClassifys : "<No Classify available in the document>",
FIND: DlnLnkMsgNoAnchor : "Please select an anchor",
NEXT LINE UNDER ADD: DlnLnkMsgNoClassify : "Please select a Classification",
FIND: DlgAnchorErrorName : "Please type the anchor name",
NEXT LINE UNDER (new section) ADD:
// Classify Dialog
DlgClassifyTitle : "Para Classification Properties",
DlgClassifyName : "Please pick a Classification",
DlgClassifyErrorName : "Please type the Classify name",
FIND: Anchor : "Insert/Edit Anchor",
NEXT LINE UNDER ADD: Classify : "Insert/Edit Classification",
FIND: AnchorProp : "Anchor Properties",
NEXT LINE UNDER ADD:ClassifyProp : "Classify Properties",
FIND: case 'Anchor' : oCommand = new FCKDialogCommand( 'Anchor' , FCKLang.DlgAnchorTitle , 'dialog/fck_anchor.html' , 370, 170 ) ; break ;
NEXT LINE UNDER ADD:case 'Classify' : oCommand = new FCKDialogCommand( 'Classify' , FCKLang.DlgClassifyTitle , 'dialog/fck_classify.php' , 370, 170 ) ; break ;
_____________________________________________________________________________________
COPY or create an image in mycase "Classify.gif" 20x21px to the editor/images direcotry
_____________________________________________________________________________________
CONTENTS: save to: dialog/fck_classify.php
NOTE: for some reason.. i could not get the query to work right while inside an HTML document.. so i renamed to php and had no probs.
NOTE2: the %$#@$% between IE and Firefox was the fact that Firefox would NOT read the value of "txtName" without using the "ID" property in the select tag IE: <select id="txtName" name="txtName" style="WIDTH: 100%">. IE didnt have a prob with it but gecko based browsers will. go figure...
CONTENT FOLLOWS:
<? include ("../../../../functions/db.php"); include("../../../../functions/variables.php"); //include("../functions/stripslashes.php"); include("../../../../functions/functions.php"); $classification_result2 = mssql_query("SELECT * FROM classification order by name"); ?>
RE: FINALLY!!!! - Successful with plugin with
You dont need the packager to add plugins. The packager is for when you make changes to the source. You don't need to make changes to the source to add plug-ins. Just follow the methods used for the example plug-ins, for instance.
Or you could check out the crappy ones I posted:
https://sourceforge.net/forum/message.p ... id=3025043
But if you don't know why your PHP query wouldn't work in the HTML file, you need to learn more.
Thanks for posting your solution, that's the right direction.
There are, however, MUCH easier ways to get plugins to work with version 2. Check out the samples that came with it.
If I have time (ha) I'll post a plugin that actually does something (vs. opening a dialog to do something).
Good Luck, and once again, thanks!
RE: FINALLY!!!! - Successful with plugin with
Yes I do need to learn more!!! MUCH MORE>. Im not sure why it wouldnt work in HTML though.. I have been mixing HTML and PHP now for a while.. and no probs.. but for the life of me.. aahhh who knows.. if you have any tips in this dep id like to know!! another wierd oddity is when I try doing a form action and am using the =$PHP_SELF. I tried to echo the whole form... but wouldnt work.. kept giving me =$PHP_SELF in the url (Page not found - was ooking for that value (=$PHP_SELF) )and not perform the form request)... if u know wha ti mean. IE:
SO I had to take the form out of PHP (?>) and only use the variable (=$PHP_SELF in php) IE:
<form action="deleteArticle.php<? echo "=$PHP_SELF?aid=$aid";?>">
Not sure what i was missing. but now it works with the above example!
I was told to build this CMS project from scratch. and I had VERY LITTLE knowledge of PHP and MSSQL.. but things are moving nicely. and tahnks to FCK editor.. I will look like a shining star!! LOL (Thanks Fred)
BUT MAN!!!! I tried and tried to use the directions for adding a plugin. (worked Previous to RC2) but could not get it to work with RC2. So i just did the HACK method. (hence my post)
Id love to see you create a skeleton (for RC2) plugin... infact it would really be great if a couple examples were done (PHP + MSSQL and static HTML).
I will look over your example and thanks for the link!
RE: FINALLY!!!! - Successful with plugin with
np, I like to type...
I thought you meant a SQL query in a HTML page (which, btw, you can do with JavaScript(or so I read in a book)) versus a URL query parameter.
Don't know why it didn't work. I just dabble in PHP tho. I'd guess it's the equals sign? Could try the printf() or whatever way of doing 'echo'.
If you are gonna do CMS you'll probably want to figure out the easy plugin method. Remember to clear your cache as well. Switch browsers sometimes even, etc.
You may also wanna check out the "tidy" sourceforge project. It cleans up HTML, etc. Quite nifty! And it comes with PHP!*
*at least in windows.
My plug-in examples are really shoddy. If they're any help at all, I'll be pleasently freaking awe struck.
May the Force be with you all!