Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 31,276 through 31,300 (of 32,491 total)
  • Author
    Search Results
  • #1260
    baptiste
    Member

    All,

    I’ve posted a few things on the forums about odd behavior I’ve seen – href attributes in a tags getting stripped, slashes not getting stripped, etc.

    I’ve confirmed that these problems are due to the WordPress integration. I am running WordPress 2.1 and bbPress 0.75 and followed the documentation to do the integration.

    When I stop loading wp-config in my bbPress config, the slashes get removed and href attributes stay in posts.

    I’m still digging, but part of this problem is overlap between WordPress and bbPress. The docs talk about a constant WP_BB that tells the code there are possibly conflicting APIs out there. Setting it causes bbPress to use the kses code from WordPress instead. WordPress 2.1 uses kses v0.2.2 while bbPress ships with v0.2.1. My guess is something changed between the two that bbPress doesn’t handle.

    As for the slashes in front of apostrophes, it MAY be part of it – I’m not sure yet if kses is used to strip slashes. I didn’t think kses got called except during posting, not during viewing. There is another library from WordPress that bbPress uses in integration mode (l10n) for localization – not sure if this is involved in anyway (doubt it)

    So if you’re seeing weird behavior – it may very well be intergation. But the good news is it doesn’t seem to be overly difficult to fix. Still digging to find the ‘right’ way (though as a hack for the slash problem, you can include a stripslashes call in template-functions:

    function get_post_text() {

    global $bb_post;

    // Hack to strip slashes until WordPress integration is fixed

    return stripslashes($bb_post->post_text);

    }

    Anyway – just an FYI. I’ll dig more into the kses href issue and post if I find anything.

    #50384
    larmir
    Member

    This seems to work for the text. Thanks so much baptiste.

    One more question, the issue still exists in the title. I’m guessing I need to update this expression, just unsure of the syntax:

    function get_topic_title( $id = 0 ) {

    global $topic;

    if ( $id )

    $topic = get_topic( $id );

    return apply_filters( 'get_topic_title', $topic->topic_title, $id );

    }

    #50383
    baptiste
    Member

    Easy fix (hack) in bb-includes/template-functions.php, update this function to look like this:

    function get_post_text() {

    global $bb_post;

    return stripslashes($bb_post->post_text);

    }

    May be an artifact of the wordpress integration – not sure.

    #51965

    lo all, I have the same problem as Staffan, when I use this fine plugin, I get no name name displayed, I have just installed the 0.75 of BBPress, and I do not have any option in my profile to enter a nicename at all, hence why the assigned database entry (‘user_nicename’) doesn’t hold a Nicename 😮

    Well I could enter a Nicename via phpMyAdmin, but that’s surely not the way to work that out, because tbh I am way too lazy, to do that for every future user registering with the forum ;)

    ==edit==

    Nevermind my post above, just sorted it out, it works, IF you install BBP with the database tables from WP in the config.php, but NOT IF you install BBP without these information ;)

    So the nicename from the WP user-table is being used, also means, users have to enter their WP profile to change that, as this is NOT possible via BBP profile

    Thx anyways :D

    ==end edit==

    Anyhow, a pretty nice plugin, keep up the good work Atsutane :)

    #53968
    Null
    Member

    Got the for each working:

    <ul id="navlist">

    <?php $pages = get_bb_menu();

    if ($pages) {

    foreach ($pages as $page) {

    $page_id = $page->page;

    $page_item = $page->item;

    $page_location = $page->location;

    echo "<li><a href="".($page_id)."">".($page_item)."</a></li>n";

    }

    }

    ?>

    </ul>

    The problem is, how can I let it spit:

    <li><a <?php if (is_bb_search())

    {

    echo "id="current"";

    }?> href="$page_id">$page_item</a></li>

    And is_bb_search() is $page_location = $page->location;

    #53556
    davidbessler
    Member

    Can someone tell me how to include the text of the first post in the new topic in the notification email. Here is the code I am using:

    function forum_restriction_send_email ($topic_id){

    if (bb_get_option('forum_restriction_notify') == "on") {

    global $forum_restriction_allowed_in_forum, $bbdb, $bb_current_user;

    $topic = get_topic($topic_id);

    $forum = $topic->forum_id;

    $mailing_list = split(",",$forum_restriction_allowed_in_forum[$forum]);

    $message = __("There is a new topic called: %1$s. You can see it here %3$s. You got this email because Bessler decided to turn on the option to notify all members of restricted forums when there are new TOPICS started in each FORUM. However, don't forget to click on "Add this topic to your favorites" so that you get an email when someone adds a POST to this TOPIC. This will keep you involved in that particular discussion. Kapish?");

    foreach ($mailing_list as $member) {

    $userdata = $bbdb->get_var("SELECT ID FROM $bbdb->users WHERE display_name = '$member'");

    $email_address .= $bbdb->get_var("SELECT user_email FROM $bbdb->users WHERE ID='$userdata'").",";

    }

    mail( $email_address, '['.bb_get_option('name') . '] ' . __('New Topic In Private Forum:').get_forum_name($forum),

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

    'From: ' . bb_get_option('admin_email')

    );

    }

    }

    add_action('bb_new_topic', 'forum_restriction_send_email');

    #53839

    In reply to: Why Key Masters?

    Null
    Member

    Now let’s call version 1.0 Gozer :)

    http://www.imdb.com/title/tt0087332/trailers-screenplay-X31785-10-2 for who never seen the movie

    #53041

    No need to change core files. Just make a file called user_types.php with the following code in it and put it in your my-plugins/ folder.

    <?php

    /*

    Plugin Name: Change 'Member' Label

    Plugin URI: https://bbpress.org/forums/topic/503

    */

    function change_user_type_labels( $label, $type ) {

    if ( 'member' == $type )

    return 'Kazoo Corps Draftee';

    return $label;

    }

    add_filter( 'get_user_type_label', 'change_user_type_labels', 10, 2 );

    ?>

    #1330
    chrishajer
    Participant

    When viewing pages on my forum, the pages load relatively quickly and normally. When submitting a new post, or editing an existing post (as admin) after hitting “send post” there is a 45 second delay. This happened once before (on Jan 16, if it matters) but appeared to go away on its own. Now, it’s back, for the past 12 hours or so. Every post that is submitted has a 45 second delay. The display of the page happens fine:

    0.986 - 13 queries is one example.

    It’s just new posts, new topics or edited posts that have the 45 second delay. Setting the akismet key to FALSE did not improve the response time. This is a new problem. The forum software was fine for a couple months and now has this problem.

    Also, I’m using 0.73. I know I need to upgrade to 0.75, but I was kind of waiting for 0.80, and the fact that 0.73 has been running fine for a long time, with this problem just cropping up makes me think it’s something else. Of course, I will upgrade if you think it will help.

    Thanks

    #53823

    In reply to: k2 for bbpress

    sabutay
    Member

    I make a little modify now, to shown the current_page_item in the header. Just add a class to the < li > function, which belongs to the Forum. Like :

    <li class="current_page_item"><a href="http://www.mainpage.com/forum">Forum</a

    See in action:

    http://www.ahumder.org

    then click on forum, you will see that the background changes to white.

    You are able to change the color in the style.css

    #53966
    Null
    Member

    Nice

    Btw stubled on the BLIX theme from bbPress. It uses for each (I asked about this in some other posts) in it’s menu and could be the answer of my nr 1 problem.

    Some peace of code:

    foreach ($pages as $page) {

    $page_id = $page->ID;

    $page_title = $page->post_title;

    $page_name = $page->post_name;

    if ($page_name == "archives") {

    (is_page($page_id) || is_archive() || is_search() || is_single())?$selected = ' class="selected"':$selected='';

    echo "<li".$selected."><a href="".get_page_link($page_id)."">Archives</a></li>n";

    }

    Now to confert it to this plugin, have to change ‘location’ input to: is_archive() || is_search() etc. Going to play with this :)

    #51961
    ccmve
    Member

    I’m getting this error in WP2.1:


    WordPress database error: [Table ‘wordpress.bb_topics’ doesn’t exist]

    SELECT * FROM bb_topics WHERE topic_status = 0 ORDER BY topic_time DESC LIMIT 10

    —-

    The table wordpress.bb_topics doesn’t exist because my bbpress database is named bbpress. So the proper database place to look would be bbpress.bb_topics

    Any way to fix this issue?

    #1329
    Null
    Member

    Okay here it is, bbMenu 0.1 beta

    What does it do?

    It adds a menu to you bbPress site, which you can re-order yourself using drag and drop at the adminpage.

    I am releasing this beta in hope to get some help concerning these issues:

    1) I need some “better” way to store/ get the page-id comparison from the database. Currently, the script compares the page-id with ‘location’ from the database table. It’s only possible to add just 1 value to this, so if the page id = front-page it will return true and give the <a> an id= current and the link will be underlined.

    The thing is, I need to add more stuff cause now only the front page is id-ed as current as the forum link is active, while topic-page should return as current aswell, cause I want this page to be “under” the forum link as well.

    I’ve tried filling the location in the table like this: front-page || topic-page, but this will not work, cause the script will check front-page || topic-page = page-id instead of picking just one to see if it is the same as page-id.

    Hope I do make any sense, just check the script.

    2) In IE the underline doesn’t show. It works in all other browsers, don’t know why.

    To do:

    1) Use some hooks for the admin pages (need bbPress 0.80 to do this right)

    2) Be able to click the menu title in the menu (in the admin) to change it into what ever you like

    3) Some documentation so people (plugin builders) can add their own pages

    4) Use scriptaculous instead of the scripts I use now (more options)

    Download the beta:

    http://www.sourceskins.com/bbMenu-0.1.zip

    #1328
    linickx
    Participant

    Hi

    Probably me being blind, but I could find a function that returned the post authors website url.

    In my theme I didn’t want the username to be a hyperlink (in post.php), I wanted to add buttons, for profile, website, & PM.

    I wrote one to get my tests working.. but is there an “official” way ?

    function post_author_url() {

    if ( get_user_link( get_post_author_id() ) ) {

    echo get_user_link( get_post_author_id() ) ;

    } else {

    bb_get_option('uri');

    }

    }

    #53822

    In reply to: k2 for bbpress

    linickx
    Participant

    thanks Sabutay, you’re right that was missing, I was trying to avoid editing any of the php templates, but I agree this “part” is critical to the look of the theme.

    I’d like to move the “Profile / admin / log out” boxes into these tabs, as I think it would make them fit nicely, but the functions output this a <p> rather than <ul> by default :o(

    #53821

    In reply to: k2 for bbpress

    sabutay
    Member

    I’ve made a little modification, i add a tab-line in the header.php, just like the same as k2 theme.

    You can see it here:

    http://www.ahumder.org/forum

    For modification, first put these lines in the style.css

    /*- Main Menu in Header */

    ul.menu {

    margin: 0;

    padding: 0;

    position: absolute;

    bottom: 0;

    left: 20px;

    width: 90%;

    }

    ul.menu li {

    display: inline;

    margin: 0;

    }

    ul.menu,

    ul.menu li a {

    padding: 5px 15px 6px;

    }

    ul.menu li a {

    font-size: 1em;

    color: white;

    margin: 0;

    }

    ul.menu li a:hover {

    background: #333;

    color: #eee !important;

    text-decoration: none;

    }

    ul.menu li.current_page_item a,

    ul.menu li.current_page_item a:hover {

    color: #333 !important;

    background: white;

    text-decoration: none;

    }

    .admintab {

    position: absolute;

    right: 0px;

    }

    * html .admintab { padding: 5px 15px 6px } /* IE hack */

    a img,:link img,:visited img { border:none }

    After that put these lines into header.php. But changes the href lines to your site.

    <ul class="menu">

  • Ana Sayfa
  • Forum
  • Resimler
  • Duyuru Listesi
  • İletişim
  • Hope it’s useful for you, and linickx may be you could add this mod to your style.css

#53555

Ok I’ve been looking at rss.php code but I’m unfamiliar with it, and while I was hoping to find a nice clean SQL Query line, there isn’t any and I don’t know where to look. But, in case someone know where to find it, it should be a line like this:

sql0=”SELECT * FROM bb_topics ORDER BY topic_time DESC limit 0,35″;

now let’s say our first forum is restricted and the fifth forum is private . The way to severe them from the feed would be to change the query to:

sql0=”SELECT * FROM bb_topics where forum_id not in (5, 1) ORDER BY topic_time DESC limit 0,35″;

of course, the nice, clean way to do this would be to use the bb_press API to store the restricted or private forums id and then restrict the query internally, but I don’t know how to do this. I’m new to WP and BB altogether.

#53862

In reply to: Bozo problem

Trent Adams
Member

Sorry, wrong location. Search database bb_usermeta table for is_bozo and you will find your bozo information in there. If you are integrated with WordPress, it will be the wp_usermeta table (as in my case). Here is an example of one of the entries in the database for a bozo:

umeta_id user_id meta_key meta_value

696 106 is_bozo b:1;

Trent

#53921

In reply to: post or reply by email

Trent Adams
Member

Your hired! ;)

