Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 27,501 through 27,525 (of 32,453 total)
  • Author
    Search Results
  • #65350
    Detective
    Member

    For 3, from the Genealogías theme:

    function gs_topic_forum_link() {
    global $topic;
    if ($topic) {
    echo '<a href="' . get_forum_link($topic->forum_id) . '">' . get_forum_name($topic->forum_id) . '</a>';

    }
    }

    For the private forums, i do the following (considering only one private forum, having id 22):

    add_filter('get_posts_where', 'ryuuko_staff_where_posts');

    function ryuuko_staff_where_posts($where) {
    if (!bb_is_user_logged_in() || !bb_current_user_can('moderate')) {
    $where .= " AND p.forum_id <> '22' ";
    }
    return $where;
    }

    add_filter('get_topics_where', 'ryuuko_staff_where_topics');
    function ryuuko_staff_where_topics($where) {
    if (!bb_is_user_logged_in() || !bb_current_user_can('moderate')) {
    $where .= " AND t.forum_id <> '22' ";
    }
    return $where;
    }

    add_filter('get_forums', 'ryuuko_staff_forums');
    function ryuuko_staff_forums($forums) {
    if (!bb_is_user_logged_in() || !bb_current_user_can('moderate')) {
    $forum_key = -1;
    foreach ($forums as $key => $forum)
    if (intval($forum->forum_id) == 22) {
    $forum_key = $key;
    break;
    }
    unset($forums[$key]);
    }
    return $forums;
    }

    add_action('bb_forum.php_pre_db', 'ryuuko_forum_redirect');
    function ryuuko_forum_redirect($forum_id) {
    if (!bb_is_user_logged_in() || !bb_current_user_can('moderate')) {
    if ($forum_id == 22)
    bb_die("You can't see this!");
    }
    }

    #3472
    davidbaldwin
    Member

    I used this code from the documentation:

    Code:
    require_once(‘path/to/wp-blog-header.php’);

    to intigrate bbpress with wordpress, so I could use my current wordpress themes.

    the only problem I have now, is that when I try to access /bbpress/bb-admin I am automatically forwarded to /bbpress and I have no access of the admin screen.

    any ideas?

    thanks!

    david

    #60805

    In reply to: Simple registration

    cordoval
    Member

    I have found the trac website with the ticket for your records:

    https://trac.bbpress.org/ticket/779

    Now I am thinking that we can achieve this easily:

    0. create custom field for password (at first do not validate with an extra field)

    1. get the registration function to create the account with the given username

    2. get the password be follow through the function and pass it to a second call

    3. the second call will really call the change-password function and will get the passed user defined password to the change-password.

    4. the end.

    Sounds simple but let’s see where our code is.

    #65050
    Detective
    Member

    I’m using a functions.php file. It’s being loaded it in the header:

    <?php require_once(bb_get_template('functions.php')); ?>

    #3469
    Detective
    Member

    URL: http://alumnos.dcc.uchile.cl/~egraells/proyectos/plugins-para-bbpress/

    Test Installation: http://www.ryuuko.cl/bbpress

    Includes readme.txt with examples. It supports english and spanish (es_ES).

    Hope you like it :)

    Suggestions, bug reports, comments and feedback in general are welcomed :)

    #65204
    Detective
    Member

    I made a few changes in the layout. I’ll release the theme tomorrow :)

    Remember it needs some knowledge, because without customization (through plugins) it’s kind of ugly …

    #65328
    bobbyh
    Member

    We don’t know what your theme is, so we don’t have enough info to answer this question. Please post a link to your site, and we’ll be able to help you out. :-)

    #65234

    In reply to: A bit of advice needed

    alexleonard
    Member

    Ah brilliant,

    Thanks so much for the clarification. I was getting the feeling that quite a few things had changed all right. The main development site has had quite a lot of work done so far, but on bbpress all I had really done was set it to use the header and footer from the WP theme.

    It’ll be easy to dump it and start again.

    Actually on that point. In installing the old version I stored the bb_press database tables in this site’s WordPress database, eg:

    | bb_forums              |
    | bb_posts |
    | bb_tagged |
    | bb_tags |
    | bb_topicmeta |
    | bb_topics |
    | wp_comments |
    | wp_ig_caticons |
    | wp_links |
    | wp_options |
    | wp_postmeta |
    | wp_posts |
    | wp_term_relationships |
    | wp_term_taxonomy |
    | wp_terms |
    | wp_usermeta |
    | wp_users |

    Should I delete each of the tables prefixed “bb_” before continuing?

    Cheers,

    Alex

    #65324
    rogermbyrne
    Member

    hi chrishajer

    after your suggestion i tried to think of a diff way so i installed phpbb via fantastico on a different domain iimported the odl database and then looked through phpmyadmin to see if i could find the posts, success! exported as .csv file and now i have all the data and email addresses ;)

    thanks for your help!

    #3466
    rogermbyrne
    Member

    Hi Guys and Gals

    I have a very small phpbb database but not up and running as many problems i have installed bbpress everything is working fine! (except I forgot about moderation and akismet and within 27 mins of going online it had four spam comments ;) )

    Is there a way I can just see the posts from that phpbb database and then i will copy and paste into my new bbpress installation?

    or is their an easier way? I have xampp runnin locally but tried to move the phpbb files and import the db using phpmyadmin but i get errors.

    Like i said its a v small database and I just need the post text!

    Thanks in advance

    Roger

    #60804

    In reply to: Simple registration

    cordoval
    Member

    This sounds a past issue, yet I would like to add fuel to this thread. Please make me aware if there is already a plug in for this feature. I saw a note of _ck_ requesting this enhancement but I doubt it has gone through over these months yet.

    To txrediakov: I want to enable the user to choose their password, not because of email anymore but because I believe we cannot just deny our users this capability. It is expected in any reasonable website that the user can type her own password.

    To chrishajer: Good information. Now thinking logically: If one can display the password in a window returned after registration I think it could be possible to perform one additional step in the php code to take a password fetched from a custom field in the registration page, then take the bbpress generated password and replace it with the new value.

    However, there is a slight problem. The user can only change her password after she is logged in. Granting the new user access to the account to post right away after registration may pose some kind of security thread to the system and to the accounts of all users. So how could we go about doing this without compromising the security of the system?

    Please you are welcome to contact me as I need to work and solve this issue.

    Encouragements,

    #65304

    In reply to: Lost Key Master

    timskii
    Member

    As the code stands at the moment, it is a little too easy to lock yourself out. There may be a cleaner solution, but the following worked for me:

    Try to login to BBPress with the WP admin. If that fails to give admin access to BBPress, the user mappings were either not set, were set at the wrong stage during integration, or were set such that nothing mapped to the Keymaster.

    Backup the database (just in case a bad situation accidentally becomes terminal while you’re trying to fix it).

    Using SQL access to the database (eg PhpMyAdmin), open up bb_topicmeta and delete the last few lines with meta_key starting wp_. That should reset everything, allowing you to get back into BBPress on the old Keymaster account and start again.

    I found the order in which the integration settings were applied was critical. Your mileage may vary, but for me that was:

    1. Edit User role map (ensure Admin is linked to Keymaster), and save.
    2. Add “wp_” under User database table prefix and save.
    3. Hit the User role map button again.
    4. Finally complete the cookie setting and save.

    #3465
    creativeherb
    Member

    Well I didn’t break it, I think… =) I’m currently using the latest version Support-Forums plugin (3.0.4), and the latest BBpress (0.9.0.2)

    On the front page, most topics displays fine, with the status bubble ahead of the topic title, but for certain topics I get this error… this error code replaces where the color bubble would have been.

    Warning: sprintf() [function.sprintf]: Too few arguments in /home/blog/public_html/forums/my-plugins/pb–support-forum/support-forum.php on line 657

    help would be much appreciated, thanks!

    #51736
    mciarlo
    Member

    Got it : you have to add a snippet of code to replace the topic tag function within the stickies area on the front page.

    #63462
    timskii
    Member

    All the integration code assumes you start with a blog and want to add a forum. However, if you start with a forum, chances are the forum’s user database will be far larger than the blog. The technique below outlines how I did it. This is entirely at your own risk. I’ve not gone over the standard things, like shared secret keys: I’m assuming you’ve read the basic integration guides.

    0. You’ll need to be familiar with .htaccess, SQL at raw database level, and template hacks. If your level of expertise is “pressing buttons”, stop reading here. This is very easy to mess up, so make plenty of backups. Ideally test the whole conversion first, and probably prepare scripts to run if a lot of database changes are needed.

    1. Block public access to the blog and forum for all except your IP using .htaccess.

    2. In the database, rename wp_users and wp_usermeta. These won’t be used, but you will need them later to cross-reference old posts to new authors. I’m assuming a standard install that uses wp_ and bb_ as prefixes.

    3. Copy bb_users and bb_usermeta to wp_users and wp_usermeta respectively. Keep the original tables for now.

    4. Add the missing column via SQL: ALTER TABLE wp_users ADD user_activation_key varchar(60) NOT NULL default '';

    5. Delete the WordPress install, but keep the old database tables (and plugins and themes). Install WordPress in its former position. Use an entirely new user name as your new WordPress admin. (The purpose of deleting and then installing WordPress is to create a genuinely new admin user in the table. For me, this was faster than manually adding an admin user and making sure all the correct permissions were set. You mileage may vary.)

    6. How much extra work you need to do to your old WordPress tables depends on the number of authors that were active on WordPress: Using SQL, you’ll need to change all the old author IDs in wp_posts and wp_comments to match that author’s ID from the forum. It is possible there are other user references deep in the system, so be careful. I had little complexity to deal with. If your were the first to register for both your forum and blog, the important IDs may match perfectly already.

    7. Most WordPress templates use the user’s display_name. This is unfortunately, because BBPress tends to use user_login. The result is that most WordPress references to user names will appear blank. You’ll either need to populate the display_name column, or hack around with your WordPress templates so that they use user_login. Template call get_the_author_login() is perfect for authors, but for comment references I had to use get_usermeta($user_id,’user_login’) or comment_author_link() where $user_id was 0. Messy. Since the admin side of WordPress uses display_name anyway, it is probably a lot easier to populate that column.

    8. Your WordPress install should be now more-or-less working. Let’s return to the forum!

    9. It is very easy to accidentally destroy the forum Keymaster, locking yourself out of the forum before integration is complete. If this happens, edit the table bb_topicmeta by deleting the final few lines with meta_key starting “wp_”.

    10. On the forum admin, under WordPress Integration: Set the User role map such that Admin links to Keymaster and everyone else is a subscriber, and save. Add “wp_” under User database table prefix and save. Hit the User role map button again. Finally complete the cookie setting and save. The order is important – simply filling in all the boxes and saving can wipe out the old Keymaster access before the new one has been set up.

    11. In WordPress, check the user list. I found that some user types did not convert automatically – notably moderators. Hopefully 99% of users will have been automatically assigned as subscribers. If you use a lot of plugins, take care that nothing conflicts. For example two separate plugins trying to write user meta data using the same key name. You may also wish to test a dummy registration and profile change.

    12. Remove the old bb_users and bb_usermeta, and the copies of your original wp_users and wp_usermeta.

    13. Remove the .htaccess blocks, and celebrate your newly integrated setup.

    I’m now having fun trying to marry a second forum to the first WordPress-Forum pair. Everything is easy, until one tries to alter the admin permissions…

    #3451
    guymed
    Member

    Hey guys! I am currently working on a plug-in that will let you use smilies, just like wordpress. Also activated the same way. I am looking through my WordPress.org files, and I found them, the smilies’ images, but not the code. I am new at this so I am gonna need some programming help. Hope it works soon!

    http://guymed.org/

    #64974
    kostya
    Member

    Must’ve missed your post :)

    Tried that and it worked, all I was missing was the salt line.

    david-stoner
    Member

    Hello, I’m trying to get this fully realized. At the moment I’ve just been hacking away at the Kakumei front-page.php but with limited results.

    So far it just pulls up the latest topics with no regard to what forum they are in. I’ve found template functions for the topic title, topic link, number of posts, last poster, and time, but other than defining the id manually I haven’t figured out how to get the last post of a topic to display automatically.

    I think I could manage to pull this information out of the database with some basic SQL queries, but I’d rather use what’s available than write some shoddy code of my own.

    Any help is appreciated.

    #65094

    In reply to: Kineda.com

    djMotLive
    Member

    Well, I for one think kineda.com is a totally awesome work of art!

    If the lookbook is actually bbPress then I’m just plain speechless. I can’t even begin to imagine what “lots of hardwork and many late nights” actually means. Something extreme, I’m sure.

    I think you have something to be totally proud of here. And having said that, it sounds absolutely understated.

    I am just embarking on a journey to rebuild Girls Rock Radio – http://www.girlsrockradio.com into a WordPress/bbPress site. Currently it is neither – it is hand coded html/php and a SimpleMachines Forum.

    On this journey, I only wish I could pick your brain along the way. If I can create something only half as beautiful as kineda.com, I’ll be very happy!

    #65210
    Billy Wilcosky
    Participant

    Yeah, you’re right, it is a feature I guess… but hey I didn’t call it a bug at least :)

    #65244
    Trent Adams
    Member

    I haven’t tried “-1” as the definition, but I was thinking the same thing :)

    Trent

    #65243
    chrishajer
    Participant

    The keymaster can always go in and edit any post. Your users could email any corrections to the keymaster. You don’t really want people going in and changing their words. With no limit, you have no control over the edits they can actually make and they would not be limited to grammar or spelling.

    Did you try making any changes to the $bb->edit_lock in the config and see the effect? 1440 is one day worth of minutes and 525600 is a year worth of minutes. I doubt there is any problem making a change like that, but you would need to try it to be sure. I just tried 525600 and I was able to edit some of my old (non-keymaster) posts.

    I wonder if -1 would allow them to be edited infinitely? Worth a try…

    #65209
    Trent Adams
    Member

    I don’t think a plugin to do that has been written and begging on the forums might not get it written anyways as the “space” that deleted posts take in the database is extremely low and is unlikely to ever become a problem. As well, it is not a bug, but a feature :)

    Trent

    #64599
    Billy Wilcosky
    Participant

    Ok, again, sorry for all the posts, but a moderate can delete them if they would like… I just want to say that for the code challenged, a new “upgrade instructions” should be made.

    First, there can’t be any config.php files ANYWHERE on your site.

    Second, if you want to keep your old posts and forums, make sure you click on the advanced settings box when going through the installation. It is very important that your database have the same prefix as before… you need something like phpmyadmin to check this.

    Other than that, follow the instructions.

    #65208
    Billy Wilcosky
    Participant

    Yes, could someone PLEASE, I’m begging :), someone please make a plug in that will allow you to TOTALLY 100% delete a post…

Viewing 25 results - 27,501 through 27,525 (of 32,453 total)
Skip to toolbar