This forum is for module development and code related questions, not general module support. For general support, use the Post installation forum.

Filter function

at end of filter.module function _filter_autop($text) must be updated:


function _filter_autop($text) {
$text = preg_replace('|\n*$|', '', $text) ."\n\n"; // just to make things a little easier, pad the end
$text = preg_replace('|
\s*
|', "\n\n", $text);
$text = preg_replace('!(<(?:table|ul|ol|li|pre|form|blockquote|h[1-6])[^>]*>)!', "\n$1", $text); // Space things out a little
$text = preg_replace('!()!', "$1\n", $text); // Space things out a little
$text = preg_replace("/\n\n+/", "\n\n", $text); // take care of duplicates
$text = preg_replace('/\n?(.+?)(?:\n\s*\n|\z)/s', "

$1

\n", $text); // make paragraphs, including one at the end
$text = preg_replace('|

\s*?

|', '', $text); // under certain strange conditions it could create a P of entirely whitespace
$text = preg_replace("|

(

  • |", "$1", $text); // problem with nested lists
    $text = preg_replace('|

    ]*)>|i', "

    ", $text);
    $text = str_replace('

    ', '

    ', $text);
    $text = preg_replace('!

    \s*(]*>)!', "$1", $text);
    $text = preg_replace('!(]*>)\s*

    !', "$1", $text);
    $text = preg_replace('|(?)\s*\n|', "

  • Filter function

    at end of filter.module function _filter_autop($text) must be updated:

    function _filter_autop($text) {
      $text = preg_replace('|\n*$|', '', $text) ."\n\n"; // just to make things a little easier, pad the end
      $text = preg_replace('|
    \s*
    |', "\n\n", $text); $text = preg_replace('!(<(?:table|ul|ol|li|pre|form|blockquote|h[1-6])[^>]*>)!', "\n$1", $text); // Space things out a little $text = preg_replace('!()!', "$1\n", $text); // Space things out a little $text = preg_replace("/\n\n+/", "\n\n", $text); // take care of duplicates $text = preg_replace('/\n?(.+?)(?:\n\s*\n|\z)/s', "

    $1

    \n", $text); // make paragraphs, including one at the end $text = preg_replace('|

    \s*?

    |', '', $text); // under certain strange conditions it could create a P of entirely whitespace $text = preg_replace("|

    (

  • |", "$1", $text); // problem with nested lists $text = preg_replace('|

    ]*)>|i', "

    ", $text); $text = str_replace('

    ', '
    ', $text); $text = preg_replace('!

    \s*(]*>)!', "$1", $text); $text = preg_replace('!(]*>)\s*

    !', "$1", $text); $text = preg_replace('|(?)\s*\n|', "
  • Automatic login?

    Hi all! Was wondering if anyone has worked out a way to provide an "automatic login" based on ip address, user-agent, etc. What I'm trying to do is provide a way for search engines to "login" to the site automatically so they can spider the "members" version of content.

    Thanks!

    Radi

    boldface sticky topics?

    I'm trying to figure out if there's anyway to hack a module (presumably the forum module) to make the titles of sticky posts bold. I found this function... but I'm not sure if there's a way to modify it so the "topics" class becomes "topics-sticky" if a post is sticky. That would enable a different style for sticky posts.

    You must select an image for upload

    I am having a very challenging time getting the image.module to upload images. Each time I attempt to preview or submit an image I receive this error message: You must select an image for upload.

    I have not been able to find a resolution to this anywhere. I have tried using both GD2 and Imagemagick and it has worked in the past on this server. I'm hoping somebody might have an idea why this is happening.

    Tuesday, Bloody, Tuesday....u2.com problems & a reward.module for drupal

    Hi guys,

    We're looking at drupal with a specific application of helping build band/artist fanbases and communities.

    the recent (this tuesday) debacle on U2.Com has highlighted a need for using band websites and fan communities in a constructive and practical way to ensure real fans - not touts or scalpers - are at the front of the cue when gig ticklets go on sale.

    What U2.COM were trying to do was setup a system - based on their original propoganda fansite system where real fans could get hold at face value tickets. It was very successfull and other bands, like Radiohead, Prince and others copied the model.

    It wasn't perfect and one problem was that because the propoganda site was free to join, the savvy touts and scalpers simply infiltrated it with bogus accounts. They changed the propoganda site after the last big tour and started a new pay-per-view website club for fans in the hope that would work better.

    Unfortunately for the band - their system went seriously pear-shaped this tuesday...fans had paid $40 to join a priority ticket sales club. But it crashed and was overloaded.

    Which leads me to the topic of a REWARD.MODULE for drupal.

    Am not sure how exactly it would work, but, I was thinking of something simple along the lines of:

    a) the module would track the length of time a user is registered and regularity of logging in.

    b) how many posts they make to the forums/blog

    Pages

    Subscribe with RSS Subscribe to RSS - Module development and code questions