Search Results for 'code'
-
AuthorSearch Results
-
September 15, 2008 at 8:09 pm #66088
In reply to: WordPress + bbPress Integration 101
chrishajer
ParticipantNekita – the reason that works is because it’s not including the wp-blog-header.php (can’t find it), but it doesn’t error out because you’re saying “if it’s there, then include it”: otherwise, just continue on, but it’s not included.
So, it errors out when you don’t have the conditional, but with the conditional there, do you have access to WordPress functions, or you can just access specific theme files? Accessing the theme files would not require integration. But using the functions like get_header, get_sidebar, get_footer would all rely on integration being correct.
This assumes that the errors are the same as doyle640:
PHP Fatal error: require_once() [function.require]:
Failed opening required '../wp-config.php'
September 15, 2008 at 5:34 pm #67666In reply to: Can’t see posts if not logged in
chrishajer
ParticipantWhat plugins are you using? Are you using any that would restrict access to certain forums? Like the hidden forums or private forums plugins?
You didn’t make all your forums categories in the admin, did you?
Also, this error is shown when accessing the forum:
SELECT COUNT(*) FROM bb_privatemessages WHERE seen = 0 AND id_receiver =September 15, 2008 at 5:31 pm #66085In reply to: WordPress + bbPress Integration 101
chrishajer
ParticipantIs the wp-config.php actually located at ../ ?
Also, you could try the absolute path rather than a relative one. I have heard before that that might be a problem (although I’ve never seen that. I don’t use MAMP though.)
First verify if the wp-config.php is located ../ from bb-config.php. If it is, try the full absolute path rather than a relative one. Something like
/Applications/MAMP/htdocs/wp-config.php.September 15, 2008 at 12:52 am #67614In reply to: Integrated WP Installation – Can’t Login
nekita
MemberNarrowing down on the problem, I’m now able to log in even with the integration code added (by using the exact same setting for WordPress address and Blog address as used in General Settings), however the account is extremely limited in use.
It’s basically the same issue described by user doyle640 here (https://bbpress.org/forums/topic/wordpress-and-bbpress-integration-101/page/3), the Admin screen is unaccessable (blank page) as well as the Profile edit options, even the form to add a new topic is completely missing.
This is true for the Admin account as well as any user account.
Once the line “require_once(‘../wp-blog-header.php’);” is deleted from bb-config.php, everything is accessable as usual.
The login synchronization now works both ways as it should though.
September 14, 2008 at 6:15 pm #67586In reply to: bbPress Top 100 September '08 update
_ck_
ParticipantI did say “or regions” which should cover Europe

“Europe” is triggered by the use of the .eu domain
September 14, 2008 at 6:01 pm #67609_ck_
ParticipantWell you’ll have to test to make sure a wikipost isn’t created yet on that topic (and that topic hasn’t been made yet, and they don’t edit the link to change the topic name,link, etc.).
But adding bbcode style parsing to posts is very straightforward. You’ll need to use
preg_match_allon the$post->post_textsomething like this:
add_filter('post_text', 'make_wiki_links'); // you can also try 'pre_post' which will make it only process the text once during save and not everytime it's displayed
function make_wiki_links($text) {
if (preg_match_all("/[wiki](.*?)[/wiki]/sim", $text, $wiki_links)) {
foreach ($wiki_links[0] as $wiki_link) {
// do whatever you want to each $wiki_link here
}
}
return $text;
}You’ve got about a dozen problems to handle with this technique, including replacing the [wiki] parts afterwards with another preg_replace, good luck.
September 14, 2008 at 5:39 pm #67585In reply to: bbPress Top 100 September '08 update
Shagalaga
Member15. Europe
He? Europe is a continent not a country
September 14, 2008 at 11:52 am #67584In reply to: bbPress Top 100 September '08 update
Mark Barnes
MemberSlightly intrigued to come across this. I’m behind find-answers.net although it’s not in my profile, because (a) it’s not a personal site, and (b) it’s not officially released.
_ck_ How did you find it? I’ve not linked to it nor told anyone about it! Check the administrator profile, you’ll find the site has only been up four days! (So it wasn’t even live when the September top 100 was put up.) That is one reason I’m not yet sharing the code. Quite simply, it doesn’t work properly yet.
The other reason I’m not yet able to share the code is that I need to make sure the licence I want to use is compatible with the licences of the borrowed nntp libraries.
If it’s any interest, one of the forums currently has around 475,000 posts. That equates to 411Mb of MySQL data in all the bbpress tables (including indices). The posts table has 208Mb of data and a 162Mb index.
_ck_ They’re not fake sub-domains. I’ve simply grouped forums into helpful ‘clusters’ and added a subdomain (actually a separate bbpress installation) for each cluster (why buy a new domain for each site?). They look fake because find-answers.net just contains a tiny bit of php code which scans my database tables for the separate installations and presents it in a forum like view. But each site is a separate installation.
Finally, the main purpose of this was to present data from non-propagating newsgroups which most people can’t access. It was largely curiosity that led to me create subdomains for publicly accessible newsgroups. I’ve no idea whether Google will like it or not. There’s certainly other NNTP mirrors out there that do get indexed.
And you’re quite right about me needing the SuperSearch plugin! It is me that you’re talking to here: https://bbpress.org/forums/topic/fulltext-searching-very-slow
September 14, 2008 at 11:14 am #67608benzilla069
MemberAh sorry I explained what I want wrong.
I already have the wikipost section sorted out, when someone puts something in [wiki]pagename[/wiki] I wan’t it to create a new topic that will be wiki enabled. Just like in mediawiki when you use the pagename and it creates a new page.
September 14, 2008 at 9:25 am #67607_ck_
ParticipantOh I see you want to turn any post into a wiki by wrapping the text in [wiki]. There is a huge problem with your logic as the wikipost plugin allows anyone to edit a post by assigning a generic user to the post, which is the trigger. Replacing that with bbcode as the trigger instead would be far more difficult.
bbPress would not have any way to know to let another user edit the post until it scans the post_text for [wiki]. That’s going to be a huge problem.
by the way is translated to
<strong>not<center>
September 14, 2008 at 8:41 am #67632In reply to: Fulltext searching very slow
_ck_
ParticipantI’m curious about this issue as performance problems always intrigue me. You must be using 0.9 as 1.0 has an index on stickies by default.
As far as fulltext search there is a trick I use because of the multiple issues with fulltext (not only speed but fulltext can’t do words less than 4 characters until you customize and rebuild mysql). The trick is to use regex and do a two pass query where you first exclude all the posts without the words and then allow mysql to do a regular scan of the remaining posts.
Query example from my Super-Search plugin:
WHERE post_text LIKE '%".$term."%'" AND post_text REGEXP ':<:".$term.":>:[^']' "Compare the performance of that against a fulltext search that uses
"MATCH post_text AGAINST $term"I don’t have enough data to do a huge benchmark but some simple tests with the cache off shows 0.4 seconds for the trick and 0.9 for the fulltext.The only downside to the trick is you cannot do partial word searches that way. ie.
$term="cat"will only return posts with the exact word “cat” and not “cats” or “category”. But it should be way faster.Searching a huge number of posts is a non-trivial problem. It’s been known to crush other forums like vbulletin which has fancy code to prevent users from searching too often/too quickly and even disable search temporarily on high server load. Sites like Wikipedia have to go through several technically complex tricks to keep the search fast on that much data.
Many large sites end up using sphinxsearch to replace fulltext search. You could interface it to bbPress via their PHP api.
You can read more workarounds on the mysql fulltext search page (with far more knowledgeable people than me) http://dev.mysql.com/doc/refman/5.0/en/fulltext-search.html
September 14, 2008 at 4:26 am #66080In reply to: WordPress + bbPress Integration 101
isaacgreenspan
Member@ck:
based on my recollections, as i’m on a road trip and can’t readily pull up the code, WP2.6 (maybe older, too, i don’t know), in the midst of their new cookies, has an action hook that can be tapped at cookie-creation to make an additional cookie for bbPress to read (in my instance, bbPress is in /forums/ so the new cookie is restricted to that path). the function that destroys the cookies at logout doesn’t have an action hook, so it has to be overridden (it’s pluggable). on the bbPress end, it’s virtually identical–use an action hook at login to create the various cookies that WP expects, override the pluggable cookie-destroying function.
there’s also some work in syncing up all the various secrets.
it’s worth noting that the cookie that’s now restricted to wp-admin/ in WP2.6.x is the same cookie that was unrestricted in path previously, so the mechanics of the cookie contents and whatnot aren’t any different, just the path restrictions.
September 13, 2008 at 2:13 pm #67581In reply to: bbPress Top 100 September '08 update
_ck_
ParticipantSeptember also features the first site to be purposely excluded from the listings. Not that I am passing judgement on it as there are other sites far more dubious that are in the list where the content is not their own.
find-answers.net
It’s impressive in that someone wrote a bbPress to Usenet gateway. But its not right to include it on the list since there will be millions of posts in no time at all and they use a fake subdomain for each group.
At least it proves bbPress can handle such a load. They are going to really want my Super Search plugin (not released yet).
I do wish they’d share the code they made to accomplish that however, especially considering they seem to be using my theme, my plugins, my favicon, etc.
(What I really want is a Mailman to bbPress gateway!)
September 12, 2008 at 5:42 pm #67565In reply to: WordPress Forums Theme
contoaberto
Participantthank u very much, Chris.
I thought you integrated themes with them.
anyway, it would be great of you if you could offer it for dummies.

It’s an elegant theme.
September 12, 2008 at 2:32 pm #67616In reply to: Punaji.com Art and Stuff
thion
MemberFirst impression – “where should I click? What the heck this website is about? I’m living…”
Second impression – “StumbleUpon – first impression count” and in the moment you’re reading this I’m 20 sites away
.
September 12, 2008 at 10:46 am #67606benzilla069
MemberWell I just want it to detect when [wiki]pagename[/wiki] is used so I can run a bit of code(I’m currently modifying your wikipost script to be more of a wiki system.) I want it to create a new post and link to that post.
Looking at the code again I’m starting to wrap my head around what’s going on.
$simple = array('b' => 'strong',); // cut and copied exampleTurns all instances of into the html equivalent <center></center> but I just want it to recognise all instances of [wiki]wikipagename[/wiki] and then allow me to run code. I’ve been tinkering with the code most of the day but most of the time it seems to want to run the code I’ve written for all the posts and not just one 😡
September 12, 2008 at 3:23 am #67605_ck_
ParticipantYou don’t need to tamper with the regex.
Essentially you are adding the attibutes incorrectly.
This is wrong:
'wiki' => array('a','href')That means set a new tag called “wiki” with the attributes “a” and “href”. But really only “href” is an attribute.
I could help you more if I understood what
<wiki></wiki>was supposed to do.September 12, 2008 at 12:09 am #66073In reply to: WordPress + bbPress Integration 101
isaacgreenspan
MemberThough I hesitate to say this out loud, it is possible to integrate bbPress 0.9.0.2 with WordPress 2.6.x (I have a site running the two and logins to one part work in the other, cookies are properly set and cleaned up, etc.), BUT it requires plugins to both bbPress and WordPress (or, alternately, modification of core code) and I’d venture to guess that it might substantially weaken the cookie security introduced in WP2.6. If anyone is desperately interested, I can share details, but it’s messy.
September 11, 2008 at 9:44 pm #3983benzilla069
MemberHi I’m currently modifying your wiki post script(source once i’ve finished it) and I’m combining looking at your bbcode plugin and I’m trying to add a simple <wiki>something</wiki> tag and I’m having a trouble getting my head around how you do it.
Looking at this code:
$complex1 = array('wiki' => array('a','href'),'img' => array('img','src'));
foreach($complex1 as $bbcode=>$html){
if($bbcode=='wiki') {
var_dump($text);
/*$text = preg_replace('/(.+?)[/'.$bbcode.']/is','<'.$html[0].' '.$html[1].'="$1">',$text);*/
}
else {$text = preg_replace('/(.+?)[/'.$bbcode.']/is','<'.$html[0].' '.$html[1].'="$1">$1</'.$html[0].'>',$text);}
}
Now I was thinking removing everything after ‘wiki’ would work but nothing works. It calls var_dump at the moment but it calls it for all posts in the topic.
Any ideas? I haven’t used regular expressions before so I’m a bit lost.
September 11, 2008 at 7:25 pm #56069In reply to: Spoiler plugin?
fantatier
MemberNo, as I can see out of the plugin code the Javascript files has to be called “enhancedss.js”. If it is not called like this, the plugin is not able to find it. Am I right?
September 11, 2008 at 1:32 am #67572In reply to: Integrating to WP has broken the static front page
jpope
MemberThanks for the input. I’m pretty sure I’m off in the wrong direction, I’m just trying to dig through what the WP and BB code are doing under the covers so that I have a better understanding of where this problem is coming from. It’s simply the analytical part of me wanting to understand the whole system.
As for why, I am currently calling a few bbpress functions from my wp pages.
I’m actually reviewing what I’m using now to see if I can just eliminate the use of the bbpress functions on the WP pages. I think I can probably just eliminate the need (at least for now).
That said, I still want to dig in and get to the bottom of this. It seems like there should be a really easy answer for this (btw — I don’t think it’s the 404 problem from the other thread you linked).
Thanks again for the feedback. Given I’m doing this on my own time, I may not get back to it for a while (I have funded development to finish for work). I’ll post back when I have a chance to re-review this.
September 10, 2008 at 5:19 pm #67598In reply to: Request: anonym.to plugin
Shagalaga
Membersure

put this Code:
<script src=”http://js.anonym.to/anonym/anonymize.js” type=”text/javascript”></script>
<script type=”text/javascript”><!–
protected_links = “”;
auto_anonymize();
//–></script>
in your footer.php, just before </body>
i dont know how secure it is, but i use it to avoid any trouble, my users could do, eg somebody post a link to an illegal site
i think it makes the backtracking harder
September 10, 2008 at 4:55 pm #67568In reply to: Integrating to WP has broken the static front page
jpope
MemberSo I have confirmed that this happens even if I set both bbpress and wordpress to the default themes, so it is definitely not something in the themes I’ve customized.
I really wish I could find the code where wp is determining the post ID of the home/front page as I suspect that is the best place to start trying to tackle this.
September 10, 2008 at 2:06 pm #67471In reply to: Accents in username
Amir Habibi
Membermeitershaker:
be patient!!
September 10, 2008 at 12:33 pm #67596In reply to: Request: anonym.to plugin
Shagalaga
Memberok, did it myself, with a little code in the footer
-
AuthorSearch Results