Please login or register.

Login with username, password and session length
Advanced search  

News:

You need/want an older version of sNews ? Download an older/unsupported version here.

Pages: 1 [2] 3 4 5

Author Topic: [Addon Package] Whizzywig editor  (Read 60417 times)

dummy

  • Newbie
  • *
  • Karma: 0
  • Posts: 5
Re: [Addon Package] Whizzywig editor
« Reply #15 on: October 12, 2007, 02:59:54 PM »

Got ya'  ;)

OMG dude! ...I just installed it and it is so cool!
Thanks so much for this!  :)
This makes sNews so better in my opinion. That was the only thing I felt sNews was lacking was a good WYSIWYG editor. I feel that they are a must in any cms today because without them, people who don't know html would be lost.  And I like simplicity when it comes down to a cms or sitebuilder.

This so Rocks!!! ...you have made my day Joost!


Update: whizzywig-snews.php must be changed to snews.php
Logged

Joost

  • Guest
Re: [Addon Package] Whizzywig editor
« Reply #16 on: October 12, 2007, 05:53:34 PM »

Thank yo four your kind words Jeff. I agree that the average user needs an editor. However, sNews is a developers tool and the core engine is supposed to remain simple and small. So it is up to us to implement the tools needed. I've chosen Whizzywig editor, because it is small, others prefer the default editor, FCKeditor, Wym or TinyMCE.

Releasing out of the box (unofficial) packages has become a trend on the forum. Although I am reluctant to do so, when only small modifications are needed, maybe it is a good idea, when it concerns editors. When people need an editor, they surely are uncomfortable with making modifications to the engine.
Logged

jlhaslip

  • Sr. Member
  • ****
  • Karma: 16
  • Posts: 374
    • My snews with AEF Forum site
Re: [Addon Package] Whizzywig editor
« Reply #17 on: October 12, 2007, 08:36:14 PM »

Quote
Arial, Arial Black, Comic, Courier, Georgia, Impact, Times New Roman, Trebuchet, Verdana

These Fonts show as being available at the site referenced in the Opening Post.
Can they be easily added to the Package?
Logged
Yes! I have no siggy.

Joost

  • Guest
Re: [Addon Package] Whizzywig editor
« Reply #18 on: October 13, 2007, 07:15:38 AM »

Quote
Arial, Arial Black, Comic, Courier, Georgia, Impact, Times New Roman, Trebuchet, Verdana

These Fonts show as being available at the site referenced in the Opening Post.
Can they be easily added to the Package?


Websites don't send fonts to the browser, they tell the browser which fonts to use. So the fonts don't have to be included in the package. You can read more about fonts here: Fonts for the Internet: A list
Logged

tyee

  • Jr. Member
  • **
  • Karma: 0
  • Posts: 56
Re: [Addon Package] Whizzywig editor
« Reply #19 on: October 15, 2007, 08:42:54 PM »

Will this mod work with Keyrocks "snews16mesu" version?? I would really like to add it in.

Thanks
Logged

Joost

  • Guest
Re: [Addon Package] Whizzywig editor
« Reply #20 on: October 15, 2007, 09:06:53 PM »

Cannot help you. I don't know what's included in the memu package, how the backend (admin) works. The preview will be disabled for sure.
Logged

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6019
  • Semantically Challenged
    • snews.ca
Re: [Addon Package] Whizzywig editor
« Reply #21 on: October 15, 2007, 11:04:11 PM »

Will this mod work with Keyrocks "snews16mesu" version?? I would really like to add it in.
Thanks
It will probably work with both the MEMU and MESU packages... provided you follow the directions closely and know your way around your package pretty good. The sections for disabling the Editor button functions noted in Joost's directions are also in the MEMU and MESU packages... they just have a lot more stuff in them than in the default sNews package.
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

tyee

  • Jr. Member
  • **
  • Karma: 0
  • Posts: 56
Re: [Addon Package] Whizzywig editor
« Reply #22 on: October 17, 2007, 05:10:42 PM »

@Keyrocks
    Is this the part to disable the editor buttons --

