Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 26,501 through 26,525 (of 32,495 total)
  • Author
    Search Results
  • #69096
    fontadoni
    Participant

    Hello Ipstenu, thanks for your response. Sorry, I should have mentioned that the new bbpress board is actually on the same folder as the previous phpbb one (/forum), however, I get people coming from google trying to find phpbb pages like:

    /forum/viewtopic.php?p=66sid=c72c343df3c37339b4d5094a1296566d

    ,but the new pages now look more like: forum/topic.php?id=38 on bbpress.

    I was wondering if there’s a code I can add so people coming from google at least can be redirected to the forum’s index, right now they’re getting a 404 (sorry, I said 401 previously) because the old page can’t be found.

    At least until google indexes everything again.

    Thanks.

    #69025

    Hi _CK_,

    Once again thanks for a great technical answer.

    Can i follow it up with a quickie though:

    Where in the documentation is all of those methods listed?

    Are there other things i can call from $bb_forums_loop that may help is theme developers?

    Where is the documentation for them?

    P.S. your answer really helped me alot, i’ll rewrite by current code now :)

    #69095

    You mean to just redirect one folder to another?

    Pretend your old forum was at http://www.domain.com/phpbb2 and the new one is at http://www.domain.com/bbpress

    Delete the phpbb2 folder and in your .htaccess add this:

    RewriteRule ^phpbb2(.*)$ http://www.domain.com/bbpress/ [L,R=301]

    That will make what’s called a Permanent redirect, and in theory teach site crawlers what’s up. Mind, a 401 is for unauthorized access, which is an odd error to get.

    #4299

    It seems blockquotes are broken on this board.

    <blockquote>Test</blockquote>

    gives:

    Test

    #4297
    fontadoni
    Participant

    Now that I converted my board from phpbb to bbpress I need to know how to redirect the old stuff to where the new board is (so people coming from google can at least get to the new bbPress index and not just get a 401 – which is what is currently happening). I suppose I need to do this in my htaccess file. Does anyone have the code for this? Thanks.

    #68973
    _ck_
    Participant

    Total shot in the dark here as I can’t debug this code but try replacing in your routine above:

    <?php // $top_topics = bb_top_topics(); ?>

    with

    <?php // $top_topics = bb_top_topics();
    global $bbdb;
    $where = apply_filters('get_latest_topics_where','WHERE topic_status=0');
    $query = "SELECT * FROM $bbdb->topics LEFT JOIN $bbdb->meta ON object_id=topic_id $where AND object_type='bb_topic' AND meta_key='avg_rating' ORDER BY cast(meta_value as UNSIGNED) DESC LIMIT 10";
    $top_topics = bb_append_meta($bbdb->get_results($query),'topic');
    ?>

    #68972
    _ck_
    Participant

    Upon further examination, function bb_rating_init() { may need further modifications under bbPress 1.0

    Unfortunately I am unfamiliar with what to do with that query under 1.0 so mdawaffe may have to do it.

    Just a complete guess, you can try changing line #94:

    $query_args = array( 'meta_key' => 'avg_rating', 'order_by' => '0 + tm.meta_value' );

    to

    $query_args = array('object_type'=>'bb_topic', 'meta_key' => 'avg_rating', 'order_by' => '0 + tm.meta_value' );

    #68971
    _ck_
    Participant

    Try replacing this line #205

    if ( $topics = (array) $bbdb->get_col("SELECT topic_id FROM $bbdb->topicmeta WHERE meta_key = 'rating'") ) :

    with this one for 1.0 compatibility:

    if ( $topics = (array) $bbdb->get_col("SELECT object_id as topic_id FROM $bbdb->meta WHERE object_type='bb_topic' AND meta_key='rating'") ) :

    and use the admin menu to do a recount of ratings.

    #69024
    _ck_
    Participant

    You can work around this problem by doing a scan of the $forums global before entering the main loop and checking the “rank” or “type” of forum for each listing.

    In fact you can replace the loop entirely with your own routine, as long as you global $forum you can set the $forum to any which one you want and the internal functions will still work.

    So essentially do a pre-loop through the forums, build your own array of how you’d like the output, and then do the main loop to output the forums in the order/design that you’d like. Just be sure to set $forum to the current forum you are working with before calling any of the forum functions.

    ps. You *can* access

    $bb_forums_loop->first_child
    $bb_forums_loop->last_child
    $bb_forums_loop->bb_root

    if you wish. Just do a global $bb_forums_loop; outside of the loop, then inside the loop they are available to you.

    #69090
    chrishajer
    Participant

    I believe it’s edit-forum.php in your template. Have you looked there? If you mean what in bbPress uses that, I can’t help you there.

    #68970

    After much research it seems the view ‘top-rated’ gives no results. I checked the DB and found noplace where ratings are stored. It’s really mind-boggling and a little over the top for my knowledge :-(

    Can anybody please help. I have the latest bbPress 1.0-alpha-2 and bbRatings 0.8.5

    vadi
    Member

    Hi,

    Where can I find the code that generates the “edit a post” page?

    The bbcode buttons and live preview plugins don’t appear to be working on this page and I’d like to add support for them.

    Thank you,

    #69006

    … as long as we have tags (which are great) we feel we’ve a fluid cross pollination forum going on. But if you take tags away for a sec (lets say the users didn’t put them in); then what your left with is 1 list of topics and 1 list of forums. That’s the definition of rigid.

    I see where we differ :) I see bbPress as ‘One big ass list of topics in one big ass forum.’ That’s not rigid so much as it’s just a list. Probably organized by last post date, but a list none the less. I don’t see it as rigid, I see it as unstructured. But I can see where you’d call it the other.

    #69032

    Depending on what version of phpMyAdmin you’re host is running, I find this ability currently under…

    “Operations > Table Options > auto_increment”

    There you can change that value back down to what it should be and cross your fingers! :)

    #69004

    Screen readers and modified browsers might love lists, but they also love properly coded tables, of which most people really seem to do.

    Google “everything you know about css is wrong” and check out how to style lists and div’s as tables, it’s an interesting read also. I don’t agree with it, but it is interesting.

    The idea of a DIV is not to nest them, but to use them to DIVIDE content. The idea of a table is to compare data in a relational way. I think if you were going to use lists for forums, you would HAVE TO use DL’s and use dt’s for the headers at the very least, to provide a definition to the content being displayed.

    I mean, I see how the argument goes both ways. (Off topic: If you’re really into accessibility, check out my WordPress section 508 theme at http://www.wp508.com? It’s not completely full of content yet, seems I have about 5 half finished projects right now ugh.)

    #4281
    John Doe
    Participant

    Ok, it’s a slight fix since it’ll only solve one of the issues (I was having) with integration.

    The problem was that I could not for the life of me force bbPress to set a ‘logged_in’ cookie with path ‘/’.

    WordPress: domain.com

    bbPress: domain.com/forum/

    This meant once I’d logged in via bbPress, when I was browsing WordPress (although it set the ‘auth’ cookie fine and I could view wp-admin/) it ‘appeared’ that I was logged out (log in and register link, instead of log out and site admin).

    I’d already tried this in bb-config.php, along with the other ‘integration speedups’ bbPress supplied;

    $bb->sitecookiepath = '';

    I’d also tried setting it to ‘/’ as well, but every time the cookie would not get set.

    And here was the culprit; line 673 in bb-settings.php;

    $bb->sitecookiepath = rtrim($bb->sitecookiepath, '/');

    Then on line 735, it checks if $bb->;sitecookiepath is not set or empty. Otherwise, the ‘logged_in’ cookie for sitecookiepath will not get added to the $cookies array, and hence will not be set when wp_set_auth_cookie is called (specifically line 172, pluggable.php).

    Changing the culprit to this fixed it for me;

    $bb->sitecookiepath = '/' . trim($bb->sitecookiepath, '/');

    The complete fix (for me) was to force all logins, registrations and logouts through bbPress with this in a .htaccess at the WordPress root;

    RewriteCond %{QUERY_STRING} action=register

    RewriteRule ^wp-login.php forum/register.php [R=301,NC,L]

    RewriteCond %{QUERY_STRING} action=logout

    RewriteRule ^wp-login.php forum/bb-login.php?logout=1 [R=301,NC,L]

    RewriteRule ^wp-login.php$ forum/bb-login.php [R=301,NC]

    This actually worked out better for me, since bbPress by nature allows you to skin the login, and users get to enter a little more info for their profile during registration.

    Hope this of some help to others!

    #69003

    Thanks mate,

    it’s definately a work in progress. the plan of it was not to emulate the CODE of phpBB press, but instead to emulate how it looks. As you can see, the difference between having the positioning and CSS in before the TR / TD is worked out allows theme developer far more options.

    And oddly, screen readers and modified browsers LOVE LOVE LOVE lists (ul/li, or dl/dt/dd). they have buttons to skip right past the ones you don’t want based on criteria and this means sifting through the parent/child heirarchy so much easier than tables. For tables screen readers (much like the DOM itself) skips line by line.

    So on my website, if you chose Eurpoe, and the first forum was UK. with Nested divs and Lists you could hit next and go to Ireland. With tables you’d go to the next TR, which would be england, then london, then scotland etc.

    I want to stress here 2 things,

    1) i in no way want to turn bbpress into phpBB, i just figured i’d use it as an example win my layouts, because as bloated as it is, it actually does the nesting output really well.

    2) I in no way want this singular issue to be the only thing we’re discussing here. It’s one of many examples where i think we’er going down a particular route.

    Finally…@Ipstenu : “I can’t visualize something ‘less rigid’ than the current iteration of bbpress type forms, since tags gives you a rather light level of ‘org’. “

    This is feel is the crux of the problem, as long as we have tags (which are great) we feel we’ve a fluid cross pollination forum going on. But if you take tags away for a sec (lets say the users didn’t put them in); then what your left with is 1 list of topics and 1 list of forums. That’s the definition of rigid.

    #69002

    Wow…

    It looks darn near perfect…

    If your concern is catering to screen readers, then you know that phpBB is hardly the place to start, as reading the screen outloud to yourself makes no sense at all. Imagine if you couldn’t see what you were listening to, it would be impossible. That’s why (properly coded) tables for forums make sense. ;)

    I noticed the topic view was buggered, didn’t want to load and show anything, so I assume that’s under construction… But, that’s pretty super awesome…

    #69000

    “But yes, yes, GOD yes, the documentation whomps. Then again, so did WordPresses back in the day ;)

    Agreed.

    But lets learn from those mistakes :)

    #68999

    There has to be some level of organization to a forum, I think we can agree, since without form you have chaos and a splat list of data. Of course, organizing in a way that ‘makes sense’ is in the eye of the beholder.

    I can’t visualize something ‘less rigid’ than the current iteration of bbpress type forms, since tags gives you a rather light level of ‘org’. Yeah, you still need some categories, but I don’t see how this negates a hierarchy, except in the case that bbPress cats are fake and, thus, annoying to me. Thinking back on the other forum software I’ve used, though, it’s all been a bit similar. You have a forum and sub-forums under that. So… okay, if that annoys you then, yes, everyone sucks equally :)

    But what’s ‘better’?

    The only option that would meet the no-standard output is something like an XML file that you format how you want. Dunno how you’d sort out hierarchy though. You’d probably have to treat everything as equal (i.e. it’s all ‘posted’) with flags for cat, forum and post in the SQL table to sort out output. But … Yeah, I can’t see how to unstructure it more.

    But yes, yes, GOD yes, the documentation whomps. Then again, so did WordPresses back in the day ;)

    #68998

    Well, I think that a theme designer and a theme developer are two different positions now, and to develop means to program, while to design means to mock the lay-out and intent.

    And I’m okay with that.

    Also, I think that tables are the most logical way to present forum data without mucking up the content with div’s and span’s. The theme files allow you to code your table rows, heads, bodys, and footers, so you can set your own distinction between cols and rows for accessibility sake.

    WordPress suffers from this similarly, with forcing h2’s and ul’s all over the place when they should probably be h3’s or dl’s considering, and the alternative is tricking it into serving what you want, versus just ordering off the menu.

    (I must be hungry with all these food analogies.)

    Really, I think that you’re right, and that bbPress would benefit from some kind of WordPress-esque codex, because otherwise I’m forced to decompile the included themes and fit them to my needs, which is a good way to learn, but a bad way to be efficient.

    #68997

    Hi _CK_,

    Firstly, sorry about the gender thing (I blame going from French to English – to simplify I make everything masculine).

    I’ve used the categories in 1.0alpha CK, and they do work wonders in the back end.

    You make a number of really good points here, really good ones so if it’s cool I’ll go through them one by one.

    It’s not just that I don’t “immediately see the solution” (though I admit I don’t), but lets run with that for a bit :) There is no documentation, there is no list of tags I can use and their features (e.g. https://codex.wordpress.org/Template_Tags) which starts to make a lot of template development guesswork. Are we honestly at the stage of saying that any theme designer or developer out there now needs to be a PHP guru and also know BBpress inside and out to be able to produce a non-liner theme?

    If we are, maybe, just maybe that why we’ve found it so hard to get people to use BBpress; and maybe that’s why almost all of the themes out there look the exactly same.

    Heck, even when I did manage to code a solution, I found that so much of the template is NOT in the actual editable template but in the damned /bb-includes/template-fucntions.php file that I was close to giving up. (this btw is another example of how NOT theme developer friendly BBpress is – there is NO documentation on how to overwrite these functions in a theme, and I’m somewhat confident that it’ll need a plugin – which also can’t be distributed in a theme).

    I totally understand and am impressed with BB1.0alpha’s understanding of categories and forums in a parent/child hierarchy. The backend totally seems to grasp them – and in fact I’ve used the ‘forum is categories’ plug-in with 0.9 and it worked really well (congratulations and thanks whoever developed it).

    But you’ve hit on the crux of the problem with “the data is just not presented outside of loop form because no-one has needed/asked for it yet”.

    This is the ‘mindset’ I was talking about originally. You’re coding and what you’ve given this community is amazing and without reproach, so hopefully you won’t mind me using you as en example.

    What we’re doing is effectively plastering over the crack. We’re fixing the… visible bit of the problem (does that make sense in English, it’s a bit like “tip of the iceberg” thing which makes no sense in french). Let me hark back to your impressive Unread Posts plug-in (which is wonderful). Rather than actually say ok this FORUM or TOPIC that we’re iterating though has unread posts, you coded a plug-in that ONLY worked it out when building the CSS of the actual forum name. It’s like, shooting the small fish downstream and then having to constantly go back upstream when someone points out that the bigger fishes are still there.

    People want Parent/Child? Sure we’ll make the change in the DB and admin.

    People want Categories? Sure we’ll give it to them in the DB and admin.

    People want to make changes to the template? Sure we’ll only work out if its’ a parent/child in the CSS because no-one has specifically asked us via a letter from the queen to give it to them in the $GLOBAL[‘forum’] variable 2 lines above. I mean, we COULD work it out before hand, but why would we do that, because then people could do what they wanted with the theme and CSS – heck they wouldn’t be stuck to using tables in a linear fashion and… oh, no, wait…

    It’s… fire fighting, it’s fixing the visible bit of the problem without actually tackling WHY people might have spotted the issue. It’s not a complaint, truly it’s not, the coding that’s been done is wonderful and I’m always impressed by it; but the mindset the thought process behind these features, isn’t wide enough.

    You yourself can see how scarce this and bbshowcase forums are, it’s hardly a bustling thriving community. If we’re honestly waiting for someone to specifically come and ask for processing to be done at the earliest stage possible and not just at the CSS level then we may be waiting a long while.

    I appreciate that it’s “Very easy to write a plugin to present the forum data any way you’d like” for someone of your obvious expertise, but not everyone in the community could do that. And while I think I could make a decent stab at it, not everyone here could, and certainly not everyone who could design/develop a theme could. Not to mention that as a THEME we’d need to specify plugins that need to be installed at the same time. Surely the good developers here at BBpress can see that’s not how a THEME works in wordpress.

    What we’re effectively doing is adding a double step. We’re saying that to be a theme developer, you need to be able to code PHP plugins and be able to read, sift, assume and work out all the relevant tags/functions/classes/object without any documentation. That’s a massive massive assumption. Which is what my original mindset point was – we’ve effectively built a piece of software that’s really good for us the “open source loving / developing / community” but not good for the average user/owner.

    BBpress has so much potential, and whether people in the community think that my particular examples are valid or not (we are all entitled to our opinion), surely we can all agree on certain points:

    Making BBpress website structure and look fit into a more wordpress.org format will help people stick around:

    Increasing the documentation will make things a lot easier.

    Not presuming that template developers are PHP wizards.

    Making the structure of the core files match WordPress more.

    I, like all of you, want BBpress to be better. But right now we’re going down one path, and the more we go down it, the harder it will be to allow people to take their BBpress forum in it’s own direction.

    #68996

    lol I gotchya…

    I have been working with bbPress for 2 days now, so I can openly admit that my knowledge on the inner workings of it (and maybe its limitations) is limited to those 2 days of study.

    From my experience with forum software, the category vs forum debate and struggle basically exists in a similar way, at least I know it does for phpBB. A category is just a forum without the ability to post directly to it, and I think that’s really the only way to do it without joining or adding an additional query that isn’t really necessary.

    I think what it sounds like you’re asking for is something more official like what WordPress has in terms of development cycle, acknowledgment, and respect from its developers. I also think that because almost everything for bbPress is a plug-in, that the opportunity for those plug-ins not to play nice with one another is greater.

    So, the dilemma is to package these as features within the forum, or allow the community to create those features when they are needed. The big guys bloat their forums with tons of stuff and allow the admin to turn them off, and bbPress does the opposite.

    I’m not sure bbPress really has a development plan anymore other than tweaking and steamlining the code to work better with WordPress, and maybe eventually import/export posts from other forum software. I personally think that better user management would be nice, but that brings up how WordPress doesn’t really care about users at all. Ha!

    #68994
    _ck_
    Participant

    Actually, the way categories are done in bbPress is in part done for backward plugin compatibility with 0.9 (which will likely be around quite awhile, at least a year, due to it’s performance over 1.0)

    And the way it works is just fine too – just because you don’t immediately see the solution you want to breakdown the categories before or after the loop, doesn’t mean it’s not there. bbPress 1.0 truly does understand that a forum is a parent of another and if it’s a category holder for it – the data is just not presented outside of loop form because no-one has needed/asked for it yet. Very easy to write a plugin to present the forum data any way you’d like, and using a single carefully crafted mysql query, you can literally walk the reverse chain of post->topic->forum->category.

    If you want forums broken down into categories with say three categories and three tables, either write a plugin or do it in the template to build a new array of $forums[1], $forums[2] etc. But don’t change the original way bbPress works to return $forums as all the forums or it will break existing plugins.

    These kinds of feature growing pains were also present in WordPress, I can assure you – I’ve been using WP since 1.5 and I really long for the good old days of 2.0-2.1. The problem is that big leaps tend to break big things, or make them overly complex. WordPress 2.7 is a perfect example of things going very, very wrong with care towards backward compatibility and massive feature bloat, even worse than the 2.3 cookies and tags changes.

    bbPress 1.0 is getting more things right from the start than WordPress did – cookies, tags, object cache, are all the more advanced methods right off and will save some headaches for plugin developers down the road (not so much for us 0.9 plugin developers).

    Everyone has a different view of what’s missing in bbPress – from my standpoint the two biggest problems are 1. search sucks (so does WordPress’s after half a decade still) and 2. the ability to move posts between topics really needs to be done in the core asap so plugins know how to deal with moving targets.

    ps. it’s “her” plugins not “his” ;-)

    pps. you should be impressed how easy it was to make the topic/forum row affected instead of the title in Unread Posts – I can’t think of any other software that would be so easy. Hidden Forums is another example of the power of bbPress’s filter design.

    #4286
    geekoid
    Member

    Well, now I’ve gone and done it. I installed bbpress 0.9 first then installed WordPress mu 2.6.3. I then tried to turn on integration, and now my bbpress installation is completely broken. I cannot login as I get the error:

    bbPress database error: [Table 'web_forums.wp_users' doesn't exist]
    SELECT ID FROM wp_users WHERE user_login = 'admin'

    bbPress database error: [Table 'web_forums.wp_users' doesn't exist]
    SELECT * FROM wp_users WHERE user_login = 'admin'

    My databases for WP and BBP are separated. Is there a way to reverse the integration? I cannot drop the database as there are existing users and posts.

    I only realised this would be a problem after the fact, when I came here searching for a solution. If anyone is able to help me I’d greatly appreciate it. I’ve searched the forum posts extensively and looked through the bbpress configuration file to no avail. I hope someone can assist as I am at a loss on how to fix this.

Viewing 25 results - 26,501 through 26,525 (of 32,495 total)
Skip to toolbar