1
Peekay
News 1.3 RC2 and Koivi view HTML problem.
  • 2005/7/1 14:56

  • Peekay

  • XOOPS is my life!

  • Posts: 2335

  • Since: 2004/11/20


Koivi works fine in News 1.3 RC2, but click the 'HTML' checkbox to view the code and the view window shrinks to a tiny size. In IE and Firefox.

Is this fixed in the 'definitive' version, or is there a fix I can apply?
A thread is for life. Not just for Christmas.

2
gediminasbyt
Re: News 1.3 RC2 and Koivi view HTML problem.

in \modules\system\admin\blocksadmin\blockform.php

replace
$textarea = new XoopsFormDhtmlTextArea(_AM_CONTENT'bcontent'$block['content'], 1570);

with
$textarea = new XoopsFormDhtmlTextArea(_AM_CONTENT'bcontent'$block['content'], '100%''400px');


Change pixels to the size you want to appear. Only problem I never did figure out how to save html, it never saves html code :bugger:

Anyone outhere who got this html box working?

3
Peekay
Re: News 1.3 RC2 and Koivi view HTML problem.
  • 2005/7/1 16:26

  • Peekay

  • XOOPS is my life!

  • Posts: 2335

  • Since: 2004/11/20


Many thx gediminasbyt I'll go and try that.

How do you mean HTML is not saved.? You mean if you paste HTML into the editor it doesn't save the file?
A thread is for life. Not just for Christmas.

4
Peekay
Re: News 1.3 RC2 and Koivi view HTML problem.
  • 2005/7/1 16:41

  • Peekay

  • XOOPS is my life!

  • Posts: 2335

  • Since: 2004/11/20


I tried that, but simply lost the 'Add New Block' section from the blocks page completely!

I'm not actually using Koivi for blocks, just News and SmartSection. I'll take a look at the SmartSection setup and see what's different.
A thread is for life. Not just for Christmas.

5
gediminasbyt
Re: News 1.3 RC2 and Koivi view HTML problem.

Exactly. Kiovi editor adds its own formatting, if you try to paste script it just wont save code.

Process:

1.Tick html box
2.Paste code
3.Save
4.Error message: Please enter content

I have the problem with Google ads because it uses the script. Any possible way I tried to add it but no avail.

<script type="text/javascript"><!--
google_ad_client "pub-id";
google_ad_width 728;
google_ad_height 90;
google_ad_format "728x90_as";
google_ad_type "text_image";
google_ad_channel ="";
google_page_url document.location;
//--></script>
<script type="text/javascript"
  
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</
script>


Some users were saying that you have to tick html box several times, but this does not help. I just go directly to database and add the code myself.

6
gediminasbyt
Re: News 1.3 RC2 and Koivi view HTML problem.

Ooops sorry, I gave you the code if you had for your blocks enabled I'll look into it.

7
Peekay
Re: News 1.3 RC2 and Koivi view HTML problem.
  • 2005/7/1 17:54

  • Peekay

  • XOOPS is my life!

  • Posts: 2335

  • Since: 2004/11/20


Thanks for drawing my attention to the HTML issue. I confess I had never tried it, but I have been telling potential users they can cut-n-paste HTML code! I can't check this now but I will later.

I know most WYSIWYG editors create slightly different code, but I would have hoped Koivi would accept basic HTML code input, or at least give you a 'raw code' editing option (so it behaves like the DHTML editor).
A thread is for life. Not just for Christmas.

8
gediminasbyt
Re: News 1.3 RC2 and Koivi view HTML problem.

I should stay corrected. Simple html I manage to save, but I would have thought this html box is to save in "raw" format which simply does not work in all situations as I explained above when I tried to paste the script.

The only debugger phperror I do get when I try to preview this script.

"); win.focus(); win.document.close(); //-->


Sorry Peekay for pointing you to the wrong place. I have made Koivi as my default editor in one site therefore it did work for me, but I'm not sure where to fix for Smartsection and News. Indeed I just noticed the same problem on my site. Just never had to paste any html yet into my News page. Now this bugs me as well.

9
Peekay
Re: News 1.3 RC2 and Koivi view HTML problem.
  • 2005/7/3 12:56

  • Peekay

  • XOOPS is my life!

  • Posts: 2335

  • Since: 2004/11/20


It appears Koivi runs 'raw' HTML code through a filter to make it XHTML compliant. There do appear to be some issues. I discovered that:

1) It strips out non-breaking space codes

1) It strips out HTML comments, however they are replaced with the word 'undefined'.

2) You cannot add a JavaScript on it's own. It has to be preceded by some regular HTML. So
<script language="JavaScript">
resetDynamicFields();
</
script>

doesn't work. However,

<p>Here's a script</p>
<script language="JavaScript">
resetDynamicFields();
</script>

does work.

Unfortunately, the preceding code needs to be a character (use a non-breaking space and it doesn't work - because the filter removes it!). However, you can hide it. I used a full-stop in this example:
<p style="display: none;">.</p>
<
script language="JavaScript">
resetDynamicFields();
</
script>


This needs addressing really, (I'll post in module troubleshooting) but in the meantime, you could remove the comment tags from your Google script and try the above workaround.
A thread is for life. Not just for Christmas.

10
Peekay
Re: News 1.3 RC2 and Koivi view HTML problem.
  • 2005/7/3 14:45

  • Peekay

  • XOOPS is my life!

  • Posts: 2335

  • Since: 2004/11/20


Tiny HTML edit box problem solved.

In modules/news/include/storyform.inc.php
Around line 80, replace:

$editor=news_getWysiwygForm(_NW_THESCOOP'hometext'$hometext1560'hometext_hidden');

with

$editor=news_getWysiwygForm(_NW_THESCOOP'hometext'$hometext'100%''300px''hometext_hidden');


Around line 87, replace

$editor2=news_getWysiwygForm(_AM_EXTEXT'bodytext'$bodytext1560'bodytext_hidden');

with

$editor2=news_getWysiwygForm(_AM_EXTEXT'bodytext'$bodytext'100%''300px''bodytext_hidden');
A thread is for life. Not just for Christmas.

Login

Who's Online

249 user(s) are online (183 user(s) are browsing Support Forums)


Members: 0


Guests: 249


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits