Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 24,276 through 24,300 (of 32,522 total)
  • Author
    Search Results
  • #76580

    Trac Posted: https://trac.bbpress.org/ticket/1159#preview

    I’ll try to update it when I have time.

    Btw, I had the trac ticket entry properly formated but alas It was raw text formatting which got stripped upon posting by the server. Sorry :-(

    #65524

    I’m interested as well. :)

    sonnygahir
    Member

    The physical directory structure is as follows:

    Directory of D:InetpubNewwwwrootforums

    20/07/2009 10:59 <DIR> .

    20/07/2009 10:59 <DIR> ..

    19/07/2009 15:14 <DIR> bb-admin

    19/07/2009 12:32 <DIR> bb-cache

    19/07/2009 12:32 <DIR> bb-plugins

    19/07/2009 12:32 <DIR> bb-includes

    19/07/2009 12:32 <DIR> bb-images

    19/07/2009 12:32 <DIR> bb-templates

    20/07/2009 13:17 1,691 bb-config.php

    05/03/2008 04:32 816 bb-load.php

    12/02/2009 00:21 1,037 bb-login.php

    24/04/2008 19:06 1,673 bb-config-sample.php

    23/04/2008 11:29 1,647 bb-post.php

    30/12/2008 23:14 445 bb-reset-password.php

    26/08/2008 20:15 13,433 bb-settings.php

    12/02/2009 00:21 822 bb-edit.php

    26/02/2007 22:48 651 edit.php

    12/02/2009 00:21 1,076 favorites.php

    22/01/2007 08:40 449 forum.php

    22/01/2007 08:40 450 index.php

    03/01/2008 00:57 17,986 license.txt

    12/02/2009 00:21 308 profile-base.php

    17/12/2008 07:57 4,782 profile-edit.php

    15/03/2008 02:40 851 profile.php

    03/01/2008 00:57 855 readme.txt

    05/03/2008 04:32 1,623 register.php

    25/04/2008 14:09 4,349 rss.php

    29/01/2008 20:11 1,402 search.php

    05/03/2008 04:32 238 statistics.php

    12/02/2009 00:21 574 tag-add.php

    12/03/2008 07:46 661 tag-remove.php

    22/01/2007 08:40 433 tags.php

    19/07/2009 15:46 3,293 testdb.php

    03/01/2008 00:57 1,312 topic.php

    03/01/2008 00:57 756 view.php

    27 File(s) 63,613 bytes

    #17211
    shiznaught
    Member

    There seemed to have been some earlier discussion on editing the permalinks structure of bbpress (http://bbpress.org/forums/topic/permalinks-slugs-modification-removing-forum), and I’m wondering if things are different in version 1.01.

    What I would like to be able to do is have all of the posts look like domain.com/g/post-name. The reason for this is that I have a vanity url, with the idea that the complete url will spell out a sentence.

    So far, the best I can do is domain.com/g/topic/post-name. Is there a way to either get rid of the “topic” part of the permalink structure, or otherwise hardcode it to be “g” isntead of “topic?”

    Thank you.

    #76643
    chrishajer
    Participant

    What version of bbPress are you using? Those instructions are for 1.0.1. Also, are you using a stock theme?

    Basically, you need to find, in whatever template file you want to change, the bbPress function that shows that text (it won’t be immediately clear because the function has a default text which is used if you don’t send it anything else. The default text is set in the core file bb-includes/functions.bb-template.php.) Just look in the source of the generated page and try to get some context for where in your template file this function will be (top, middle, bottom, in a table cell, near a unique css id, etc). Then, try adding your text in comments inside the parentheses, instead of them being bare. So, from this:

    bb_do_whatever()

    to:

    bb_do_whatever('Add New Essay')

    #76641
    chrishajer
    Participant

    2. of my reply covers your second problem.

    <?php bb_new_topic_link('Add New Essay'); ?>

    bb_new_topic_link is called without parameters in your front-page.php template file, but if you pass it the string ‘Add New Essay’ you will see the text in your displayed site change. You are overriding the default text which is in the bbPress core.

    The reason you don’t find it in a template file is because it’s not there. The function is there, and is called without parameters. The default text is in the core, but you can override it in your template.

    1. I cannot help you with and I questioned the desire to even do something like that. Why would you want an “add new” page indexed when it has no content? What benefit does it give your site?

    I imagine you could probably do something to change that using mod_rewrite and your .htaccess file, but I don’t know how to do that.

    #76639
    chrishajer
    Participant

    1. I’m wondering what benefit there would be to indexing a page that has no content on it, just the ability to add a new topic?

    2. In version 1.0.1 of the software it’s in the template files. You want to find this function:

    <?php bb_new_topic_link(); ?>

    And make it look like this:

    <?php bb_new_topic_link('text Instead of Add New'); ?>

    Paul
    Member

    I have a link to my forum in my global nav by creating an empty page with a slug that is the same as the directory name as where I have bbpress installed.

    But I also load the wp-load.php file in my bb-config.php file

    define('WP_BB', true);
    if ( !defined('DB_NAME') ) {
    require_once( dirname(__FILE__) . '/../wordpress/wp-config.php');
    }
    $bb->wp_table_prefix = 'wp_'; // your wordpress db prefix is
    $bb->wp_home = 'http://www.trashfilmorgy.com/wordpress';
    $bb->wp_siteurl = 'http://www.trashfilmorgy.com';

    Then I went into my bbpress theme and changed every instance of bb_get_header() with get_header(), and bb_get_footer() with get_footer().

    Since I want to have my wordpress sidebars show up in the forum, too, I also added get_sidebar() right above the call to get_footer().

    I could also add other sidebars, too – the theme I use adds two columns below the main content area and uses the dynamic sidebar functionality to add them in to each page. I could see how adding other or more sidebars and going in to the templates could be really useful

    #76316

    In reply to: unescaped characters

    Paul
    Member

    Here are the installed plug-ins, but I should note that it has been doing this before I installed any plug-ins:

    Akismet v1.0

    Bavatars v0.4

    BBcode Lite v1.0.3

    BBVideo v0.24

    Post Count Titles v1.0.2

    Right on the forum front page, you can see this entry:

    Satan’s Cheerleaders Pictures 1 Paul Brown 9 hours

    That escaped apostrophe is what I’m talking about… were I to go in and edit that post, there would be two backslashes.

    #76620
    _ck_
    Participant

    No, no no, bb_is_admin is to detect if you are in the admin control panel

    First line should be

    <?php if (bb_current_user_can('administrate')) { ?>

    #76619
    Gautam
    Member

    Use this:

    <?php if(bb_is_admin()){ ?>
    <div id="useronline">
    <h3><?php _e('ONLINE TODAY'); ?></h3>
    <p><?php do_action('members_online_today',''); ?></p>
    </div>
    <?php } ?>

    This should work…….

    kickerman360
    Member

    Maybe this will work:

    <a href='<?php bb_uri(); ?>/profile/<?php topic_last_poster(); ?>"><?php topic_last_poster(); ?></a>

    Not 100% sure it would work since <?php topic_last_poster(); ?> grabs the display name, not the user name I think. Well there’s a start.

    #15763
    edwinfoo
    Member

    Hello,

    I was wondering if someone can point me in the right direction. Though I am a webmaster, marketing is my forte and cutting code is quite foreign to me but I get by.

    Have the members_online.php plugin installed and though I like to see who’s been online today, I don’t want potential advertisers seeing that information or indeed forum members as it can provide a distorted view of site traffic stats.

    Here is the snippet of code from the front-page.php file which generates the summary on the forum front page.

    <div id="useronline">
    <h3><?php _e('ONLINE TODAY'); ?></h3>
    <p><?php do_action('members_online_today',''); ?></p>
    </div>

    Can someone please tell me what to do to make that output visible only to admins?

    Thank you in advance

    #76606
    Arturo
    Participant

    yes Tom, and they correspond!!!! i’ve put the exact code from the bbpress integration plugin… any idea?

    #76617
    Gautam
    Member

    Create a functions.php file in your theme folder, and write this in it:

    <?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;
    }
    ?>

    Then at the front page, put this where you need to display the post text (it should be inside the loop):

    <?php echo get_post_teaser(200); ?>

    You can change that 200 to anything, any number of letters you want. Default is 200.

    I think, this should work.

    #76345
    Gautam
    Member

    I think, for the front page, where all topics are shown, you should put this:

    <?php
    $limit = bb_get_option('page_topics');
    $offset = ($page-1)*$limit;
    $all_topics = $bbdb->get_results("SELECT * FROM $bbdb->topics WHERE topic_status = 0 AND topic_sticky = 0 ORDER BY topic_id DESC LIMIT $limit OFFSET $offset");
    $all_topic_posts = get_thread( $topic->topic_id);
    $topics = $all_topics;
    ?>

    Haven’t tested it, but should work.

    #76611
    infected
    Participant

    Hm… That might be work. But there´s no way to handle this like in wordpress? For example you can pass arguments before and after the tag and also define a separator. Like this: <php the_tags('Tags:', ', ', ''); ?>

    #76610
    deadlyhifi
    Participant

    functions.bb-template.php line 1866 shows the arguments that this functions can accept, including a before and after character. But it also states $args = null. You could add the | on line 1868 but this is editing the core :(

    Alternatively use an if ( bb_current_user_can( 'view_by_ip' ) ) { echo " | "; }.

    #76604
    deadlyhifi
    Participant

    You’d replace the topic_posts(); with the code that johnhiler wrote.

    Is it worth running through that calculation for every listed post though? People on your forum would soon become familiar with Number of Posts rather than Replies to Post statistics.

    #76519
    deadlyhifi
    Participant

    I’ve just reported this issue of HTML characters being displayed in edit post in Trac. (https://trac.bbpress.org/ticket/1158).

    It looks like a minor bug in bbP rather than an issue with the plugin… although it could affect people who are trying to type HTML characters out in their code examples. That rarely happens on my forum though.

    #76343
    deadlyhifi
    Participant

    This code won’t work on front-page.php but did you try it in forum.php? I’m running v1.0.1 and it’s working fine there.

    For the front page you need to find the SQL query that gets called and replace it with your own, and ORDER BY topic_id. Let me know how you get on. I’ll have a closer look tomorrow when I’m working from home.

    #15410
    infected
    Participant

    Hi!

    First of all, sorry for my bad english… I try to explain my intention as good as i can.

    I tried to show this ” | ” before or after a php tag in my own template. For example my post.php contains this code

    <div class="poststuff"><?php printf( __('Posted %s ago'), bb_get_post_time() ); ?> <a href="<?php post_anchor_link(); ?>">Permalink</a> <?php post_ip_link(); ?> <?php post_edit_link(); ?> <?php post_delete_link(); ?></div>

    What i want is that e.g. before <?php post_ip_link(); ?> is displayed the above mentioned character. If i insert it before the php tag it also displayed to “normal users”. Normally the ip link is only displayed for admins. And so i´d like to see the | only as admin.

    The output for normal users should look like this: Posted 38 minutes ago | Permalink

    The output for admins should look like this: Posted 38 minutes ago | Permalink | 127.0.0.1 | Edit | Delete

    If i add this “|” manually before the tags, for normal users it looks like this: Posted 38 minutes ago | Permalink | | |

    Any ideas how this can be done?

    #15409
    Arturo
    Participant

    Hi,

    i’ve installed WP (not mu) 2.8.1 and bbPress 1.0.1 with user and cookie integration, users work without problem but the cookie not.

    i’ve installed the bbpress integration plugin added the code to my wp-config.php but nothing change… the key are checked, i really don’t know how to resolve this… please help me… thanks!

    #76517
    deadlyhifi
    Participant

    Just noticed an issue when editing a post. If there is an apostrophe it get’s turned into HTML code. i.e. ' the preview code stops being generated… will look at this closer tomorrow. I suppose this only affects if the preview form has been added to edit post with (add_action('edit_form','add_live_comment_preview');)

    #15404

    On both Chrome and Safari (latest stable on both, and up-to trunk on Chrome) these do not work for me:

    – Adding/Removing from favorites ajax script within a viewed topic: Clicking on the span wrapped anchor shows animation but state unchanged.

    – keymaster removal of posts: input box and animation plays, upon refreshing page (Manual F5) posts re-appear.

    These situations do not occur with FireFox or I.E.

    I’ve also replaced jQuery 1.2.6 with jQuery 1.3.2 (without errors, and requires a few php changes to the script loader) but this does not work. I had thought maybe there were fixes to 1.3.2 ajax code.

    Still not discounting my own server config, and I haven’t fully debugged the javascript yet. I have jQuery debug up and running, just going to be a while.

    Stack is: WPMU 2.8.1 >> BBPress 1.0.1

    Anyone have similar issues?

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