Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> v2.4 RN Issues
Author Message
xmtech
New Member
New Member



Joined: Jul 08, 2010
Posts: 4

PostPosted: Thu Aug 12, 2010 6:52 pm Reply with quote

the journal works great for the most part
except for the text align feature
you align text to the center then submit your journal
when you go to view it again its align to the left
its does it on every theme so i dont think its a theme issue
can anyone help me?
 
View user's profile Send private message
jakec
Site Admin



Joined: Feb 06, 2006
Posts: 3048
Location: United Kingdom

PostPosted: Tue Aug 17, 2010 3:18 pm Reply with quote

<BUMP>
 
View user's profile Send private message
spasticdonkey
RavenNuke(tm) Development Team



Joined: Dec 02, 2006
Posts: 1693
Location: Texas, USA

PostPosted: Tue Aug 17, 2010 8:39 pm Reply with quote

yes i can confirm this behavior, seems to strip the style="text-align: center;" off of <p> and <div> tags. For now if you need some centered text I guess use the table widget in the editor, something like:

Code:
<table cellspacing="0" cellpadding="0" border="0" align="center" width="100%">

        <tr>
            <td align="center" width="100%">some centered text</td>
        </tr>
</table>


With potential future changes to the built-in editor and the filtering system I'm not sure what kind of priority will be placed on fixing this..
 
View user's profile Send private message Visit poster's website
xmtech







PostPosted: Thu Aug 26, 2010 2:33 pm Reply with quote

spasticdonkey wrote:
yes i can confirm this behavior, seems to strip the style="text-align: center;" off of <p> and <div> tags. For now if you need some centered text I guess use the table widget in the editor, something like:

Code:
<table cellspacing="0" cellpadding="0" border="0" align="center" width="100%">

        <tr>
            <td align="center" width="100%">some centered text</td>
        </tr>
</table>


With potential future changes to the built-in editor and the filtering system I'm not sure what kind of priority will be placed on fixing this..


i find a simple html center tag works fine something like

Code:
<center> whatever text or pickture </center>


altho it a very simple bit of html my issue is that my members are idiots and dont know any html including the basics

so i decided to do abit of research and found the old phpnuke journal used
Code:
<div align="center">this code<br />

</div>
instead of the one your using now
so my new question is, is there a way of getting your editor to use the old alignment tags that phpnuke used?

maybe theres something i can edit?
 
Palbin
Site Admin



Joined: Mar 30, 2006
Posts: 2583
Location: Pittsburgh, Pennsylvania

PostPosted: Thu Aug 26, 2010 8:15 pm Reply with quote

In rnconfig.php find the following
Code:


$AllowableHTML = array(
   'a' => array('href' => 1, 'target' => 1, 'title' => array('minlen' => 4, 'maxlen' => 120)),
   'b' => array(),
   'blockquote' => array(),
   'br' => array(),
   'center' => array(),
   'div' => array('align' => 1),
   'em' => array(),
   'font' => array('face' => 1, 'style' => 1, 'color' => 1, 'size' => array('minval' => 1, 'maxval' => 7)),
   'h1'=>array(),
   'h2'=>array(),
   'h3'=>array(),
   'h4'=>array(),
   'h5'=>array(),
   'h6'=>array(),
   'hr' => array(),
   'i' => array(),
   'img' => array('alt' => 1, 'src' => 1, 'hspace' => 1, 'vspace' => 1, 'width' => 1, 'height' => 1, 'border' => 1, 'align' => 1),
   'li' => array(),
   'ol' => array(),
   'p' => array('align' => 1, 'style' => array('text-align' => 1)),
   'pre' => array('align' => 1, 'class' => 1, 'title' => array('minlen' => 4, 'maxlen' => 120)),
   'span' =>array('class' => 1, 'style' => array('font-family' => 1, 'color' => 1)),
   'strong' => array(),
   'strike'=>array(),
   'sub'=>array(),
   'sup'=>array(),
   'table' => array('align' => 1, 'border' => 1, 'cell' => 1, 'width' => 1, 'cellspacing' => 1, 'cellpadding' => 1),
   'td' => array('align' => 1, 'width' => 1, 'valign' => 1, 'height' => 1, 'rowspan' => 1, 'colspan' => 1 ),
   'tr' => array('align' => 1),
   'tt'=>array(),
   'u' => array(),
   'ul' => array(),
);

Find the following line:
Code:


   'p' => array('align' => 1),

Replace with this:
Code:


   'p' => array('align' => 1, 'style' => array('text-align' => 1)),

_________________
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan. 
View user's profile Send private message
xmtech







PostPosted: Sat Aug 28, 2010 4:13 pm Reply with quote

ok now im happy Smile
that was a almost perfect fix my align now works fine unless i try to align bullet points but i dont think people will notice that unless there actually looking for problems.
so Palbin thank you very much
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> v2.4 RN Issues

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©