Welcome to the archive of the old FlatPress support forum. Browse more than a decade of FlatPress wisdom! Login is disabled.

The current FlatPress support forum is available here: forum.flatpress.org
BBCode tweaks
  • Just getting FP up and running and I've made a few BBCode tweaks that others may find useful/helpful. 1) if you would like to enable BBCode in comments, edit the file "fp-plugins/bbcode/plugin.bbcode.php" and uncomment the following line: //add_filter('comment_text', 'plugin_bbcode_comment'); 2) if you would like to enable BBCode in entry titles, edit the file "fp-plugins/bbcode/plugin.bbcode.php" and add the following line: add_filter('the_title', 'BBCode', 1); then edit the file "fp-plugins/lastentries/plugin.lastentries.php" and make the following changes to the block of code: while ($q->hasmore()) { list($id, $entry) = $q->getEntry(); $link = get_permalink($id); $entry_subject = plugin_bbcode_comment($entry['subject']); $string .='
  • '; $admin = BLOG_BASEURL . "admin.php?p=entry&entry="; if (user_loggedin()) // if loggedin prints a "edit" link $string .= "[".$lang['plugin']['lastentries']['edit']."]"; $string .= "{$entry_subject}
  • \n"; $count++; }
  • That's useful, and it seems to work partially. Unfortunately it doesn't seem to work for all the BBCode tags in comments (it seems to work fully in entry titles). Just to clarify things for anyone else trying it, it works for regular things like "B", "I", "U" & "DEL", but more complex tags like "url" & "color" didn't work. I'm guessing there's a good reason why there's a restricted set of BB Code allowed in comments. I want to use the full set if possible (as this is on a private blog which is not viewable to the public so I'm not worried about people abusing it). Can anyone help? Edit: I just happened to make a new comment on my blog and put a text only link in, and it automatically turned into a hyperlink - but I still can't use the URL tag to hide a very long url under a short word, like "link".
  • "url" & "color" didn't work.

    that's how it is supposed to work
  • Posted By: NoWhereMan that's howit issupposed to work

    That's a good enough answer for me! Thanks.
  • also, instead of calling directly plugin_bbcode_comments it's better calling $string = apply_filters('comment_text', $string)); bye
  • I would like to add some buttons to the standard flatpress, without plugin to do this. It is possible? The codes i would like to have automatically are: [align=center][/center] [del][/del] [list][/list] [url][/url]
  • Posted By: lantacaI would like to add some buttons to the standard flatpress, without plugin to do this.

    A little off topic but there's a thread here which should help you. You should ask any further questions on this there, but it's pretty easy to follow.
  • This discussion has been closed.
    All Discussions
    Start a New Discussion

    Howdy, Stranger!

    It looks like you're new here. If you want to get involved, click one of these buttons!


    In this Discussion