Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 28,551 through 28,575 (of 32,481 total)
  • Author
    Search Results
  • #61971
    Trent Adams
    Member

    Change the following:

    $bb->mod_rewrite = 'false';

    to:

    $bb->mod_rewrite = false;

    Trent

    #61961
    jamwol
    Member

    silly me. just download the plugin ;)

    #61921

    In reply to: Replace word in Post

    livibetter
    Member

    I just finished uploading talkPress 002: A Simple bbPress Plugin – Bad Words Filter. You can watch this here.

    The code mentioned in video is:

    <?php
    /*
    Plugin Name: Bad Words Filter
    Plugin URI: http://www.livibetter.com/
    Description: Removing bad words from post content
    Author: Yu-Jie Lin
    Author URI: http://www.livibetter.com/
    Version: 0.1
    */

    function BadWordsFilter($post_text) {
    // $post_text = str_ireplace('bad', '*****', $post_text);

    $bad_words = array('bad', 'topic', 'cialis');
    foreach($bad_words as $bad)
    // $post_text = str_ireplace($bad, '*****', $post_text);
    $post_text = preg_replace("/\b$bad\b/i", '*****', $post_text);

    return $post_text;
    }

    add_filter('post_text', 'BadWordsFilter');
    ?>

    #54810
    itissue
    Member

    Nevermind. I figured it out. I needed a .htaccess file, and it needed to contain this:

    <IfModule mod_rewrite.c>

    RewriteEngine On

    RewriteBase /

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

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

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

    RewriteRule ^topic/([^/]+)/?$ /topic.php?id=$1 [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 ^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/forum/([^/]+)/?$ /rss.php?forum=$1 [L,QSA]

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

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

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

    </IfModule>

    #61952

    In reply to: i need …

    العاب
    Member

    chrishajer,Thank you!

    1.the FCK wysiwyg editor is very Nice … but how i can install it in my BBpress ?

    2.This sitemap : http://boakes.org/download/bbpress_sitemap.txt

    not working whith 0.8.3

    3.I will try to add this code .

    Thank you agin … By.

    #61951

    In reply to: i need …

    chrishajer
    Participant

    1. You can integrate FCK Editor or TinyMCE if you are looking for a wysiwyg editor.

    http://www.fckeditor.net/

    http://tinymce.moxiecode.com/

    1a. To allow all that type of content, you’re going to need a plugin. Check out this thread:

    https://bbpress.org/forums/topic/plugin-youtube-in-bbpress?replies=18#post-5707

    2. Does the regular sitemap plugin NOT work with 0.8.3? I never tried it. http://boakes.org/download/bbpress_sitemap.txt

    3. To show hot tags, you are going to need to edit the template files for each page, then insert this tag where you want it:

    <p class="frontpageheatmap"><?php bb_tag_heat_map(); ?></p>

     

    Depending on the layout of each of your pages, you might need to create a new div to insert that tag heat map into, or maybe there is room inside an existing div.

    The things you are asking for are going to require a substantial amount of work on your part. It can all be done (probably) but it’s not going to be super quick.

    Good luck.

    #61923

    In reply to: Excerpts

    Doobus
    Member

    I’ve already looked into that as a viable solution, but WordPress’ back-end just complicates things for new users. bbPress is a lot simpler solution in that a forum is built around the idea of community, I’m just theming it not to look like a forum for advertising purposes, everyone knows that the ctr for forums are terrible. Plus I already gutted Kakumei beyond recognition, can’t turn back now :).

    Anyhoo, anyone know of how to put excerpts?

    #61919

    In reply to: Replace word in Post

    Ben L.
    Member

    I’m guessing get_post_text() would be your best option. post_text() doesn’t return a value, it just pastes the text onto the page.

    #2689

    Topic: Excerpts

    in forum Plugins
    Doobus
    Member

    I’m in the process of theming bbPress not to look like a forum, but rather a blog with multiple posters :P. The one thing I’m stuck on, and there doesn’t seem to be any documentation on how to do this. How do you put excerpts in the front? The best example would have to be 9rules, I was wondering if that was custom code, or is there a plugin or a simple solution to achieve that? Thanks in advance.

    #2687

    Topic: Replace word in Post

    in forum Plugins
    ruilouis
    Member

    Hello all,

    I tried to realize a plugin that would allow me to replace some words by others in the post. I created the DB contained the words to replace and the word to put instead, i created the function and all is working fine, BUT, I don’t find how to use it on BBPRESS.

    My function is something like

    echo replace_words($TextToBeTransform,$WordToReplace)

    , and the function use the DB to see what is be put instead of the $WordToReplace. As I can see, the post are printed out from the post.php of the template we do use.

    I got this:

    <?php

    $tset="A trial phrase.";

    $WordToBeReplaced="trial";

    ?>

    <div class="threadpost">

    <div class="post">

    <?php echo replace_words( $test,$WordToBeReplaced); post_text()?></div>

    <div class="poststuff">

    <?php printf( __('Posted %s ago'), bb_get_post_time() ); ?>

    ">#

    <?php post_ip_link(); ?> <?php post_edit_link(); ?>

    <?php post_delete_link(); ?></div>

    </div>

    It print me exactly as I want the “A trial phrase” replace trial by “new” (from the DB).

    The problem is that when I want to apply this to the text of the post, post_text(), it won’t work at all. I see that this post_text() is actually applying filters and others to the text, which my cause my function to fail (no error, it just don’t replace the words).

    Could someone tell me where should I apply my own filter replace_words() for it to be taken into account?

    Thank you very much.

    #55385
    aaron1728
    Member

    How should I modify my .htaccess to accomodate a bbpress install in a /forums/ subdirectory? The install worked but permalinks aren’t.

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    # END WordPress

    #50391
    rcanine
    Member

    Wouldn’t a better fix for this be to apply a filter in the “WordPress Integration” plugin? I’m not sure the exact syntax but something like:

    if (function_exists('wp_head')) {
    // or another check to see if WordPress has been included
    add_filter('get_topic_title', 'stripslashes');
    add_filter('get_post_text', 'stripslashes');
    }

    To me this is exactly what a WordPress Integration plugin should do.

    #61917
    Trent Adams
    Member

    You have managed to come across a bug since you have a “username” that is a number. bbPress is searching for the 850th user which is that user and not your profile. I will let the “powers above” know. I will try and figure out your user ID number so you can at least see the profile until they fix this ;)

    Trent

    #2686
    850
    Member

    I logged in here on the bbPress forums to view my profile so that I could find my topics that I created a couple weeks ago. When I view my profile, it doesn’t show my posts or topics and my profile information is someone else’s:


    crisdias

    Member Since

    January 21, 2004 (3 years)

    Location

    Rio

    User Activity

    Recent Replies

    No more replies.

    Threads Started

    No more topics posted.


    That’s not me, I’m not from Rio.. and I’ve only been a member for a year or so.

    Also, I’m not able to edit my profile here.

    #61906

    In reply to: BB Poll Plugin

    Trent Adams
    Member

    How would I have known that….read the title of this post? ;) *slaps himself for not reading it* ! How does that plugin add the polls now? Through code or buttons in create post and replies? That might help others think of possible solutions.

    Trent

    #61905

    In reply to: BB Poll Plugin

    Doobus
    Member

    Unfortunately I’m not much of a coder, I get by, but hacking code to make it work in a specific way is a little over my head. Regarding the poll-plugin I was referring to that, wondering if anyone got it to work in this manner.

    #61911
    chrishajer
    Participant

    Looks like you got past the part where it creates the tables, so I would guess the permissions are OK.

    Looks to me like there is a problem with the username you used when you did the installation. All the fields related to username are empty in that error you pasted.

    topic_poster,              ,  <-- why empty?
    topic_poster_name, '', <-- why empty?
    topic_last_poster, , <-- why empty?
    topic_last_poster_name, '', <-- why empty?

     

    None of those can be null. So, did you do something weird when creating the username, or use a weird character, or are you using integration with an existing user or maybe a display name plugin?

    Something is going on with the username. It’s not present, so the INSERT failed.

    #61913

    In reply to: Limiting Pagination

    livibetter
    Member

    Check out your config.php again.

    #2678
    Null
    Member

    Hi,

    Don’t know if anyone knows how this works, but I though, let’s give it a shot.

    I currently have the following code (javascript) to get a hash:

    function serialize(s)
    {
    serial = $.SortSerialize(s);
    alert(serial.hash);
    };

    Now this has as output:

    sort3[]=links&sort3[]=images

    I want it to output:

    links,images

    How to do this?

    sort3[]= needs to be filtered

    & needs to replaced by ,

    I’ve tried things like:

    function serialize(s)
    {
    serial = $.SortSerialize(s);
    alert(serial.hash);
    var hash = serial.hash;
    var temp = hash.replace(new RegExp( "sort3[]=", "gi" ),'');

    and

    function serialize(s) {
    serial = $.SortSerialize(s);
    var hash = serial.hash;
    var temp = hash.replace(/sort3[]=/gi,'');
    alert(serial.hash);
    };

    But none worked :( Hope you guys can help.

    Many thx,

    Null

    #54423

    In reply to: Add nofollow to links

    livibetter
    Member

    Here it is:

    <?php
    /*
    Plugin Name: My own tweak for my forums
    Plugin URI: https://bbpress.org/
    Description: Fine tuning codes for my forum
    Author: Your name
    Author URI: http://www.myforum.com/
    Version: 0.1
    */

    add_filter('post_author_link', 'bb_rel_nofollow');
    ?>

    Basically, you can put many fine tuning codes within one PHP files, and this file is for your forum only. Remember to activate this plugin.

    #61865
    chrishajer
    Participant

    Look at the rendered source of the page (the HTML source) and look for <br /> or <p> tags – those will cause line wrapping. The other possibility is that the container that is holding the search form (the div) is too small, so it wraps.

    #61869
    chrishajer
    Participant

    I haven’t watched this video yet, but I think an idea for another one would be how to write a plugin :)

    #54421

    In reply to: Add nofollow to links

    livibetter
    Member

    You can simply add that line into bb-includes/default-filters.php

    or

    create your own plugin file with that line.

    #54420

    In reply to: Add nofollow to links

    bedbugger
    Participant

    Please–can you tell me specifically where to add this? What file and which lines? (Sorry, perpetual noob, trying to learn.) :-)

    #2676
    livibetter
    Member

    Hi!

    I made a new podcast show and the first episode’s topic is “Integrating bbPress into WordPress.” This is my first video, so I’m really need your suggestions. Maybe you can tell me what are you expecting in such podcast show? I am looking forward to hearing from you! :)

    PS. I haven’t decided what’s next episode and when will it be released.

    PS2. You may want to download .ogg (I might convert .ogg to .flv and .mov without appropriate parameters, so the qualities are not good).

Viewing 25 results - 28,551 through 28,575 (of 32,481 total)
Skip to toolbar