Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 22,651 through 22,675 (of 32,481 total)
  • Author
    Search Results
  • #32506
    Michael
    Participant

    Greetings all :)

    I hope someone can help me here.

    I have a strange feeling there is a function for this, but I can’t find it. I’d like to add a column into my Latest Discussions on the front page that shows the forum that the topic resides in. I’d like to do this so that users don’t have to explicitly state it in the title itself. I have a large structure for my new forum, and I’d like it to provide as many neatened features as possible.

    Kind Regards

    Michael

    #82200
    Michael
    Participant

    Hi there. :)

    Have you installed BBCode lite? you can solve that issue by adding BBCode to your forum

    Michael

    #32504
    bb-lover
    Member

    Dear Developers,

    I’ve recently use bbpages plugin.. its working fine..but i want one more thing in this plugin … here is url like my site

    http://www.example.com/bb-page.php?page_id=3

    i want to change it to

    http://www.example.com/my-own-keyword.html

    can any coder tell me how it possible?

    i’ll be great thankful to you

    here is plugins files


    1. bb-page.php for root

    <?php

    require_once(‘./bb-load.php’);

    $page_id = 0;

    bb_repermalink();

    if ( !$page )

    bb_die(__(‘Page not found.’));

    do_action( ‘bb-page.php’, $page_id );

    bb_load_template( ‘page.php’, array(‘bb_db_override’, ‘page_id’) );

    ?>


    2. page.php for template

    <?php bb_get_header(); ?>

    <?php if ( isset_id() ) : ?><?php if ( page_exist() ) : // Do not delete this ?>

    <div class=”top_box”>

    <h2><?php echo get_page_title(); ?></h2>

    <div class=”bbcrumb”>“><?php bb_option(‘name’); ?> » <?php echo get_page_title(); ?></div>

    </div>

    <div class=”post-content”>

    <?php echo get_page_content(); ?>

    </div>

    <?php else: // If there is no page with id=X in database ?>

    <div class=”notice_box”><div class=”notice_content”>404 – I’m sorry, but this page does not exist.</div></div>

    <?php endif; ?>

    <?php else: // If page ID is not specified or it equals 0 ?>

    <div class=”notice_box”><div class=”notice_content”>Page is not specified.</div></div>

    <?php endif; ?>

    <?php bb_get_footer(); ?>


    3. bb-pages.php for plugin

    <?php

    /*

    Plugin Name: bbPages

    Plugin URI: http://astateofmind.eu/freebies/bbpages/

    Description: Allows you to create static pages within your bbPress forum.

    Author: F.Thion

    Author URI: http://astateofmind.eu

    Version: 0.0.2

    license: GPL

    donate: http://astateofmind.eu/about/support/

    */

    function get_page_id() {

    if ( isset ( $_GET ) ) :

    $page_id = $_GET;

    return $page_id;

    endif;

    }

    function isset_id() {

    if ( $_GET > 0 ) :

    return true;

    else:

    return false;

    endif;

    }

    function page_exist() {

    global $bbdb, $bb;

    $id = get_page_id();

    $table_name = $bbdb->prefix . “pages”;

    $query = $bbdb->get_results(“SELECT page_id FROM $table_name WHERE page_id=”.$id.””);

    if ( $query == true ) :

    return true;

    else:

    return false;

    endif;

    }

    function get_page_title() {

    global $bbdb, $bb, $page_id;

    $id = get_page_id();

    $table_name = $bbdb->prefix . “pages”;

    $query = $bbdb->get_results(“SELECT page_title FROM $table_name WHERE page_id=”.$id.””);

    foreach ($query as $rk) {

    return $rk->page_title;

    }

    }

    function get_page_slug() {

    global $bbdb, $bb, $page_id, $page;

    $id = get_page_id();

    $table_name = $bbdb->prefix . “pages”;

    $query = $bbdb->get_results(“SELECT page_slug FROM $table_name WHERE page_id=”.$id.””);

    foreach ($query as $rk) {

    return $rk->page_slug;

    }

    }

    function get_page_content() {

    global $bbdb, $bb, $page_id;

    $id = get_page_id();

    $table_name = $bbdb->prefix . “pages”;

    $query = $bbdb->get_results(“SELECT page_content FROM $table_name WHERE page_id=”.$id.””);

    foreach ($query as $rk) {

    return $rk->page_content;

    }

    }

    function list_pages() {

    global $bbdb, $bb;

    $table_name = $bbdb->prefix . “pages”;

    $query = $bbdb->get_results(“SELECT * FROM $table_name ORDER BY page_order ASC”);

    $status = array(

    0 => ‘Draft’,

    1 => ‘Published’

    );

    foreach ($query as $rk) {

    echo ‘

    <tr>

    <td>’.$rk->page_id.'</td>

    <td>’.$rk->page_title.'</td>

    <td>’.$rk->page_date.'</td>

    <td>’.$status[$rk->page_status].'</td>

    <td>page_id.'”>Edit | page_id.'”>Delete | page_id.'”>View</td>

    </tr>

    ‘;

    }

    }

    function pages_panel() {

    $action = $_REQUEST;

    switch($action)

    {

    default:

    ?>

    <h2>Manage Static Pages <small>(Create new page)</small></h2>

    <table class=”widefat”>

    <thead>

    <tr>

    <th style=’width:5%;’>ID</th>

    <th style=’width:45%;’>Title</th>

    <th style=’width:20%;’>Creation Date</th>

    <th style=’width:10%;’>Status</th>

    <th style=’width:20%;’>Actions</th>

    </tr>

    </thead>

    <tbody>

    <?php echo list_pages(); ?>

    </tbody>

    </table>

    <h3>Please support the developer</h3>

    <img src=”http://astateofmind.eu/uploads/donation.gif&#8221; style=”margin-right:10px” border=”0″ align=”left” />

    Do you like this plugin? Do you find it useful? If so, please donate few dollars so I could keep develop this plugin and others further and further. Even the smallest help is greatly appreciated for a student in Poland ;).

    <form action=”https://www.paypal.com/cgi-bin/webscr&#8221; method=”post”>

    <input type=”hidden” name=”cmd” value=”_donations”>

    <input type=”hidden” name=”business” value=”wojciech.usarzewicz@gmail.com”>

    <input type=”hidden” name=”item_name” value=”bbPages Donation”>

    <input type=”hidden” name=”item_number” value=”bbPages Donation”>

    <input type=”hidden” name=”no_shipping” value=”0″>

    <input type=”hidden” name=”no_note” value=”1″>

    <input type=”hidden” name=”currency_code” value=”USD” />

    Type donation amount: $ <input type=”text” name=”amount” value=”1″ />

    <input type=”hidden” name=”tax” value=”0″>

    <input type=”hidden” name=”lc” value=”US”>

    <input type=”hidden” name=”bn” value=”PP-DonationsBF”>

    <input type=”submit” name=”submit” value=”Donate with PayPal!” alt=”PayPal – The safer, easier way to pay online!”>

    <img alt=”” border=”0″ src=”https://www.paypal.com/pl_PL/i/scr/pixel.gif&#8221; width=”1″ height=”1″>

    </form>

    <p>Want to know what I’m developing right now? Follow me on Twitter, ignore 90% of stuff and learn a lot you will ;). And thank you for using my plugin!</p>

    <?php

    break;

    case “add”:

    global $bbdb, $bb;

    if (isset($_POST))

    {

    $page_title = $_POST;

    $page_slug = bb_sanitize_with_dashes( “$page_title”, “” );

    $page_content = $_POST;

    $page_order = $_POST;

    $page_status = $_POST;

    $table_name = $bbdb->prefix . “pages”;

    $query = “INSERT INTO ” . $table_name .

    ” (page_id, page_date, page_content, page_title, page_status, page_slug, page_order) ” .

    “VALUES (0, NOW(), ‘”.$page_content.”‘, ‘”.$page_title.”‘, ‘”.$page_status.”‘, ‘”.$page_slug.”‘, ‘”.$page_order.”‘)”;

    $bbdb->query($query);

    ?><div class=”updated”><p>Page has been saved.</p></div> <?php

    }

    ?>

    <h2>Add new page</h2>

    <form class=”settings” method=”post”>

    <fieldset>

    <div>

    <label for=”page_title”>

    Page title </label>

    <div>

    <input name=”page_title” id=”page_title” type=”text” class=”text long” />

    <p>Page slug will be created automatically (don’t worry, it’s not useful for anything yet).</p>

    </div>

    </div>

    <div>

    <label for=”page_order”>

    Page order </label>

    <div>

    <input name=”page_order” id=”page_order” type=”text” class=”text long” />

    </div>

    </div>

    <div>

    <label for=”page_content”>

    Page content </label>

    <div>

    <textarea name=”page_content” id=”page_content” rows=”20″ cols=”80″ ></textarea>

    </div>

    </div>

    <input type=”hidden” name=”page_status” value=”1″ />

    <input type=”hidden” name=”page_id” value=”<?php echo $_GET; ?>” />

    </fieldset>

    <input type=”submit” class=”submit” name=”add_page” value=”<?php _e(‘Add page’, ‘add_page’) ?>” />

    </form>

    <?php

    break;

    case “edit”:

    global $bbdb, $bb;

    if (isset($_POST)) {

    $page_id = $_POST;

    $page_title = $_POST;

    $page_content = $_POST;

    $page_order = $_POST;

    $page_status = $_POST;

    $table_name = $bbdb->prefix . “pages”;

    $query = “UPDATE “.$table_name.” SET page_content='”.$page_content.”‘, page_title='”.$page_title.”‘, page_status='”.$page_status.”‘, page_order='”.$page_order.”‘ WHERE page_id='”.$page_id.”‘”;

    $bbdb->query($query);

    ?> <div class=”updated”><p>Page updated…</p></div> <?php

    }

    $table_name = $bbdb->prefix . “pages”;

    $query = $bbdb->get_results(“SELECT * FROM $table_name WHERE page_id=”.$_GET.””);

    foreach ($query as $rk) {

    $id = $rk->page_id;

    $title = $rk->page_title;

    $content = $rk->page_content;

    $order = $rk->page_order;

    $status = $rk->page_status;

    }

    ?>

    <h2>Edit page</h2>

    <form class=”settings” method=”post”>

    <fieldset>

    <div>

    <label for=”page_title”>

    Page title </label>

    <div>

    <input name=”page_title” id=”page_title” type=”text” class=”text long” value=”<?php echo “$title”; ?>” />

    <p>Page slug will be created automatically (don’t worry, it’s not useful for anything yet).</p>

    </div>

    </div>

    <div>

    <label for=”page_order”>

    Page order </label>

    <div>

    <input name=”page_order” id=”page_order” type=”text” class=”text long” value=”<?php echo “$order”; ?>” size=”10″ />

    </div>

    </div>

    <div>

    <label for=”page_content”>

    Page content </label>

    <div>

    <textarea name=”page_content” id=”page_content” rows=”20″ cols=”80″ ><?php echo “$content”; ?></textarea>

    </div>

    </div>

    <input type=”hidden” name=”page_status” value=”1″ />

    <input type=”hidden” name=”page_id” value=”<?php echo $_GET; ?>” />

    </fieldset>

    <input type=”submit” class=”submit” name=”save_page” value=”<?php _e(‘Save page’, ‘save_page’) ?>” />

    </form>

    <?php

    break;

    case “delete”:

    global $bbdb, $bb;

    $id = $_GET;

    $table_name = $bbdb->prefix . “pages”;

    $query = $bbdb->get_results(“DELETE FROM $table_name WHERE page_id=”.$_GET.””);

    $bbdb->query($query);

    ?> <div class=”updated”><p>Page deleted…</p></div> <?php

    break;

    }

    }

    function pages_admin_menu() {

    bb_admin_add_menu(__(‘Manage Pages’), ‘administrate’, ‘pages_panel’);

    }

    function bbpages_install() {

    global $bbdb;

    $table_name = $bbdb->prefix . “pages”;

    $bbdb->query(“CREATE TABLE IF NOT EXISTS $table_name (

    page_id mediumint(9) NOT NULL AUTO_INCREMENT,

    page_date datetime,

    page_content text,

    page_title varchar(255),

    page_status int(1),

    page_slug varchar(255),

    page_order int(11),

    PRIMARY KEY (page_id)

    )”);

    }

    bb_register_activation_hook( __FILE__, ‘bbpages_install’);

    add_action( ‘bb_admin_menu_generator’, ‘pages_admin_menu’ );

    ?>


    Note: I want to mention here that the author of this plugin is no more active. He make this plugin but something is wrong with this pluing. he tell us wrong path for plugins files. But I’ve little bit knowledge of php that’s why i correct its path now the path of the plugins files which I’ve mentioned above is totally correct and working fine.

    Now I really need to your help. If someone will not guide me then I’ll leave this software “bbpress” and I’ll move to vBulletin or phpbb after disheart….

    So I’m waiting for positive answers from developers… Thanks … And Love you all

    #82312

    In reply to: Problem with bbPress

    Naujokas
    Member

    I am integradet users from WordPress. :)

    MSR6
    Member

    I am using avatar upload. It is working fine, but I have a couple questions. I have the avatar working on posts, but cannot find the correct file or location to for the avatar on the profile page.

    My site is: http://www.msrplastics.com/bbpress

    I am using the iNove theme/template, which has the avatar image in the right sidebar on the profile page. Help, I’m driving myself crazy looking through random php folders for any sign of an avatar reference!

    Also, the avatar I chose for myself has an oblong shape and did not get resized correctly. Any fix or is it necessary to upload more “square” shaped pictures. Look at only post for reference.

    And when I put the code in the bb-post.php, I replaced the call for an avatar code that was already there. Is this right or should I have just added it before or after?

    Thanks for any help,

    Mike

    MSRplastics.com

    #70692

    Another way to remove the (frankly awful) table tags is to make use of PHP’s output buffering.

    function cleanForm($buffer){

    // do a str_replace on $buffer to remove the table tag and replace with <div>s, or whatever you fancy and return it

    $buffer = str_replace('replace me', 'with me', $buffer);

    return $buffer;

    }

    ob_start(“cleanForm”);

    bb_profile_data_form();

    ob_end_flush();

    #82075

    @ jackey – The patch will haunt you back the day you upgrade WP, because you have to remember to apply the change again on the new, overwritten, wp-settings.php file… :-)

    If the fix to comment out that line provides a solution, I don’t know why that function is in the core in the first place. There must be a good reason, I am not a programmer…

    #82074
    jackey
    Participant

    O.K. that works equally well, and less intrusive… Thanks.

    I stopped programming about 30 years ago, but is this kind of patching common practice?

    I suspect that this patch will haunt back on me one day.

    Don’t misunderstand… I’m happy with the fix, but isn’t there something wrong in the core?

    And functions with “magic” in their name give me the creeps. ;-)

    Thanks again!

    #82127

    Well, there is a way I just tested, by modifying core code (which I really don’t like doing).

    If pointing out where the change occurs could help someone to come up with a way to change it via a plugin, here it is…

    functions.bb-capabilities.php

    line 166

    $roles->add_role( 'member', __('Member'), array(

    change to

    $roles->add_role( 'member', __('Info'), array(

    same goes for the other roles in the same file (Moderator, etc.)

    Hope this helps.

    #82073

    @jackey – You could also try what is suggested in one of the links I posted above, to see if it works for you:

    “To get round this, go to around line 388 in “wp-settings.php” file and hash out $_POST = add_magic_quotes($_POST); and hey presto!”

    In this current version, I have it on line 590. To comment out:

    //$_POST = add_magic_quotes($_POST );

    #80259
    bingsterloot
    Member

    Hi there

    This might not be to any importance of you, but your forum has massive css problems on a Mac platform, so it messes up badly :O(

    #82072
    jackey
    Participant

    O.K. Andrew fixed things for the iBlogProForum, but the backslashed where still popping up in the backend. Andrew then suggested to change the PHP setting magic_quotes_gpc to on . And this worked for most of the backend. (Strangly enough for all plugins, but not the “signature” plugin, this one went from \\’ to just one ‘.)

    However I stumbled over a warning of PHP.net.

    “/This feature has been /DEPRECATED/ as of PHP 5.3.0 and /REMOVED/ as of PHP 6.0.0. Relying on this feature is highly discouraged./”

    So I’m afraid this is a temporary fix.

    For now I’m content. And running a fully integrated forum at: http://golfclub-stippelberg.nl/forums/ ;-)

    Thanks!

    #32483
    Michael
    Participant

    Hi all :)

    I installed bbPress Moderation Suite two weeks ago. It was working perfectly for a good amount of time, until 3 days ago, when I appointed a new moderator for my forum.

    It seems that the Moderation Suite is only allowing key-masters to access the moderation control panel. I have a funny feeling that this my have something to do with one of my other plugins. The minute the new mod was appointed, he went straight in to have a browse around my modified admin panel. He told me at that point that he had access to the Mod Suite – but now it seems he doesn’t.

    I have created a test user and changed the levels between Moderator and Administrator – nothing worked. It’s only letting Keymasters in.

    Any ideas?

    Kind Regards

    Michael

    #81080

    In reply to: Help out with bbPress

    Mufasa
    Member

    Hi Guys,

    My name is Dan Milward and I’d like to help. I’ve always yearned for a better bbPress + WordPress integration. Ages ago when we integrated bbPress on our site I thought it would be cool to make a shortcode to run bbpress or significant portions of it from WordPress.

    This is how we want to contribute – by doing this.

    Skills are advanced.

    Best,

    Dan

    #81079

    In reply to: Help out with bbPress

    bbhack
    Member

    I might be able to help out as well. I’ve certainly got some ideas ;)

    I have 16 years of software and backend web development experience working on some of largest sites on the net (eBay and others).

    #54807
    Michael
    Participant

    Not to worry – I did some research and found what I was looking for. Simply integrated it into the existing htaccess file – all is working just fine. :)

    #81501
    Ben L.
    Member

    Add this line to your bb-config.php:

    error_reporting( E_ALL & ~E_DEPRECATED );

    #81078

    In reply to: Help out with bbPress

    littleoracle
    Member

    Hi gang,

    I’m an enthusiast of all things WordPress and would love to help out if I can.

    Being unemployed right now, I’ve definitely got some TIME.

    My php/javascript skills are kind of entry level, my html/css skills are fairly advanced. That being said, I’d love to get my hands dirty with the code end of things and I’m more than willing to do any testing that’s necessary or write up some documentation.

    Just point me at a problem and I’ll get to work.

    #54804
    Michael
    Participant

    Hi there :)

    I’m not 100% sure how it would work on a manual basis. There is a plugin called bbPages (https://bbpress.org/plugins/topic/bbpages/) that will have support for “pretty permalinks” in the near future.

    Some-one may have to take over the development of this plugin. It may happen in the next couple of months.

    #82198

    In reply to: new topics not showing

    hpguru
    Member

    Try disable ALL plugins. Then try if site works/recount. If no, activate all plugins, problem is maybe in bbPress installation. So try this next. :)

    #82274

    In reply to: RSS Problem

    Michael
    Participant

    I had 6 plugins with extra spaces – some more than one space.

    It seems to be working just fine now. Thank you. :)

    #82273

    In reply to: RSS Problem

    Michael
    Participant

    Will give that a try – I can see very well how that kind of thing would happen.

    Wish me luck – I have 43 plugins. :)

    Will let you know. :)

    #32480

    Topic: RSS Problem

    in forum Installation
    Michael
    Participant

    Greetings all :)

    I installed my bbPress forums (http://www.inniosoft.co.cc/devstation) about 2 weeks ago. I have also added many plugins to it – and everything seems to be just peachy.

    However, I now have a problem with my RSS Feeds. I am getting the following error in Mozilla Firefox:

    XML Parsing Error: XML or text declaration not at start of entity
    Location: http://www.inniosoft.co.cc/devstation/rss/forum/news-and-announcements
    Line Number 1, Column 2: <?xml version="1.0" encoding="UTF-8"?>
    -^

    I have replaced all the RSS files with the originals just in case the were corrupted – with no luck.

    To see an example, go to this topic and click on the RSS link at the bottom right:

    http://www.inniosoft.co.cc/devstation/topic/from-the-blog-recieving-and-parsing-twitter-feeds

    #81604
    Michael
    Participant

    I had huge troubles changing the permissions, so I simply deleted the my-templates and my-plugins folders (as there was nothing in each one) and re-created them using the necessary permissions.

    All is working fine now – thanks. :)

    #82126

    I’m sure it could be changed to Member Info, Moderator Info and so on?… While I’d have attempted to create a ticket in trac for the change, I wouldn’t know where to start looking, nor would I know if it’d ever get accepted! But adding ‘Info’ onto the end really would help! :)

Viewing 25 results - 22,651 through 22,675 (of 32,481 total)
Skip to toolbar