Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 28,601 through 28,625 (of 32,462 total)
  • Author
    Search Results
  • #61608
    vafaaaan
    Member

    for rss ? ok..

    the remove_filter “plugin” works :)

    Thank you very much

    #61784

    In reply to: Create a blank page

    livibetter
    Member

    You need to format the return array of bb_top_topics() on your own.

    <?php
    /*
    Page Name: Highest rated
    2007-11-29 14:47:26
    */
    $sidebar_area = "forum";
    // $sidebar_ibox = "topic";
    require_once('./bb-load.php');
    bb_get_header();
    ?>
    <div id="content" class="narrowcolumn">
    <h2>Most highly rated topics</h2>
    <table id="latest">
    <tr>
    <th><?php _e('Topic'); ?> — <?php new_topic(); ?></th>
    <th><?php _e('Posts'); ?></th>
    <th><?php _e('Last Poster'); ?></th>
    <th><?php _e('Freshness'); ?></th>
    </tr>
    <?php if ( $topics = bb_top_topics() ) : foreach ( $topics as $topic ) : ?>
    <tr<?php topic_class(); ?>>
    <td><a href="<?php topic_link(); ?>"><?php topic_title(); ?></a></td>
    <td class="num"><?php topic_posts(); ?></td>
    <td class="num"><?php topic_last_poster(); ?></td>
    <td class="num"><small><?php topic_time(); ?></small></td>
    </tr>
    <?php endforeach; endif; ?>
    </table>
    </div>
    <?php
    bb_get_footer();
    ?>

    #2647

    Topic: Create a blank page

    in forum Themes
    vafaaaan
    Member

    what do i need to do that?

    <?php
    /*
    Page Name: Highest rated
    2007-11-29 14:47:26
    */
    $sidebar_area = "forum";
    // $sidebar_ibox = "topic";
    require_once('./bb-load.php');
    bb_get_header();
    ?>
    <div id="content" class="narrowcolumn">
    <h2>Most highly rated topics</h2>
    <?php
    // Display top rated
    bb_top_topics();
    ?>
    </div>
    <?php
    bb_get_footer();
    ?>

    Cant display topics so something is missing..

    #61770
    livibetter
    Member

    Just a note, if you want to send a http response code, you need to use bb_init action (check init action for WP). If you use bb_head, you will get error since there is something has been sent to client side before your own header. And your own response code won’t be effective.

    I suggest you send header, bb_load_template and then exit in the action hook.

    #61707
    richsad
    Member

    Here’s where I’m at. if I modify the function get_profile_info_keys in /wpmu/bbpress/bb-includes/functions.php and change the definition of get_profile_info_keys to what I want, it’s all good. I changed the text to make it fit and apologize for poor formatting. The downside here is I am changing bbpress code, not my own template. There was no documentation indicating get_profile_info_keys is eligible for being plugged in, but it seems like it is. So I tried hardcoding first to see if this obtained the desired results. It did. The profile info prompts displayed correctly on registration page, the data was written the appropriate usermeta table, and viewing the profile displays the newly named fields and shows correct data. So far so good. Below is the code (sorry for poor formatting). Of course, the fatal flaw here is this NEEDS to be done in a plugin. So now I will tackle this. If anyone has a plugin sample for bbpress that shows modification of profile_info_keys I would be very grateful to take a peek. I believe by tomorrow I will have this hashed out and working properly as a plugin with no changes to core bbpress code. I will share that code here when I get there. In the meantime, feel free to flame, compliment, empower, disempower, or any other useful feedback! I am heading into no man’s land…

    //meta_key => (required?, Label). Don’t use user_{anything} as the name of your meta_key.

    function get_profile_info_keys() {

    return apply_filters(

    ‘get_profile_info_keys’,

    array(

    ‘user_email’ => array(1, __(‘Email’)),

    ‘tip’ => array(0, __(‘A tip you would like to share?’)), ‘favorite’ => array(0, __(‘Favorite products?’)),

    ‘more’ => array(0, __(‘How are you getting more?’)),

    ‘interest’ => array(0, __(‘Hobbies/interests?’))) );

    /* original array follows

    array(

    ‘user_email’ => array(1, __(‘Email’)),

    ‘user_url’ => array(0, __(‘Website’)),

    ‘from’ => array(0, __(‘Location’)),

    ‘occ’ => array(0, __(‘Occupation’)), ‘

    interest’ => array(0, __(‘Interests’))) );

    */

    What I’d love is to see someone has tread in these waters and knows how to use a plugin to implement an overridden get_profile_info_keys. I’m getting old for these all night programming marathons. It was fun the first three decades, but now the arthritis flares up and I have to break to take my Centrum Silver… So all help will result in admiration from me to you! Ships ahoy.

    #61768
    chrishajer
    Participant

    Doesn’t every template/theme header call bb_head();? So then you could write a plugin that calls something like add_action('bb_head', 'blah_maintenance_mode'); right? I think the header supplied should be a 503 header('HTTP/1.0 503 Service Unavailable');

    One of these days I’ll learn how to write a plugin :D

    #61783

    In reply to: Forum WIthin WordPress

    chrishajer
    Participant

    I think you might be better off with a WordPress plugin then, if you really want them always in WordPress.

    https://codex.wordpress.org/Plugins/Forums

    Trent Adams
    Member

    The regular uses still have the option to post in the hidden forum and get the error or on all forums? Not quite sure the exact problem. Could you explain a little more for us people that need to be explained things like we are 5 years old? :) For example, what plugin are you using. What exactly do you see versus the regular users, etc.

    Trent

    #61778
    Trent Adams
    Member

    Good deal ;)

    Trent

    #61774
    Trent Adams
    Member

    From the FAQ:

    Create a file called .htaccess in bbPress’ root directory. Put only the following line in that new file.
    Options +MultiViews

    Just upload a file like htaccess.txt with the line mentioned above and then use the FTP program to name it to .htaccess versus htaccess.txt (notice the dot before name).

    WordPress is just thinking right now that you have a URL that doesn’t have an assigned page or post to it and it is getting screwed up! Try that one out!

    Trent

    #61765
    Null
    Member

    I was thinking of a check in the header, since this is always loaded. If maintenance is true -> load maintenance page, else load forum. Very simple to do (if there is an hook in the header.php) . I’ll try to cook something up :)

    _Null

    #53059
    Null
    Member

    Think those 2 plugins use the same “values” in the forms. …. no, value is the wrong word, they use the same names in the code (ok sounds vague I know :)) or the forms have the same name.

    You could check this in the code and if this is the case rename the doubles in 1 form…

    _Null

    #53058
    citizenkeith
    Participant

    I installed the Restrict Registration for bbPress plugin. Every time I make a change to restrictions in the admin panel, all my Private Forums are reset to “Open to All.”

    Plugin: Restrict registration for bbPress

    Not sure where the problem lies (I assume with the restriction plugin), but thought I’d post it here just in case. :)

    #61757
    eeeblog
    Member

    Hi !!

    You were right again! :-)

    I have the line

    $bb->mod_rewrite = ‘false’;

    I forgot to delete the ‘

    Now everything works PERFECT!!!

    Thank you so much!!

    Best regards fromo Spain!

    Andres

    #61763
    Null
    Member

    Thanks, gonna take a look at it. Perhaps it’s easy to convert :)

    #58221

    In reply to: bbSync

    fel64
    Member

    Nope. Whenever I figure it out.

    Feel free to be pushy. I’m still doing it for myself. :P

    At the same time, I do run my own site on bbsync so I am inclined to get it fixed as soon as I can.

    #61585

    In reply to: How Do I Do This?

    chgogrrl99
    Member

    Yes, remember I was going to try to have a list of the cities so people could just click on say “Miami” and then be taken directly to the “Miami” part of the page? Well, livibetter’s code created a list of all the cities and took them directly to the sub-forum for each city. If I create a link on the main WP Page for the Chicago board using an address like http://theangrywaiter.com/forum/forum.php?id=2

    it also takes them directly to the sub-forum. I didn’t really like that, so I figure I’ll just offer one link from the main WP site to the forums and let the visitor scroll past the other cities until they find their’s.

    It might actually be better because then they can see the other cities and more easily go and read posts in those cities as well as in their own city.

    Oh, and if they go to a sub-forum they can enter a post outside of the child forums. I tried to comment that comment form out, but it took them out of all the forums as well. So, now I think it was all a waist of time, but at least I learned something.

    #61584

    In reply to: How Do I Do This?

    chrishajer
    Participant

    table ids, yes, the code from livibetter would need a tiny modification to create unique ids for each table. :)

    And for the anchoring, do you mean something like a list up top on the page, then each of those link further down the page to a named anchor? Like this?

    http://www.vestacompanies.com/properties/

    (click a for sale or for rent category and it just scrolls down the page a little bit to the proper table)

    #61754
    chrishajer
    Participant

    In your config.php, make sure your “mod_rewrite” line says false:

    $bb->mod_rewrite = false;

    Permalinks are not supported on your host, at least not right now. Change that line to false (maybe you have slugs or true there now?) and it should work fine.

    If things work like that, you can figure out the proper mod_rewrite rules for your .htaccess file.

    BTW – those are not real folders, they’re just URLs created by bbPress that look like folders. They won’t be in the filesystem.

    #61697
    Null
    Member

    I need something like this too. Trying to make a plugin that does this by hiding that forum from members but only when they want to create a new topic in that forum. This way they can reply, but not create a topic (cause they can’t select it when creating a topic cause it is invisible for them).

    Still working on a few issues, but theoraticly it should work :)

    #61583

    In reply to: How Do I Do This?

    chgogrrl99
    Member

    I changed the title to alt=

    As far as the table ids…are you talking about the code I got from Livibetter?

    And about anchoring each forum?

    After all that work (by you guys, not so much me) I took that out and decided to just let people scroll down the page. I just think the page looks better and I kind of like that they can see all the other cities.

    I know, I’m a pain in the ass.

    So, on the front-page.php and the forum.php I see nothing like that anymore, but if I right-click page source when at the actual forums page I see what you mean.

    Edit: I see what you mean too when I run it through a valadator

    #61582

    In reply to: How Do I Do This?

    chrishajer
    Participant

    Only 47 posts? Piece of cake.

    I did notice, in Firefox 2.0.0.10 the logo is not entirely clickable. Certain parts of it are, if you hit it just right, but not the whole thing. Odd. In IE7, it’s all clickable.

    Oh, and I probably told you this incorrectly as well (although not intentionally.) The <a href should have a <strong>title attribute, not an alt attribute. The <img should have an alt. So

    <a href="http://www.theangrywaiter.com/" title="go home"> and

    <img src="http://www.theangrywaiter.com/forum/bb-templates/awbbtheme/images/awforumlogo3.jpg" alt="the angry waiter logo" />

    Sorry about that.

    And, to keep your page valid XHTML, you’re going to have to give each forumlist a different ID by appending the name or number of the forum to it. So it would be

    <table id="forumlist-chicago">

    and <table id="forumlist-atlanta">

    or <table id="forumlist-4">

    and<table id="forumlist-11">

    #61752
    chrishajer
    Participant

    Sounds to me like you edited a file (maybe db-mysqli.php) and have a blank line or a space after the closing ?> in the file. PHP doesn’t like that, so it throws that Warning: Cannot modify header information - headers already sent by error. Check any file you modified (db-mysqli.php?) for a blank line or space after the closing ?>

    #61579

    In reply to: How Do I Do This?

    chrishajer
    Participant

    This needs to be removed. It’s right after the header div in header.php

    <img id="headerlogo"

    That is doing you no good. Actually, my message was a combination of a couple messages. Initially I was going to say give the image an id so you could position it, then I said to just style it with #header img – in any case, you need to remove the above since it’s not valid and is causing weird things.

    And you must be working on it since there is no border.

    #58219

    In reply to: bbSync

    vafaaaan
    Member

    it was a test plugin .. i tried to understand the db relationships, and i did .. now i know now how to update a post tag .. so there is nothing usable? :) ok

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