Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 30,601 through 30,625 (of 32,522 total)
  • Author
    Search Results
  • #56400

    In reply to: Freshness Linked

    fel64
    Member

    Not sure how to do that specifically, however here’s a quick rip of Sam Bauer’s pagination plugin that’ll add a double-forward arrow to the end of each topic name linking to the latest post. Copy it into a text file, save it as something.php and upload.

    <?php
    /*
    Plugin Name: Link to last Post
    Plugin URI:
    Description: Adds page links to topic lists
    Author: fel64
    Version: 0.7
    Author URI: http://www.loinhead.net/
    */

    if (!function_exists('is_tags')) {
    function is_tags()
    {
    return is_tag();
    }
    }

    if (is_front() || is_forum() || is_tags()) {
    add_filter('topic_title', 'fel_addlatestlink', 101);
    }

    function fel_addlatestlink($title)
    {
    global $topic;
    $felgtlpl = get_topic_last_post_link($topic->topic_id);
    $title = $title . ' <a href="' . $felgtlpl . '">&nbsp;&raquo;&nbsp;</a>';

    return $title;
    }
    ?>

    #1678
    Nola1974
    Participant

    I just got finished posting a whole bunch of posts a little while ago. Worked on my theme a bit.. added this to the header, that’s it:

    <?php
    function w3l_tl_pages($before = '', $after = '', $between = ' ') {
    global $wpdb;
    $query = "SELECT ID, post_title FROM $wpdb->posts WHERE (post_type = 'page' AND post_status = 'publish' AND post_parent = 0) ORDER BY menu_order";
    $pages = $wpdb->get_results($query, ARRAY_A);
    $temp_pages = array();
    foreach ($pages as $page) {
    $temp_pages[] = $before . '<a href="' . get_bloginfo('url') . '/' . get_page_uri($page['ID']) . '">' . $page['post_title'] . '</a> ' . $after;
    }
    echo implode($between, $temp_pages);
    }
    ?>

    This is to get the menu of pages from my wordpress.mu install.

    Now, whenever I try to post, after I submit a new topic, it turns yellow and doesn’t not then appear in the discussions list.

    I can’t delete ANY posts. Not even old ones.

    THe new topics appear in the dashboard under “Recently Moderated” and says this:

    Topic titled test post started by bb_get_user needs a numeric ID

    Null
    Member

    Well I know how much time it takes to write a plugin :)

    I do want to request to make this a stand alone plugin and no modification of the private forums plugin, cause I want to merge it with my bbPortal plugin (with your permission ofcourse) and that is done most easily with a stand alone plugin…

    #56373

    In reply to: Plugin: bbMenu 1.1

    Null
    Member

    Hi,

    I will take a look at the plugin (think after easter) and see if there is a way to implement this. The tab titles are stored in the db, can’t change that, but the title can be replaced with a stringreplace thingy. So technically it could do what you want… Well I’ll try to get that tab in first :D

    edit: seems you’ve got that pm tab working, what did you use to edit it into the table? (saves me time finding it out myself)

    #56388

    In reply to: Syntax questions

    lonemadmax
    Member

    fel64’s assumption is correct. You can see the definition of _e() and __() in bb-includes/l10n.php:

    // Return a translated string.

    function __($text, $domain = 'default') {

    // Echo a translated string.

    function _e($text, $domain = 'default') {

    #56372

    In reply to: Plugin: bbMenu 1.1

    wittmania
    Member

    Null, thanks for the help. Yeah, going into the table isn’t a whole lot of fun, but this isn’t something that would need to be changed very often.

    PM is private messaging, i.e. this plugin:

    https://bbpress.org/plugins/topic/20

    The plugin adds a page (/yourforum/pm.php) that lets you read/write private messages to other users. Because it is a static page, you can define the address in the table.

    What would be really great, though, is a way to make the links dynamic. The PM plugin also comes with a notification function where users can be given an alert when they visit the forum letting them know a new message has arrived. The tab would say something like “Private Messages (1)” or something like that. Unfortunately, since the page addresses are stored in the DB, I can’t really think of a way to do this.

    As far as wanting to see it, you can check my forum here:

    http://www.lne97.com/bbpress/

    I have it locked down so you have to register, which addresses the issue you mentioned above. However, you can log in using:

    user: just a test

    password: justatest (no spaces)

    Thanks again for the plugin!

    #56371

    In reply to: Plugin: bbMenu 1.1

    Null
    Member

    Well most izi way:

    Wait for the next release, it will have custom tabs adding feature.

    Hard way:

    Using phpmyadmin you can add into the menu table:

    DEFAULT, 'Excample tab', 'inactive', 'pagename.php', 'front-page', 0

    Well ‘front-page’ is more complicated to add it should be changed to something else and added as a plugin (i know this sounds weird), so let it in and see what happens….

    About the pm issue, i am not familair with it what does it do? Can you show me? If it is a page that is added then this is possible INCLUDING that the tab stays active…

    problem that could happen is for non logged in visitors, they will see the tab too

    #1670

    Topic: Syntax questions

    in forum Themes
    wittmania
    Member

    A couple of questions about what syntax to use, especially on template pages:

    1. I see that a lot of people use _e('string...') instead of echo('string...'). Is this just a bbpress/wordpress thing or is this generally acceptable php coding?

    2. In front-page.php of kakumei (and many other places), I see people using this shorthand echo where normal text would work just fine. For instance, in the hottags div, it is:

    <h2><?php _e('Hot Tags'): ?></h2>

    Why would you have PHP echo that when you could just have it as plain ol’ text in the first place? Am I missing something?

    I realize neither of these is of any earth-shaking importance, but I would like to know so I can keep my code modifications in line with the default syntax that is used throughout. Thanks!

    #56368

    In reply to: Plugin: bbMenu 1.1

    Null
    Member

    Darn that error again, there must be something wrong with that insert part when a table is created.

    Check with phpmyadmin if the table bb_menu is created. If not do so manually (this is not tested, but it contains the stuff needed in the table):

    "CREATE TABLE$bbdb->menu` (

    item_id INT(3) NOT NULL AUTO_INCREMENT,

    item varchar(50) NOT NULL default ”,

    set varchar(50) NOT NULL default ”,

    page varchar(50) NOT NULL default ”,

    location varchar(50) NOT NULL default ”,

    order int(9) NOT NULL default ‘0’,

    PRIMARY KEY (item_id)

    );`

    Then you will have to fill it (again not tested, but it contains what needed):

    "INSERT INTO$bbdb->menu` VALUES

    (DEFAULT, ‘Forums’, ‘active’, ‘index.php’, ‘front-page’, 0),

    (DEFAULT, ‘Search’, ‘active’, ‘search.php’, ‘search-page’, 1),

    (DEFAULT, ‘Statistics’, ‘inactive’, ‘statistics.php’, ‘stats-page’, 0);”`

    When sucesfully created this table, things should work…

    #50832

    In reply to: Avatars

    Trent Adams
    Member

    I use this plugin for MyBlogLog avatars, but looking at the code it seems to be already setup for Gravatars as well! Maybe take a look at it!

    https://bbpress.org/plugins/topic/36?replies=6

    Trent

    #1674
    archasek
    Member

    http://kmr.nazwa.pl/forum/topic.php?id=3&page&replies=1#post-6

    i want to translate headers like this “reply” and

    [Delete entire topic] [Close topic] [Stick topic (to front)]
    Move this topic to the selected forum:

    and

    dodano 2 hour temu

    where can i do this?

    fel64
    Member

    As long as you integrated from the start, no? Are you using the same database for WP and bb? In your config.php, did you add details for these settings:

    bb->wp_table_prefix
    bb->wp_home
    bb->wp_siteurl

    Another way to tell is, did it use your WordPress name for your admin account when you installed?

    #56390
    fel64
    Member

    Might be worth making a trac ticket for it here: https://trac.bbpress.org/ Log in with the details you use here. :)

    #50829

    In reply to: Avatars

    Atsutane
    Member

    U can put that code as a plugin.

    #1667
    davetropeano
    Member

    I recently did my first bbpress install on localhost and it went miserably. I used the latest download from today.

    Checking on this forum I had the same path seperator issues and stylesheet issues others had, etc.

    My $bb->domain and $bb->path were fine. The fresh install just didn’t work properly under xampp and then again a retry on easyPHP.

    This is the solution and findings I found:

    1. The first issue is because in config.php and bb-load.php dirname(__FILE__) is used to get the base path for BBPATH. This is not a good thing on localhost Windows based installs.

    2. There are a number of attempted workarounds to this that I’ve read about in this forum. All of them that I saw didn’t work. Focusing on the issue with the stylesheet href not being correct I noticed that there was logic in the bb_get_active_theme_folder() function.

    By default, the installer does NOT create an option entry ‘bb_active_theme’ in the database table topicmeta. The code logic doesn’t make the correct uri.

    To fix this, do an install and then add a database field bb_active_theme in the topicmeta table.

    For example, I set mine to:

    http://localhost/dev/bbpress/

    Playing regular expression games to change x: and in general is not worth it. This seemed to be simple and worked right out of the box.

    #56348
    tegolino
    Member

    it doesn’t work :(

    #55894
    fel64
    Member

    Thanks for this Sam, looking at it I also made a plugin using the Simple Onlinelist which will highlight any new posts made since the last time someone logged in. :) Waiting to have it approved as a plugin so I can upload.

    fel64
    Member

    You will have to make changes to some core files to make this work properly, as they are in different subdomains.

    Find your bbPress config.php file and add these lines:

    //try to sync cookies
    $bb->cookiedomain = '.mpm.org.au';
    $bb->cookiepath = '/';

    Now go to your wordpress folder, open wp-settings.php.

    #line 190

    FROM

    define('COOKIE_DOMAIN', false);

    TO

    define('COOKIE_DOMAIN', '.mpm.org.au');

    Make sure that you make note of this change to wp-settings.php. Every time you upgrade wordpress this change will be overriden and you will have to make this change again.

    #56345
    tegolino
    Member

    ops sorry for the swiching! I’m doing a tests!

    I have my-templates folder, but I want the same theme of my blog http://www.motiongraphics.it . When I switch to MW theme the error is

    Fatal error: Call to undefined function: get_settings() in /web/htdocs/www.motiongraphics.it/home/forum/

    my-templates/mw1.1/themetoolkit.php on line 331

    :((((

    #56343
    chrishajer
    Participant

    I just created a login at http://www.motiongraphics.it/forum/ and everything worked fine. I was able to do login and create a topic just fine.

    The really weird thing is that the forum initially looked like a standard bbPress install (kakumei or whatever that theme is called) then, after I created a topic, it switched over to what looks like this bbpress.org forum theme. It was so disorienting, I thought I posted on bbpress by mistake!

    So, unless you were messing with the templates, something weird is going on. However, I did not see the error you mentioned, I just had the weirdness with the differing templates.

    Sorry for my Italian :)

    #50827

    In reply to: Avatars

    thegunman
    Member

    You say this is bbpress code but after searching through every file I couldn’t find any reference to avatar in any of the code. Where exactly is this block of code placed?

    #56297

    In reply to: config.php

    archasek
    Member

    Warning: Cannot modify header information - headers already sent by (output started at /home/kmr/ftp/forum/config.php:1) in /home/kmr/ftp/forum/bb-includes/pluggable.php on line 166

    when i login. i don’t have print_r funciton.

    edit:

    ok, everything seem to be working ok. thank ya ! :)

    #56296

    In reply to: config.php

    Sam Bauers
    Participant

    I accidentally left a print_r() command in the first upload of the patch. Check line 64 of db-mysli.php, if it has print_r($server); on it, just remove that line completely.

    print_r() forces output, which may explain the errors. Sorry about that.

    #52212
    Trent Adams
    Member

    I am sure they both are not the same as this forum! I just copied across the stylesheets and then moved a few things around. If I get a chance I might take a closer look at it this weekend, but I was really getting something of a basic template for others to use, not quite 100% perfection as I did it in about 20 minutes…..;)

    Trent

    #56087
    fel64
    Member

    At a wild guess from memory it’ll be in /bb-includes/formatingfunctions.php :)

Viewing 25 results - 30,601 through 30,625 (of 32,522 total)
Skip to toolbar