Search Results for 'code'
-
AuthorSearch Results
-
September 16, 2013 at 11:30 am #137159
In reply to: Add page to your personal cabinet
tiktak007
ParticipantWrote this:
add_rewrite_tag( '%custom%', '([1]{1,})' ); add_rewrite_rule( 'users'. '/([^/]+)/custom/&$', 'index.php?' . 'bbp_user' . '=$matches[1]&custom=1', 'top');But when you go to the page user/admin/custom, 404 page is displayed
September 16, 2013 at 9:35 am #137157Topic: add new topic button on top
in forum Installationoligou
ParticipantHello,
WP version : 3.6.1
bbpress : 2.4Please, is there someone to clarify these :
I want to have a “new topic button” on top of each forum. I found some info here, I created a page with shortcode [bbp-topic-form].
And now ?
How can I have this link on the top of my forum ?
I’m not a develloper.Thank you
September 16, 2013 at 8:43 am #137154In reply to: Help with importing from WBB3.1
inspirationally
ParticipantWow, great work!! Thank you so much!
Baby sleeping, big one sent to kindergarden, so I have a bit of time, too.Little changes in your version:
replaced
'from_tablename' => 'forum',with
'from_tablename' => 'wbb1_1_board',at forum status and forum board
(Btw. everyone may use another board ID!!!) I have 1, some may also have wbb2_1_board and wcf2_ or even wbb1_2_board (if they have a second board – you can install two baords in one WCF – Community Framework – this is to change individually. The same goes for the language IDs. There may be more/different languages.
Signature import works (will have to see how to implement that later for buddypress maybe), just special characters don’t convert: “there’s Johnny.— – but that’s just a mini error,
languages work, too (I just have to see how to implement it),
I have whole topics with all their answers (what I did not have yesterday – instead a headache).
Categories work quite perfect, too!
Closed forums -> no idea, because I don’t have any. But it sounds correct.
BBCodes have been converted, too, besides a few like [align=center]The sortOrder does NOT work. Simply, because that field exists in wbb1_1_board, but it is empty.
This is saved in wbb1_1_board_structure with the fields parentID boardID and position.
I tried a table join here again and probably destroyed your clean coding once again. But it works, I just tested!!
See the updated wbb.txt from the top!!The author thing is bad,
It’d be great if they even were anonymous and not ME. Actually there are some pretty silly posts there, and I keep replying to myself this way. Hmmm…
But I can solve it with manually replacing User ID 1 with 0 where it is a topic or reply for now to MAKE it anonymous.I tried – because of the smilies not working and the special chars in the signature – an import with uncommenting the last lines (see wbb.txt)
Some Special Characters still wrong, but who cares for the few? as long as ä ö ü ß from German language work, everything is fine.
Smilies started to work. Great!!So the only thing left is the author and the passwords.
I tried to implement parts of a paid plugin WBB Bridge here, but even that didn’t work (plus we cannot simply use it because of the license)September 16, 2013 at 6:06 am #137145In reply to: Multiple Forums
Stephen Edgar
KeymasterSure is possible 🙂
Take a read of this to help you on your way https://codex.bbpress.org/getting-started-with-bbpress/
Make a category (forum) called ‘Fruits’ and then make your sub forums ‘Apples’, ‘Oranges’ etc
Make another category (forum) called ‘Vegetables’ and sub forums ‘Potatoe’, ‘Carrots’ etcCreate a WordPress page for each of your categories ‘Fruits’ and ‘Vegetables’
Use the
[bbp-single-forum id=$forum_id]bbPress shortcode on each of these pages with the forum_id of each category.September 15, 2013 at 10:27 pm #137132In reply to: Issue since upgrade to 2.4
Stephen Edgar
KeymasterI haven’t got much else to add except I think you have tried everything to find ‘spot the difference’ 😉
I am glad it is sorted though.
If you have SSH access to your host go on a code hunt 😉
grep -i -r 'bbp_list_forums' *and/orgrep -i -r 'bbp-forums-list' *This will find any reference to the term ‘bbp_list_forums’, there might be some rogue hiding spot where this is being used as a custom function somewhere.
September 15, 2013 at 9:11 pm #137129In reply to: Help with importing from WBB3.1
Stephen Edgar
KeymasterForum Section
- Added Forum Display Order using
wbb1_1_board.sortOrder - Added wbb1_1_board.boardType and callback method
callback_forum_typewhere category =1 & forum = 0 - wbb1_1_board.isClosed & callback method
callback_forum_statuswhere closed =1 & open = 0 - (Are the above values correct for these DB fields? I have guessed these ;))
Topic Section
- Changed callback method for Topic Language from
callback_topic_reply_counttocallback_topic_language - Added topic author ip
- Your SQL join for the topic content looks good
Reply Section
- Fixed ‘Reply parent forum id’ (we need the ‘parent forum’ here not the first ‘post id’, the inline docs were not very clear here)
- Removed ‘Reply Unregistered Author name’ (See #2347for more info)
User Section
- Added ‘User Signature’
wcf1_user.signature
Generally cleaned up the code and inline docs to match the other importers.
The updated version here: https://gist.github.com/ntwb/41b8bb57df78d1a1bd01
The differences between versions here: https://gist.github.com/ntwb/41b8bb57df78d1a1bd01/revisionsSeptember 15, 2013 at 5:51 pm #137122In reply to: Issue since upgrade to 2.4
Kaliceos
ParticipantAs you can see on line 478 from the code you pasted, the <br /> is here, but I guess it’s not interpreted because it’s just at the end of the < li > element, which is displayed inline. These CSS properties are not easy to use. Maybe a plugin added a css that caused the issue.
But your problem is solved, that’s the main thing 🙂
September 15, 2013 at 4:13 pm #137118In reply to: Help with importing from WBB3.1
inspirationally
ParticipantI’m too silly, damn. This is over my intelligence.
I have the problem, that the posts have the wrong post_parent, so that two topics are merged curiously.For example Post ID 9257 from the WBB board is attached to Thread ID 9257 from the old board, and I cannot see what I have to change. Please please help!
This took me now over 2 hours changing things and I haven’t found it. I guess it is this part, but I have no idea what to change:// Parent Post ID. // Note: We join the posts table because this needs to be the fist post of a topic. $this->field_map[] = array( 'from_tablename' => 'wbb1_1_thread', 'from_fieldname' => 'firstPostID', 'join_tablename' => 'wbb1_1_post', 'join_type' => 'INNER', 'join_expression' => 'USING (threadID) WHERE wbb1_1_thread.threadID = wbb1_1_post.threadID', 'to_type' => 'reply', 'to_fieldname' => 'post_parent', );I updated the wbb.txt above (where I also linked the WBB database structure).
September 15, 2013 at 3:18 pm #137116In reply to: Help with importing from WBB3.1
inspirationally
ParticipantHmm…unfortunately, all the posts written by unregistered users are assigned to ME (UserID = 1) automatically. Is there any possibility to give them the user ID 0 (=Anonymous) and in that case also save the username in postmeta?
// Reply unregistered author name (stored in postmeta) $this->field_map[] = array( 'from_tablename' => 'wbb1_1_post', 'from_fieldname' => 'username', 'to_type' => 'reply', 'to_fieldname' => '_bbp_anonymous_name', );September 15, 2013 at 1:56 pm #137110jenseo
ParticipantOk, I have partly found the problem!
I’m relying on Google’s jQuery-packs since these load much faster. I’m having the following code in my functions.php file:
// Load jQuery if ( !is_admin() ) { wp_deregister_script('jquery'); wp_register_script('jquery', ("http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"), false); wp_enqueue_script('jquery'); }When removing this line, it suddenly works. The problem is that I would like to keep using Googles libraries…
Any suggestions?
// Jens.
September 15, 2013 at 8:11 am #137105In reply to: Issue since upgrade to 2.4
Kaliceos
ParticipantI went to clan.wolflan.com and your source code looks like some paragraphs were added by your editor as I see some <p> and </p> in weird places. What software did you use to edit loop-single-forum.php or your functions.php ?
I was not able to check because some of your forums are private, but what’s the html source code for the list of subforums ? (I mean in the browser) Is there a <br /> between the list of subforums ? Because, when I watch your screenshot, subforums are not separated by a comma, so I guess the function did his job, but your code may be broken because you used WordPress editor or an other editor that deleted the <br />.
Anyway, in your case, the simplest solution may be using some CSS. And as you said, simple stuff first ! You wouldn’t need to change any php template. You may try something like that in your style.css or Custom CSS if you use Jetpack :
#bbpress-forums .bbp-forums-list li { display: block; }If it works, I don’t know what was the problem with the bbp_list_forums() function, but you will not need to use it and you can delete the custom loop-single-forum.php that you copied to your theme’s directory if you had not made other edits.
September 14, 2013 at 8:22 pm #137103In reply to: Import from Buddypress Legacy Group forums
palmdoc
ParticipantI am pleased to report I managed to successfully upgrade to bbPress from legacy forums
The proper code to put in the Forums page is:
[bbp-topic-index]September 14, 2013 at 4:20 pm #137098In reply to: Any plans to merge O2 features into bbPress?
Erlend
ParticipantThank you very much for chiming in Beau. Your points make sense, except the first one has me a bit confused. o2 is going to be a plugin, like bbPress. So isn’t “WordPress.com runs WordPress, not o2” just as true?
the code will be open source, so you’re welcome to take pieces and apply it to bbPress as well.
I sincerely hope that will be feasible. Excitedly looking forward to seeing o2 in action!
September 14, 2013 at 4:06 pm #137097In reply to: Any plans to merge O2 features into bbPress?
Beau Lebens
ParticipantI suppose there are a few reasons for this, but the most immediate are:
- Our primary goal is replacing our own internal communications platform (P2). That runs on WordPress.com, which runs WordPress, not bbPress (this is probably the biggest one).
- We (the team working on it) are more natively WordPress developers than bbPress specifically.
- Quite simply, we didn’t really think about it until we were already well along the way building it for WordPress.
There are no plans to do anything related to bbPress, but the code will be open source, so you’re welcome to take pieces and apply it to bbPress as well.
September 14, 2013 at 2:16 pm #137093In reply to: How to post code with backticks in it?
Hansaplastique
ParticipantOr is there an option to disable this feature?
September 14, 2013 at 2:14 pm #137092Topic: How to post code with backticks in it?
in forum InstallationHansaplastique
ParticipantI’m running 2.4 and WP 3.6.1.
It seems that bbPress converts backticks to code tags …Can anyone please explain to me how I can post code that has backticks in it?
I mean: the backticks are part of the actual code I’m trying to post in my forum? So they should NOT be converted.September 14, 2013 at 2:10 pm #137091Topic: Multiple Forums
in forum TroubleshootingTravis S.
ParticipantMy goal is to make multiple forums (around 10 when its all said and done). Each forum will be for different subjects but all related with each on a different page.
Per example… one forum will be on a specific fruit. So apple, oranges, etc. but would all fall under the umbrella Fruit (not my actual plans, but this was easier to explain).
Is this possible?
I’m currently running one bbpress install on the twenty-13 theme. I know there is a shortcode to show specific topics on a page, but I want each forum to show on just one page.
Note: ive been on wordpress.com for a little while and started over on the .org. So I’m completely knew to screwing around with php files. Not asking you to hold my hand through it all, but clear directions would be great. Sorry if this question is a repost and/or very basic and im just over thinking it.
Thanks in advance,
September 14, 2013 at 1:12 pm #137089In reply to: Allow HTML from users
Amin
ParticipantI’m using this, and it works fine:
if ( !function_exists( 'ja_filter_bbpress_allowed_tags' ) ) { function ja_filter_bbpress_allowed_tags() { return array( // Links 'a' => array( 'href' => array(), 'title' => array(), 'rel' => array() ), // Quotes 'blockquote' => array( 'cite' => array() ), // Code 'code' => array(), 'pre' => array(), // Formatting 'em' => array(), 'strong' => array(), 'del' => array( 'datetime' => true, ), 'span' => array( 'lang' => array(), 'style' => array() ), 'p' => array( 'dir' => array(), 'style' => array() ), 'div' => array( 'class' => array() ), // Lists 'ul' => array(), 'ol' => array( 'start' => true, ), 'li' => array(), // Images 'img' => array( 'src' => true, 'border' => true, 'alt' => true, 'height' => true, 'width' => true, ) ); } } add_filter( 'bbp_kses_allowed_tags', 'ja_filter_bbpress_allowed_tags' );September 14, 2013 at 9:10 am #137083In reply to: Kunena converter for bbPress 2.4
jbuesking
ParticipantWhen I run the script with the convert users option checked it throws the following error:
WordPress database error: [Unknown column 'users.userid' in 'field list'] SELECT convert(users.userid USING "utf8") AS userid,convert(users.password USING "utf8") AS password,convert(users.username USING "utf8") AS username,convert(users.email USING "utf8") AS email,convert(users.registerDate USING "utf8") AS registerDate FROM tvc4d_users AS users LIMIT 0, 100It appears to work if I don’t try to convert the users. I’ll dig into this later this evening but wanted to see if it’s something obvious?
September 14, 2013 at 7:42 am #137081In reply to: Help with importing from WBB3.1
inspirationally
ParticipantAllright, another thing I need help with:
In WBB, there's the field isClosed to create a WordPress status from it with this: // Topic status (Open or Closed) $this->field_map[] = array( 'from_tablename' => 'wbb1_1_thread', 'from_fieldname' => 'isClosed', 'to_type' => 'topic', 'to_fieldname' => 'post_status', 'callback_method' => 'callback_topic_status' );and
public function callback_topic_status( $status = 0 ) { switch ( $status ) { case 1 : $status = 'closed'; break; case 0 : default : $status = 'publish'; break; } return $status; }But there’s also a field called “isDeleted”, so I could also use
`// Topic status (Deleted)
$this->field_map[] = array(
‘from_tablename’ => ‘wbb1_1_thread’,
‘from_fieldname’ => ‘isDeleted’,
‘to_type’ => ‘topic’,
‘to_fieldname’ => ‘post_status’,
‘callback_method’ => ‘callback_trash_status’
);`and
public function callback_trash_status( $status = 1 ) { switch ( $status ) { case 1 : $status = 'trash'; break; case 0 : default : $status = 'publish'; break; } return $status; }The second, though, would overwrite the first, so that even closed topics that are not trash have the status publish again. Is there any chance to combine these two?
September 14, 2013 at 12:25 am #137071In reply to: bbPress 2.4 Now Available
jnarain
ParticipantHi,
I realize that the old workarounds (Code, Plugins etc.) for enabling the TinyMCE Full editor does not work anymore.
The newly added Post Formatting/ Add toolbar & buttons to textareas to help with HTML formatting option, does not enable the editor with full range of buttons and capabilities.
Any solution to bring the editor in full?
Regards,
Jinobi
September 13, 2013 at 9:06 pm #137067In reply to: Help with importing from WBB3.1
Stephen Edgar
Keymaster3. some users are twice now (like myself..who have been admins of wordpress and users of the forum). Can I simply merge them with
UPDATE wp_posts SET post_author = ’1′ WHERE post_author = ’2′; and it will count for the forum, too?If a user already exists in WordPress during the import a new user will be created called ‘Imported_Username’, you can go to wp-admins user panel and when you select ‘Delete User’ you will be prompted to delete all posts or attribute them to another user, select the later and all the topics/replies etc will be attributed to the user you selected.
4. the passwords – in WBB they are hashed by this:
$passwort = sha1($row->salt.sha1($row->salt.sha1($_POST[‘passwort’])));
so what do I write at the end of wbb3.php
public function authenticate_pass( $password, $serialized_pass ) {
$pass_array = unserialize( $serialized_pass );
return ( $pass_array[‘hash’] == md5( md5( $password ). $pass_array[‘salt’] ) );
}
or is this impossible and the users have to get the new password by mail?I am going to look at passwords next week for all the importers as my skills with PHP are only just beginning so this is all a bit tricky for me at the moment. 😉
So the best workaround is to have the users reset their password by email for now.
5. the imported users have no “Forum Role”. Is is “normal”? Is there any chance to automatically give them the forum role “Participant”?
Go to bbPress tools and run the repair tool ‘Remap existing users to default forum roles’ and that will do the trick. https://codex.bbpress.org/repair-forums/
6. do I have to keep the wbb3.php “forever” because of the passwords or can I delete it one day, even if not all members have com back yet?
If the passwords are not being converted you do not need to keep it, though I don’t see any issues why you would need to delete it.
Speaking of keeping it, can we include your WBB v3 Importer and distribute it with bbPress?
7. until now we have everything like private messages, profiles, friends and especially user groups (Moderators, crew members) with hidden forums. Do I see correct, that I can install both, import bbpress and afterwards attach for example our “Mods Only” to the group “Moderators” as group forum?
Currently bbPress only has: https://codex.bbpress.org/getting-started-with-bbpress/#creating-your-first-forum
Visibility: decide whether your forum is public, private or hidden.
Public – Anyone can see these forums
Private – Only logged in registered users can see these forums
Hidden: Only Moderators/Admins can see these forumsI see that every user gets a new User ID – old IDs are saved in table _bbp_converter_translator – will that table be kept? Maybe by this I have a chance to later import – somehow – private messages for buddy press!?
The translator table is not kept and the old user ID is stored in wp_usermeta as per this item in the ‘Example.php’ importer.
https://bbpress.trac.wordpress.org/browser/trunk/includes/admin/converters/Example.php#L458
// Store old User id (Stored in usermeta) 459 $this->field_map[] = array( 460 'from_tablename' => 'users_table', 461 'from_fieldname' => 'the_users_id', 462 'to_type' => 'user', 463 'to_fieldname' => '_bbp_user_id' 464 );I’ll take closer look at the importer and structure you linked to over the weekend and post back with anything else I can think of.
September 13, 2013 at 8:52 pm #137066In reply to: Import problem PHPbb – bbPress
Stephen Edgar
KeymasterAs far as I know there are no issues importing from phpBB v3.0.11
This doc has any known issues when using the phpBB importer:
https://codex.bbpress.org/import-forums/phpbb/Did your import fail at one point and you started the import again which would have caused duplicates?
To debug the issue further I would need some detailed information, particularly some SQL examples would be helpful.
If you still have issues after resting your forums and this constantly happpens please create a ticket on Trac https://bbpress.trac.wordpress.org/ with some detailed steps to reproduce the issue and I will take a look.
September 13, 2013 at 7:36 pm #137063In reply to: SMF Import to bbPress
Stephen Edgar
KeymasterJoe,
Thanks for looking at this I uploaded a new version with the fix above for the ‘to_type’ you mentioned above.
I have not started with the passwords as of yet, this is next weeks job to look at all the importers passwords sections and begin writing custom callbacks for all of them. With my limited PHP skills this is going to be a challenge indeed. I will be calling heavily on the code found in the phpBB importer to base the code on and then changing any calculating/algorithms as needed.
If you beat me to it, I could live with that 😉
September 13, 2013 at 5:09 pm #137060SysFailure0x5a
ParticipantFor some reason my last comment isnt showing up…
No, I even stripped all the plugins and themes out of the install, and removed/reinstalled bbpress. Same issue. I don’t feel that I had anything abnormal installed for plugins. Most of the popular plugins, jetpack, basic functionality stuff like image resizing/fitting, stat tracking, google analytics, shortcode stuff…
Here is another person who had the problem. I also found a thread on your bug tracking site regarding this issue for multisite from several versions back. Can’t find the link right now, but it said resolved… Not so sure that’s true.
and another
and another…
Admin user: "You do not have sufficient permissions to access this page"
It’s also broken for BRAND NEW sub sites with brand new admin usernames.
- Added Forum Display Order using
-
AuthorSearch Results