Forum Replies Created
-
In reply to: img tags
function outlet_encode_bad( $text ) {
$text = wp_specialchars($text);
$text = preg_replace('|<(/?strong)>|', '<$1>', $text);
$text = preg_replace('|<(/?em)>|', '<$1>', $text);
$text = preg_replace('|<(/?a.*?)>|', '<$1>', $text);
$text = preg_replace('|<(/?ol)>|', '<$1>', $text);
$text = preg_replace('|<(/?p)>|', '<$1>', $text);
$text = preg_replace('|<(/?img.*?)>|', '<$1>', $text);
$text = preg_replace('|
|', '
', $text);$text = preg_replace('|<(/?ul)>|', '<$1>', $text);
$text = preg_replace('|<(/?li)>|', '<$1>', $text);
$text = preg_replace('|<(/?blockquote.*?)>|', '<$1>', $text);
$text = preg_replace('|<(/?code)>|', '<$1>', $text);
$text = preg_replace(“|
(.*?)
|se”, “‘' . encodeit('$1') . '
‘”, $text);return $text;
}
..should work, but doesn’t.
Ok, how bbPress does it is that it takes every < and > and replaces them with the < and > characters.
Then, it goes through the above list (the exceptions) and turns the lt’s and the gt’s back to actual <‘s and >’s. I can’t get it to recognize the img tag though, because regular expressions confuse the hell out of me. If anybody can get it to recognize the img tags, you’d be making a lot of people happy. For now I am going to take a break…
In reply to: img tagsAdded this to the above function… still nothing
function outlet_encode_bad( $text ) {
$text = wp_specialchars($text);
$text = preg_replace('|<(/?strong)>|', '<$1>', $text);
$text = preg_replace('|<(/?em)>|', '<$1>', $text);
$text = preg_replace('|<(/?a.*?)>|', '<$1>', $text);
$text = preg_replace('|<(/?ol)>|', '<$1>', $text);
$text = preg_replace('|<(/?p)>|', '<$1>', $text);
$text = preg_replace('|<(/?img)>|', '<$1>', $text);
$text = preg_replace('|
|', '
', $text);$text = preg_replace('|<(/?ul)>|', '<$1>', $text);
$text = preg_replace('|<(/?li)>|', '<$1>', $text);
$text = preg_replace('|<(/?blockquote.*?)>|', '<$1>', $text);
$text = preg_replace('|<(/?code)>|', '<$1>', $text);
$text = preg_replace(“|
(.*?)
|se”, “‘' . encodeit('$1') . '
‘”, $text);return $text;
}
add_filter( ‘encode_bad’, ‘outlet_encode_bad’, -1, 3);
There’s also the bb_autop function but that unfortunately is beyond me… I can barely understand regex as it is.
Anyone?
In reply to: img tagshmm.. thats essentially just a print statement in edit-form.php in the templates folder… I added it but it did not help.
In reply to: img tagsI just tried plugin-izing that but it didn’t work either… what are we missing?
<?php
/*
Plugin Name: Allow <img> tags in posts
Plugin URI: https://bbpress.org/forums/topic/149
*/
function outlet_bb_allowed_tags() {
$tags = array(
'a' => array(
'href' => array(),
'title' => array(),
'rel' => array()),
'img' => array(
'src' => array(),
'alt' => array(),
'title' => array()),
'blockquote' => array('cite' => array()),
'br' => array(),
'code' => array(),
'em' => array(),
'strong' => array(),
'ul' => array(),
'ol' => array(),
'li' => array()
);
return apply_filters( 'bb_allowed_tags', $tags );
}
add_filter( 'bb_allowed_tags', 'outlet_bb_allowed_tags', -1, 3);
?>
In reply to: img tagsindeed…
In reply to: freshness = -1 yearshttps://bbpress.org/forums/topic/30?replies=5
looks like this is already being discussed – the time zone isyour server time, not yours. the two may be different. My server is in California while I like on the east coast… i had to set it to -7.
In reply to: bbPress 0.73 releasedNow you guys just need to make a wiki, and a gallery!!!
In reply to: freshness = -1 yearsI’m having this same problem – little bit of patience/debugging shows that it stops reading “-1 years” after some time and starts behaving normally, but the time is still incorrect (off by some hours)
In reply to: another type of login problemcorrect! works now!
In reply to: bbPress 0.73 releasedGreat work! You and the rest of the bbPress team (whoever that might be) should be commended for your fast, quality development.
PS. the plugin works now and i’m so PSYCHED!
In reply to: another type of login problemok, no worries! I’m itching for it… itching!
In reply to: another type of login problemcool site, btw!
In reply to: Cannot login, Hide forumthe beauty of the .htaccess approach is that users wont be able to access *anything* inside of the forums directory without a password or intermediate to advanced haXXing skillz.
Is there anything in your control panel that allows you to do this? Look into it.
In reply to: another type of login problemThis is very hacking debugging but I put another print statement in, this time inside the custom function which prints “the code is being executed”
when the wpbb_user_sanitize function and that does not display on the page at any point during any sort of login, successful or unsuccessful.
Is there anything else you can suggest?
In reply to: sports templateI love seeing what people come up with for these forums! Good work.
In reply to: display_name – a column for the future?the one-word-login thing is inferior to wordpress’ login, which allows spaces in usernames. This will become problematic to people who are integrating with WP.
I agree though, that row should be added to the table.
In reply to: Cannot login, Hide forumhttp://www.javascriptkit.com/howto/htaccess3.shtml
There’s a (not) trivial tutorial on there, but you can do it! Just focus. If you don’t want users to even try to access it, dont provide a link, just email your dudes with the URL.
In reply to: another type of login problemIt still does not work. My forum is at outletzine.org/forums2
In reply to: hello from RussiaHello from America!
dyduiryuituio8t — you must explain your username to me!
In reply to: Cannot login, Hide forumThe quickest way to hide the forums is to simply delete the elements from the UI in the templates. Do you edit HTML or know somebody that does?
Just use <!– and –> to comment out the registration link, or comment out the php that renders it
You can also use an .htaccess file to make your forums directory password protected with a master user:pass.
If this is over your head, like i said, ask somebody. ask me!
The login problem seems to be troubling a lot of people, including myself.
In reply to: Call to underfined functionI got that and since it was a fresh install I just over wrote all of the files and re-uploaded it.
that seemed to work. __ is part of the i10|n thing which is probably in bb-includes…. debugging this would be a major pain, I’d say just copy the files over again.
In reply to: Can I import data from Phpbb2?Lucky for you, there’s already a thread about this –
In reply to: another type of login problemHas nobody else had this problem with spaces in the username?
Is the server returning any other database driven info anywhere else on your site? like is there anything else besides your forums that requires mysql data, and is that behaving properly?
define(‘BBDB_NAME’, ‘themboy7_bbpres’)
not “themboy7_bbpress”?
if that’s not the case then you should perhaps contact your ISP to see if the database server is up and running (unless you can tell because your page is successfully completing other mysql queries)