Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 24,076 through 24,100 (of 32,468 total)
  • Author
    Search Results
  • anandasama
    Member

    nice to be able to help. Got any other question (like thread maker profile link) then I know the code for that too.

    You should flag this topic as resolved.

    #77385
    _ck_
    Participant

    Doing it through bb_get_template simply fires an extra filter – but nothing else is aware of sidebars in bbPress yet so it’s pointless. Plus I wasn’t aware you could use require on a function. Then bb_get_template uses another include/require so it’s massive overkill (or just wrong in the first place).

    chrishajer
    Participant

    How about the “Topics per page” plugin?

    https://bbpress.org/plugins/topic/front-page-topics/

    It lets you set the number of topics to be returned for many bbPress pages/views.

    #77384
    Josh Leuze
    Member

    Thanks for the info _ck_, glad to hear that I’m not way off track.

    Yeah, I have been loading the sidebar after the content, but just above the footer include, rather than in the footer, so that I can use different sidebars easily.

    I wouldn’t want to take credit for Ryan Imel’s work! Only linked to Theme Playground as an example, but you’re right, he did an awesome job on integrating the forums into the rest of his site.

    Now that I scroll down and read the comments on his post a little closer, I see that Justin Tadlock mentioned another way to add a sidebar, but it looks to have the same end result as a regular include:

    require_once( bb_get_template( 'sidebar.php' ) );

    I’m not sure if I can match Ryan’s quality design, but I’m going to try to do a few fresh looking bbPress themes to share with the community.

    #77449
    chrishajer
    Participant

    666 is also rgb(102, 102, 102); – it bites me every time I look for it. Find that 102, 102, 102 in style.css and you will see where to change it.

    There are 10 or 12 places where the CSS colors are in RGB notation like that. I wish it was either one way or the other (preferably 6 digit hex notation. That gets me sometimes too, looking for 666666 when it was coded as 666.)

    Dreamcolor
    Participant

    bbPress 0.9.0.6 Simplified Chinese Translation.

    You can download it with the URL below.

    http://wpcn.googlecode.com/files/bbPress.0.9.0.6.Simp.Chinese.pack.only.v1-wpcng.zip

    bbPress 1.0.2 Simplified Chinese Translation.

    You can download it with the URL below.

    http://wpcn.googlecode.com/files/bbPress.1.0.2.Simp.Chinese.pack.only.v1-wpcng.zip

    There maybe still have some translation bugs. So please let me know and I will fix it.

    You may use the bbPress Admin Fonts Beautifier plugin too…

    http://bbpress.org/forums/topic/bbpress-admin-fonts-beautifier

    #77422
    woopstash
    Member

    They forgot to put wrap it all in a div like they did all the other pages.

    I think this works:

    In bb-adminthemes.php:

    add: <div class="wrap"> on line 119 (above Manage Themes header)

    add: </div> on line 158 (after </table> and </div>)

    #77417
    woopstash
    Member

    I’m having the exact same issue too, although I’m using bbpress 1.0.2. IE6 it’s missing, FF 3.x works.

    From what I’ve gathered, its an issue with #bbAdminMenu negative margin in the bb-adminstyle.css file.

    I can’t seem to figure anything out that fixes it (I can get it to show, but formatting is awful) and I really don’t want to have to dive into the actual markup.

    Edit: Just found a solution/hack

    Due to the IE6 double margin bug, you’ll need to do a little css hacking. In bb-adminstyle.css:

    add: _margin-left: -83px; to ul#bbAdminMenu {…}

    add: _margin-left: -25px; to body.bb-menu-folded ul#bbAdminMenu{…}

    note the ‘_’ before the css. this is for IE6 to read it but no other browser as far as I know.

    #77445
    hpguru
    Member

    Yes.

    1. https://bbpress.org/plugins/topic/114 – bbCode Buttons Toolbar

    2. https://bbpress.org/plugins/topic/93 – bbCode Lite

    #31345
    Josh Leuze
    Member

    I’m working on my first bbPress theme and I am going to have two columns on most pages. I will likely vary the content of this second column depend on which page you are on.

    I’d like to use a separate sidebar just like WordPress so that I can create a few different files that I could load.

    These sidebars need not draw any content from WordPress, I don’t need deep integration or anything. I’m just wondering what would be the best way to go about doing this.

    Theme Playground’s bbPress forum has it’s sidebar added to the footer.php file, which sounds like a good idea, but seems a bit impractical for multiple sidebars.

    I also found this simple sidebar plugin in the forums which adds the “bb_get_sidebar()” function to bbPress. A neat idea, but I hate to frivolously add extra plugins, especially when it is essential for the theme to work properly.

    So what I have done in my theme is to simply use an include like this:

    <?php include ('sidebar.php'); ?>

    This has been working fine for me and I don’t see any reason not to do it like this.

    But does anyone else have a different method that has some advantage? Or is there plans for, or already an official function like “bb_get_sidebar()” that I am unaware of?

    #56568
    anandasama
    Member

    Somehow both of your codes doesnt work.

    #59838
    _ck_
    Participant

    Just to be certain, you understand how titles work right? You mouse over it to see it.

    Maybe try doing a “view source” to make sure it’s there.

    You’ve already proved that the code will output the date, all we’ve done is just move it into the hidden, mouse-over title.

    Show me the view source part just for what it outputs.

    #77174
    anandasama
    Member

    It works now at least for Firefox. Very ugly code though. I need to structure it and make functions of everything. ^^

    I solved it by putting the formated string output into a form, and then sending to the last page (by using get_topic_last_post_link(), but It echoes a anchor id.. I want to strip the #id in the URL and change it to url+#to-post. Any Idea how I can do that?

    And I needed to make a Js timeout for a few seconds because TinyMCE wouldnt load the new information unless it is loaded itself first.

    Here is the forum:

    http://matsuri.moai.se/

    #31357
    TonyVitabile
    Member

    OK, here’s the functions.php file that I created in my theme to reproduce the drop down menu I had on my WordPress side.

    Please note that this code does not attempt to reproduce all of the functionality of the WordPress wp_list_pages() function. Rather, it just tries to create the HTML needed for the drop down menu code that came with my WordPress theme to work. If you need anything more than that, feel free to modify this or strike out on your own.

    Overview

    Before the code, just a quick overview of how it works.

    The function bb_list_pages() is a recursive function that returns a string containing the HTML for all of the pages that descend from a particular ancestor. The process is started by calling it with a parent ID of 0. The way the wp_posts table in WP is designed, this returns the highest level.

    The function calls a helper function called get_pages() to retrieve the list of child pages from the database. It then loops through all of the pages returned by get_pages() & constructs the list item & anchor tags. It then calls itself to build the HTML for any descendants of the current page.

    Here’s the code:

    <?php
    /**
    * This file contains useful functions that can be called in any of the template's files.
    *
    * Version 1.0
    * Date: 23-July-2009
    * Author: Tony Vitabile
    */

    function curPageURL() {
    $pageURL = 'http';
    if ($_SERVER["HTTPS"] == "on") {$pageURL .= "s";}
    $pageURL .= "://".$_SERVER["SERVER_NAME"];
    if ($_SERVER["SERVER_PORT"] != "80") {
    $pageURL .= ":".$_SERVER["SERVER_PORT"];
    }
    $pageURL .= $_SERVER["REQUEST_URI"];

    return $pageURL;
    }

    /**
    * Compute the name of the WordPress pages table & return it
    */
    function pages_table() {
    global $bb;

    // Compute the name of the table we need to query
    $table = $bb->wp_table_prefix;
    if ($bb->wordpress_mu_primary_blog_id != "")
    $table .= $bb->wordpress_mu_primary_blog_id."_";
    $table .= "posts";
    return $table;
    }

    /**
    * Retrieve a list of pages from the WordPress posts table whose parent has the ID
    * passed to this function.
    *
    * @param int $parent ID of the page that is the parent of the ones we're searching for
    * @return array List of pages matching defaults or $args
    */
    function get_pages($parent = 0) {
    global $bbdb;

    // Compute the name of the table we need to query
    $table = pages_table();

    // Build our query string
    $parent = (int) $parent;
    $query = "SELECT * FROM {$table} WHERE post_type = 'page' AND post_status = 'publish' AND post_parent = {$parent} ORDER BY menu_order";

    // Get an array of rows back from the database
    $pages = $bbdb->get_results($query);

    // Return whatever we got back to the caller
    return $pages;
    }

    /**
    * Simple function to recursively scan the WordPress posts table looking for pages.
    * It builds a string consisting of <ul><li></li>...</ul> items.
    *
    * @param int $parent ID of the parent page. 0 = no parent
    * @param int $depth How far down in the heirarchy to go
    * @param string $thisPage The name of the page that is currently being displayed
    * @returns string A <ul><li></li>...</ul> list of page navigation information
    */

    function bb_list_pages($parent = 0, $depth=0, $parent_uri='', $indent=' ') {
    // Initialize the output of the function
    $output = "";

    // Is the depth = 0?
    if ($depth == 0) {
    // It is. Return the empty string now
    return $output;
    }

    // Get the child rows of $parent
    $pages = get_pages($parent);

    // Did we get any pages back?
    if ( empty($pages) ) {
    // No, we didn't. Return the empty string now
    return $output;
    }

    // Yes, we got pages back. Loop through all of the pages in our results
    foreach ( $pages as $page ) {
    // Compute this page's URI
    $page_uri = $parent_uri;
    if (substr($page_uri, -1) != '/')
    $page_uri .= "/";
    $page_uri .= $page->post_name . "/";

    // Build the <li> tag
    $output .= "{$indent}<li class="page_item page-item-{$page->ID}";
    if ($page_uri == curPageURL() ) {
    $output .= " current_page_item";
    }
    $output .= "">";

    // Now build the rest of this item's information
    $output .= "<a href="{$page_uri}">".$page->post_title."</a>n";

    if ($page->ID > 0) {
    // Get this page's children recursively
    $kids = bb_list_pages($page->ID, $depth -1, $page_uri, '', $thisPage, $indent . " ");

    // Does this page have any children?
    if ($kids <> "") {
    // It does. Add the information for the kids surrounded by <ul></ul> tages
    $output .= "{$indent}<ul>n" . $kids . "{$indent}</ul>n";
    }
    }

    // Output the closing </li>
    $output .= "</li>";
    }

    // Return the string to the caller
    return $output;
    }

    ?>

    Tony

    #59837
    piedpiper21
    Member

    I don’t think it’s a problem using <? as I was able to change it to a timestamp format with that.

    I tried the simplified code, still the same problem. Only the regular freshness, no title.

    #59836
    _ck_
    Participant

    Based on what you showed me that is working, mine should work fine.

    Here is a simplified version:

    <td class="num"><a href="<?php topic_last_post_link(); ?>"  title="<?php echo date("r",strtotime($topic->topic_time)); ?>"><?php topic_time(); ?></a></td>

    I think the problem with the old example is I used a php shortcode (<?) instead of the full <?php and some servers have a problem with it, maybe yours. I’ve now edited all examples on this page to use the full <?php to prevent confusion by future viewers.

    #59835
    piedpiper21
    Member

    <td class="num"><a href="<?php topic_last_post_link(); ?>"><span class=timetitle title="<?php echo date("r",strtotime($topic->topic_time)); ?>"><?php topic_time(); ?></span></a></td>

    I was referring to the title in this line.

    And I’m trying to implement the code you gave above.

    I want the regular text to read the freshness and the title to hold the exact date.

    #77333

    In reply to: Role = Main?

    Mark / t31os
    Member

    Well call me stupid, but strangely things seem to work as i’d expected them to now… (i’ve changed nothing)..

    Late night, perhaps it was just me… in any case it’s all as it should be..

    Consider resolved. :)

    Thanks for the response… ;)

    #77357
    johnhiler
    Member

    Here are some instructions on how to change your file permissions using an FTP client:

    https://codex.wordpress.org/Changing_File_Permissions#Using_an_FTP_Client

    #76672
    anandasama
    Member

    That is navigation for the front page, not topics.

    My topics navigation works fine with permalinks but I also have the same problem with permalinks on the latest discussion (like on endrant.org).

    I use Plugin: “Topics Per Page” .. I Added the replace in htaccess with no luck.

    Using bbpress 1.0.1

    Is there any other plugin or built in function that do the same trick for latest discussions?

    Seems bbpress.org works with permalink / latest discussion pagination.

    How do their code look like?

    _ck_
    Participant

    This will remove the ability for moderators to see IPs anywhere in bbPress.

    add_filter('get_roles','no_view_ip');
    function no_view_ip($roles){unset($roles['moderator']['capabilities']['view_by_ip']); return $roles;}

    It will work in bbPress 0.9 or 1.0.

    In 1.0 you can just put it into functions.php in your template folder or make it into a mini-plugin for 0.9

    #77391
    _ck_
    Participant

    case matters, it’s ->ID

    #77414
    Markus Pezold
    Participant

    Yesterday I had the same question – a look into the kakumei-theme helps me. The Code-Snippet is:

    <?php topic_page_links(); ?>

    TonyVitabile
    Member

    I’m very happy with the way my bbPress them has turned out. I’ve even managed to fix my drop down menus so they work — my function that spits out the

    tags was putting the before the

      tag for the level below. Once I fixed the placement of the tag, they worked great.

    My problem at this point is when I view a topic, my IP address shows up beneath my gravatar. That’s not in the code in topic.php. I believe it’s coming from the call to do_action(‘under_title’). This seems to be the only place that the gravatars can come into the post, as there doesn’t seem to be anything in the topic.php file related to them.

    Any ideas are appreciated.

    Tony

    #31346
    maramac
    Member

    I’ve got my forum set in German and had some trouble displaying various characters, so I followed a few hints in various topics around here and set my database collocation from utf-8_general_ci to utf-8_bin.

    That in itself didn’t change the problem – that didn’t disappear until I converted the front-page.php from being encoded in ANSI to being encoded in utf-8. Since that took care of the problem, I converted all other files I’d been using lately (profile, topic, etc) to utf-8, figuring that it was my mistake for not having notepad++ set properly when I started out with it.

    Everything is now displaying properly except for the profile page which simply will not load. I am getting timeout errors, e.g.

    Fatal error: Maximum execution time of 30 seconds exceeded in … /forum/bb-includes/functions.bb-formatting.php on line 257

    or

    Fatal error: Maximum execution time of 30 seconds exceeded in …/forum/bb-includes/backpress/functions.plugin-api.php on line 136

    or

    Fatal error: Maximum execution time of 30 seconds exceeded in …/forum/bb-includes/functions.bb-core.php on line 844

    If I hit refresh, it shows up with a different line in any of those files. They all have something to do with the encoding, from what I can see.

    So I changed back the database collation, and converted the files into ANSI again, and deactivated any plugin that directly links into the profile page (the subscribe to topics plugin). No change. No profile. Still the same error messages.

    Could anyone point me into the right direction of where to look? If there’s anything more you need to know, I’ll gladly mail the details.

Viewing 25 results - 24,076 through 24,100 (of 32,468 total)
Skip to toolbar