Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 22,851 through 22,875 (of 32,468 total)
  • Author
    Search Results
  • #32313
    arpowers
    Member

    hi!

    I have a forum here: http://www.pagelines.com/forum

    I sometimes want to add HTML tags to explain things to people but they get stripped out or used as real HTML…

    Is there a way to do this (display HTML code) in BBPress?

    #32312
    Dailytalker
    Member

    Dear coders, please remove “forum” and “topic” from the urls in your future editions of bbpress.

    http:www.xxx.com/forums/topic/how_to_remove_unnecessary_things

    doesn’t look nice, especially when you run forums in another language than English. Because this gives you a mix of languages in the url.

    http://www.xxx.com/forums/troubleshooting/how_to_remove_unnecessary_things

    looks better.

    Please see also the following topic about this issue:

    http://bbpress.org/forums/topic/nicer-slug-url-rewrite-plugin-done

    #60401
    Dailytalker
    Member

    Hi, I’ve just followed your instructions and was also able to remove “forum” and “topic” from the urls.

    But something is wrong because the pages cannot be found. This is my rewrite code (it is a bit different from your code because I am using the newest version of bbpress):

    # BEGIN bbPress

    Options -MultiViews

    <IfModule mod_rewrite.c>

    RewriteEngine On

    RewriteBase /forum/

    Options +FollowSymlinks

    RewriteRule ^page/([0-9]+)/?$ /index.php?page=$1 [L,QSA]

    RewriteRule ^forum/([^/]+)/page/([0-9]+)/?$ forum.php?id=$1&page=$2 [L,QSA]

    RewriteRule ^forum/([^/]+)/?$ /forum.php?id=$1 [L,QSA]

    RewriteRule ^forum/?$ [R=302,L,QSA]

    RewriteRule ^topic/([^/]+)/page/([0-9]+)/?$ /topic.php?id=$1&page=$2 [L,QSA]

    RewriteRule ^topic/([^/]+)/?$ /topic.php?id=$1 [L,QSA]

    RewriteRule ^topic/?$ /forum/ [R=302,L,QSA]

    RewriteRule ^tags/([^/]+)/page/([0-9]+)/?$ tags.php?tag=$1&page=$2 [L,QSA]

    RewriteRule ^tags/([^/]+)/?$ tags.php?tag=$1 [L,QSA]

    RewriteRule ^tags/?$ tags.php [L,QSA]

    RewriteRule ^profile/([^/]+)/page/([0-9]+)/?$ profile.php?id=$1&page=$2 [L,QSA]

    RewriteRule ^profile/([^/]+)/([^/]+)/?$ profile.php?id=$1&tab=$2 [L,QSA]

    RewriteRule ^profile/([^/]+)/([^/]+)/page/([0-9]+)/?$ profile.php?id=$1&tab=$2&page=$3 [L,QSA]

    RewriteRule ^profile/([^/]+)/?$ profile.php?id=$1 [L,QSA]

    RewriteRule ^profile/?$ profile.php [L,QSA]

    RewriteRule ^view/([^/]+)/page/([0-9]+)/?$ view.php?view=$1&page=$2 [L,QSA]

    RewriteRule ^view/([^/]+)/?$ view.php?view=$1 [L,QSA]

    RewriteRule ^rss/?$ rss.php [L,QSA]

    RewriteRule ^rss/topics/?$ rss.php?topics=1 [L,QSA]

    RewriteRule ^rss/forum/([^/]+)/?$ rss.php?forum=$1 [L,QSA]

    RewriteRule ^rss/forum/([^/]+)/topics/?$ rss.php?forum=$1&topics=1 [L,QSA]

    RewriteRule ^rss/topic/([^/]+)/?$ rss.php?topic=$1 [L,QSA]

    RewriteRule ^rss/tags/([^/]+)/?$ rss.php?tag=$1 [L,QSA]

    RewriteRule ^rss/tags/([^/]+)/topics/?$ /forum/rss.php?tag=$1&topics=1 [L,QSA]

    RewriteRule ^rss/profile/([^/]+)/?$ rss.php?profile=$1 [L,QSA]

    RewriteRule ^rss/view/([^/]+)/?$ /forum/rss.php?view=$1 [L,QSA]

    RewriteCond %{REQUEST_FILENAME} !-f

    RewriteCond %{REQUEST_FILENAME} !-d

    RewriteRule ^.*$ /forum/index.php [L]

    </IfModule>

    # END bbPress

    Probably I made something wrong with point four where you say that the lines 46 and 48 have to be switched. What do I actually have do do there?

    Quote: “4. Open up bb-post.php at the root of your bbPress install and simply switch lines number 46 and 48”

    Is it this code?

    $link = get_post_link($post_id);

    $topic = get_topic( $topic_id, false );

    #81351
    Sushubh
    Member

    well its hard to restrict the title limit on a community. twitter is hard enough to manage with a limit.

    i was actually surprised that no one has had this issue and there were no plug-ins either. :)

    well words would be fine. 3-4-5 to keep the link short and sweet. of course i am not looking for a wordpress like slug feature. but a vbseo like fixed limit on the number of words.

    #81363
    chrishajer
    Participant

    Sounds like you need to add some rewrite rules for use with that plugin. I don’t see anything about it in the readme.txt, but now that I think about it, those non-pretty links should even when permalinks are enabled. For example, this link will be rewritten to my profile, even though it’s an ugly link:

    https://bbpress.org/forums/profile.php?id=65703 end up here:

    https://bbpress.org/forums/profile/chrishajer

    Also, there shouldn’t be two forum in your pretty link. It should look like this:

    http://www.mysite.com/forum/profile/xx

    #81326
    billerby
    Member

    Thanks for your reply, just like you said Akismet has identified those posts as spam. I contacted the user and asked for a report and he replied that every time he tried to submit the topic he got an error message stating “no subject”, which is strange since all five posts had a subject(the same). I understand if Akismet reacts on five messages in a row with the same subject in a short time, but the real question is why bbPress presents an error message when a subject is both submitted and inserted? Lets hope this will not happen again :) Maybe a one time error?

    #81273

    I have a tutorial for that coming online on my series WP as CMS on my blog – http://blog.ashfame.com/2009/11/wordpress-cms-series/

    I will be demonstarting how to do it without deep integration. You might want to check that out if you are comfortable with code and love to do it yourself ;)

    #81323
    lukeah
    Member

    yeah im stupid. can anyone tell im a newb :)

    #32291
    #78458
    circuit
    Member

    i upgraded bbpress and converted wordpress to MU, then added buddypress on top. i didn’t run into any major issues, but then again, i made sure to back up before i made any major changes to the database, so a few disasters were avoided that way ;)

    #81272
    circuit
    Member

    “the latest forum posts on the right hand side are visable on your wordpress pages. Was this achieved by calling bbpress header after wp header?”

    no, it’s a plugin called bbpress latest discussions.

    i dislike unhelpful meanies who hang around on techy forums, and i don’t mean to be one of them, but you honestly need to search the forum (and google) because the answers are out there! if you don’t do the research you’re going to waste time on things that have been done for you already.

    just migrating my wordpress+bbpress install to MU+buddypress+bbpress took me around 30 hours. that’s not including the initial setup of wordpress+bbpress, or the re-theming of template files to acommodate the upgrade. most of that 30 hours was spent searching google for plugins and hacks and reading around.

    thanks for the compliments on my site. believe me, i am not a coder, i am just persistent!

    #81320
    hatter
    Member

    Are you trying to synchronize posts between the two, so that you can continue the discussion in the forum? If so, you can use the plugin found here: http://bobrik.name/code/wordpress/wordpress-bbpress-syncronization/ Or are you just trying to transfer from bbPress into WordPress completely?

    #81314

    In reply to: Post_Text Front Page

    Doobus
    Member

    Funny thing is that is what I’m planning on delving into next. I’m new to bbPress but decided to try it out because I was familiar with WordPress. I don’t have any formal training in code, I’ve pretty much just learned by piecing things together and seeing if they work.

    Back to my original train of thought, I’m planning on implementing something like queries, which I think is what you mean by loop of topics. I was actually browsing around the forums looking for ways to pull related topics together not by keywords but by relation to forums. I plan on putting this within the topics template to display similar topics to members. Will definitely be looking for help on that one as I’m sure it won’t be as easy to implement as in WordPress.

    I was planning on using <?php if (in_category() ): ?>, that is what I used in WordPress to pull similar posts together. However I’m wondering if this approach is possible in bbPress because I’m not sure if there is such a thing as in_category. I guess this will be another thing to get into. Will check back after I take a much needed rest. Thanks again.

    #81313

    In reply to: Post_Text Front Page

    hatter
    Member

    You beat me to it :) Glad you figured it out. Just to clarify, what I mean was you need to pass the proper topic ID depending on what you are doing. In this case, you are using get_topic_id(), which will get the current topic ID being worked on based on the global topic object. In other cases, you may be within a loop of topics, in which case you would need to use something along the lines of $topic->topic_id, depending on your topic object name. This will start to make more sense as you progress within php and bbPress. Until then, don’t be afraid to ask questions for help, everyone has to learn somehow.

    #81311

    In reply to: Post_Text Front Page

    Doobus
    Member

    I’m a little confused, please bare with me :). If I put in a topic id wouldn’t that just read out the same forum name by the file under: ?

    To clarify I will be putting the code in the topic template as well as the front-page template which will show the latest discussions. Problem is if I put in a topic id wouldn’t it just read that all the topics are under one category?

    #81310

    In reply to: Post_Text Front Page

    hatter
    Member

    Ah, copying the exact code would be the problem. That was meant as a guide, meaning you need to pass in the correct topic ID into the get_topic function. Depending on where in the front-page template you are putting this, you need to get the correct / current topic id.

    #81309

    In reply to: Post_Text Front Page

    Doobus
    Member

    I literally just copied the code you provided and pasted it in the front-page.php template file and topic.php template file. The front-page template shows the url however it does not display the forum name. The topic template shows the forum url and the forum name.

    This is what I put in the template files:

    <?php $topic = get_topic($topic_id);
    $forumName = forum_name($topic->forum_id);
    $forumLink = forum_link($topic->forum_id); ?>

    #81308

    In reply to: Post_Text Front Page

    hatter
    Member

    That’s odd that it wouldn’t work in the front-page.php template file, since it is used within there. Make sure you are calling it correctly and that your code is hit. Can you post a code snippet for how you’re calling it?

    #81306

    In reply to: Post_Text Front Page

    hatter
    Member

    Ok, I see what you’re looking for now. To get the forum name, use the forum_name() function and to get the forum link, use the forum_link() function. Once you have the topic ID, use the get_topic() function to get the topic object. From here, you can use the forum id. So, your code would look like:

    $topic = get_topic($topic_id);

    $forumName = forum_name($topic->forum_id);

    $forumLink = forum_link($topic->forum_id);

    An example of the forum_name and forum_link functions being used is in the bb-templateskakumeiforum.php file. Keep in mind that the example uses the current forum_id and doesn’t pass it in, but this should give you an example of how to use them.

    #81305

    In reply to: Post_Text Front Page

    Doobus
    Member

    I guess I made it a little confusing with the category reference to WordPress.

    You’re on the right track, but what I’m looking for is detecting what forum a topic is in, this will be used by title in the front_page as well the titles in the topic_pages.

    Illustration:


    Topic Title

    File under: Forum 1


    Making the forum link linkable would be ideal as well. Thanks.

    #81303

    In reply to: Post_Text Front Page

    Doobus
    Member

    Hatter thanks for the lesson, even though most of it was above my head I’m very grateful for your help. Btw your code worked like a charm.

    I feel like an a** since I’ve been littering these boards with newb questions. With that said, I was wondering if you could help me with another minor thing that I have been trying to figure out. In WordPress you can call the_category(); which indicates which category the post is in. I’ve been searching the forum and there was one person who asked the same question but didn’t get a reply can this be done?

    Sorry for hijacking my own post :(.

    #81049

    In reply to: Help out with bbPress

    r-a-y
    Participant

    +1 for _ck_ to join the bbPress team.

    She knows the project inside and out and is a stickler for code optimization and performance!

    #81301

    In reply to: Post_Text Front Page

    Doobus
    Member

    A bit surprised no one has chimed in yet, didn’t think it was that difficult to achieve.

    Anyways here is the code that I found in another thread:

    <?php
    function get_post_teaser($chars = 200){
    global $bbdb;
    $topic_id_ft = get_topic_id(); //topic id for getting text of first post of the topic
    $first_post = (int) $bbdb->get_var("SELECT post_id FROM $bbdb->posts WHERE topic_id = $topic_id_ft ORDER BY post_id ASC LIMIT 1");
    $content = substr(strip_tags(strip_shortcodes(get_post_text($first_post))),0, $chars); //gets the first 200 chars of the post
    return $content;
    }
    ?>

    I figured it’s the same basis, however since I’m pretty much brain dead in regards to php I can’t for the life of me make the post_text show fully. This code strips out html code so links don’t show, how can the code be altered to allow html? I figure this code is similar to WordPress’ content_excerpt. If there is another way, I’m open to suggestions.

    Sorry for all the newbie questions, I assure you I’ve tried my best to track down my issues in the forum search before asking my questions, unfortunately due to lack of a codex and documentation I’m pretty much at a lost.

    #32284

    I have what I hope is a fairly easy question to answer: On the WordPress side of my site (running 2.8.5), I have a custom script that loads a small icon showing the status of users who have donated to the site, as well as for staff members. As you’ll see below, it calls the user_id and then looks for and displays an image with the matching name.

    <?php $user = new WP_User( $comment->user_id );

    if ( !empty( $user->roles ) && is_array( $user->roles ) ) {
    foreach ( $user->roles as $role )
    echo "<img src='/{$role}.gif' />";
    } ?>

    I’d like to introduce this to the forum side as well. I’m running bbPress 1.0.2, and it’s fully integrated, and I’m trying to add this to the standard Kakumei template in the post.php file, above the post_author_avatar_link line. It doesn’t appear to break anything, but it also doesn’t load the image, or show a broken image link that would hint that there’s no appropriate image to be found.

    It also appears to recognize the WP_User term, but not BB_User (it breaks with an error when changed).

    Any ideas how I can get this working for at least the staff levels (keymasters, admins, moderators)?

    #81289
    travis07
    Member

    Resolved. I had created and was working on a development instance (copied db and code) instead of doing an install from scratch. I had missed changing one of the database url’s that was still pointed to Prod instance.

Viewing 25 results - 22,851 through 22,875 (of 32,468 total)
Skip to toolbar