Page 1 of 2

html blobs get truncated or simplified.

Posted: Tue Jan 18, 2005 6:46 pm
by jptechnical
I am trying to use the html blobs as a sort of include file... first let me know if this is not the intended purpose.

So I am adding this content

Code: Select all


<table width="187" border="0" cellpadding="0" cellspacing="0">  
<tr>    
<td height="43" background="/images/header_arrow_bg.jpg">
<table width="151" border="0" align="right" cellpadding="0" cellspacing="0">  
<tr>    
<td width="151">title</td>
  </tr>
</table>
</td>
  </tr>
  
<tr>    
<td background="/images/current_sale_bg.jpg">
<table width="187" border="0" cellpadding="10" cellspacing="0">        
<tr>          
<p align="center"><a href="images/New%20Folder/current_project_windows.jpg"><img src="images/current_project_windows_th.jpg" width="121" height="150" border="0" align="middle" /></a></p>
              
<p align="center">test test test </p>
              
<p> </p>
        </tr>
    </table>
<div align="center" /></td>
  </tr>
</table>
and when I hit update and then look at the html again, I get this content

Code: Select all


<table width="187" border="0" cellpadding="0" cellspacing="0">  
<tr>    
<td height="43">
<table width="151" border="0" align="right" cellpadding="0" cellspacing="0">  
<tr>    
<td width="151">title</td>
  </tr>
</table>
</td>
  </tr>
  
<tr>    
<td>
<table width="187" border="0" cellpadding="10" cellspacing="0">        
<tr>          
<p align="center"><a href="images/New%20Folder/current_project_windows.jpg"><img src="images/current_project_windows_th.jpg" width="121" height="150" border="0" align="middle" /></a></p>
              
<p align="center">test test test </p>
              
<p> </p>
        </tr>
    </table>
<div align="center" /></td>
  </tr>
</table>

You notice it is stripping the background tag from the element.

Any ideas?

Are there more html limitations in the html blob I havent found yet?

html blobs get truncated or simplified.

Posted: Tue Jan 18, 2005 7:11 pm
by Ted
No, that's definatly the intended purpose of HTML Blobs...

Are you using TinyMCE? Even though the html_verify is off, for some reason it still likes to "clean up" html. Turn it off and modify it accordingly. I'll see if I can come up with a fix for TinyMCE to leave it alone.

html blobs get truncated or simplified.

Posted: Tue Jan 18, 2005 7:31 pm
by jptechnical
8.2 clean install. So I assume tinymc is the wysiwyg editor.

I will look for an html verify option.


Thanks for the reply.

This an an awesome CMS! I have mentioned in other posts that I am coming from Postnuke, Xaraya, PHPNUKE and XOOPS and I have all but abandoned them for your project.

The strengths of CMSMS are the weakness of all the other cms I have tried, modules and addons up the wazoo but no simple way of maintaining simple content. Any of those other features can be handled with a simple static template to match CMSMS and that is worse case scenario.

Keep to your goal of simplicity. Try not to get too swayed by the massive requests for 'features' that turn into 'liabilities'.

Thanks for all the work.

html blobs get truncated or simplified.

Posted: Tue Jan 18, 2005 7:38 pm
by jptechnical
I dont see anything matching html_verify in cmsms admin. I did a text search for html_verify and it came up empty in the tinyMCE folder in the plugins folder in cmsms82.

In user prefs I just see the option to use tinyMCE as the editor and tinyMCE options just have the strip css toggle.

Can you tell me where to look for the html_verify option?

thanks.

html blobs get truncated or simplified.

Posted: Tue Jan 18, 2005 7:48 pm
by Ted
Sorry, there is no easy to configure this stuff yet. The file you're looking for is: modules/TinyMCE/modulefuctions.php around line 60 or so.

Now that I'm reading up on the tinymce options a bit (http://tinymce.moxiecode.com/docs/using.htm), I think I might see the problem...

Remove the extended_valid_elements line and instead replace it with:

Code: Select all

valid_elements : "*[*]"
I didn't try it myself, but it MIGHT work. I can mess with it later on if you don't get any good results.

Also, thanks for the kind words. I'm glad CMSMS is filling that niche that's needed filling for a LONG time now (coming to you as an ex-postnuke user).

html blobs get truncated or simplified.

Posted: Tue Jan 18, 2005 8:13 pm
by jptechnical
That appears to have done it.

I will be working on the site again in the next couple days and I will see if it is going to work for includes like I want it to.


thanks alot.

html blobs get truncated or simplified.

Posted: Wed Jan 19, 2005 6:46 am
by jptechnical
Or perhaps not.

Now it looks to be stripping off the css.

this is what I put in

Code: Select all

<table width="100%" border="0" cellpadding="0" cellspacing="0">          <tbody>
<tr>            
<td>
<table width="187" border="0" cellpadding="0" cellspacing="0">                <tbody>
<tr>                  
<td height="43" class="headerarrow">
<table width="151" border="0" align="right" cellpadding="0" cellspacing="0">                      <tbody>
<tr>                        
<td width="151">title</td>
                      </tr>
                  </tbody></table>
</td>
                </tr>
              </tbody></table>
                
<table width="100%" border="0" cellpadding="0" cellspacing="0">                  <tbody>
<tr>                    
<td class="currentsalebg"> </td>
                  </tr>
              </tbody></table>
</td>
          </tr>
        </tbody></table>
This is what I get out

Code: Select all

<table width="100%" border="0" cellpadding="0" cellspacing="0">          <tbody>
<tr>            
<td>
<table width="187" border="0" cellpadding="0" cellspacing="0">                <tbody>
<tr>                  
<td height="43">
<table width="151" border="0" align="right" cellpadding="0" cellspacing="0">                      <tbody>
<tr>                        
<td width="151">title</td>
                      </tr>
                  </tbody></table>
