Welcome to Geeklog, Anonymous Tuesday, November 29 2022 @ 09:44 am EST

Geeklog Forums

HTMLArea

Page navigation


Jody

Anonymous
I have a problem with that. I follow the Info in there. I load it in and it's not working. Like to put it in Story. Here's my Question on that. Do I delete all in the story.php and put HTMLArea in that? Is that right or wrong. That's where I don't understand yet.
 Quote

Status: offline

NeoNecro

Forum User
Regular Poster
Registered: 02/07/04
Posts: 90
Hey,
I think you're trying to hard. I'm also wanting to use HTMLArea, but I'm not going to because it only suports ie and that sucks But I think I know the answer to your question: You'll have to go to the directory of youre theme and at te folowing code between your head tag in header.thtml.
Text Formatted Code

</script>
<script language="Javascript1.2"><!-- // load htmlarea
_editor_url = "/htmlarea/";                     // URL to htmlarea files
var win_ie_ver = parseFloat(navigator.appVersion.split("MSIE")[1]);
if (navigator.userAgent.indexOf('Mac')        >= 0) { win_ie_ver = 0; }
if (navigator.userAgent.indexOf('Windows CE') >= 0) { win_ie_ver = 0; }
if (navigator.userAgent.indexOf('Opera')      >= 0) { win_ie_ver = 0; }
if (win_ie_ver >= 5.5) {
 document.write('<scr' + 'ipt src="' +_editor_url+ 'editor.js"');
 document.write(' language="Javascript1.2"></scr' + 'ipt>');
} else { document.write('<scr'+'ipt>function editor_generate() { return false; }</scr'+'ipt>'); }
// --></script>

 


Then you should edit the folowing files:
comment/commentform.thtml for comments
submit/submitlink.thtml for links
submit/submitstory.thtml for stories

