Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 31,026 through 31,050 (of 32,491 total)
  • Author
    Search Results
  • #54889
    Trent Adams
    Member

    Short of actually going through the database and deleting the topics using phpmyadmin, I don’t know of any tool that is available to delete the posts that ‘already’ deleted! I would imagine that a plugin could be written to do this for you, but in terms of space, I don’t think that a post takes up very much space in the database, but your point is taken with great attention! I would love a simple plugin to do this as well to clean up posts and topics and there are many great code writers that use this forum and I wouldn’t be suprised if one comes up to do just this!

    Nice point!

    Trent

    #1463
    acefinale5
    Member

    Hi, this is a newbie to bbPress. Thanks for the great work.

    Just want to ask before deploying the code into a semi-production environment.

    It’s great to hear that deleted posts can be undeleted.

    But, how am I going to clean up posts that I’m sure I no longer need anymore?

    I pay for web hosting and don’t have a very large database.

    Thanks a lot. Take care.

    –acefinale5

    #54670

    In reply to: Import SMF to bbPress

    lonemadmax
    Member

    I’m very sorry. My SMF forum was not in UTF-8. If your try was in a test bbPress forum, try again deleting all utf8_encode calls in the script (leave the argument, of course).

    #50261
    Pravin Paratey
    Participant

    Me too. It’s not done yet. Trying v0.8.1 now :D

    #54834

    In reply to: .htaccess/Cookie woes!

    macwise
    Member

    STATUS: RESOLVED

    Ziyphr,

    I’ll preface this by saying that I love Ahi Tuna dishes at restaurants. What is it about that huge hunk of raw fish meat that’s only seared to (probably) keep men’s wives from refusing to share a bed with a man who would eat a classic “dry heave” food. So, why do I like it? Well, it’s not the big chunk of meat that draws me in and pleases my palate. It’s the simple glaze that I often find on top; the light, sweet sauce that perfectly compliments the fish. As they say, “The secret’s in the sauce.”

    So, the “sauce” for this problem was the secret, and the sauce ended up being all too simple. Ziyphr first directed my friend and I to wp-settings.php. (He said to check out line 185, but mine was around 151-160). I found the code that called the siteurl and home, both of which would have returned http://babyquestions101.com, as that is what I have listed in my admin panel. I thought I needed to modify those to somehow spit out two domains, with the www and sans.

    My friend also informed me that he believed that cookie domains really need two dots, the first before the domain and the second after the domain but before the ‘com’. In my case it would be .babyquestions101.com. How to get ‘siteurl’ or ‘home’ to reflect that was a challenging thought.

    One side-note for anyone trying this same thing, DON'T CHANGE YOUR SITE ADDRESS OR HOME ADDRESS TO ANYTHING OTHER THAN \"WWW.MYURL.COM\" OR \"MYURL.COM\" IN THE ADMIN PANEL. Doing so will cause you more headaches than when you meet your mother in law for the first time. (Ok, that was an exaggeration, but only slightly).

    Once I got that mess sorted out, we tried to hard code in the .babyquestions101.com, replacing

    define('COOKIEPATH', preg_replace('|https?://[^/]+|i', '', get_settings('home') . '/' ) ); with

    define('COOKIEPATH', '.babyquestions101.com');

    This didn’t work, and all hope was lost. Curiosity getting the best of me, I opened up my preferences panel in Safari and pulled up the list of all my stored cookies to see if there were any similarities/discrepencies between my cookie and other sites’ cookies. This is where I saw my cookie had the value “www.babyquestions101.com” under the heading “website” where most other sites were listed as “.siteurl.com”, missing the www that seemed to be plaguing me. I decided that was what I needed changed, and when I looked back at the code in wp-settings.php, I discovered that line 160 was unique from the others.

    if ( !defined('COOKIE_DOMAIN') )
    define('COOKIE_DOMAIN', false);

    I decided to change this to this:

    if ( !defined('COOKIE_DOMAIN') )
    define('COOKIE_DOMAIN', '.babyquestions101.com');

    What do you know…I dumped my cookies for my site, refreshed the page, logged in, checked the cookie, and there it was, ‘.babyquestions101.com’. Now for the true test, I got rid of the ‘www’ in the address bar, hit return, and VOILA! I was still logged in. Everything was seamless. I was now the owner of a spiffy wordpress/bbpress integrated site that shared cookies across sites and subdomains. No crazy .htaccess directives, no checking and double checking every last link in my site to reflect my choice of domains.

    This is the way it should be done. I’m quite surprised it was such a simple solution, and that nobody seemed to be aware of how simple the solution is. I hope this is helpful to someone else trying to share cookies across multiple subdomains.

    #54867
    macwise
    Member

    I can confirm that I have the same code, the same behavior (no users displayed), and had the exact same assumption when I came across it. I was expecting some results to show up when a username was searched for, but alas, none of the results reflected a query for usernames.

    So, no solutions, but a chime in from Macwise…

    #54669

    In reply to: Import SMF to bbPress

    vedmak
    Member

    Script works, but i have problem. All not english (russian) symbols convert in questions (???????).

    Example:

    Before – “Эволюция Красоты (YouTube)”

    After – “??????? ??????? (YouTube)”

    My smf forum 1.1.2 and all database in UTF-8. Its strange why script dont understand russian characters. Anyway thanks.

    #1459
    chrishajer
    Participant

    When I upgraded from .73 to .80, the search stopped finding users. In the templates folder, search.php, this code exists:

    <?php if ( $users ) : ?>
    <h2><?php _e('Users')?></h2>
    <ol>
    <?php foreach ( $users as $user ) : ?>

    which makes me THINK it should display users, and it used to display users, but it doesn’t any more. There were quite a few changes in that file between versions. Does anyone else have this problem? Try searching your forum for an exact username and see if you find any users. It also used to match part of a username, so searching for “river” would return “riverside” and “riverfront” if those were valid users.

    Anyone?

    #51970
    fel64
    Member

    I like this plugin a great deal, because it works so nicely right off the bat :D

    Since my forum is in a subdomain, I had to change the code a bit (just coded in the location of my forums instead of letting it grab my blog location and adding a path). But a very minor thing to do for a very nice plugin. :)

    #54866
    mvashistha
    Member

    I am also looking for same thing. I would really appreciate any help in this regard.

    Can I use bbpress functions as library functions in my code to register user in bbpress, login in bbpress and logout from bbpress programmatically?

    If there are some direct functions available for these needs, please let me know.

    Thanks in advance.

    #54754

    This is awesome! Thanks :D!

    #53877

    In reply to: Bozo problem

    Also, it is only happening with Akismet on. I removed my Akismet key and it’s now working fine, but I’m afraid that this is going to leave me open to spammers :-/

    #1457
    tzangms
    Member

    Today I am integreating wordpress and bbpress, it’s works fine, but after I set BBLANG to my language(zh_TW), this message below shows up.

    “Fatal error: Cannot redeclare class streamreader in /path/to/bbpress/bb-includes/streams.php on line 26”

    Coz StreamReader class has been declared in wordpress, but bbpress will declare it again in ‘bb-settings.php’, this coz the error.

    here is the code in ‘bb-settings.php’

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

    I use class_exists to avoid these two files, ‘streams.php’ and ‘gettext.php’ to be include twice.

    the code came into these:

    Code:
    if (!class_exists(‘StreamReader’))
    include_once(BBPATH . BBINC . ‘streams.php’);

    if (!class_exists(‘gettext_reader’))
    include_once(BBPATH . BBINC . ‘gettext.php’);

    then it works! bbpress came back to normal, but my language file seems not to be loaded.

    After all, I find out, that bbpress uses wordpress function after integrate, so I place my .mo file into /path/to/wordpress/wp-includes/languages/ , then, my language file finally loaded. but ….. here is another problem, the .po of wordpress and bbpress will mess up into one file. but I want my wordpress not to be translated. ><

    #53566
    skrimpy
    Member

    Ok I seem to have it working now. I did have display-name.php installed. I think the problem was with another plugin: bb-limit-latest-discussion.php. I took that plugin down and the forum restriction plugin began to work properly.

    I still get an error when I put in my display name; however it does give me access to the forum category. This afternoon I’m going to work on getting all the forum categories set up the way I want and I’ll let you know if it seems to be working right for everyone.

    I like the limit discussion plugin because it makes for a cleaner forum; however having restricted access to forum categories is more important to the purpose of my boards so I’m just going to leave the limited discussion plugin off for now.

    thanks David :)

    #54833

    In reply to: .htaccess/Cookie woes!

    Ziyphr
    Member

    I had a look at the WP code but haven’t had a chance to look at bbPress’ yet. Would like to hear your solution. One thing I noticed was when you try entering www on here it filters them out.

    #53875

    In reply to: Bozo problem

    chrishajer
    Participant

    I was only going off this reply by peiqinglong (different user?):

    https://bbpress.org/forums/topic/643?replies=17#post-3815

    Trent,

    That’s the problem, there is no box to uncheck them anywhere in their individual profile, where they are listed as Bozos, etc.

    “No box to uncheck” was the part I caught. I’ve seen it mentioned before too and wondered if that was part of the real problem. (edit: maybe since this is a few weeks old this is the one I was remembering)

    This was a different, but possibly related problem (where unchecking the box never “stuck” – you’d always be a bozo – that was in 0.73 though I think):

    https://bbpress.org/forums/topic/312?replies=4#post-1525

    Also, I didn’t follow this from mdawaffe:

    There’s nothing in the admin for this (sad, I know).

    You need to edit that user’s profile.

    But, as key master you CAN edit the user’s profile, from admin. So I didn’t follow this part either.

    I thought the crux of the problem was that there were no boxes visible in the admin, where I have boxes, as expected. That is all :)

    edit: PLEASE change the style.css to include some styling for [blockquote] – my quotes were quoted up there but you can’t tell. Indent, different font, different BG color, something.

    #1455
    chrishajer
    Participant

    Here is the section of akismet.php that I saw that led me to believe I could assign a level to a user to make them ‘trusted’:

    In akismet.php, around line 119:

    function bb_ksd_check_post( $post_text ) {
    global $bb_current_user, $bb_ksd_pre_post_status;
    if ( in_array($bb_current_user->roles[0], bb_trusted_roles()) ) // Don't filter content from users with a trusted role
    return $post_text;

    #53873

    In reply to: Bozo problem

    chrishajer
    Participant

    Trent, maybe I misunderstand. There is a box on the edit tab of my user’s profiles that says “this user is a bozo” and it’s normally unchecked (there was an issue with .73 and the admin being checked bozo, but that doesn’t appear to be an issue any more.)

    See this admin user screenshot and normal user screenshot, both of the edit tab in the profiles. Is that what is missing from the OP’s install? I wasn’t asking for anything that doesn’t exist. It sounded to me like this box that I see does not show up sometimes. That’s the confusion for me.

    edit: also, I saw on the source somewhere that users of a certain level could be whitelisted to skip the akismet check, but maybe that’s not implemented yet.

    In akismet.php, around line 119:

    function bb_ksd_check_post( $post_text ) {
    global $bb_current_user, $bb_ksd_pre_post_status;
    if ( in_array($bb_current_user->roles[0], bb_trusted_roles()) ) // Don't filter content from users with a trusted role
    return $post_text;

    That I asked about before, for sure:

    https://bbpress.org/forums/topic/728?replies=1

    #53602
    fel64
    Member

    Hey,

    I just wanted to say that I just installed bbPress in a subdomain from my forum and got the cookie syncing to work fine.

    Much thank to Trent, who provided half the solution:

    $bb->cookiedomain = '.lumanation.com';
    $bb->cookiepath = '/';

    made it so that forum-generated cookies worked for the entire website. I had to go into wordpress root and edit wp-settings.php line 190:

    define(COOKIE_DOMAIN, '.example.com');

    I do not understand how it worked previously, as it defined it simply as false (I assume that the browser will automagically substitute the domain that the user is currently on?). However, hardcoding the domain worked for me, and as long as I remember to change this in future upgrades I should be fine.

    I did have troubles, especially logging out, while testing all this, and found that it’s vital to clear your cookies manually as the wordpress/bbpress logouts were clearing different cookies and you could stay logged in despite trying to log out.

    But yeah, I’m all good. :) Thanks guys.

    #54802
    macwise
    Member

    Ok, this is the solution that worked for me. I did have to add the rewrite rule, as multiviews isn’t working on my server??? (I think I’m running on php4, is that why?) So, for others who want a wal-mart type bb build ;) here’s a recap of what I did:

    I created a page in my bbpress root called contest.php. Inside of that page I put:

    <?php
    require('./bb-load.php');
    bb_load_template( 'contest.php' );
    ?>

    I then created my contest.php page with the content I needed (the template)

    The last thing I did was to put these two lines in my .htaccess file IN MY FORUM ROOT FOLDER, (not my wordpress root folder):

    RewriteRule ^contest/$ /forum/contest.php [L,QSA]
    RewriteRule ^contest$ /forum/contest.php [L,QSA]

    This basically says that myurl.com/my/forum/directory/contest (without the trailing backslash)

    and myurl.com/my/forum/directory/contest (with the trailing backslash)

    will both point to the contest.php page in the root forum directory.

    As so1o said, this last part in .htaccess may be unnecessary if you have multiviews enabled (if your .htaccess file in your FORUM directory has this line: “Options +MultiViews”). Maybe someone else can confirm/deny this, as my configuration is different.

    Hope this helps someone else who needs some custom functionality out of bbpress.

    #54801
    so1o
    Participant

    macwise..

    if you are ok hacking the code.. create a page contest.php in the root forum folder

    add require_once('./bb-load.php'); on the top of the page. and write whatever code you want in the page.. that should create a static page with bbpress functions..

    as far as rewrite is concerned.. im not 100% sure but i think multiviews will automatically translate /contest.php to /contest/. test it and see.

    #54800
    macwise
    Member

    bbolman,

    thanks for the idea. I would probably prefer to do this. However, I have a few bbpress functions being called in the code on the page, and though I could probably dig about and find out how to replace it with wp code, it was not the most pleasant thought. I figured I’d just throw a page up on the bbpress side, and have it resolve at a myurl.com/directory/ as is common with wordpress. I found out how to take care of this…I achieved this by adding two lines in the .htaccess file…

    RewriteRule ^contest/$ /forum/contest.php [L,QSA]
    RewriteRule ^contest$ /forum/contest.php [L,QSA]

    I’m not trying to start a battle here, but I think your response, Null, might be a bit short-sighted and aggressive. After all, if I feel my software needs a static page, that may just be what it in fact does need.

    I agree with bbolman that this would probably be more efficiently handled by wordpress. However, since bbpress is still in it’s infancy, and it’s not integrated fully yet with wordpress, (this is my way of trying to sound like I’m not a completely right-brained individual), I think it’s fair to say that these decisions aren’t so cut and dried. Anyway, I appreciate the responses all the same, and will post any further findings here…

    #54829

    In reply to: .htaccess/Cookie woes!

    macwise
    Member

    Ziyphr,

    Thank you so much for your reply. I think this is really the solution that I have been looking for. It just doesn’t make sense to me to only have one subdomain registered in the cookies, and I wasn’t sure how wordpress handled the adding of a subdomain.

    I am still moderately new to php, so I’m not sure I follow the last paragraph in terms of proper form and syntax, and so I’d prefer to ask that “stupid question” rather than sound smart and fail. ;). Can you let me know exactly what you think should go there, in terms of syntax? That would be greatly appreciated.

    P.S. It sounded like you meant to say “You should NOT need to use .htaccess? Just checking to be sure…

    Thanks so much for your help.

    #54828

    In reply to: .htaccess/Cookie woes!

    Ziyphr
    Member

    You should need to use .htaccess. Best thing is to override the way cookies are created. For WP these are in wp-settings.php around line 185. To have a shared cookie for the whole site I changed the cookie scope replacing:

    codeif ( !defined(‘COOKIEPATH’) )

    define(‘COOKIEPATH’, preg_replace(‘|https?://[^/]+|i’, ”, get_option(‘home’) . ‘/’ ) );code

    With:

    codeif ( !defined(‘COOKIEPATH’) )

    define(‘COOKIEPATH’, ‘/’ );code

    Setting the www bits etc can be done in a similar way. Assuming you’ve integrated your users, if you set the cookie path to ‘/’ with domain .babyquestions.101.com you should be fine.

Viewing 25 results - 31,026 through 31,050 (of 32,491 total)
Skip to toolbar