Input formats [was: quote test]

51 posts / 0 new
Last post
Jacques Roux's picture
Jacques Roux
Offline
Joined: 17-07-06
Apr 1 2007 18:19
Input formats [was: quote test]
Quote:
no name entered

crabs wrote:
quote with name

Jacques Roux's picture
Jacques Roux
Offline
Joined: 17-07-06
Apr 1 2007 18:19
rkn wrote:
Quote:
no name entered

crabs wrote:
quote with name

Jacques Roux's picture
Jacques Roux
Offline
Joined: 17-07-06
Apr 4 2007 12:06
    <a href="/user/rkn" title="View user profile.">rkn</a>

     
           
      
          
        Posts: 7037
      
      
        Joined: 17-07-06

      
    	  
Jacques Roux's picture
Jacques Roux
Offline
Joined: 17-07-06
Apr 4 2007 12:14

Ok have redone input formats.

Regular users have no choice, they are using one with all html escaped - normal (all html escaped)

Editors and contribs can use some html - normal (some html allowed)

Jacques Roux's picture
Jacques Roux
Offline
Joined: 17-07-06
Apr 4 2007 12:16

Penis. Are smileys using html?

beardy

Jacques Roux's picture
Jacques Roux
Offline
Joined: 17-07-06
Apr 4 2007 12:17

Thats odd. Smileys should be run before html filter.

Jacques Roux's picture
Jacques Roux
Offline
Joined: 17-07-06
Apr 4 2007 12:28

Chnaged escape all to strip all except img beardy

Mike Harman
Offline
Joined: 7-02-06
Apr 4 2007 12:45

hmm, ought to be able to get smileys to work without img tag. That'd partially stop smiley spammers as well, maybe.

Jacques Roux's picture
Jacques Roux
Offline
Joined: 17-07-06
Apr 4 2007 12:47

yeah couldnt see why. Im sure its easy to hack the module, i asked on its project page

Steven.'s picture
Steven.
Offline
Joined: 27-06-06
Apr 4 2007 15:52

wahey quoting fixed!

Mike Harman
Offline
Joined: 7-02-06
Apr 4 2007 18:25

does that mean code's fixed as well?

Jacques Roux's picture
Jacques Roux
Offline
Joined: 17-07-06
Apr 4 2007 18:38

yeah code is fine as long as it doesnt have img in it

Jacques Roux's picture
Jacques Roux
Offline
Joined: 17-07-06
Apr 4 2007 19:20

hmm for some reason all old smileys in posts are fucked now

Jacques Roux's picture
Jacques Roux
Offline
Joined: 17-07-06
Apr 4 2007 19:25

beard

Jacques Roux's picture
Jacques Roux
Offline
Joined: 17-07-06
Apr 4 2007 19:26

roll eyes

Jacques Roux's picture
Jacques Roux
Offline
Joined: 17-07-06
Apr 4 2007 19:26

hello beardiest

Jacques Roux's picture
Jacques Roux
Offline
Joined: 17-07-06
Apr 4 2007 19:27

circle A

Jacques Roux's picture
Jacques Roux
Offline
Joined: 17-07-06
Apr 4 2007 19:27

beardy

Jacques Roux's picture
Jacques Roux
Offline
Joined: 17-07-06
Apr 4 2007 19:31

ok putting them below footnotes works. But still above html filter. so in theory should be able to remove img tag from allowed html and smileys should still parse ok. Doesnt work.

Ok this is fucking wierd.

All html is set to to be escaped so....

That image shouldnt show.

Have put smileys below html filter... so it should run like this:

1. All html is escaped.
2. Smileys run with html tags

But smileys seem to be working

Jacques Roux's picture
Jacques Roux
Offline
Joined: 17-07-06
Apr 4 2007 19:35

Nice. Now im going to post up some code.




<a href="/lastpage.htm">
This text</a> is a link to a page on 
this Web site.



<a href="http://www.microsoft.com/">
This text</a> is a link to a page on 
the World Wide Web.





function comment_delete($cid = NULL) {
  $comment = db_fetch_object(db_query('SELECT c.*, u.name AS registered_name, u.uid FROM {comments} c INNER JOIN {users} u ON u.uid = c.uid WHERE c.cid = %d', $cid));
  $comment->name = $comment->uid ? $comment->registered_name : $comment->name;

  $output = '';

  // We'll only delete if the user has confirmed the
  // deletion using the form in our else clause below.
  if (is_object($comment) && is_numeric($comment->cid) && $_POST['confirm']) {
    drupal_set_message(t('The 
Jacques Roux's picture
Jacques Roux
Offline
Joined: 17-07-06
Apr 4 2007 19:37

ok so its not putting line breaks in code.

Line break converter is currently below bbcode, and bbcode line breaks are off.

Switched drupal line breaks off, bbcode on.

Jacques Roux's picture
Jacques Roux
Offline
Joined: 17-07-06
Apr 4 2007 19:38
function comment_delete($cid = NULL) {
  $comment = db_fetch_object(db_query('SELECT c.*, u.name AS registered_name, u.uid FROM {comments} c INNER JOIN {users} u ON u.uid = c.uid WHERE c.cid = %d', $cid));
  $comment->name = $comment->uid ? $comment->registered_name : $comment->name;

  $output = '';
Jacques Roux's picture
Jacques Roux
Offline
Joined: 17-07-06
Apr 4 2007 19:41

ok switched off bbcode line breaks and put on drupal line breaks.

moved line breaks above bbcode

function comment_delete($cid = NULL) {
  $comment = db_fetch_object(db_query('SELECT c.*, u.name AS registered_name, u.uid FROM {comments} c INNER JOIN {users} u ON u.uid = c.uid WHERE c.cid = %d', $cid));
  $comment->name = $comment->uid ? $comment->registered_name : $comment->name;

  $output = '';
Jacques Roux's picture
Jacques Roux
Offline
Joined: 17-07-06
Apr 4 2007 19:41

no difference.

Mike Harman
Offline
Joined: 7-02-06
Apr 4 2007 22:31

not sure it's supposed to put line breaks in code tbh. Dunno though. Looking very nice though!

Jacques Roux's picture
Jacques Roux
Offline
Joined: 17-07-06
Apr 4 2007 22:59

Pretty sure it is... phpbb does wink

Mike Harman
Offline
Joined: 7-02-06
Apr 4 2007 23:07

might be theme thing.

Jacques Roux's picture
Jacques Roux
Offline
Joined: 17-07-06
Apr 5 2007 10:53

whats the theme thing?

Mike Harman
Offline
Joined: 7-02-06
Apr 5 2007 22:52

the way the theme deals with line breaks and stuff, lack of tables. dunno tbh. I think it's alright not having a line break - it shouldn't in the actual file so better not to add one here, maybe we could add a horizontal scrollbar instead of it bleeding off the edge though?

Mike Harman
Offline
Joined: 7-02-06
Apr 5 2007 23:41

rkn this is breaking loads of articles which were entered in rich text before.

I reckon we should swap the filter settings over - so rich text is as it was, but then shift the default for authenticated to the new stripped down one. That way old articles don't get stripped, and new forum posts still do.

Pretty sure no non-admins/contribs will be able to edit pre-switch posts when we do that, but it'll be better than having to go through dozens of articles to change input format. See sectors for example: http://libcom.org/sectors

Jacques Roux's picture
Jacques Roux
Offline
Joined: 17-07-06
Apr 10 2007 13:45

Ok swapped them over to fix everything old. So now going to change default over.

beard