Code: [Select]
/* -------------------- TEXT EDITOR FUNCTION BUTTONS (keyrocks) -------------------  */
### icon-button links to the Editor functions. Default strings commented out with // .
# Bold text
echo '<input type="image" src="'.db(website).''.gl(sub_dir).'sn_icons/text_bold.gif" alt="'.l('button_bold').'" name="strong" value="strong" onclick="tag(\'strong\'); return false;" />';
#Italic text
echo '<input type="image" src="'.db(website).''.gl(sub_dir).'sn_icons/text_italic.gif" alt="'.l('button_italic').'" name="em" value="em" onclick="tag(\'em\'); return false;" />';
# Strike-through text
echo '<input type="image" src="'.db(website).''.gl(sub_dir).'sn_icons/text_strikethrough.gif" alt="'.l('button_strike').'" name="del" value="del" onclick="tag(\'del\'); return false;" />';
# quad-left text, paragraph
echo '<input type="image" src="'.db(website).''.gl(sub_dir).'sn_icons/text_left.gif" alt="'.l('button_textleft').'" name="p" value="p" onclick="tag(\'p\'); return false;" />';
# Centered text, paragraph
echo '<input type="image" src="'.db(website).''.gl(sub_dir).'sn_icons/text_center.gif" alt="'.l('button_textcenter').'" name="centered" value="centered" onclick="tag(\'centered\'); return false;" />';
# Quad Right Text
echo '<input type="image" src="'.db(website).''.gl(sub_dir).'sn_icons/text_right.gif" alt="'.l('button_textright').'" name="right" value="right" onclick="tag(\'right\'); return false;" />';
# Justified text, paragraph
echo '<input type="image" src="'.db(website).''.gl(sub_dir).'sn_icons/text_justify.gif" alt="'.l('button_justify').'" name="justify" value="justify" onclick="tag(\'justify\'); return false;" />';
# Position image right, with text-wrap
echo '<input type="image" src="'.db(website).''.gl(sub_dir).'sn_icons/image-right.gif" alt="'.l('button_imageright').'" name="imageright" value="imageright" onclick="tag(\'imageright\'); return false;" />';
# Position image right, with text-wrap
echo '<input type="image" src="'.db(website).''.gl(sub_dir).'sn_icons/image-left.gif" alt="'.l('button_imageleft').'" name="imageleft" value="imageleft" onclick="tag(\'imageleft\'); return false;" />';
# Return, new line - <br />
echo '<input type="image" src="'.db(website).''.gl(sub_dir).'sn_icons/return.gif" alt="'.l('button_return').'" name="br" value="br" onclick="tag(\'br\'); return false;" />';
# [Break] article text
echo '<input type="image" src="'.db(website).''.gl(sub_dir).'sn_icons/break.gif" alt="'.l('button_break').'" name="break" value="break" onclick="tag(\'break\'); return false;" />';
# Insert image file-path, replaced by mattonik's Image Insert Panel
//echo '<input type="image" src="'.db(website).''.gl(sub_dir).'sn_icons/image.gif" alt="Insert Image Path" name="img" value="img" onclick="tag(\'img\'); return false;" />';
# Insert URL link
echo '<input type="image" src="'.db(website).''.gl(sub_dir).'sn_icons/link.gif" alt="'.l('button_link').'" name="link" value="link" onclick="tag(\'link\'); return false;" />';
# Include File file-path
echo '<input type="image" src="'.db(website).''.gl(sub_dir).'sn_icons/include.gif" alt="'.l('button_include').'" name="include" value="include" onclick="tag(\'include\'); return false;" />';
# Insert SEF link to Hidden Article content: (Mod Philmoz insertHA)
echo '<input type="image" '.db(website).'src="'.gl(sub_dir).'sn_icons/hidden_art.gif" alt="'.l('button_hiddenarticle').'" name="insert" value="insert" onclick="tag(\'insert\'); return false;" />';

# Insert Event Block (keyrocks)
echo '<input type="image" src="'.db(website).''.gl(sub_dir).'sn_icons/block.gif" alt="'.l('button_block1').'" name="eventblock" value="eventblock" onclick="tag(\'eventblock\'); return false;" />';

I think that's all, please confirm.
tyee
« Last Edit: October 25, 2007, 03:40:01 PM by Keyrocks »
Logged

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6019
  • Semantically Challenged
    • snews.ca
Re: [Addon Package] Whizzywig editor
« Reply #23 on: October 17, 2007, 05:26:09 PM »

Yessiree tyee... exacto-mundo. You will also want to comment out the echo '<p>'; string just before this section... and the echo '</p>'; that follows it (the paragraph tags). And... chances are you won't need to keep function tag(tag) active any longer either. It is located within the javascript functions section near the bottom of the core.php file... and you can locate it by searching for - // basic html textarea editor . I suspect... although I haven't tried it... that you could remove the whole function as it appears that its' only purpose is to generate tags for the sNews Editor system.

