Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 29,301 through 29,325 (of 32,481 total)
  • Author
    Search Results
  • #58845
    suff
    Member

    Well…I’ve resolved my (and maybe also your) problem… the problem was that I’ve used the same db prefix for both bbpress and wordpress… I feel like an idiot :D I just didn’t read the instructions too carefuly :D

    #58844
    suff
    Member

    I have the same problem… :(

    #59893
    Sam Bauers
    Participant

    From what you have it is pretty easy.

    Just create two functions that contain the content you want displayed, they need to be named after the third variable in the sub menu function:

    ... your code ...

    function myplugin()
    {
    echo 'hello admin';
    }

    function myplugin_two()
    {
    echo 'hello again admin';
    }

    Intercepting post data is another matter though. Then you need to add an action to “bb_admin_head” I think.

    Check out my existing LDAP authentication plugin for some decent example code.

    #59899
    _ck_
    Participant

    I guess you’ll see that the way it works around here is you get the idea, you volunteer to make the plugin ;-)

    Start coding. But seriously, without cron jobs or pseudo cron it will be tricky to do this. A plugin would have to check the time of day each time it runs and then keep whatever user is currently visiting on a delay while it emails however many people. This can be problematic. What if the site is fairly idle at that time when it should email and noone is visiting? What if there are 100 emails to send, will the people be kept waiting over a minute or two?

    Personally I’m just using yahoo rss to email alerts. It watchs the rss feed for you for changes.

    But this plugin could be easily changed to have two checkboxes, one to just email a summary at end of day, vs when it happens:

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

    http://www.la-school.com/2006/bbpress-notification/

    #53828

    In reply to: k2 for bbpress

    fel64
    Member

    Find the .post rule and add overflow: auto; to it. That way there will be a scroll bar at the bottom if anything is too long. overflow: hidden; will simply hide it instead.

    Also, if you didn’t know bb does let you search. :) Hit up http://www.nyquistcapital.com/forums/search.php . You can also add a search form to your template but I’m not sure just how.

    #2224
    Null
    Member

    Heya Sam,

    Since you came up with the following function, I think you can help me answer a question about it.

    The function:

    add_action( 'bb_admin_menu_generator', 'myplugin_add_admin_page' );

    function myplugin_add_admin_page() {
    bb_admin_add_menu(__('My plugin'), 'use_keys', 'myplugin');
    bb_admin_add_submenu(__('My plugin sub menu item one'), 'use_keys', 'myplugin', 'myplugin');
    bb_admin_add_submenu(__('My plugin sub menu item two'), 'use_keys', 'myplugin_two', 'myplugin');
    }

    This works, it will add 2 submenu’s to my new menu, but how to show up things like forms under each tab?

    Let’s say I have submenu tab1 and tab2. Under tab1 I want to show form X and use some functions. Under tab2 I want to show form Z and again have some functions their to use the form etc. But how do I declare where it will show what? How do I get stuff under tab1 and how under tab2?

    Do you understand what I mean? Can you give me an excample too?

    Many thanks

    ps. anyone can answer ofcourse :)

    #59818
    MaryJane
    Member

    Yea after i tried posting it in there a few times i figured that out. Will do boss! ^_^

    #59817
    fel64
    Member

    If you’d be so kind as to take all that code out of your post and put it in http://pastebin.ca/ then link to it, that’d be nice. Also, bb doesn’t by default use bbCode. Code is delimited by ` backticks.

    #59892

    In reply to: Always login

    fel64
    Member

    I think bb_cookie is in pluggable.php, so yes. Just look for wordpress documentation on overwriting functions like this (achieveable through plugins).

    Also easy. :)

    add_action('bb_init', 'chuck_out_lusers');
    function chuck_out_lusers() {
    if( !bb_get_current_user() && bb_get_location != 'login-page' ) {
    header('Location: http://blah.example.com/bb-login.php');
    exit;
    }
    }

    #59816
    MaryJane
    Member

    This is what i have for my wp login. I want my users to login/register from the wp side. So i have this snippet of code i gathered from various forum posts as well as some of it was in my current theme.

    It says Welcome guest when you arent logged in or registered and it gives the link to register. If your signed in or sign in it says Welcome username and shows the forum avatar you have set. Based on your user level it shows you different links for each thing you can do. Like make a post in WP or your profile and favorites in the forum.

    I have a redirect page setup that when you login from this form it just directs you back to the index page instead of going automatically to the dashboard as this confuses most people and the links are on there if your signed in to show you what you can do.

    ** I didnt write this i just gathered it up from various sources on the internet in different forum posts and edited it to suit my needs. Part of it was already wrote into the theme i bought for my wp. **

    pastebin url to it: http://pastebin.ca/651318

    The redirect part is a file i named redirect.php and placed in my wp main directory with a redirect link to the main page. You can see that bit here :

    http://pastebin.ca/651326

    If you have your bbpress intergrated well with wp you should be able to use the same form on your forum. That is what i use.

    #57317

    In reply to: Plugin: bb-Topic-Views

    _ck_
    Participant

    Ah I know what it is after studying the code a bit.

    They never planned on $topic_id being null or not set, so it’s being inserted into the query as blank.

    mysql is getting something like

    SELECT meta_value FROM $bbdb->topicmeta WHERE topic_id = AND meta_key='views'

    see the blank before AND? It’s unacceptable to mysql, needs to be a value.

    hack

    function get_view_count ( $topic_id )

    and

    function initialize_view_count( $topic_id )

    and make a new first line for each that says

    if (!$topic_id) return;

    Should be a dirty workaround until the author can take a look.

    #59889

    In reply to: bbPress database error

    _ck_
    Participant

    Ah I know what it is after studying the code a bit.

    They never planned on $topic_id being null or not set, so it’s being inserted into the query as blank.

    mysql is getting something like

    SELECT meta_value FROM $bbdb->topicmeta WHERE topic_id = AND meta_key='views'

    see the blank before AND? It’s unacceptable to mysql, needs to be a value.

    hack

    function get_view_count ( $topic_id )

    and

    function initialize_view_count( $topic_id )

    and make a new first line for each that says

    if (!$topic_id) return;

    Should be a dirty workaround until the author can take a look.

    #59891

    In reply to: Always login

    Null
    Member

    Can this be used as a plugin? The real questions should be: Can you overide normal bbpress functions with a plugin? And if so, how would this plugin look like?

    And can a function like this be added:

    If user logged-in = false -> redirect to login.php (or register.php)

    #59815
    Detective
    Member

    Hi!

    I don’t use BBPress in that site, i’m installing it on another site, and there the code i posted works :)

    #59814
    avatarx
    Member

    Hey Detective, thanks for the code snipet. I checked out your site and I see it on your sidebar in the forums but not on your main WP sidebar? BTW, nice looking site. :)

    #2219
    _ck_
    Participant

    Could they please consider using the favorites notification plugin?

    People are posting bug reports on my plugins and I am completely missing them because I don’t know to check.

    Maybe they can simply code the “extend” area to email the plugin author if there is a post on any of their plugin pages?

    #2218

    Topic: Askimet as a plugin?

    in forum Plugins
    Null
    Member

    Would’t it be much easier to make Askimet a plugin? With an admin page where you can enter you askimet nr and perhaps see how many posts where blocked by it.

    This would make using Askimet much easier…

    Is this possible and who can make this? :)

    _Null

    #59861

    In reply to: bbMenu 1.2 released!

    Null
    Member

    No problem mate, it only seems fair to me to credit the right persons.

    Also, don’t put too much energy into the double-click bug. I am currently working on version 2 and it’s using jQuery instead of all the scripts it’s using now (like prototype). So the current double-click feature will be replaced by jQuery :)

    #2217
    _ck_
    Participant

    Is there a way via config.php or similar to override the local path? I thought it was BBPATH but I tried forcing that to something different and it’s not working, it’s still looking at the old path for the templates?

    UPDATE: ah, I see the problem now. Even if you are using the default template, if you have changed your template and then changed it back to default, bbpress rememebers it as a custom template selection, not the default

    so in template-functions.php ~line 17

    if ( file_exists( bb_get_active_theme_folder() . $file) ) {

    it thinks there is a custom theme and tries to load it’s known path stored in the db, rather than looking at BBPATH

    For now I just deleted “bb_active_theme” from the topic meta table and it reverted to the default path off BBPATH, yay!

    A minor bug I can put into trac.

    #59813
    Detective
    Member

    This is what i do in my sidebar (in WP and BB):

    <form action="<?php bloginfo('url') ?>/wp-login.php" method="post">
    <label for="log">Usuario<br /><input type="text" name="log" id="log" value="" size="22" /></label>
    <label for="pwd">Password<br /><input type="password" name="pwd" id="pwd" size="22" /></label>
    <input type="submit" name="submit" value="Ingresar" class="button" />
    <label for="rememberme"><small><input name="rememberme" id="rememberme" type="checkbox" checked="checked" value="forever" /> Recordarme</small></label><br />
    <input type="hidden" name="redirect_to" value="<?php echo $_SERVER['REQUEST_URI']; ?>"/>
    </form>

    #59812
    avatarx
    Member

    I just downloaded Firefox w/Firebug and looking at the message it appears to be related to another plug-in I am using. Otherwise I think it works fine, but it’s looking like more customization than I want to do right now for those behaviors I was talking about. I think I’ll just stick with what I have, but thanks to both for your help! I’ll provide a link to my site once it’s live, right now it’s kind of a mess. ;)

    #59859

    In reply to: bbMenu 1.2 released!

    M
    Member

    Lookin’ good :)

    One thing. In Omniweb double-clicking doesn’t work. In Safari/Camino it does, and in Firefox triple-clicking works, but you covered that one in the readme. I’ll look into it though… it might be an error on my part.

    #59826
    Inquirer
    Member

    Hi ck:

    [Remember that the date will be relative to worldwide visitors unless you list the timezone (which will be meaningless to people far outside the timezone).]

    The time isn’t of concern. I would like it to initialize to my time zone of U.S Central.

    Actually, I prefer to display the date format you have implemented in the the mouseover without implementing a mouseover rather than the current number of days format.

    What would be the code and which file is it located?

    Thank you for your response to my inquiry.

    #2215

    Topic: bbMenu 1.2 released!

    in forum Plugins
    Null
    Member

    Hi,

    Just released the last version of bbMenu. bbMenu 1.2 has some several bug fixes and minor code improvements:

    – bbMenu now uses the bb_admin_add_submenu hook

    – Fixed a bug that caused bbMenu to crash on some servers (thanks box87)

    – Some code cleanup and optimalisations (thanks box87)

    – Some template changes. If bbMenu is deactivated, the header now adapts and wont crash

    Note that bbMenu 1.2 is not compatible with bbPortal 1.2 and bbPress pre 0.8

    This is also the last version I release using the prototype libary. The next version will be jQuery based and smaller in size.

    You can download bbMenu 1.2 here:

    http://www.bbportal.org/bb-downloads/bbmenu1.2.zip

    #59855
    so1o
    Participant

    vlp..

    you said you want to show the favorites in the wordpress profile.

    http://www.tasty.sk/forum/profile/username/favorites

    this is the link to the bbpress profile page.

    i am confused now :) can you try to explain again what are you trying to do?

Viewing 25 results - 29,301 through 29,325 (of 32,481 total)
Skip to toolbar