Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 21,676 through 21,700 (of 32,481 total)
  • Author
    Search Results
  • #33938
    psycheangels
    Member

    based on http://bbpress.org/plugins/topic/improved-spoiler/

    instead only using css my mod using javascript based on spoiler plugin vbulletin

    here is the php mod http://pastebin.com/ReTD7eJE

    and this is the final look

    http://i40.tinypic.com/2h5qlg8.png

    you need to add this in your css template file

    .spoilerbg {width:auto;height:auto;background:#e1e4f2;border:1px inset;padding:5px;}

    the problem now, the Improved Spoiler Plugin doesnt build for nested spoiler like

    the first spoiler will be broken, diffrent from vbulletin spoiler plugin

    #86525
    gerikg
    Member

    Yes, thank you! I edited to fit my needs.

    with this code

    <?php if ( bb_forums() ) : 	while ( $depth = bb_forum() ) : if( $depth > $last_depth ) : ?>
    <?php echo str_repeat(" ",$depth) ?>
    <?php else : ?></li>
    <?php while( $depth < $last_depth ) : echo str_repeat(" ",$depth+1) ?>
    <?php echo str_repeat(" ",$depth) ?></li>
    <?php $last_depth--; endwhile; endif; if (bb_get_forum_is_category()) :
    echo str_repeat(" ",$depth) ?><li class="forum_cat"><a href="<?php forum_link() ?>" title="<?php forum_description(array('before'=>'','after'=>'')) ?>"><?php forum_name() ?></a>
    <?php else :
    echo str_repeat(" ",$depth+1) ?><li class="forum_subforum"><a href="<?php forum_link() ?>" title="<?php forum_description(array('before'=>'','after'=>'')) ?>"><?php forum_name() ?></a>
    <?php endif; $last_depth = $depth; endwhile ?>
    </li>
    </ul>

    # 2. how do I make the current forum have a class=”selected”

    #86524
    psycheangels
    Member
    #86484
    psycheangels
    Member

    in bbcode-button.js

    var CSS=’#bbcode_buttons div {float:left; background:#999; border:1px solid #666; border-radius:2px; -moz-border-radius:2px; -webkit-border-radius:2px; color:#fff; padding: 0px 6px 1px 6px; margin: 1px 7px 2px 0;’

    +’font: 1.2em times, serif; word-spacing: -1px; height: 16px; vertical-align:middle; line-height:16px;’

    +’text-align:center; position:relative; cursor: pointer; cursor: hand;}’;

    #33936
    gerikg
    Member

    Two part question

    1. Is there a code to imitate wp_list_pages(‘title_li=’) with the forum names?

    result in…

    <li><a href="http://bbpress.org/forums/forum/installation">Installation</a></li>
    <li><a href="http://bbpress.org/forums/forum/troubleshooting">Trouble Shooting</a></li>

    etc etc…

    2. How do you add class=selected to current forum page?

    #86482
    psycheangels
    Member
    #86469
    Damien
    Member

    No good :(

    but… from your other related thread…

    <?php echo bb_get_avatar( $topic->topic_last_poster, ’16’);?>

    works bro! I owe you a few beers, thankyou!

    #86494
    DKB
    Participant

    I placed just the backup back

    Otherwise i put

    RewriteRule ^attachments/([^/]+)/download/([0-9]+)/inline/?$ /?bb_attachments=$1&bbat=$2&inline [L,QSA]
    RewriteRule ^attachments/([^/]+)/download/([0-9]+)/?$ /?bb_attachments=$1&bbat=$2 [L,QSA]

    oke now i modified the htaccess with that. Is that what you meant?

    #33931
    psycheangels
    Member

    in .htaccess add


    RewriteRule ^attachments/([^/]+)/download/([0-9]+)/inline/?$ /?bb_attachments=$1&bbat=$2&inline [L,QSA]
    RewriteRule ^attachments/([^/]+)/download/([0-9]+)/?$ /?bb_attachments=$1&bbat=$2 [L,QSA]

    in bb-attachments.php line 234 edit like this

    if ($attachment->status==0) {
    $output.=" "."<a href='".$uri."attachments/$attachment->post_id/download/$attachment->id/'>".$attachment->filename."</a> "." ";
    }

    in bb-attachments.php line 289

    if (file_exists($fullpath)) {	// it's been resized, so it's likely on AWS, show directly
    $aws=$bb_attachments['aws']['url'].$file->id.'.'.$file->filename;
    $replace="<a class='bb_attachments_link' href='".$uri."attachments/".$match[1]."/download/".$match[2]."'><img src='$aws' /></a>";
    if (is_bb_feed()) {$replace=wp_specialchars($replace);}
    $text=str_replace($match[0],$replace,$text);
    }

    in bb-attachments.php line 298

    http://pastebin.com/gDG523R2

    so now your attachments have permalink like this

    example.com/attachments/*postid*/download/*attachmentid*/

    and embed image url

    example.com/attachments/*postid*/download/*attachmentid*/inline/

    Related thread : http://bbpress.org/forums/topic/on-attachment-file-permalink

    #33930
    psycheangels
    Member
    function get_post_img(){
    global $bbdb;
    $topic_id_ft = get_topic_id(); //topic id for getting text of first post of the topic
    $first_post = (int) $bbdb->get_var("SELECT post_id FROM $bbdb->posts WHERE topic_id = $topic_id_ft ORDER BY post_id ASC LIMIT 1");
    $content = substr(strip_tags(strip_shortcodes(get_post_text($first_post))),0);
    preg_match('/[img](.*?)[/img]/i', $content, $matches);
    $src = $matches[1];
    echo $src;
    }

    modified from here http://bbpress.org/forums/topic/show-a-snippet-of-the-post-under-the-topic-title#post-39260

    #86468
    gerikg
    Member

    Okay based on my question, this might work

    <?php
    if (function_exists('bb_get_photo'))
    bb_get_photo($topic->topic_last_poster);
    ?>

    try it?

    #86442
    gerikg
    Member

    Okay I added echo and it works <?php echo bb_get_avatar( $topic->topic_last_poster, '16');?>

    16 = is the size (in px) of the avatar you want for people who want to know.

    Thank you!

    #86440

    bb_get_avatar( $topic->topic_last_poster, '16')

    #33922
    Damien
    Member

    http://bbpress.org/plugins/topic/user-photo-for-bbpress/

    Hi, I’m trying to display the avatar of the person who started the forum topic on the mainpage, in the place of the last posters name, in the latest discussions area.

    I’ve tried using the way it displays in profiles

    <?php if ( $avatar = bb_get_avatar( $member->ID ) ) : ?>

    <div id=”useravatar”><?php echo $avatar; ?></div>

    <?php unset($avatar); endif; ?>

    It does not work. I’ve tried pulling it like in a post

    <?php post_author_avatar_link(); ?>

    Nothing. One more

    <?php

    if (function_exists(‘bb_get_photo’))

    bb_get_photo($user->ID);

    ?>

    No joy there either. I tried using this function

    <img src=”<?php echo USERPHOTO_URL . $profileuser->userphoto_image_file . “?” . rand() ?>” alt=”<?php _e(“Full size image”, ‘user-photo’); ?>” />

    and it almost does it…

    http://localhost.wordpress.com/wp-content/uploads/userphoto/?29089

    but as you can see it does not grab the users avatar, (1.jpg) although it’s pointing to the right place.

    has anyone ever gotten avatars showing on the mainpage with the user photo plugin? I am aware other plugins exist for avatars but they do not suit my needs, apart from this one hickup, user photo is the best for wordpress/bbpress shared avatars. The guy who made it has long since left :(

    #86444

    In reply to: jquery loading

    yoyopop
    Member

    Maybe I wasn’t clear – basically I have a script that I wrote myself that I have put in header.php so that it gets loaded on every page. However, this script needs the jquery script to load as well or it won’t work. BBPress has jquery built-in but it only loads it on certain pages. I wanted to see what defines where the jquery script that is built into BBpress is called…

    But I can use this technique to do the same thing, just the opposite way around, so thanks for the help! I did it like this:

    <?php if ( in_array( bb_get_location(), array( 'login-page', 'register-page' ) ) ) echo "<script type='text/javascript' src='http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js'></script>n"; ?>

    I tried to use bb_enqueue_script( 'jquery' ); in there but couldn’t get that to work!

    #86435
    pagal
    Participant

    @ Gautam… when you are making this kind of plugin?

    Can you give me the time frame?

    And not.. I’m not one of the pagalguy.com :-)

    #69805
    Herzsagen
    Member

    For everyone having trouble with special characters in forum names and descriptions,

    FIND (on or around lines 193 and 194 of the original script)

    $forum_name = $row;

    $forum_desc = $row;

    CHANGE TO (adding the addslashes() function)

    $forum_name = addslashes($row);

    $forum_desc = addslashes($row);

    And that should resolve most of the complaints I’ve seen here about the conversion failing.

    #86434
    Gautam Gupta
    Participant

    There’s no plugin for the time being, but it can be made by doing this:

    1) Create an admin page where the admin puts all the ads and keywords

    2) preg_match the post_text for the keywords and display the ad.

    BTW, are you the one of pagalguy.com?

    #84758

    In reply to: Plugins You Want !!!

    blogher8
    Participant

    i-badhani is 100% correct.

    My needs have been met by plugins, for the most part, but I am in dire straits when it comes to themes.

    I am not able to code fluently, so I hack away at existing themes. Finally found one I like but it is not compatible with IE6 (which some people still use)…

    Would LOVE to have an easily tweaked bbpress theme similar to THESIS for WP.

    Saving that, an easily-tweaked theme, period.

    #33917
    pagal
    Participant

    dear developers,

    i need a text advertisement script or plugin.. where i can set some keywords where sponsors want to advertise… suppose if a sponsor want to advertise his site “www.example.org” on a keyword of example .. then every user who write a post and use the keywords example in his post then automatically this keyword (example) make hyperlink with my advertiser’s site..

    same as link example

    I hope you’ll understand what i want..

    Is there any script or plugin exist?

    thanks in advance :)

    melyarra
    Member

    actually, i’m using it for build a portal so it just for internal office use so there’s no link for outsider who wanna look. :-(

    i’m using IIS not apache…is there any relation with that? I guess not :-(

    ouw, and when i did step #3 and #4, the last 3 didn’t lock as it should be…even i repeated again…

    huff…almost frustrating just for this.. :-(

    #86427
    johnhiler
    Member

    Ah neat!

    Adding stuff to the standard registration would probably mean the trick wouldn’t work for too long – Invisible Defender used a similar trick but eventually spammers updated their software to bypass the extra fields:

    https://wordpress.org/extend/plugins/invisible-defender/

    Would love to see this code as a plugin!!

    #85800
    psycheangels
    Member

    :D nice theme

    http://i40.tinypic.com/8wfhqx.jpg <– look at this image some css problem i think.

    im using firefox 3.

    #33913
    checkfront
    Member

    Hello,

    We’ve been using bbPress for a couple of weeks now, and have been getting a couple dozen automated accounts each day. Now it appears they are coming alive adding spam posts to the forums.

    We’re using the instant-password plugin because we don’t want our users to have to wait for e-mail, and I personally despise captcha (see http://www.stopcaptcha.com).

    After cleaning out the bot accounts, here is what we did to stop it:

    Our registration page: http://www.checkfront.com/community/register.php

    Using CSS, we hid the occupation and interest fields (don’t need them). Spam bots will often fill out all the forum fields on a page. If a new registration comes in with one of those filled, we discard it.

    We also added a hidden field (potpan) that gets filled with a unique id generated on each page load via javascript. If the potpan id doesn’t match the one in the session, we discard it.

    Since we put it in place yesterday, it’s blocked all 35 automated registrations.

    If anyone is using the instant-password plug in and would like the modified code, let me know and will zip it up. Perhaps this functionality could make its way into the standard registration.

    Cheers,

    -J

    #85799
    Kevin Ryman
    Participant

    Thanks buddy! I’ll check it out asap! :D

Viewing 25 results - 21,676 through 21,700 (of 32,481 total)
Skip to toolbar