Trent

#53949

In reply to: redirection error

donharry
Member

now it works, but there is another problem while trying to edit the profile

Warning: require(profile-edit.php) [function.require]: failed to open stream: No such file or directory in /www/htdocs/w0056475/superheldenclub/videos/community/profile.php on line 20

Fatal error: require() [function.require]: Failed opening required ‘profile-edit.php’ (include_path=’.:/usr/share/php:..’) in /www/htdocs/w0056475/superheldenclub/videos/community/profile.php on line 20

#53948

In reply to: redirection error

donharry
Member

thank you guys! I knew there was something wrong with my details, but I didn’t catch it – my fault, should have read everything more specificly. thank you very much! :)

#53000

Download the updated beta version here:

https://plugins-dev.bbpress.org/browser/posts-since-last-visit/trunk/since-last-visit.php?format=raw

Demo here:

http://la-school.com/bbpress/ (Test/test)

It requires Onlinelist 1.4 to work!!

As requested in another thread here, If you want to indicate new posts with an icon next to the topic do it this way:

<?php if ($topic->topic_time > view_since_last_visit_user()) : ?>

DISPLAY IF NEW

<?php else : ?>

DISPLAY IF NOT NEW

<?php endif; ?>

add this in front of you topic title.

At the moment the topic still stay “new” even if you’ve already seen it, till the next visit. Gonna fix this in next version.

Any Feedback?

#1326
plaggi
Member

Hi!

First off all, thank you very much for this great piece of code! :-)

We’re using bbpress as forum for our citizen journalism project “Bürgerzeitung Köln” at http://bz.koeln.de. Because our users prefer german language, we decide to do a translation. And of course we will make it public and available for everyone.

So, as ‘only’ 133 translations are waiting to be done, there should be a public Alpha availabe by the end of this week. It will be a “Sie”-Version, but it shouldn’t be a problems doing a “Du”-Version as well, later.

Greetz, Sven

#53947

In reply to: redirection error

so1o
Participant

the problem is your config.php

it should be

$bb->domain = 'http://videos.superheldenclub.de';

$bb->path = '/community/';

and not

$bb->domain = 'http://videos.superheldenclub.de/community';

$bb->path = '/';

#53150
chrishajer
Participant

Sorry for the double post. The first time I posted, I got a 408 Request Timeout error:

Request Timeout

This request takes too long to process, it is timed out by the server. If it should not be timed out, please contact administrator of this web site to increase ‘Connection Timeout’.

https://bbpress.org/forums/bb-post.php

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