Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 27,201 through 27,225 (of 32,481 total)
  • Author
    Search Results
  • #3717
    Null
    Member

    Hi,

    I have the following code that works in wordpress:

    <?php $homepage = get_settings('siteurl')."/search.php/";
    global $wp;
    $wp_received_argument = false;
    foreach ($wp->query_vars as $k=>$v) if ($v) $wp_received_argument = true;
    if ($wp_received_argument) require(TEMPLATEPATH . “/index.php”);
    else { wp_redirect($homepage);
    exit(); } ?>

    Now this wont work in bbpress, so I’ve made some modifications:

    <?php $homepage = bb_get_option( 'uri' )."/search.php/";
    global $bb;
    $bb_received_argument = false;
    foreach ($bb->query_vars as $k=>$v) if ($v) $bb_received_argument = true;
    if ($bb_received_argument) require(TEMPLATEPATH . “/index.php”);
    else { bb_redirect($homepage);
    exit(); } ?>

    It now crashes at the foreach. What am I missing?

    Thx

    #66484
    thion
    Member

    I’ve created something like this:

    function page_link( $page_number ) {
    echo apply_filters('page_link', get_page_link( $page_number ) );
    }

    function get_page_link( $page_number ) {
    $rewrite = bb_get_option( 'mod_rewrite' );
    if ( $rewrite ) {
    global $bbdb, $bb, $page;
    $page = $page_number;

    if ( $rewrite === 'slugs' ) {
    $table_name = $bbdb->prefix . "pages";
    $query = $bbdb->get_results("SELECT page_slug FROM $table_name WHERE page_id=".$page."");

    foreach ($query as $rk) {
    $column = $rk->page_slug;
    }
    } else {
    $table_name = $bbdb->prefix . "pages";
    $query = $bbdb->get_results("SELECT page_id FROM $table_name WHERE page_id=".$page."");

    foreach ($query as $rk) {
    $column = $rk->page_id;
    }
    }
    $link = bb_get_option( 'uri' ) . "page/" . $column;
    } else {
    $args = array();
    $link = bb_get_option( 'uri' ) . 'page.php';
    $args['page_id+id'] = $page;
    $args['part'] = 1 < $part ? $part : false;
    $link = add_query_arg( $args, $link );
    }

    return apply_filters( 'get_page_link', $link, $page_number );
    }

    Trust me, I don’t know what this is either ;). I’m working on this for a couple of hours (in total) and I’ve messed up. Could someone help me in this by explaining how this thing should look like?

    I mean – the above code is allowing me to type

    <?php echo page_link("1"); ?>

    and this will display url to static page with id=1, creating something like domain.com/page/1 or domain.com/page/about – so links are working. But now I want to send page ID to other functions that are selecting and displaying date from database – and I have no idea how to send this id in ‘rewrited’ version. Can anyone help?

    #66410
    chrishajer
    Participant

    I saw your comments on the comments page and figured it was being resolved there.

    This was the last I heard:

    https://bbpress.org/plugins/topic/bb-attachments/page/6/#post-1553

    I just tried the 0.1.9 version and the JavaScript is working; it inserts the bbcode. But when I resave, the image was renamed to this:

    [png] Error_Occurred_While_Processing_Request.png (17.7 KB, 0 downloads) [x]

    And it is not inserted into the post.

    #60769

    In reply to: PHPBB3 Converstion

    hhberthelsen
    Member

    I’m also looking for an update, and so far found these links:

    https://codex.wordpress.org/GSoC2008

    http://www.stealyourcarbon.net/2008/07/midterm-progress/

    http://www.stealyourcarbon.net/2008/07/bbpress-importer/

    and SoC ’08 discussions going on here:

    http://groups.google.com/group/wordpress-soc-2008

    Not sure if these are good signs … v0.1A seems a long way to a stable version 😮

    #66518
    _ck_
    Participant

    Note the names of the settings in bbPress and WordPress is slightly different. Also, never, ever, edit bb-settings.php, what you want is bb-config.php on the bbpress side and wp-config.php on the WordPress side.

    Follow ALL the steps here and you’ll get cookie integration in just a few minutes:

    https://bbpress.org/forums/topic/wordpress-and-bbpress-integration-101#post-17410

    Note step #8 is where you edit wp-config.php, the rest are for bb-config.php

    #3714
    Billy Wilcosky
    Participant

    Similar posts have been made about this subject, and I’ve read the documentation, but no matter what I do I can’t get the cookies to work. I’m sure you hate working with newbies like me because we’re always like, “gah, i can’t get anything to work” but, please, I don’t want to keep tweaking it because I don’t want to mess anything up… One solution here at this forum says to go into the wp_settings.php file and change something… do things like that have be to done, or is there an easier way? By the way, I did actually do that… I went into the wp_settings and changed that cookie_domain line from false to ‘.myurl.com’, if you know what I’m talking about… well, that tweak didn’t work for me either.

    I just want to be able to log into my blog, then go to my forum and still be logged in. Or log into my forum and go to my blog and still be logged in, then also be able to successfully log out from either location.

    I put

    define(‘COOKIE_DOMAIN’, ”);

    define(‘COOKIEPATH’, ‘/’);

    in my wp config and it is also in my bb press config.

    Now, some posts here say that for the cookie_domain, you have to actually put your domain, like:

    define(‘COOKIE_DOMAIN’, ‘.myurl.com’);

    is this true?

    If someone has the time and successfully has cookies working properly between their wordpress blog and bbpress forum, could you help me out?

    I’ve stayed up many nights trying to get this to work just right… it’s sad :( Whats weird is, when I first did the integration it worked BUT I couldn’t log out, so since then I’ve been changing things to fix that, but now, I’m back to square one. I can log into my forum. then, I can log into blog, and I can log out of both with the same username and password, but again, if I log into one and go to the other, I’m not logged in.

    I’ve just seen a few different posts and all the posts recommend doing different things. Then the actual documentation of course just says to use the built in integration feature in bbpress, which I used. Since there are so many different posts offering different solutions, can any one give me a step by step fix for this?

    #3713
    csseur3
    Member

    Hello,

    a update system for plugins is scheduled or not? :)

    bye,

    Fred

    #66469
    811568
    Inactive

    For what it’s worth, I think bbPress is a great piece of kit, and I send out a big thanks to the developers and members of this forum :)

    It’s just outright rude to complain about bbPress – it’s completely free for pete’s sake! If you haven’t got the guts or the knowledge to work with it (and reap the rewards I assure you!), go use another forum!

    #3710
    811440
    Inactive

    Hello,

    I was looking for a way to limit moderators in some way to only have moderation powers on specific forum/s. I have a forums where I need to have a set of moderators have access to only moderate a few forums and not every forum on the site. I did some searching and couldn’t find anything in the forums or plug ins that did this task. Is this something that could be handled by being able to add more roles, and then custom define the abilities of those roles? Thanks for your time, I look forward to hearing back from the community on this. :)

    #66449
    chrishajer
    Participant

    You might have https hard coded in something. Or, if you start with an https URL, your links are always https also. Search the source of your files for https and if it’s not there, then just be sure to use http to link to your website and forum. Users won’t normally use https unless they click on a link from somewhere.

    If you’re bothered by it, you could always create a rewrite rule in .htaccess to direct any https traffic to http.

    #66425
    Null
    Member

    Shouldn’t be too hard to copy, perhaps I” take a look at it IF I can take a brake from WoW this weekend :P.

    I’ll make a green version (bbPress like) too then…

    btw I love you theme, can we download it somewhere?

    #66421

    In reply to: Ning layout?

    gio500000
    Member

    I’m a newbie to the bbpress framework. Is there a function in bbpress that can call each forum and show the most recent topics for each one? Any help on how to getting started is appreciated. If you could provide some code to get started I feel confident to take it from there. I’m sure this layout isn’t for everyone but its a refreshing social-like layout that others may like.

    Thanks,

    Gio

    #66483
    thion
    Member

    That’s how I’m writing Static Pages plugin now ;).

    #66478
    _ck_
    Participant

    The (new) config.php name is bb-config.php

    You are getting the error because you renamed it to config.php when it should be bb-config.php

    #66481
    thion
    Member

    Hmm – documentation is really needed… :)

    #66480
    _ck_
    Participant

    There already is a function is_front()

    if (is_front()) {
    // do stuff
    }

    lots of related functions in template-functions.php

    if you need multiple pages, a trick I like to use is

    if (in_array(bb_get_location(),array('topic-page','tag-page','forum-page'))) {
    // do stuff
    }

    #66462
    wiseacre
    Member

    And bbpress has had many weeks of … nothing. And some funny old bugs.

    Look at WordPress. How many lines of code you can find? And how many tickets are closed for a week? This is “development time” for me.

    In other hand the bbpress development team does not give people timely versions … and news. For now this project looks like a hobby.

    #66477
    793412
    Inactive

    I used the version 0 9 0 2 that appears here like the lastest. I’ve upgrade it like it was an older version… nothing happens. :P

    #66015
    _ck_
    Participant

    Hmm, is this the default in WordPress? define('COOKIEHASH', md5($_SERVER[HTTP_HOST]));

    does that actually appear in wp-config.php by default? Because that would override the cookiehash calculation. Make sure then you have this in your bb-config.php

    define('BB_HASH',md5($_SERVER[HTTP_HOST]));

    also, since you are trying to do “full” (complex) integration. You may want to see here for more ideas: http://www.adityanaik.com/integratepress-part-i/

    #66460
    Detective
    Member

    Use SMF then :)

    That’s the magic of open source. YOU can choose.

    #66014
    dankelly613
    Member

    My WordPress/bbPress still does not integrate.

    RE: FIVE things must be identical in WordPress and bbPress
    configuration for cookies to be sync'ed and logins to be shared:

    1. DATABASE secret key
    2. wp-config.php/bb-config secret key
    3. cookie DOMAIN
    4. cookie PATH
    5. cookie hash

    1. I have checked the database secret_key – it matches.

    2. I have updated the SECRET_KEY in both config files – they match.

    3. 4. & 5. I have the following code in my wp-config

    define('COOKIEPATH','/');
    define('SITECOOKIEPATH', '/');
    define('COOKIEHASH', md5($_SERVER[HTTP_HOST]));

    And, my bb-config INCLUDES wp-config because of previous instructions on WP/BB integration.

    define('WP_BB', true);
    if ( !defined('DB_NAME') ) {
    require_once( 'full/path/to/wp-config.php');
    }

    NOTE: “full/path/to” was changed to the real ‘full path’

    Any thoughts?

    #66442
    John Conners
    Participant

    Remove the brackets – this is what you want to execute:

    UPDATE bb_topicmeta SET
    meta_value='http://www.portcityunderground.com/bbpress/'
    WHERE meta_key='uri' LIMIT 1

    #66441
    781521
    Inactive

    Ok, Thanks.

    Heres what I have in the bb-config.php:

    $bb_table_prefix = 'bb_';

    So heres what I put:

    UPDATE (bb_)
    topicmeta SET
    meta_value='http://www.portcityunderground.com/bbpress/' WHERE
    meta_key='uri' LIMIT 1

    Heres its response (I really didnt know if I need to leave the parenthesis etc in it…I have never queried a database before):

  • SQL query:

    UPDATE (

    bb_

    )topicmeta SET meta_value = ‘http://www.portcityunderground.com/bbpress/&#8217; WHERE meta_key = ‘uri’ LIMIT 1

    MySQL said:

    #1064 – You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘topicmeta SET

    meta_value=’http://www.portcityunderground.com/bbpress/&#8217; WHERE

    m’ at line 2

  • any suggestions on what next?..

    Thank You!

#66440
Ben L.
Member

Go into your database, do the following query:

UPDATE (your $bb_table_prefix found in the config file goes here)topicmeta SET meta_value='http://www.portcityunderground.com/bbpress/' WHERE meta_key='uri' LIMIT 1

#65708

In reply to: Intergrating the theme

793634
Inactive

And I get this if I try to edit any of the settings

Warning: Cannot modify header information - headers already sent by (output started at /home/crusaders4christ/public_html/bbpress/bb-includes/db-mysql.php:130) in /home/noproblem/public_html/wp-includes/pluggable.php on line 770

Viewing 25 results - 27,201 through 27,225 (of 32,481 total)
Skip to toolbar