Author |
Message |
probador
New Member
![New Member New Member](modules/Forums/images/ranks/1star.gif)
![](modules/Forums/images/avatars/gallery/blank.gif)
Joined: Apr 20, 2006
Posts: 24
|
Posted:
Sat Apr 22, 2006 11:50 am |
|
Hi
WYSIWYG is great ; I use it all the time to post news. However, when I create pages with the content module, it keeps some of the HTML such as tables, images, etc.. but removes all the style applied to the text such as color, font, size, etc...
It's like CSS would overrride but that does not happen when using WYSIWYG on blocks creation, news module, etc...
I'm pretty sure it is not a problem of WYSIWYG, since when I re-edit the content page it is shown corrrectly, but rather a problem of the content module, but I am not sure of where to start this thread...
I tried to change the $AllowableHTML but nothing seems to change. I need content to take the WYSIWYG style into account, obviously without changing the css for the rest of the web.
Any ideas?? Thanks in advance. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
kguske
Site Admin
![](modules/Forums/images/avatars/41f0b40a419280935f3a0.gif)
Joined: Jun 04, 2004
Posts: 6437
|
Posted:
Sat Apr 22, 2006 1:15 pm |
|
Welcome to RavenPHPScripts.com!
I haven't looked at the content module in a while, but would guess that it might have extra code that is causing this. Let me take a look - maybe it's doing some unnecessary things... |
_________________ I search, therefore I exist...
Only registered users can see links on this board! Get registered or login! |
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
probador
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Sat Apr 22, 2006 7:06 pm |
|
Thanks for your interest. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
probador
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Mon Apr 24, 2006 4:29 am |
|
Still no clue what is going on....
This is the code for the content module:
Code:function showpage($pid, $page=0) {
global $prefix, $db, $sitename, $admin, $module_name;
include("header.php");
OpenTable();
$pid = intval($pid);
$mypage = $db->sql_fetchrow($db->sql_query("SELECT * FROM ".$prefix."_pages WHERE pid='$pid'"));
$myactive = intval($mypage['active']);
$mytitle = stripslashes(check_html($mypage['title'], "nohtml"));
$mysubtitle = stripslashes(check_html($mypage['subtitle'], "nohtml"));
$mypage_header = stripslashes($mypage['page_header']);
$mytext = stripslashes($mypage['text']);
$mypage_footer = stripslashes($mypage['page_footer']);
$mysignature = stripslashes($mypage['signature']);
$mydate = $mypage['date'];
$mycounter = intval($mypage['counter']);
if (($myactive == 0) AND (!is_admin($admin))) {
echo "Lo siento, esta página no existe.";
} else {
$db->sql_query("UPDATE ".$prefix."_pages SET counter=counter+1 WHERE pid='$pid'");
$date = explode(" ", $mydate);
echo "<font class=\"title\">$mytitle</font><br>"
."<font class=\"content\">$mysubtitle<br><br><br><br>";
$contentpages = explode( "<!--pagebreak-->", $mytext );
$pageno = count($contentpages);
if ( empty($page) || $page < 1 )
$page = 1;
if ( $page > $pageno )
$page = $pageno;
$arrayelement = (int)$page;
$arrayelement --;
if ($pageno > 1) {
echo ""._PAGE.": $page/$pageno<br>";
}
if ($page == 1) {
echo "<p align=\"justify\">".nl2br($mypage_header)."</p><br>";
}
//Here the text is printed on the screen
echo "<p align=\"justify\">$contentpages[$arrayelement]</p>";
|
I guess the problem does have sth to do with "arrayelements" but I can't come up with more ideas... The funny thing is that under admin the content is saved correctly and if a Edit it it is displayed correctly under the WYSIWYG editor....
Help!! |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
probador
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Mon Apr 24, 2006 4:54 am |
|
Now I changed:
Code:echo "<p align=\"justify\"><font class=\"content\">$contentpages[$arrayelement]</font></p>";
|
for:
These are the lines on news module to print the bodytext of the piece of news (where it is displayed correctly).
The result is: It is still losing its style. This means that
a) $mytext is already formatted like that ???
b) There is other code that is formatting the whole content module like that.
Any ideas?? |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
defibber
Hangin' Around
![](modules/Forums/images/avatars/411e34fb4459885b2e619.jpg)
Joined: Apr 17, 2006
Posts: 46
Location: Kansas City Area
|
Posted:
Tue Apr 25, 2006 1:59 pm |
|
I am not sure if this is the right spot but I have been trying to add Content pages into my site. How do I adjust the Font Size? I tried <font size="7, <font="+2, etc. But they don't seem to work. The <h1, <h2..... work. Is this something I am going to have to modify the code like you are showing above?
Defiber |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
probador
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Tue Apr 25, 2006 3:16 pm |
|
I haven't come up with the solution yet. For the moment I am using WYSIWYG with span tags.
Good luck. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
defibber
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Tue Apr 25, 2006 3:19 pm |
|
how do you use the span tags? |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
probador
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Tue Apr 25, 2006 3:24 pm |
|
well you define a class on your CSS file of your theme with the type of letter etc...
e.g.:
Code:.BIG { font: 22px verdana, sans-serif; color: #3D3D3D; }
|
Then you can call it with html
Code:<span class="BIG">This would appear big</span>
|
|
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
defibber
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Tue Apr 25, 2006 3:27 pm |
|
OK , I tried the style before but I will try it again with the Span. THanks |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
defibber
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Wed Apr 26, 2006 2:53 pm |
|
I am having internitten luck with the Span thing. It works for somethings but not others
For example if you look at http://www.kearneyfire.org/modules.php?name=Content&pa=showpage&pid=1. The majority of the text should be the same size.
Here is the code:
Quote: |
<h3 align="center">Please call (816) 628-4122 before you burn or to ask questions</h3>
<table>
<td width="60%"><span class="content_1">In order to burn in the Kearney Fire & Rescue Protection District you need to fill out and submit a Missouri DNR Burn Permit to the Kearney Fire Department. We then forward it on to Missouri DNR for Final approval (usually takes a few days). We then contact you and let you know if it was approved or denied.</span><p>Download/Print a Mo. DNR Permit from <a href="../downloads/burn_permit.pdf"><u>Here</u></a></td>
<td width="40%"><a href="http://www.fs.fed.us/land/wfas/fd_class.gif"><img width="280" vspace="10" hspace="10" height="197" border="1" align="right" alt="Fire Danger Rating Continental Map" src="http://www.fs.fed.us/land/wfas/fd_class.gif" /></a></td>
<tr>
<td><span class="content_1">The Kearney Fire District is considered part of the Mid-America Regional Council Group so we ask that you restrict your burning to "Green Days".</span><p>Visit the Mid-Americal Regional Council <a href="http://www.marc.org"><u>Here</u></a></td>
<td><img src="http://www.marc.org/airquality/alert.gif" width="439" height="70" border="0"></td>
</table>
<br>
<H3>SECTION 210.615: REGULATION OF OPEN BURNING IN THE CITY LIMITS OF KEARNEY, MISSOURI</H3>
<span class="content_1"><P>A. No person shall burn or cause to be burned any sweepings, trash, paper, lumber, straw, hay, leaves or any combustible material with the exception of:</P></span>
<span class="content_1"><P> 1. Vegetable or flower gardens may be burned.</P></span>
<span class="content_1"><P> 2. Agricultural fields may be burned.</P></span>
<span class="content_1"><P>The burning of the above exceptions shall only be allowed between the hours of sunrise and sunset and person in charge of fire shall be in constant attendance with a water supply ready to quench the fire if same is within twenty (20) feet of a structure.</P></span>
<span class="content_1"><P>B. Nothing in this Section shall prevent the making of fires on proper occasions, providing permission is first obtained from the Chief of the Fire Department.</P></span>
<span class="content_1"><P>C. The use of the term <I>"Fire Chief" </I>in this Section shall mean the Fire Chief of the Kearney Fire and Rescue Protection District unless the Board of Aldermen designates otherwise.</P></span>
<span class="content_1"><P>D. Any person violating the provisions of this Section shall upon conviction thereof be punished by a fine not exceeding one hundred dollars ($100.00) for each such violation. (Ord. No. 476-87 §§2--4, 8-24-87; Ord. No. 548-91 §1, 6-17-91)</span></P></span>
|
any ideas? |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
kguske
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Wed Apr 26, 2006 8:42 pm |
|
I seems like a theme / css thing. If you preview this using submit news at http://nukeSEO.com, you can see that most of the text is the same size. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
montego
Site Admin
![](modules/Forums/images/avatars/0c0adf824792d6d341ef4.gif)
Joined: Aug 29, 2004
Posts: 9457
Location: Arizona
|
Posted:
Thu Apr 27, 2006 5:58 am |
|
Sorry to butt in here as I don't have much knowledge of the editor, however, I am noticing invalid HTML and wondering if that is causing the issue:
Code:
<span class="content_1"><P>The burning of the above exceptions shall only be allowed between the hours of sunrise and sunset and person in charge of fire shall be in constant attendance with a water supply ready to quench the fire if same is within twenty (20) feet of a structure.</P></span>
|
You cannot enclose a block tag (P tag) within an in-line tag (span). You could try "div" instead of "span" and see if that helps? Actually, I wonder if the CSS on the P tag is overwriting the style of the span... if they are both defined and P is given a conflicting style I cannot recall which one "wins". |
_________________ Only registered users can see links on this board! Get registered or login!
Only registered users can see links on this board! Get registered or login! |
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
defibber
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Thu Apr 27, 2006 8:17 am |
|
OK thanks, I am new to HTML and newer to NUKE so I wasn't 100% sure which one goes first. And I have seen DIV but not sure what it does. I will give it a try.
Thanks |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
montego
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Thu Apr 27, 2006 10:42 pm |
|
I am not quite sure how the FCKEditor handles this, so would definitely appreciate you giving us a report on how it goes. We're going to incorporate it into the next release as standard, so would like to get it as "robust" as possible.
Thanks! |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
defibber
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Fri Apr 28, 2006 2:38 pm |
|
That's cool. I have notice a huge difference between the way IE and Firefox read it. I re-did one of my content pages and seem to have fairly good luck with it. I had to add my own CSS code in the top to get it to work though but Firefox doesn't like the color code.
I tried to post the code but it wouldn't let me
When I get the CSS to work it is hit or miss on working. I have even tried Copy and Paste from Word to the content editor (not the source), and it is still inconsistent. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
defibber
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Fri Apr 28, 2006 4:51 pm |
|
My WYSIWYG editor and the regular entry boxes are gone!!! I was working with my Content pages and they all disappeared
Edited: They came back but I got banned from the IP I was working from
I started using this code
Quote: |
<head>
<STiLE type="text/css">
<!--
td {color: #000000; FONT-SIZE: 14px; FONT-FAMILY: Verdana, Helvetica,sans-serif; ! important}
.heading {color: #FF0000; text-align: center; FONT-SIZE: 20px; FONT-FAMILY: Verdana, Helvetica,sans-serif; ! important}
.content_2 {color: #000000; FONT-SIZE: 16px; FONT-FAMILY: Verdana, Helvetica,sans-serif; ! important}
-->
</STiLE>
</head>
<bidy>
<P><div class="heading">FIRE DEPARTMENT HISTORY FROM RECORDS OF COUNCIL MEETING MINUTES</div></p>
<table>
<td width="10%" align="center" valign="top">2-2-48</td> <td width="90%">The condition of the hose on fire truck was discussed and Mayor Bratton agreed to check on it and report back to board.</td><tr>
</table>
</bidy>
|
No I did not misspell Body or Style but I had to do it in order to post.
Interesting part though, it changed the font on the blocks and everything else< but in firefox the "heading" is small.
In IE, Blocks enlarged and the content was correct. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
defibber
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Sat Apr 29, 2006 12:14 pm |
|
I have been fighting the WYSIWYG editor for awhile because I import the code into the "source" then when I click ok it likes to add <p> </p> and it really messes up the page. I have gone back through the code in NoteTab Pro and there is nothing there but when I paste it into the editor Source window and click ok it throws them in there. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
|