Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for '\"wordpress\"'

Viewing 25 results - 25,551 through 25,575 (of 26,841 total)
  • Author
    Search Results
  • #58395
    fel64
    Member

    Didn’t see ganzua’s post, posted at the same time. 😮

    When copy and pasting the code you have to remove any bb dependencies. For example, bb uses the $bbdb; wordpress uses the $wpdb, and for queries and the like you can just switch them. Note that $wpdb does not contain information about the names of bb tables, so $wpdb->topics or the like will not work. In other cases the function names are simply different; bb_get_option() or simply get_option() for example. This code is what I used in bbSync to integrate avatars:

    function bbreplyavatar() {
    global $bbposter, $opshuns;
    $avatar = get_usermeta( $bbposter->ID, 'avatar_file' );
    $avatar = explode('|', $avatar );
    $bburl = $opshuns['bburl'];
    echo '<img alt="' . $bbposter->user_login . ' avatar" src="' . $bburl . '/avatars/' . $avatar[0] .'" class="avatar" />';
    }

    Note that $opshuns and $bbposter need definition (or changing). bbSync could be quite useful to you actually.

    What’s the specific problem you want to solve right now, and what have you tried?

    #58394
    Kahil
    Member

    the edit profile link, yes, that was resolved, but I just meant that statement as an example. There are other things from bbpress that I would like to have displayed in my wordpress sidebar.

    Well, since you mentioned that the first option can be tricky, lets start with the latter? the php code?

    Thanks,

    Kahil

    #58393
    fel64
    Member

    Okay, but which do you want to do? I don’t feel qualified to make that decision for you. Can you make a start on either?

    #58392
    ganzua
    Member

    “I would like to insert the “edit profile” link and some other stuff into my wordpress sidebar.”

    -> I think we have solved this question in the other topic ;-)

    #58391
    Kahil
    Member

    I would appreciate any help. Whichever is the easiest and will work the best. I’m fairly new to coding myself, but I learn fast. yourkahil.com is where I’m doing this. I have a lil login form in that first box in the sidebar and once you login, it has a couple links now, like logout. I would like to be able to show the user’s avatar with the “upload avatar” plugin, the private message link(s) from the “private message” plugin.

    Thanks for the help!

    Kahil

    #58359
    ganzua
    Member

    It works!!!!!!

    The working whole code is;

    function wp_registro( $before = '<li>', $after = '</li>' ) {

    if ( ! is_user_logged_in() ) {
    if ( get_option('users_can_register') )
    $link = $before . '<a href="' . get_option('siteurl') . '/wp-login.php?action=register">' . __('Register') . '</a>' . $after;
    else
    $link = '';
    } else { if( current_user_can('activate_plugins') ) {
    $link = $before . '<a href="' . get_option('siteurl') . '/wp-admin/">' . __('Site Admin') . '</a>' . $after;}

    else {global $current_user; $link = $before . '<a href="' . get_option('siteurl') . '/bbpress/profile.php?id=' . $current_user->ID . '">' . __('Profile') . '</a>' . $after;
    }
    }

    echo apply_filters('register', $link);
    }

    Now when any user logs in, wordpress sidebar displays a link to his profile in bb, but when is the admin the one who logs in he get a link to wp control panel. :)

    Thanks a lot fel64!

    #50275
    peter-b
    Member

    Sorry – no, not running this on wordpress.com, it is on my own server, however (unless I have not read the headers properly) the e mails don’t appear to originate from my server. I created two test accounts last night – 10 hours later the e mails still haven’t arrived!

    Thank you for details of the fix. It worked (after fixing another @ strpos problem in the functions.php script) however I see that setting is bozo to zero in the admin pages removes the table row, rather than restting it to zero (i.e. setting to one creates the table row with the value 1, resetting it to zero deletes the row, rather than just resetting the value!) which seems strange behaviour – but hey – it works! No doubt it will be swept up in future versions!

    #50273
    peter-b
    Member

    Thank you – sorry, some other anomolies/bugs! The bozo setting is strange as the default setting in the user profile is (literally) “1” but there is no entry imn the meta table. Manually setting the setting to “1” (including quotes) then generates the row in the meta table with the value “1” (including quotes) with the user set to bozo! Perhaps the default setting in the table should be 0.

    Chosen passwords might be preferable to having to wait 48 hours or more for registration password to arrive. This mechanism seems unreliable, but I’m not sure if it is a local server issue or a WordPress.com issue…

    #58390
    fel64
    Member

    Yeah. That’s because WP doesn’t load bb and all the associated functions. You have two options: you could set up wp to always load bb, or you could recreate the functionality yourself. The first could be tricky and fiddly, the latter means coding the PHP yourself. We can help with either.

    #50271
    peter-b
    Member

    I have a similar problem. WordPress sends notifications from my server quite happily (although it takes about 72 hours after a post/comment to appear until I get the e mail, but with BB-press, this is a significant problem. I’m still waiting after 2 days for an e mailed password. In the end I used the md5sum function to create the hashed password iof my choosing and pasted that directly into the user table.

    Could future releases allow users to choose their own passwords at the time of registration?

    I have got BB working, but a number of bugs. How do I report them?

    How do I permanently delete posts? Can I lock forums?

    If the is_bozo line appears for a user in the user_meta table, even if the value is “1” posts are marked as spam. Updating the user profile with 0 seems to fix this.

    There are several others I have found, usually fixed by editing the tables directly using phpMyadmin!

    Server is running FC6, MySql 14.12 Distrib 5.0.27, php 4.4.7 and apache 2.2.4

    #58389
    Kahil
    Member

    Those two plugins don’t help at all. Basically if you have a lil php code that you have in your bbpress theme to display anything from display names, profile info or the avatar when using upload avatar plugin….when you paste that code on the wordpress side you get an error.

    #58388
    Pravin Paratey
    Participant
    #1957
    Kahil
    Member

    How do I insert info from bbpress into wordpress? I would like to insert the “edit profile” link and some other stuff into my wordpress sidebar.

    Thanks

    #58349
    ganzua
    Member

    “you could just copy all of wp_register() into your theme (everything from function wp_register() { to the final }”

    -> do you mean copying in my theme functions.php file and then calling the fuction in the sidebar?

    “WordPress sets $id to be the user ID. It should be available, so just try it. If it’s not, you will need to put global: $id; in the line of code above it, so it knows you mean the global variable $id and not a new one.”

    -> I didn’t understand this. Do you mean something like this?

    global: $id;

    $link = $before . '<a href="' . get_option('siteurl') . '/bbpress/profile.php$id">' . __('Profile') . '</a>' . $after;

    csl749
    Member

    Hi folks,

    Just trying to iron out the niggles in my forum. I’ve noticed that my forum is very slow compared to the forum here, which seems surprising given my forum’s lack of activity! Could it be related to the permalinks structure or .htaccess? I’ve tried setting the permalinks up in config, with multiview in the .htaccess, and while it works fine in FF (still slow though) it won’t appear in IE (I get a 404). So I’ve disabled permalinks in order for it to work in IE.

    Now, some info. My forum is in a subdirectory from my main WordPress install. I had to enable the php5 handler in the site root .htaccess file for all the new bits and bobs in WP 2.2 to work properly. Here’s what my root .htaccess file looks like:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    # END WordPress

    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^www.ochremusic.com$ [NC]
    RewriteRule ^(.*)$ http://ochremusic.com/$1 [R=301,L]

    AddHandler application/x-httpd-php5 .php

    Would any of that inherited by the forum subdir cause any problems with the bbPress permalink structure, or cause speed issues? Tried optimising the db, but no difference.

    Any help on these issues would be very gratefully received, thanks.

    PS. Also, for some reason I get a 404 trying to validate the forum on W3. Clues as to why? :P (Sorry!)

    #49954

    In reply to: En español

    Covi
    Member

    En serio que me gustaría poder ayudarte más :_(

    Pero al final… decidí cambiar de nuevo y seguir con Vanilla de Lussumo, bbpress está demasiado verde y le faltan funciones que ya uso en Vanilla, es más, ya tengo hacks para muchas cosas y me gusta como me ha quedado.

    La integración con la DB de WordPress, las sesiones, etc… va de perlas con Vanilla, así que nada me impedía ya seguir con Vanilla.

    Tengo más o menos una integración gráfica, de perfiles y de registro y logeo. Me quedó “casi” perfecto para mí ^^

    Me gustaría poder aportando si es posible y sirve cosas aquí, me gusta el proyecto bbpress… pero por ahora.

    Así que si te sirve de algo puedes registrarte y chequear mi sitio con esta integración:

    http://www.laguardiadejaen.com/web/foro/

    Un saludo y suerte.

    PD: Puedes contactarme por aquí si necesitas algo, ok? ;)

    futurefront
    Member

    I have a fresh wordpress install at the root level of one of my sites:

    http://seidon.com

    (working)

    I then created another database, then nested a bbpress install as follows:

    http://seidon.com/photography-forums/

    (working)

    Not working – Users still have to create accounts on both sites, to post on both sites.

    Was I supposed to target the same WP data base in the bbpress Config.php file so users can use one set of username/password to post in both WP and BBPRESS?

    I thought I tuned my config file and even loaded the php intgration plugin (and activated it), but new registrations don’t work in both sites yet. Please help!

    #58348
    fel64
    Member

    Ah, whooami. She’s a pleasant one. What she probably meant is, you could not use wp_register() and do your own new function in your theme that does what you want; that’s probably a better solution than changing core code. It’s easy; you could just copy all of wp_register() into your theme (everything from function wp_register() { to the final }, change its name and then make the changes you want, and use that instead. Probably worthwhile, too.

    There’s a very easy way! WordPress sets $id to be the user ID. It should be available, so just try it. If it’s not, you will need to put global: $id; in the line of code above it, so it knows you mean the global variable $id and not a new one.

    #58347
    ganzua
    Member

    Hey fel64! thanks for the answer;

    “If you’re not comfortable writing a plugin I’d be worried about hacking core files.”

    -> I’m not skilled enough, I’m learning like you, through wordpress, but it is too much for just half month and I’d like to upload the new web by the end of next week.

    Regarding the code, I asked this same question in wp forums and user whooami told me that;

    “youre doing that assbackwards. The smart way to do what you want to do is to use an if/else statement inside your theme.”

    :)

    The original code is like this;

    function wp_register( $before = '<li>', $after = '</li>' ) {

    if ( ! is_user_logged_in() ) {
    if ( get_option('users_can_register') )
    $link = $before . '<a href="' . get_option('siteurl') . '/wp-login.php?action=register">' . __('Register') . '</a>' . $after;
    else
    $link = '';
    } else {
    $link = $before . '<a href="' . get_option('siteurl') . '/wp-admin/">' . __('Site Admin') . '</a>' . $after;
    }

    echo apply_filters('register', $link);
    }

    so bearing in mind the code you provided and guessing that I need to generate both links in the same way;

    function wp_register( $before = '<li>', $after = '</li>' ) {

    if ( ! is_user_logged_in() ) {
    if ( get_option('users_can_register') )
    $link = $before . '<a href="' . get_option('siteurl') . '/wp-login.php?action=register">' . __('Register') . '</a>' . $after;
    else
    $link = '';
    } else { if( current_user_can('administrate') ) {
    $link = $before . '<a href="' . get_option('siteurl') . '/wp-admin/">' . __('Site Admin') . '</a>' . $after;}
    else { $redirect_to = $bb_profile_link;
    }
    }

    echo apply_filters('register', $link);
    }

    or replacing that $redirect_to = $bb_profile_link; for;

    $link = $before . '<a href="' . get_option('siteurl') . '/bbpress/profile.php<!--call id user here --> ">' . __('Profile') . '</a>' . $after;

    What I don’t know is how to add the id user to the link ??? Since it is the same id user than in wordpress the must be a way

    #58346
    fel64
    Member

    I hope you’re keeping wp-login.php up to date! If you’re not comfortable writing a plugin I’d be worried about hacking core files.

    wp user IDs are the same as bb user IDs.

    It is something like that.

    if( current_user_can('administrate') ) {
    $redirect_to = "/wp-admin";
    } else {
    $redirect_to = $bb_profile_link;
    }

    That would be all the code you need (although you have to generate $bb_profile_link. Not hard). Tell me you can’t read and understand that. And this explains all about hooks. We all make a start somewhere. I learnt PHP through WordPress just back in December.

    #58005
    jetson
    Member

    Hi,

    I found a solution for this problem. It’s a known bug from wordpress because of 64bit systems. Here’s the fix:

    Open “bb-includes/gettext.php” and change the following code passage to:

    // $MAGIC1 = (int)0x950412de; //bug in PHP 5
    $MAGIC1 = (int) - 1794895138;
    // $MAGIC2 = (int)0xde120495; //bug
    $MAGIC2 = (int) - 569244523;

    $this->STREAM = $Reader;
    $magic = $this->readint();
    if ($magic == ($MAGIC1 & 0xffffffff)) {
    $this->BYTEORDER = 0;
    } elseif ($magic == $MAGIC2) {
    $this->BYTEORDER = 1;
    } else {
    $this->error = 1; // not MO file
    return false;
    }

    Source: http://forum.wordpress-deutschland.org/sprachdatei/24-wordpress-deutscher-sprache-5.html (German)

    Then it should work!

    Greets,

    jetson

    #1954

    Topic: Code in post plugin

    in forum Plugins

    Is there a plugin that enables you to write code in a post? I know I can use the backtick/code-tag, but the code still looks wrong. I gets a lot of backslash’es. Like in this post:

    http://wordpress.dk/forum/topic/187?replies=10#post-1099

    We use bbPress for the danish WordPress support forum, so we post code examples quite often, why it is important, that they look right.

    #58345
    ganzua
    Member

    Well, I have think in a more elegant solution, but this is for wordpress users that inserted bbpress in their wordpress interface. I have it half working though. First of all, my wp-login and wp-registering forms are integrated in my custom theme because I hacked wb-login.php.

    Whenever you login in wordpress there is a function in the sidebar, that displays two links;

    Site Admin -> link to wp profile.php

    Logout

    This links are defined in /wp-includes/general-template.php -> line 50

    $link = $before . '<a href="' . get_option('siteurl') . '/wp-admin/">' . __('Site Admin') . '</a>' . $after;

    You can change /wp-admin/ for bbpress/profile.php

    The first failure of this theory is that bbpress uses an id to show user profiles; bbpress/profile.php?id=1 and I have no idea how to add this id to the link plus I don’t know if bbpress user id are the same that in wordpress.

    The second failure is that if you are the admin you should get the original link to /wp-admin/

    this should be something like if user = admin then “link to /wp-admin/” else “link to /wp-admin/profile.php?id=n user”

    but since I have no idea of how to code all this I can’t go further

    :)

    #58344
    ganzua
    Member

    “You’re the admin, right? You could just bookmark the page.”

    -> Well, this is an option that I have in mind, but then all users that registered through bbpress will appear with “undefined” role in wordpress. And I can’t insert bbpress <?php login_form(); ?> in wordpress sidebar because it doesn’t work :(

    “Otherwise I suggest you write a plugin that uses the WP wp_login hook and changes the hopefully global $redirect_to depending on whether or not the user is admin. That’s for wp. bb default login behaviour is okay?”

    -> Unfortunately, I have no idea of how to write a plugin or a simple function :( I can badly modify already made code.

    #58342
    ganzua
    Member

    “I’m not sure what you’re trying to do. “

    -> I’ll try to explain better :) My web will be made with wordpress and bbpress. Only registered users can comment wp blog entries and post topics in the bbpress forum.

    Login tables are integrated and bbpress is inside the wordpress interface. When you go to bbpress you can see there the wordpress header, footer and sidebar.

    So, right now users could log in through two gates; wordpress sidebar or through bbpress frontpage.

    Well, I want to get rid of of these two gates and I want to avoid users can access wordpress dashboard and profile because the interface of these two pages is different. However, admin still needs access to wp control panel.

Viewing 25 results - 25,551 through 25,575 (of 26,841 total)
Skip to toolbar