Modding Tip: I don't know how you go about doing mod surgery like this. I suggest you make sure you have a back-up of your core.php file... at least your un-touched 'master' file-set... so you can always start over with a fresh file if you screw up along the way. I also create a "spare parts" folder somewhere... and create a new "spare-parts.php" file. I then copy into it... the code sections I am removing... and leave comments where I removed them to remind me of what I did... and I make a comment note at the top of the file to remind me of where the mod or removal location was in the file. Logging well along the way makes troubleshooting much easier later on.  ;)

Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

tyee

  • Jr. Member
  • **
  • Karma: 0
  • Posts: 56
Re: [Addon Package] Whizzywig editor
« Reply #24 on: October 17, 2007, 05:45:35 PM »

@Keyrocks
     I just tried it by just doing what I listed above and it seems to work except I get huge buttons for the new Whizzywig editor. Do you know what controls the size of the editor buttons or do I just have to search for it in one of the .js files?

I will also try what you just suggested too!

Thanks
Logged

Joost

  • Guest
Re: [Addon Package] Whizzywig editor
« Reply #25 on: October 17, 2007, 05:59:48 PM »

You have either something in your stylesheet that make the buttons big or accidentally deleted the endtag of a header (</h2>) or something alike.
Logged

BoltX

  • Newbie
  • *
  • Karma: 8
  • Posts: 29
    • vekna.com
Re: [Addon Package] Whizzywig editor
« Reply #26 on: October 18, 2007, 08:05:44 PM »

joost, I don't know if it is me or what, but after getting your 4Dummies version, and after doing it myself same result occured:

my PREVIEW didn't work. Anyhow, I looked at the snews code to generate code for TOGGLE(DIV) and I found a bizzare error where "PREVIEW" was labaled as CUSTOMIZE which in turn shows up 2 lines of code below.

Anyhow, I changed that to l.('preview') from l.('customize') and then had to go into updatePreview() javascript function to add a check for TEXT instead of TXT (lowercase) for getElementById(_text_).

That worked for me - so I went back to see what might be causing the confusion there (Firebug shows that ID for the text area is called TEXT, but in snews statement (where you replace textarea) there is NO id declaration (and since it's probably getting it from whyz, I added those getElementbyID checks in the func, and preview started working for me).

If more details are needed... feel free to post.

BTW, I love your add-on.

EDIT: will add affected code code here later.
« Last Edit: October 18, 2007, 11:59:24 PM by BoltX »
Logged

tyee

  • Jr. Member
  • **
  • Karma: 0
  • Posts: 56
Re: [Addon Package] Whizzywig editor
« Reply #27 on: October 23, 2007, 09:46:02 PM »

Joost, you were right. Something in my css is making the buttons and the frame their in too large. I veritfied this by installing the snews-whizzywig mod only into the clean snews and get the same thing! I've tried to use firebug (Firefox css plugin) to analyze what is causing this but I'm not a css expert. Can't seem to find what's causing it. Any tips you can suggest  would be much appreciated.

I can see where the frame is being generated but can't locate any pixels dimensions anywhere except for the width (97%). Can't find anything about the height of the frame or buttons.
« Last Edit: October 23, 2007, 09:51:09 PM by tyee »
Logged

brauck

  • Hero Member
  • *****
  • Karma: 18
  • Posts: 556
    • http://www.hbw-webdesign.nl/
Re: [Addon Package] Whizzywig editor
« Reply #28 on: October 24, 2007, 04:09:08 PM »

Quote from: BoltX
I found a bizzare error where "PREVIEW" was labaled as CUSTOMIZE which in turn shows up 2 lines of code below.

see this post

Quote from: BoltX
my PREVIEW didn't work.

see this post.

Hope this helps  :)
Logged
Confidence is reduced complexity.
brauck.nl for free css templates

Joost

  • Guest
Re: [Addon Package] Whizzywig editor
« Reply #29 on: October 25, 2007, 04:12:23 AM »

@Brauck / BoltX

Preview is not needed, when a wysiwyg editor is used, as both show the same content. You might want to update your code (save the post without editing).

@tyee

In snews.php there is no styling for the buttons present. So it is in your stylesheet or there is a conflict with another jscript (Whizzywig editor works with default snews jscript). It is also possible, that your browser cannot handle Whizzywig editor its focus is on IE and Firefox.
Logged
Pages: 1 [2] 3 4 5