Text Formatted Code
And at this code between the <form> tags, just before </form>
(I needed to put this in a code box, because it kept removing the <form> tags :(

 

Text Formatted Code

<script language="JavaScript1.2" defer>
var config = new Object();
config.toolbar = [ ['fontname'],
  ['fontsize'],
  ['bold','italic','underline','strikethrough','separator'],
  ['justifyleft','justifycenter','justifyright','separator'],
  ['OrderedList','UnOrderedList','Outdent','Indent','separator'],
  ['forecolor','backcolor','separator'],
  ['HorizontalRule','Createlink','htmlmode','popupeditor','separator'],
  ['about']
];
editor_generate('TEXTAREANAME',config);
</script>

 



That should work

btw: there's a new version of HTMLArea available that should work with FireFox. I'm going to give that one a try
dimis-site.be
 Quote

Jody

Anonymous
I did that Yesterday. I been searching for my answer and never found it. Still don't work that way. I even have it posted the other site. Nothing came back yet. Your way don't work at all. Yesterday I tryed that 5 times and it don't work at all.
 Quote

Status: offline

tomw

Forum User
Full Member
Registered: 08/12/02
Posts: 300
Have you looked at the package I put together with instructions for HTMLarea 2.03 at gplugs?

Many have been using that for years.

I have never gotten the HTMLArea 3.0 beta running successfully.
 Quote

Jody

Anonymous
Yes it is the HTMLArea 3.0 Is that why i'm having problems.
 Quote

Jody

Anonymous
Tomw I put in htmlarea 2 in and got a error in the Editor.js it is document.all[objname].config = config; there something missing and I can't debug that. The Editor I have won't debug it.
 Quote

Status: offline

SoundChaser

Forum User
Newbie
Registered: 03/04/04
Posts: 11
So, is anyone actually having any luck getting HTMLArea 2.03 or 3.0 working with Geeklog 1.3.9? So far, I've tried both versions, and have had precisely zero luck getting it to work.

This is frustrating because (A) I have several other apps that are working with HTMLArea on the same server, and (Cool even the examples in the HTMLArea distribution files work without problems.

The whole issue seems to be centered around Geeklog integration. Yes, I have tried tomew's instructions, with no luck.
 Quote

Jody

Anonymous
Me no luck either. I guess I forget that way. Try another way. All I want is put Pics in Articles. Anyone know how to do that.
 Quote

Status: offline

Blaine

Forum User
Moderator
Registered: 07/16/02
Posts: 1232
Location:Canada
Yes, GL works fine with HTMLArea 2.03 and following Tom's directions still work correctly.

I have also integrated 3.0 but had some issues and was not able to get it to work locally on my devel desktop (XP) but worked when I moved it to a hosted server for some reason. This was a few months ago now and I have not tried it since.

Make sure you don't have a conflict with some other JS library. I know that fValidate JS library for example has a conflict with HTMLArea 2.03 namespace.
Geeklog components by PortalParts -- www.portalparts.com
 Quote

Status: offline

comicbookguy

Forum User
Regular Poster
Registered: 05/15/04
Posts: 97
I am running 2.03 and it works fine. I used Tom's instructions and the install went smooth enough.

I could see where it could be very easy to make a mistake though, since it's not your typical install.
 Quote

Chalkhillian

Anonymous
awake
Works on http://bressetteskarate.com as well with 1.3.9 - I used Tom's instructions with 1.3.7 and upgraded with no problems. Post some code - lets see what you've got.
 Quote

Status: offline

samstone

Forum User
Full Member
Registered: 09/29/02
Posts: 820
HTMLArea 3.0 works on all my sites, English and other languages. I also use the ImageManager plug in. I just don't know how I would be able to live without it. It saves a heaven lot of time. This is how I do it.

I have no codes in my header.thtml because I don't want it to be activated all the time.

I put these codes at the top of admin/story/storyeditor.thtml. You do the same with other pages that has textarea.


Text Formatted Code

<script type="text/javascript">
  _editor_url = "/htmlarea/";
  _editor_lang = "en";
</script>
<script type="text/javascript" src="/htmlarea/htmlarea.js"></script>
<script type="text/javascript">
//load the ImageManage + Editor plug-in
HTMLArea.loadPlugin("ImageManager");
HTMLArea.loadPlugin("TableOperations");
HTMLArea.loadPlugin("SpellChecker");
</script>


 


Then at the textarea for IntroText I did a little modification and add the java script as follows:

Text Formatted Code

<textarea name="introtext" id="introtext" cols="98" rows="24" wrap="virtual">{story_introtext}</textarea>
<br>
<script type="text/javascript">
        var editor = new HTMLArea("introtext");
// var config = new HTMLArea("content");  
        var config = editor.config;
        config.width = '450px';
        config.height = '200px';
        editor.registerPlugin(TableOperations);
editor.registerPlugin(SpellChecker);
editor.generate();
</script>      

 


And again at the bodytext area:

Text Formatted Code

<textarea name="bodytext" id="bodytext" cols="98" rows="36" wrap="virtual">{story_bodytext}</textarea><br>
<script type="text/javascript">
        var editor = new HTMLArea("bodytext");
// var config = new HTMLArea("content");  
        var config = editor.config;
        config.width = '450px';
        config.height = '320px';
        editor.registerPlugin(TableOperations);
editor.registerPlugin(SpellChecker);
editor.generate();
</script>


 


That takes care of the storyeditor.

If this works, I guess you can figure out how to do other non-admin pages giving limited HTMLArea features following the documentation.

It works on both IE and Mozilla. It works on Mozilla better, on IE you might have to refresh it sometimes. If you do the modification according to HTMLArea's forum, you can make it work better with IE, (so that it will come up every time and you don't have to refresh).

I don't have other than these two browsers to test and my users don't go beyond these two browsers.

In case you don't know where I get the ImageEditor, it'shere
 Quote

Status: offline

SoundChaser

Forum User
Newbie
Registered: 03/04/04
Posts: 11
HTMLArea 3.0 works on all my sites, English and other languages. I also use the ImageManager plug in. I just don't know how I would be able to live without it. It saves a heaven lot of time. This is how I do it.


YES! This works!! Only one (minor) problem -- and it's probably something that I messed up... For some reason when I save an article, I end up in the /admin/story.php -- with a blank page. Dunno what I could have messed up to cause this. Here's a copy of my storyeditor.php file, if anyone has a clue (I suspect it's pretty simple), I'd love the feedback:

Text Formatted Code
<script type="text/javascript">
  _editor_url = "/htmlarea/";
  _editor_lang = "en";
</script> <script type="text/javascript" src="/htmlarea/htmlarea.js"></script>
<script type="text/javascript">
//load the ImageManage + Editor plug-in
// HTMLArea.loadPlugin("ImageManager");
HTMLArea.loadPlugin("TableOperations");
HTMLArea.loadPlugin("SpellChecker");
</script>
                            <form action="{site_admin_url}/story.php" method="post" enctype="multipart/form-data">
                                <table border="0" cellspacing="0" cellpadding="3" width="100%">
                                    <tr>
                                        <td align="right">{lang_author}:</td>
                                        <td>{story_author}<input type="hidden" name="uid" value="{story_uid}"></td>
                                    </tr>
                                    <tr>
                                        <td align="right" valign="top">{lang_date}:</td>
                                        <td>
                                            <select name="publish_month">
                                                {publish_month_options}
                                            </select>
                                            /
                                            <select name="publish_day">
                                                {publish_day_options}
                                            </select>
                                            /
                                            <select name="publish_year">
                                                {publish_year_options}
                                            </select>  
                                            <select name="publish_hour">
                                                {publish_hour_options}
                                            </select>
                                            :
                                            <select name="publish_minute">
                                                {publish_minute_options}
                                            </select>
                                            <select name="publish_ampm">
                                                <option value="am" {publisham_selected}>am</option>
                                                <option value="pm" {publishpm_selected}>pm</option>
                                            </select><br>
                                            <input type="hidden" name="publish_second" value="{publish_second}">
                                            {publish_date_explanation}
                                        </td>
                                    </tr>
                                    <tr>
                                        <td align="right">{lang_title}:</td>
                                        <td><input type="text" size="48" maxlength="255" name="title" value="{story_title}"></td>
                                    </tr>
                                    <tr>
                                        <td align="right">{lang_topic}:</td>
                                        <td>
                                            <select name="tid">
                                                {topic_options}
                                            </select>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td align="right">{lang_show_topic_icon}:</td>
                                        <td>
                                            <input type="checkbox" name="show_topic_icon" {show_topic_icon_checked}>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td align="right">{lang_draft}:</td>
                                        <td><input type="checkbox" name="draft_flag" {is_checked}></td>
                                    </tr>
                                    <tr>
                                        <td align="right">{lang_mode}:</td>
                                        <td>
                                            <select name="commentcode">
                                                {comment_options}
                                            </select>
                                            <select name="featured">
                                                {featured_options}
                                            </select>
                                            <select name="frontpage">
                                                {frontpage_options}
                                            </select>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td valign="top" align="right">{lang_introtext}:</td>
                                        <td><textarea id="introtext" name="introtext" cols="50" rows="15" wrap="virtual" style="width:100%">{story_introtext}</textarea>
<br>
<script type="text/javascript">
        var editor = new HTMLArea("introtext");
// var config = new HTMLArea("content");  
        var config = editor.config;
        config.width = '450px';
        config.height = '200px';
        editor.registerPlugin(TableOperations);
editor.registerPlugin(SpellChecker);
editor.generate();
</script>      
</td>
                                    </tr>
                                    <tr>
                                        <td valign="top" align="right">{lang_bodytext}:</td>
                                        <td><textarea style="width:100%" name="bodytext" id="bodytext" cols="50" rows="24" wrap="virtual">{story_bodytext}</textarea>
<script type="text/javascript">
        var editor = new HTMLArea("bodytext");
// var config = new HTMLArea("content");  
        var config = editor.config;
        config.width = '450px';
        config.height = '320px';
        editor.registerPlugin(TableOperations);
editor.registerPlugin(SpellChecker);
editor.generate();
</script>
</td>
                                    </tr>
                                    <tr valign="top">
                                        <td align="right"><b>{lang_postmode}:</b></td>
                                        <td>
                                            <select name="postmode">
                                                {post_options}
                                            </select>
                                            <br>
                                            {lang_allowed_html}
                                        </td>
                                    </tr>
                                    <tr>
                                        <td valign="top" align="right"><b>{lang_images}:</b></td>
                                        <td>
                                            {saved_images}
                                            {image_form_elements}
                                        </td>
                                    </tr>
                                    <tr>
                                        <td align="right">{lang_hits}:</td>
                                        <td><input type="hidden" name="hits" value="{story_hits}">{story_hits}</td>
                                    </tr>
                                    <tr>
                                        <td align="right">{lang_comments}:</td>
                                        <td><input type="hidden" name="comments" value="{story_comments}">{story_comments}</td>
                                    </tr>
                                    <tr>
                                        <td align="right">{lang_emails}:</td>
                                        <td><input type="hidden" name="numemails" value="{story_emails}">{story_emails}
                                            <input type="hidden" name="sid" value="{story_id}">
                                        </td>
                                    </tr>
                                    <tr>
                                        <td colspan="2"><hr></td>
                                    </tr>
                                    <tr>
                                        <td colspan="2"><b>{lang_accessrights}</b></td>
                                    </tr>
                                    <tr>
                                        <td align="right">{lang_owner}:</td>
                                        <td>{owner_username}<input type="hidden" name="owner_id" value="{owner_id}"></td>
                                    </tr>
                                    <tr>
                                        <td align="right">{lang_group}:</td>
                                        <td>
                                            {group_dropdown}
                                        </td>
                                    </tr>
                                    <tr>
                                        <td colspan="2"> </td>
                                    </tr>
                                    <tr>
                                        <td colspan="2"><b>{lang_permissions}</b>:</td>
                                    </tr>
                                    <tr>
                                        <td colspan="2">{lang_perm_key}</td>
                                    </tr>
                                    <tr>
                                        <td colspan="2">
                                            {permissions_editor}
                                        </td>
                                    </tr>
                                    <tr>
                                        <td colspan="2">{permissions_msg}</td>
                                    </tr>
                                    <tr><td colspan="2"> </td></tr>
                                    <tr>
                                        <td colspan="2">
                                            <input type="submit" value="{lang_save}" name="mode">
                                            <input type="submit" value="{lang_preview}" name="mode">
                                            <input type="submit" value="{lang_cancel}" name="mode">
                                            {delete_option}
                                            {submission_option}
                                        </td>
                                    </tr>
                                </table>
                            </form>

 


I can probably compare against the original file, and find out where I went wrong -- but it may take a while because of the modifications...so if anyone spots the problem right off, I'd appreciate the help...

// George
 Quote

Status: offline

samstone

Forum User
Full Member
Registered: 09/29/02
Posts: 820
I took a quick look and couldn't find anything wrong with the java script itself.

You might want to replace the story.php with a fresh one and see what happen.

And then get a fresh storyeditor.thml and put these codes in again.

Just some easy way to narrow down the problem.

Sam
 Quote

Status: offline

ByteEnable

Forum User
Full Member
Registered: 10/20/03
Posts: 138
I also get a blank page. However, looking at the blank page source it says this:

Text Formatted Code

<html><head><meta http-equiv="refresh" content="0; URL=http://www.linuxelectrons.com/admin/story.php?msg=9"></head></html>


 


So the story actually got saved. Just didn't refresh the page.

On another note, I could never get my spell checking working from the server, any pointers in that area as well?

Strange, from my ISP I cannot get zhuo's site. Here is the sourceforge link:

https://sourceforge.net/project/showfiles.php?group_id=92873

Byte
 Quote

Status: offline

NeoNecro

Forum User
Regular Poster
Registered: 02/07/04
Posts: 90
Thanks samstone for your explanation, but I'm still having one problem: links!
If I try to make a link with firefox, a popup opens, but I can't put text in the two fields. If I wan't to make a link with ie, I can put text in those two fields, but my html code doesn't get placed
On the HTMLArea forums I found out there were more users with this problem, but from those threads I can't figure out who to fix it
I really don't know what's wrong, I even downloaded the latest cvs version, but with that nothing works
Any idee on who to fix this?

grtz
dimis-site.be
 Quote

Status: offline

tomw

Forum User
Full Member
Registered: 08/12/02
Posts: 300
I see you also found the two problems that I never could get around spell check and links. For me links is a showstopper.
 Quote

Status: offline

NeoNecro

Forum User
Regular Poster
Registered: 02/07/04
Posts: 90
I don't mind the spelling checker doesn't work, but only for the links.
I'm going to look on there forums to find a solution. I will let you know if I found one.

/edit
I think I got the links working! But I don't know if it was my fault or HTMLArea's. Now I can make links in Firefox and in IE.

You first need to select the tekst that you wan't to make a link of (didn't knew that) and then klick on the link icon. In IE it will work from the first time the popup opens, but in Firefox, you'll need to wait a few seconds or klick some where outside the popup then you can enter tekst.

I also changed some files from cvs:


Don't know if they make a difrence
dimis-site.be
 Quote

Status: offline

NeoNecro

Forum User
Regular Poster
Registered: 02/07/04
Posts: 90
I just found out there's an editor that could be better then htmlarea. It's FCKeditor, it's much simpler to install and it works like it's suposed to on Firefox!

You can read more about in in this threat.
dimis-site.be
 Quote

Status: offline

NeoNecro

Forum User
Regular Poster
Registered: 02/07/04
Posts: 90
Quote by SoundChaser:
For some reason when I save an article, I end up in the /admin/story.php -- with a blank page. Dunno what I could have messed up to cause this.


I had the same problem when I posted articles with HTMLArea or FCKeditor, but only in Firefox, in IE nothing seems to be wrong.

I found out who to fix it. But it's a very dirty way to do so:
You should replace this line (2559) in your lib-common.php
Text Formatted Code

return "<html><head><meta http-equiv="refresh" content="0; URL=$url"></head></html>//n";


 

to this
Text Formatted Code

   return "<html><head><SCRIPT LANGUAGE="JavaScript">redirTime = "100"; redirURL = "$url"; function redirTimer() { self.setTimeout("self.location.href = redirURL;",redirTime); } </script></head><body onLoad="redirTimer()"></body></html>//n";


 

From now on Geeklog will use a script to redirect you to the folowing page. In Firefox en ie.

I hope it works for you.

ps: the forum removed som back-slashes, I hope you know where to put them.
dimis-site.be
 Quote

Page navigation

All times are EST. The time is now 09:44 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content