Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 28,326 through 28,350 (of 32,462 total)
  • Author
    Search Results
  • #61676

    In reply to: User Registration

    The bbpress mail funcion is just something I can’t really understand. When I tried to use it with my favorite notification plugin I got some problems, so I decided to hardcode the mail-function into my plugin.

    mail( $userdata->user_email, bb_get_option('name') . ':' . __('Notification'),

    sprintf( $message, $topic->topic_title, get_user_name($bb_current_user->ID), get_topic_link($topic_id) ),

    'From: ' . bb_get_option('admin_email') );

    I just kept it simple there. Did someone of you try to hardcode the mailing into the registration function? Would be interesting to see if it works then?!

    #62578
    chrishajer
    Participant

    The $bb->name setting in config.php is the name for the whole site and the name you see in Admin > Content > Forum is the name of the categories or sub-forums (however you want to think about it – see the bottom of http://bbPress.org/forums/ for “Installation”, “Troubleshooting”, “Themes”, etc – that is what you’re changing in Admin > Content > Forums). Changing it there does indeed change the display (look at the bottom of the front page to see the name you are changing in the admin panel: it’s under “Forums”). If it’s not working like that in your installation, there’s another problem I’m not familiar with.

    Anyway, being able to change the site name in the admin panel might be a good suggestion. You can make feature requests at http://trac.bbpress.org .

    #62480
    fel64
    Member

    I think one could add some PHP code in the topic page loop to parse the /uploads folder for folders whose names match the numbers of the post id’s displayed on that page, if-then display links to any files contained within those folders, if-not, then don’t.

    Probably more expedient to just check if folders with any of the post-ids as name exist; if then the operating system or whatever has to run through the entire folder to look, at least you’re handing the task to someone competent.

    If you want this done, I suggest you look at some PHP examples and do it. The hard part of programming is not knowing the language, but figuring out the solution.

    #61672

    In reply to: User Registration

    rslater
    Member

    Still does not work.. Can you elaborate on the “valid email” and what exactly you mean.. May sound like a dumb question but I just want to make sure i am not crazy. Which may be the case… :)

    #2801
    charliestout
    Member

    File uploads and attachments: like many others, I am highly interested in such a plugin. While I agree with the intent of the developers to keep bbPress light and awesome (which it is,) it certainly seems a shame to have to abandon bbPress because it does not provide for file uploads.

    It’s my understanding that each post is given a unique identifier, visible as a URL parameter: id=38 for post 38, id=39 for post 39, etc.

    Functionally, it seems a matter of creating an /uploads folder, and using a PHP upload/file management script to create a folder with the same name of the post ID in the /uploads folder.

    I think one could add some PHP code in the topic page loop to parse the /uploads folder for folders whose names match the numbers of the post id’s displayed on that page, if-then display links to any files contained within those folders, if-not, then don’t.

    Do I have the technical know-how to pull this off? Of course not. I barely got the forums installed and avatar plugin running on my server. But others lurking here with any PHP ninja skills might be able to.

    Of course, there might be horrendous security risks that I’m not thinking of with this method. And the PHP code that scans the uploads folder for foldernames that match post id’s might ridiculously slow down the forums, as it constantly scans the filesystem instead of performing a quick database lookup.

    But it might be a good start. Between all of us here in these forums, I am confident that we’ll eventually stumble across this much-needed functionality. Necessity is a mother…

    #62574
    Olaf Lederer
    Participant

    Hi Trent, thanks for the feedback!

    just checked the suggested plugin and using some activation code makes sense. Is this something for the bbress core version? And is this really needed? At the moment I have ~50 new registrations a day because people need to register to download some PHP classes from my website.

    Sure some of them have entered their URL to the profile, but this is not accessible until thy made a first post.

    #61671

    In reply to: User Registration

    Sam Bauers
    Participant

    Looks like it may be rejecting the mail due to the “From” email address being invalid. Try this code in a plugin and make sure your admin_email option is a valid email address:

    <?php
    if ( !function_exists( 'bb_mail' ) ) :
    function bb_mail( $to, $subject, $message, $headers = '' ) {
    if (!is_array($headers)) {
    $headers = trim($headers);
    $headers = preg_split('@r(?:n{0,1})|n@', $headers);
    }

    if (!count($headers) || !count(preg_grep('/^from:s/im', $headers))) {
    if (!$from = bb_get_option('admin_email'))
    if ($uri_parsed = parse_url(bb_get_option('uri')))
    if ($uri_parsed['host'])
    $from = 'bbpress@' . trim(preg_replace('/^www./i', '', $uri_parsed['host']));

    if ($from)
    $headers[] = 'From: "' . bb_get_option('name') . '" <' . $from . '>';
    }
    $headers = trim(join("rn", $headers));

    return @mail($to, $subject, $message, $headers);
    }
    endif;
    ?>

    #2824
    #62558
    Olaf Lederer
    Participant

    Hey trex33, the bigger forums are using vbulletin ;)

    #61935

    In reply to: Excerpts

    vedmak
    Member

    This is great excerpt , but i have 2 problems:

    1. excerpt don’t work with Sticky Topic
    2. how to make plugin from this code?

    Thanks anyway livibetter.

    #62571
    Trent Adams
    Member

    The spam post isn’t under moderation, but spam posts that are well written in WP are not either as they display immediately. I can tell you this though, on wordpress.com support forums there are very few “spambot” posts that make it past akismet. I have a couple small forums myself, but I have never had a post get past akismet except posts that don’t have any bad words or links which really “could be” real user posts. Even that number is pretty low. I have more problems with spam registrations, but livibetter’s “enhanced registration” plugin took care of that :)

    Trent

    #54861
    Göran
    Member

    I inserted your code:

    Code:
    include_once(BBPATH . BBINC . ‘streams.php’);
    include_once(BBPATH . BBINC . ‘gettext.php’);

    in ‘bb-settings.php’ but it did not quite work. My blog http://www.goranlin.se/blogg/wordpress/ is slower and website adm disappeared. And my forum http://www.goranlin.se/blogg/wordpress/bbpress/

    still do not show the posts from the blog which was planned. I use bbSync to try to get that, but no success so far.

    #62564
    Trent Adams
    Member

    If you search in https://wordpress.org/extend/plugins/ there is actually a plugin to do this for wordpress if I am not mistaken as well, but I use the way that chrishajer suggests myself as RSS feeds are easy to change and doesn’t require bbPress be in the same database ;)

    Trent

    #54860
    Göran
    Member

    I seems to have the same problem. I get

    Fatal error: Cannot redeclare class streamreader in /mnt/home/_g/goranlin/www.goranlin.se/blogg/wordpress/bbpress/bb-includes/streams.php on line 26

    I want both wp and bbpress to be translate so maybe I can put your code into ‘bb-settings.php’. Would that work?

    #62569
    Trent Adams
    Member

    Any guess on how much space say 100,000 users (spam and real) would take in actual database space? If it is a small amount, then why even worry about deleting them :)

    Trent

    #62548
    Göran
    Member

    Thanks for help. I am moving forward. I deleted both WP and bbPress and started again and made progress. The blog and the forum are integrated but I cannot get bbSync to work. Both work by temselves and I can log in with same id and password but cannot get posts into forum.

    Installation:

    Blog at http://www.goranlin.se/blogg/wordpress/

    Forum at http://www.goranlin.se/blogg/wordpress/bbpress/

    WordPress 2.3.2 installed 22 january 2008

    theme WordPress Default 1.6 changed colors in head with panel

    bbPress 0.8.3.1 installed 22 january 2008

    sv_SE.mo for WP installed 22 january 2008

    sv_SE.mo for bbPress installed 22 january 2008

    bbSync version 0.94 installed 22 january 2008

    bbSync gave message “It needs your config!:)

    I did that! succesfully I thought.

    But when trying to write new post in blog:

    Fatal error: Cannot redeclare class streamreader in /mnt/home/_g/goranlin/www.goranlin.se/blogg/wordpress/bbpress/bb-includes/streams.php on line 26

    but going back to blog the new post is there but still not in Forum

    line 24-26 in streams.php is:

    // Simple class to wrap file streams, string streams, etc.

    // seek is essential, and it should be byte stream

    class StreamReader {

    // should return a string [FIXME: perhaps return array of bytes?]

    function read($bytes) {

    return false;

    I have no clue how to do anything about this! All help is welcome!

    #62562
    Olaf Lederer
    Participant

    Ok Chris, thats the reason :D

    yeah it works great (all my WP blogs are working the same way)

    #56116

    In reply to: New Topic Notification

    Olaf Lederer
    Participant

    on the plugin site here :D

    https://bbpress.org/plugins/

    #62547
    fel64
    Member

    You do need a localisation file, but if one doesn’t come with the topic it’s typically the sort of thing you can do for yourself.

    Some wp themes let you set the colour scheme in the admin panel (Mandigo for one), but it’s a fairly simple task to open the style.css file and change the hex colour-codes (once you understand what they are).

    Having bb as a subdirectory of wp is a good start but it’s not necessary as far as I know. My wp install is in a folder /wordpress/, while bb is in the forums subdomain. This should be everything you need to know on integration: https://bbpress.org/documentation/integration-with-wordpress/

    #62561
    chrishajer
    Participant

    finalwebsites: does it work? If so, that’s all you need. If permalinks are not working, then your server does not support Options +MultiViews and you need the longer explicit rewrite rules as generated by bb-admin/rewrite-rules.php.

    #62560
    Olaf Lederer
    Participant

    ???

    my .htaccess has only this single row:

    Options +MultiViews

    #62556
    Olaf Lederer
    Participant

    yeah the profile belongs to the left like in other forums (it’s not MS office 2007) ;)

    #62478
    fel64
    Member

    A nonce is used to ensure that you’re coming from the right place and you weren’t tricked into submitting the data (basically to give continuity between starting and finishing an action). If the value is not given or wrong I’d expect bbPress not to post at all. You might be able to look through the code and see where it creates the nonce, then replicate that yourself.

    #62300
    shaythong
    Member

    In bbPress version 0.8.3.1 open file: bb-admin/plugins.php and find:

    if ( is_callable( 'glob' ) ) {
    foreach ( glob(BBPLUGINDIR . '_*.php') as $_plugin ) {
    $_data = bb_get_plugin_data( $_plugin );
    $_plugins[$_plugin] = $_data ? $_data : true;
    }
    }

    Replace with:

    if ( is_callable( 'glob' ) ) {
    $pluginarray = glob(BBPLUGINDIR . '_*.php');
    if ($pluginarray)
    foreach ( $pluginarray as $_plugin )
    require($_plugin);
    }

    I’m not sure if this will work.

    #62522
    chrishajer
    Participant

    Well, AFAIK, bbPress only allows three values for permalinks: true, false and slugs. In config.php, there is a line (around line 27 in the current 0.8.3.1 release I think) that starts $bb->mod_rewrite =. I think it works like this. Of course, you can try modifying your config.php and see for yourself as well.

    $bb->mod_rewrite = true;

    /bbpress/topic.php?id=526&page#post-6043

    $bb->mod_rewrite = false;

    /bbpress/topic/526

    $bb->mod_rewrite = 'slugs';

    /bbpress/topic/the-title-of-the-topic

Viewing 25 results - 28,326 through 28,350 (of 32,462 total)
Skip to toolbar