Search Results for 'code'
-
Search Results
-
Hello,
I would like to add 2 more textarea fields in “Create New Topic” page in addition to an original textarea of bbPress.
I added following code to function.php, but an original textarea of bbPress was disappeared and couldn’t become submit, error of “ERROR: Your topic cannot be empty. “.
——————————-
add_action ( ‘bbp_theme_before_topic_form_content’, ‘bbp_extra_fields’);
function bbp_extra_fields() {
$value = get_post_meta( bbp_get_topic_id(), ‘bbp_extra_field1’, true);
echo ‘<label for=”bbp_extra_field1”>textarea1</label><br>’;
echo “<textarea name=’bbp_extra_field1′ rows=’10’ cols=’78’ value='”.$value.”‘></p>”;$value = get_post_meta( bbp_get_topic_id(), ‘bbp_extra_field2’, true);
echo ‘<label for=”bbp_extra_field1″>textarea2</label><br>’;
echo “<textarea name=’bbp_extra_field2′ rows=’10’ cols=’78’ value='”.$value.”‘></p>”;
}add_action ( ‘bbp_new_topic’, ‘bbp_save_extra_fields’, 10, 1 );
add_action ( ‘bbp_edit_topic’, ‘bbp_save_extra_fields’, 10, 1 );function bbp_save_extra_fields($topic_id=0) {
if (isset($_POST) && $_POST[‘bbp_extra_field1’]!=”)
update_post_meta( $topic_id, ‘bbp_extra_field1’, $_POST[‘bbp_extra_field1’] );
if (isset($_POST) && $_POST[‘bbp_extra_field2’]!=”)
update_post_meta( $topic_id, ‘bbp_extra_field2’, $_POST[‘bbp_extra_field2’] );
}add_action(‘bbp_template_before_replies_loop’, ‘bbp_show_extra_fields’);
function bbp_show_extra_fields() {
$topic_id = bbp_get_topic_id();
$value1 = get_post_meta( $topic_id, ‘bbp_extra_field1’, true);
$value2 = get_post_meta( $topic_id, ‘bbp_extra_field2’, true);echo “textarea1: “.$value1.”<br>”;
echo “textarea2: “.$value2.”<br>”;
}
——————————-What I want to do is;
・There are 3 of textarea fields in “Create New Topic” page.
・After submitted, the content being input in 3 textarea are shown in 1 original posted textarea like,<p>
content of textarea1
</p>
<p>
content of textarea2
</p>
<p>
content of textarea3
</p>If anyone know it, please help me.
Thanks,
Hi,
I started to setup my first forum.
For me it is necessary to share files.
I’m using the WordpRess Download Manager PlugIn
https://wordpress.org/plugins/download-manager/
to share files and I have the following problem:I would like to use the Short-Codes (e.g. [wpdm_package id=’120′])
of the Download Manager to insert files into a Topic, but ist doesn’t work.
The Topic displays only the commands and doesn’t display the designed download buttons.Is anyone able to help? Or should I use an other PlugIn to share files?
Thx for your help.
Topic: Multiple create topic forms
Is it possible to have more than one create a topic form on the forum page?
I’d like one at the top and bottom of the forum list, i’ve added a second
<?php bbp_get_template_part( 'form', 'topic' ); ?>to the top of content-single-forum.php
They are both hidden inside collapsing divs which are toggled by a “new topic” button, the first form at the top works fine but the second at the bottom shows no quicktags-toolbar.
What do I need to do so that both work?
I also have an issue where if I press tab from inside the topic title field of the first form it moves me down to the second forms “wp-editor-area”
Hi there,
I have been trying to follow the instruction on your page: http://codex.bbpress.org/modal-login-in-a-menu/
I searched online and via the wordpress dashboard for the plugin mentioned ‘wp modal login’ and I can’t find it?
If not, does anyone have the link for it, or instructions for another one that will work with bbPress? (I’m using the most recent version of WordPress, bbPress and Canvas theme)
Many thanks
Hi there,
I’ve been working around bbpress for the past 5 hours, and i’m now using the plugin bbpress addition shortcodes to build my forum.
This is my forum:
http://invaderz.pt/community/?page_id=29As you can see, i have multiple forum indexes, but they all have the same name. But i need them to have different names from each other.
Is there anyway to do this?Thank you for you time,
MiguelTopic: profile page links??
Hello everyone, I’m having a problem. I am using something called uerpro, and I integrated it into bbpress, but it now makes it where the profile links to the userpro profiles. This is what I want, but I was wondering if the things like: New posts, replies, signature and everything that was in the bbpress profile page can be put into the userpro profile page. It uses a single page as the template, so if there are shortcodes or something, that would be perfect. Thank you for any help!
Hello!
I’ve stumbled across that problem today. Let’s say I make a forum of ID 65 private in bbPress’ settings.
Then, somewhere in my template I’m using get_posts to pull some custom post type content which has nothing to do with the forums. When there is no user with sufficient privileges logged in, bbPress adds following SQL to my query:
... INNER JOIN wp_postmeta ON ( wp_posts.ID = wp_postmeta.post_id ) ...
and... AND ( ( wp_postmeta.meta_key = '_bbp_forum_id' AND CAST(wp_postmeta.meta_value AS SIGNED) != '65' ) ) ...which always ends up breaking my query, since the posts I’m querying for do not have meta_key entries of ‘_bbp_forum_id’.
I’ve switched the plugin off temporarily, but that doesn’t solve the problem for good.