Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 23,776 through 23,800 (of 32,468 total)
  • Author
    Search Results
  • vlp
    Member

    Tomwi: can you post your code for showing mentioned template

    *post title*

    Posted by: *user* in *forum*.

    or send it to me – procka@tasty.sk

    greets

    Vlado

    #78516
    dogdayfear
    Member

    I moved the javascript code from index.php to file header.php (between <head> and </head> tags) of the template Im using and everything works now.

    #78508
    Olaf Lederer
    Participant

    @Nightgunner5,

    so you can use a wildcard here?

    glob( BB_PATH . 'avatars/' . $current_user->user_login . '.*' )

    after 6 years of php programming I found this function, thanks :)

    #78031
    Olaf Lederer
    Participant

    Great than it’s time to change that :)

    #31590
    gerikg
    Member

    WPMU 2.8.4a

    BP 1.0.3

    BB 1.0.2

    “Manage your favorites” only shows up for the admin.

    <?php if (bb_current_user_can( 'edit_favorites_of', $user->ID )) : ?><?php printf(__('<a href="%1$s">Manage your favorites</a>'), esc_attr( get_favorites_link() )); ?><?php endif; ?>

    Any one had this problem?

    #76608
    gerikg
    Member

    try add the same codes to bb-config without the Hash

    #31610
    dogdayfear
    Member

    I have included this piece of code at the top of my index.php file:

    <script language=”javascript”>

    if(top==self)

    this.location=’http://www.somedomein.es/somefolder/page&#8217;;

    </script>

    It checks if bbpress is loaded into an iframe and if not, it redirects to http://www.somedomein.es/somefolder/page and this page load bbpress correctly into an iframe.

    It works perfectly but it breaks the style making the some fonts bigger that they should.

    If I remove the javascript code everything works normally again.

    Any suggestions ?

    Thanks in advance.

    #78473

    In reply to: Hiding Sub-Forums

    Jimmy B.
    Participant

    Hey hentdan! Thanks for your code snippet, that seemed to do the trick. I tweaked a couple things, namely <?php if (bb_forum_depth() <= 1 ) : ?>.

    Thank you very much!

    Here’s the complete code that’s working for me:

    <?php function bb_forum_depth( ) {
    global $bb_forums_loop;
    if ( !is_object($bb_forums_loop) || !is_a($bb_forums_loop, 'BB_Loop') )
    return false;

    return $bb_forums_loop->walker->depth;
    } ?>

    <?php while ( bb_forum() ) : ?>
    <?php if (bb_get_forum_is_category()) : ?>
    <tr<?php bb_forum_class('bb-category'); ?>>
    <td colspan="3"><?php bb_forum_pad( '<div class="nest">' ); ?><a href="<?php forum_link(); ?>"><?php forum_name(); ?></a><?php forum_description( array( 'before' => '<small> – ', 'after' => '</small>' ) ); ?><?php bb_forum_pad( '</div>' ); ?></td>
    </tr>
    <?php continue; endif; ?>
    <?php if (bb_forum_depth() <= 1 ) : ?> <!-- ******* -->
    <tr<?php bb_forum_class(); ?>>
    <td><?php bb_forum_pad( '<div class="nest">' ); ?><a href="<?php forum_link(); ?>"><?php forum_name(); ?></a><?php forum_description( array( 'before' => '<small> – ', 'after' => '</small>' ) ); ?><?php bb_forum_pad( '</div>' ); ?></td>
    <td class="num"><?php forum_topics(); ?></td>
    <td class="num"><?php forum_posts(); ?></td>
    </tr>
    <?php endif; ?><!-- ******* -->
    <?php endwhile; ?>

    #78030
    hpguru
    Member

    Thank you for fast help. This works good now. :)

    #78507
    kickerman360
    Member

    NightGunner5: I’ll test that when I get a chance, thanks!

    FinalWebsites: The plugin calls the image a certain name. If the user is “admin” the admin’s avatar will be “avatar.jpg” but could also be “avatar.gif” etc. This code hopefully will reduce the code.

    Thanks again!

    #78506
    Ben L.
    Member

    <?php echo('<img src="/forums/avatars/' . basename( current( glob( BB_PATH . 'avatars/' . $current_user->user_login . '.*' ) ) ) . '" />'); ?> (Untested, but it should work.)

    #78029
    Olaf Lederer
    Participant

    Hi,

    locate in the plugin file the function

    function create_seo_meta_txt($content) {
    $raw = str_replace(PHP_EOL, ' ', strip_tags($content));
    $raw = str_replace(' ', ' ', $raw);
    $snippet = substring_words($raw, 120, '');
    return htmlentities($snippet, ENT_QUOTES);
    }

    and replace “htmlentities” with “wp_specialchars”.

    Let me know if this works for you. This plugin is a little quick and dirty for these functions :)

    The seo plugin for wordpress has for internationalization huge blocks of code :)

    #78505
    Olaf Lederer
    Participant

    You don’t need to use all the php tags and how do you test if the image exists?

    #31608
    kickerman360
    Member

    Hi,

    I not that good at php so I was wondering if some wouldn’t mind shortening this bit of code:

    <?php  echo('<img src="/forums/avatars/' . $current_user->user_login . '.jpg" />'); ?>
    <?php echo('<img src="/forums/avatars/' . $current_user->user_login . '.png" />'); ?>
    <?php echo('<img src="/forums/avatars/' . $current_user->user_login . '.gif" />'); ?>
    <?php echo('<img src="/forums/avatars/' . $current_user->user_login . '.jpeg" />'); ?>

    Basically it is supposed to go through every file extension allowed by the avatar plugin and display the image with the actual extension, there can be only one.

    It is used to display Avatars in WordPress by the way without loading bbPress.

    Any help would be great!

    #78028
    hpguru
    Member

    Utf-8

    My forum is bbPress 1.0.2 and url is http://keskustelu.hpguru.net/

    Thank you. :)

    PS: There is http://keskustelu.hpguru.net/topic/kayta-googlea ä and ö. And in many others topics.

    #78472

    In reply to: Hiding Sub-Forums

    hentdan
    Member

    This works for me…

    function bb_forum_depth( ) {

    global $bb_forums_loop;

    if ( !is_object($bb_forums_loop) || !is_a($bb_forums_loop, 'BB_Loop') )

    return false;

    return $bb_forums_loop->walker->depth;

    }

    <?php while ( bb_forum() ) : ?>

    <?php if (bb_get_forum_is_category()) : ?>

    <tr<?php bb_forum_class('bb-category'); ?>>

    <td colspan="3"><?php bb_forum_pad( '<div class="nest">' ); ?>"><?php forum_name(); ?><?php forum_description( array( 'before' => '<small> – ', 'after' => '</small>' ) ); ?><?php bb_forum_pad( '</div>' ); ?></td>

    </tr>

    <?php continue; endif; ?>

    <?php if (bb_forum_depth() <= 2 ) : ?> <!-- ******* -->

    <tr<?php bb_forum_class(); ?>>

    <td><?php bb_forum_pad( '<div class="nest">' ); ?>"><?php forum_name(); ?><?php forum_description( array( 'before' => '<small> – ', 'after' => '</small>' ) ); ?><?php bb_forum_pad( '</div>' ); ?></td>

    <td class="num"><?php forum_topics(); ?></td>

    <td class="num"><?php forum_posts(); ?></td>

    </tr>

    <?php endif; ?><!-- ******* -->

    <?php endwhile; ?>

    #75069
    Duke
    Member

    I only know how to do it in the forum view, for the latest post author (in every topic)… but I dont know how to make it work for single posts inside the topics…

    Latest poster in a topic, points to profile:

    <a href="<?php user_profile_link($topic->topic_last_poster) ?>"><?php topic_last_poster(); ?></a>

    Come on, there must be a way to link each post author name (inside a topic) to their profile….

    #78025
    Olaf Lederer
    Participant

    The new version is fine, it’s just the old version :) if you update you’re fine

    #78482
    thekmen
    Member

    Thanks for the help, I managed to fix the issue by using

    define('BB_HASH', md5('my key here'));

    in bb-config.php

    #63073
    _ck_
    Participant

    Try this simpler version:

    function bb_target_blank( $text ) {
    $text = preg_replace('|<a (.+?)>|i', '<a $1 target="_blank">', $text);
    return $text;
    }
    add_filter('pre_post', 'bb_target_blank');

    EDIT 22 December 2009. bbPress is stripping the $1 out of the code above. It goes between the ‘a’ and the ‘target’ where you can see two spaces. See here:

    http://pastie.org/753419

    #78283
    yangers101
    Member

    I tried that but it still does not work =(. I have these versions: WPMU 2.8.4a, Buddypress 1.0.3, bbpress 1.0.2. Any more ideas please?

    #78481
    gerikg
    Member
    #78480
    thekmen
    Member

    I wish I didn’t, but I do…bbPress is setting a cookiehash & I need to change it, I thought this would be possible by using

    define('BB_COOKIEHASH', md5('my key here'));

    or

    define('COOKIEHASH', md5('my key here'));

    in my bb-config.php, but whatever I use as ‘my key here’ makes no difference to the cookies created by bbPress, any other ideas?

    #31601
    thekmen
    Member

    Hi all,

    I am trying to integrate BBPress with a few WordPress installs that all share the same user table database.

    All is working fine except for adding:

    define('COOKIEHASH', md5('my key here'));

    in the bb-config.php file, no matter what I add here, the cookiehash is never changed using BBPress 1.0.2, is this a bug have I missed something?

    #68593
    Fernando Tellado
    Participant

    I’m translating and modifying the theme, you can see it in my forum: http://ayudawordpress.com/foro/

    I’ve made some changes to adecuate it to bbPress 1.x (core code adaptations to new functions). I’ve changed some css too, reordered the front page, added the description to the style.css and a screenshot and a lot more. When it is finished I’ll publish it.

Viewing 25 results - 23,776 through 23,800 (of 32,468 total)
Skip to toolbar