</td>
                </tr>
              </tbody></table>
                
<table width="100%" border="0" cellpadding="0" cellspacing="0">                  <tbody>
<tr>                    
<td> </td>
                  </tr>
              </tbody></table>
</td>
          </tr>
        </tbody></table>

So it is working fine for html but the css tags are getting removed.

Any ideas?

thanks.

html blobs get truncated or simplified.

Posted: Wed Jan 19, 2005 11:59 pm
by Greg
Is this class defined in your CSS that is associated with the template that page is using? I found that if the class wasn't in the associated template tinymce would just remove it.
More related info:
here
Greg wrote:I added line 66 to tinymce/modulefunctions.php:

Code: Select all

content_css : "tiny.css",
and placed tiny.css in the admin folder. The css in tiny.css is then used in the styles dropdown.

The CSS in this file must be a subset of the CSS associated with the template of the page you are editing.

Very useful if you have some css that is common to all your templates!

html blobs get truncated or simplified.

Posted: Thu Jan 20, 2005 3:38 am
by jptechnical
I am not sure what you mean but let me give it a try.

The css is stripped out when you hit update in the html blob.

So far as I know an html blob is not associated with any template or content item... it is just a snippet of html and is completely independant. It is just called whenever you put in the smarty tag for it. - Is that right?

I would put it in a content page or a template and test it out but like I said, when you hit update and then look at the html again the css is just gone.

I will look at that link

html and news modules strip out css

Posted: Thu Feb 24, 2005 1:32 am
by Glenn
I've tried everything mentioned here. If you are using TinyMCE and try to do anything like or or use div instead of span or try adding any type of css html blob and news modules will just strip it out.

This CMS is great, fantastic, but this is a MAJOR flaw that needs to be fixed. I've done some extensive hacking with php for the site that I am using it on (www.seedalliance.org) and I've got it working, but I'm not using html blobs or news at all -- even though that's what excited me about this at first. I can't use them if the client can't apply styles with the WYSIWYG editor. HTML area is no help. Installed it and I get errors on just about everything I try.

I hope we can figure this one out. Thanks for all your work Wishy, you're fantastic!

html blobs get truncated or simplified.

Posted: Thu Feb 24, 2005 1:46 am
by Ted
You might be in luck... Can you (or anyone else pissed off by this bug) confirm a bugfix for me?

Open up modules/TinyMCE/TinyMCE.module.php

Go to line 156. Add the line

Code: Select all

verify_css_classes : "false",
so that it looks like

Code: Select all

                verify_html : "false",
                verify_css_classes : "false",
                plugins : "table,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,zoom,flash,ibrowser",
when you're done.

Save and retry it. Please let me know if it works or not (it did for me).

Thanks!

html blobs get truncated or simplified.

Posted: Thu Feb 24, 2005 2:03 am
by jptechnical
In .9rc4 I don't have this problem anymore. I put in this code:

Code: Select all

<table width="100%" border="0" cellpadding="0" cellspacing="0">          <tbody>
<tr>           
<td>
<table width="187" border="0" cellpadding="0" cellspacing="0">                <tbody>
<tr>                 
<td height="43" class="headerarrow">
<table width="151" border="0" align="right" cellpadding="0" cellspacing="0">                      <tbody>
<tr>                       
<td width="151">title</td>
                      </tr>
                  </tbody></table>
</td>
                </tr>
              </tbody></table>
               
<table width="100%" border="0" cellpadding="0" cellspacing="0">                  <tbody>
<tr>                   
<td class="currentsalebg"> </td>
                  </tr>
              </tbody></table>
</td>
          </tr>
        </tbody></table>
And this is what is there after I update, save and open again.

Code: Select all

<table width="100%" height="55" cellspacing="0" cellpadding="0" border="0">          <tbody>
<tr>           
<td>
<table width="187" height="43" cellspacing="0" cellpadding="0" border="0">                <tbody>
<tr>                 
<td height="43" class="headerarrow">
<table width="151" height="12" cellspacing="0" cellpadding="0" border="0" align="right">                      <tbody>
<tr>                       
<td width="151">title</td>
                      </tr>
                  </tbody></table>
</td>
                </tr>
              </tbody></table>
               
<table width="100%" height="12" cellspacing="0" cellpadding="0" border="0">                  <tbody>
<tr>                   
<td class="currentsalebg"> </td>
                  </tr>
              </tbody></table>
</td>
          </tr>
        </tbody></table>
It is however setting the height of the tables if you notice. I don't particularly like this, but it really isnt that much of an issue. In most cases the content will force the table to be taller due to the content.

html blobs get truncated or simplified.

Posted: Thu Feb 24, 2005 5:29 am
by jptechnical
Sorry, my bad. It is not disturbing the class="" but it is removing the inline style.

Code: Select all

 <td background="/images/template/watermark.jpg" style="background-position:center; background-position:top; background-repeat:no-repeat">
becomes

Code: Select all

 <td background="/images/template/watermark.jpg">
I did put in the line in TinyMCE.module.php but it didnt affect it.

html blobs get truncated or simplified.

Posted: Thu Feb 24, 2005 10:21 am
by Ted
argh. Ok, I'll keep looking.

html blobs get truncated or simplified.

Posted: Thu Feb 24, 2005 1:19 pm
by Ted
I'm striking out on this one, but I'm starting to agree with the TinyMCE philosophy...

If you have specific needs about what code is output (particularly table), why are you using a WYSIWYG? I dunno. I'm just frustrated because there is no WYSIWYG that will make everyone happy.