Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 31,351 through 31,375 (of 32,188 total)
  • Author
    Search Results
  • #1168
    chrishajer
    Participant

    Sometimes, when I search my forum, I get search results with a title and post meta (date, poster name, etc.) but the context of the search term is not shown. It appears this piece of code is returning nothing (in bb-templates/search.php):

    <?php echo show_context($q, $bb_post->post_text); ?>

    Here’s the function from bb-includes/formatting-functions.php, which I don’t understand:

    function show_context( $term, $text ) {

    $text = strip_tags($text);

    $term = preg_quote($term);

    $text = preg_replace("|.*?(.{0,80})$term(.{0,80}).*|is", "... $1<strong>$term</strong>$2 ...", $text, 1);

    $text = substr($text, 0, 210);

    return $text;

    }

    The source of the search results page just shows

    where that context would be shown.

    Is it possible that only the first (however many) characters/words are searched and used for context? It seems like when the results are missing, it’s because the search term appears late in a lengthy post.

    In one instance I checked, the search term is word 674, around 3796 characters into the post. Total length of that post is 1360 words, 7546 characters.

    In another instance, the search term is word 1423, starting around character 8487. Total length on this post is 2661 words, 15604 characters.

    It has happened in other instances, but I never looked into where the term appears in the post to see if that’s related at all. Maybe it’s not related at all to where the search term is in the post, but just how long the post is?

    Also: I have edited the search.php file (should have put a copy in my-templates/search.php, but I didn’t know then what I know now) BUT the same results happen with the stock bb-templates/search.php.

    Any ideas?

    Thanks

    chrishajer
    Participant

    When viewing a user profile http://www.example.org/forum/profile.php?id=10 there is “Recent Replies” and a “Thread Started” section. There is one thread started (which is accurate) says started 3 weeks ago (accurate) but it says “No replies” which is inaccurate. There are 6 replies to the thread, and the thread starter was not the last one to reply (this user only started the thread.) If you hover over the title of the thread, it says http://www.example.org/forum/topic.php?id=12&replies=6 which indicates to me that there are 6 threads too, which is accurate. You can see an edited screenshot here. I am hovering the mouse over the “What’s Next” thread title, and you can see that status bar says &replies=6

    http://www.chrishajer.com/bike/XLF/noreplies.png

    Bottom line: the info under “thread started” is inaccurate, but the link is accurate.

    Any ideas?

    Thanks.

    #52882
    Nicki Faulk
    Member

    IMO, post them here first to confirm whether or not the behavior is normal or not. (and/or if a plugin can alter the behavior to something more acceptable :))

    Let’s save the real bugs for Trac. :D

    #51685
    Nicki Faulk
    Member

    You’re most welcome. :)

    #52291
    Nicki Faulk
    Member

    hehe, thanks. :)

    #52290
    spencerp
    Member

    Hahahaha.. Yeah, that wouldn’t be good! “We” wouldn’t want that now, lol. =P Fiancee? Congrats on that! ;) :)

    spencerp

    #52289
    Nicki Faulk
    Member

    LOL, probably not. He’d be thinking “Who is this guy, and why is he hugging my fiancee?”

    :)

    #52288
    spencerp
    Member

    [blushing].. Hehe.. I guess I could always come over there then.. LOL Hahaha.. Nah, just kidding, I don’t think your man would like that too much lol! =P Anyway, I’m glad to hear that fixed it.. :) ;)

    spencerp

    #52287
    Nicki Faulk
    Member

    Spencer, if I could reach you, I’d hug you! :)

    That fixed it, thanks so much! :D

    #52286
    spencerp
    Member

    Here, try this once..

    http://spencerp.net/downloads/message.php.txt

    Copy/Paste into the original one of course.. into the forum’s root directory.. like normal. :);) That *should* work lol.. And it’s no problem.. I love helping people.. ;) :)

    spencerp

    /If that don’t work either.. I’m going to scream lmao. I’m trying to get Josh on GoogleTalk, but he must be busy or something.. sigh. Hopefully he comes in here soon lol..

    #52284
    Nicki Faulk
    Member

    Hey, no dice. I compared your version to mine and it looks like it had a couple of mod_rewrite fixes, but didn’t see anything else. Error still occurs.

    I’ll take it back out of my template and watch this thread. Thanks for your help! :)

    #51684
    spencerp
    Member

    Hahaha.. you’re welcome. ;) :) Come to think of it, I might even go back to just using the original plugin lmao.. I dunno though.. I kinda liked the idea of that though.. to help remind people that my forum’s are there LOL!

    Being that my forums are so small, it’s kind of a nice thing, however.. if and when it gets a little bigger, it might not be a good thing.. I’ll think about it though… I just got tons of other things to do sigh..

    spencerp

    /Thanks for registering on my forums by the way.. ;) :)

    #51683
    Nicki Faulk
    Member

    Ok, that explains it. LOL

    Mine didn’t do that and I had wondered if mine didn’t do that for me because I’m the KeyMaster, or what…. :)

    Thanks for clearing that up. :D

    #52283
    spencerp
    Member

    Try this version of the “main plugin” file once..

    http://spencerp.net/downloads/bb-privatemessage.php.txt

    Just copy the codes from that one, and place it in the original bb-privatemessage.php and reupload it into the my-plugins directory again..

    That *should* work.. If not, Josh(ardentfrost) and I will look into what we’ve done before, to get rid of that error. ;):)

    spencerp

    /I think we had to “hard-code” the calls to the users table for the database..? If I’m not mistaken.. Josh?

    #51682
    spencerp
    Member

    Nicki, I’m using another version of this plugin.. I had asked Thomas earlier in the thread, for one that sends one out no matter what, or who’s thread gets replied too. ;):)

    https://bbpress.org/forums/topic/313?replies=34#post-1766

    So, by default.. his original plugin won’t do that. ;) :)

    https://bbpress.org/forums/topic/313?replies=35#post-1528

    spencerp

    #52282
    Nicki Faulk
    Member

    Revisiting this: I’m still getting this error:

    bbPress database error: [Table 'DBNAME.bb_users' doesn't exist]

    SELECT * FROM bb_users WHERE ID = 4

    I’ve re-read all the replies to this thread and it looks like spencerp had the same problem I am right now, but I didn’t see a solution posted. Spencer, could you lend me a hand? Or ardentfrost, is there a new version coming? (in other words, should I wait? :))

    #51483
    Nicki Faulk
    Member

    Very handy! Thanks! :D

    #51030

    In reply to: Topic views

    spencerp
    Member

    Sixthed. – I’d also like to see this plugin made possible.. ;) :)

    spencerp

    #52891
    spencerp
    Member

    Oh ok, thanks a million Trent. ;) :) By the way, I also dropped a thread off over here on the MWUSERS forum.. 15 views, no replies there lol.

    Oh well, maybe someone will then. :) Also, Trent.. how would I go about changing the “Create New” account link in the MediaWiki .. to point to either my Forum’s or Blog’s registration page?

    Shoot, which one should I use though? I’m guessing the Blog’s registration page right? And even point my forum’s register link to the blog? Might be the best way of doing it.. What you all think?

    spencerp

    /*cough* I wish ya were on GTalk again lmao, would be a helleva a lot easier to talk me through this crap LoL!!.. :P

    #1163
    chrishajer
    Participant

    I tried to insert a tag that was a duplicate, and got this error:

    bbPress database error: [Duplicate entry '231-1-65' for key 1]

    INSERT INTO bbpress_tagged ( tag_id, user_id, topic_id, tagged_on ) VALUES ( '231', '1', '65', '2006-12-31 15:19:51')

    Warning: Cannot modify header information - headers already sent by (output started at /htdocs/riverside/forum/bb-includes/db-mysqli.php:147) in /htdocs/riverside/forum/bb-includes/wp-functions.php on line 816

    ]]>

    Are duplicate tag insertions normally caught?

    #52852
    lordcoder
    Member

    K , thanks thomasklaiber , i ill create a new plugin so i don’t lose the changes on a specific update :P

    PS : i am from Morroco , but i can speak French , German , English …

    #1166
    spencerp
    Member

    Ok people, here’s the deal.. I’ve installed MediaWiki 1.8.2 on my domain: http://codex.spencerp.net/ and customized the links for it and so forth.. no big deal right… ?

    What I have done so far is (in this order)..

    1) Integrated bbPress to my WordPress blog.. So anyone that registers on my bbPress forums, is automatically registered into my WP blog. Usernames and Passwords work for BOTH..

    2) Applied the bbPress_Auth_for_MediaWiki extension to my MediaWiki.. However, I had to use some of the modifications listed here.

    Now, people can login to my MediaWiki with the usernames and passwords from either the WP blog, or the forums.. ;):)

    The ONLY problem I’m having now, is.. having users register for a new account on my MediaWiki “Create New Account” page.. sigh.. I’m getting the following error..

    http://codex.spencerp.net/Special:Userlogin?type=signup&returnto=Main_Page

    “Login error:

    There was either an external authentication database error or you are not allowed to update your external account.”

    Which is obviously saying, it’s trying to create a new account in the MediaWiki database.. but, where really it should be trying to make a new account in my WP database.. right? Or, that might be meaning the other way around.. I’m not sure.

    My questions are:

    1) Is there a way to modify the “Create New Account” page, with the WP register page codes? So, when someone tries to create a new account on my MediaWiki itself.. it calls the WP database for it?

    Or..

    2) Just modify the MediaWiki file, that contains the “Create Account” link, and use the link to the registration page for the WP blog itself? And if so, which MediaWiki file does this reside in?

    I guess I’d rather have it simple.. and just implement the WP registration codes, into the MediaWiki file.. so there is no redirecting of the “Create Account” link in my MediaWiki..

    Or, does someone know of an “extension” for MediaWiki.. that synchronizes the MediaWiki & WordPress registrations? Thanks in advanced.. ;) :)

    spencerp

    /It’s ALMOST totally there now.. the way I want her.. just that dang Registration problem on the MediaWiki sigh.

    By the way, you have to be registered and signed-in, to edit my Wiki.. whee! Which means, you’ll have to register on my blog, or forums first! This is why I’d like to get this MediaWiki registration figured out soon sigh..

    #51680
    spencerp
    Member

    Haha, Glad to hear you found it though! ;) :) I posted some other plugins I’m using in this blog post here:

    http://spencerp.net/id/4

    Shoot, I’m actually missing some there.. I’ll have to re-edit that post again soon.. Again, glad to see you found it, and thanks for checking through my forums.. :D

    spencerp

    *cough* You could join there ya know..? Lmao Ya don’t have too though.. =P

    #51679
    Nicki Faulk
    Member

    Not sure how I overlooked this one, but I was just wishing for something like this last night! :)

    (found via spencerp’s forums, hehehehe)

    #52851

    Yeah … it’s called profile_menu because it’s for your profile and not for the whole board =)

    You can add this function (with a new name like profile_menu_global) into a plugin so you don’t have to change the core files!

    Where are you from, Germany? I’m from Germany if you need more help ;-)

Viewing 25 results - 31,351 through 31,375 (of 32,188 total)
Skip to toolbar