Forum Replies Created
-
not sure what that means – render a screen with the form? or create a worpdress page ?
perhaps you could describe what you want to achieve from what and to what.
In reply to: Stop redirect after submitting replyIn reply to: Critical error when I try to deinstall bbpresssuspect it might have been another plugin that was dependant on it, but anyway glad you are fixed.
In reply to: custom post type in bbpress forum boardoops semi colon missing from $image = line
<?php bbp_reply_author_link( array( 'show_role' => true ) ); ?> <?php $image_id = get_user_meta (bbp_get_reply_author_id(), 'profile-picture' , true) ; $image = get_post_meta ($image_id, _wp_attached_file, true) ; echo '<li>herestart'.$image.'hereend</li>' ; ?>
In reply to: custom post type in bbpress forum boardok, so we are making progress.
I don’t expect this to work, just to return the next stage
so amend that to
<?php bbp_reply_author_link( array( 'show_role' => true ) ); ?> <?php $image_id = get_user_meta (bbp_get_reply_author_id(), 'profile-picture' , true) ; $image = get_post_meta ($image_id, _wp_attached_file, true) echo '<li>herestart'.$image.'hereend</li>' ; ?>
In reply to: custom post type in bbpress forum boardthat’s fine, I wanted to see what was in the database ie in this case 1345, I suspect it is a reference to a media image
In reply to: custom post type in bbpress forum boardok, can you change the other one to
<?php bbp_reply_author_link( array( 'show_role' => true ) ); ?> <?php $avatar = get_user_meta (bbp_get_reply_author_id(), 'profile-picture' , true) ; echo '<li>herestart'.$avatar.'hereend</li>' ; ?>
In reply to: custom post type in bbpress forum boardtry
<?php $neighborhood = get_user_meta (bbp_get_reply_author_id(), 'user-subdivision' , true) ; echo '<li>'.$neighborhood.'</li>' ; ?>
come back if that doesn’t work
In reply to: custom post type in bbpress forum boardoops sorry, I’ll correct that
In reply to: Import from Asgaros Forumhmm…just loaded Asgaros to my test site, and it has it’s own tables
wp_forum_forums
wp_forum_topics
wp_forum_postsas well as several others dealing with subscriptions, polls and ads.
the issue with importing would be hooking forum_topics which holds header stuff with forum posts which holds the content, but also the replies.
What size is your current Asgaros forum – eg forums, topics replies?
In reply to: custom post type in bbpress forum boardfor the avatar, I need to know what is stored in the usermeta, so can you try adding this after line 44
<?php bbp_reply_author_link( array( 'show_role' => true ) ); ?>
to get
<?php bbp_reply_author_link( array( 'show_role' => true ) ); ?> <?php $avatar = get_user_meta (get_current_user_id(), 'profile-picture' , true) ; echo '<li>'.$avatar.'</li>' ; ?>
I need to see if this produces a url or link to media item etc.
In reply to: custom post type in bbpress forum boardok replace the
<?php echo 'hello' ; ?>
with
<?php $neighborhood = get_user_meta (get_current_user_id(), 'user-subdivision' , true) ; echo '<li>'.$neighborhood.'</li>' ; ?>
and let’s see if that does that one first
In reply to: Import from Asgaros Forumbut yes the answer is just a case of filling in the form, in the same sense as completing a crossword is just a case of writing the answers in the squares 🙂 🙂
In reply to: Import from Asgaros Forumno idea how asgaros stores the data in the database – is it separate tables or in posts/postmeta?
and different tables for forums vs topics vs replies ?
and does it use wordpress user ID’s?In reply to: Import from Asgaros Forum@scifikriss I see you have asked this many months ago.
The problem is that developing a script is a long tedious process requiring running the process many times, and having to reset databases in between. When I first started with bbpress in 2013 I imported a snitz database and it took 24 attempts over 2 weeks to succeed. https://bbpress.org/forums/topic/documented-import-from-snitz-access-database/
If you’d like me to look at what might be involved as a paid piece of work, contact me via
In reply to: Automatically unsubscribing to a topic when replyingyou can amend the topic and reply form templates and put those as hidden fields
In reply to: Automatically unsubscribing to a topic when replyingeither
or
once activated go to
dashboard>settings>bbp style pack>Topic/Reply Form item 6
In reply to: bbpress + divi template questionsso we need to work out which theme template is rendering the forum pages
looking at the page you gave me, I see that the template has a div of
<div id="content-area" class="clearfix">
This is probably a common div to several files, but we can use it’s presence to track down the file
so you need to look in your theme (wp-content/themes/%your-theme-name%) for likely files
If you have notepad++ (or another text editor that will do this) you can download your theme to your computer and do a search across all the files.
otherwise you might have files called page.php, single.php, content.php, content-page.php etc.
in each file where you find the
<div id="content-area"
then add a further class, but call each one something differenteg
<div id="content-area myclass1" class="clearfix">
<div id="content-area myclass2" class="clearfix">
etc.then use the browser inspector and hopefully you’ll find the class repeated in there which will tell you what template it is using
then come back
In reply to: custom post type in bbpress forum boardgreat, so now I need to know the names of the fields you want in the database
so I need to construct a bit of code that looks like
$neighborhood = get_user_meta ($user_id, ‘%what_the_field_is_called%’ , true) ;
so I need %what_the_field_is_called% for both field 🙂
In reply to: bbpress + divi template questionsok, so do you have a link to a forum page I can look at?
In reply to: Replace topic subscription textgreat – glad you are fixed !!
In reply to: bbpress + divi template questionsbbpress will render pages using a .php file – this can be one of many in your theme.
It is this file that you will need to edit and put in a child theme to get what you want.
so how familiar with files, FTP and code are you ?
In reply to: custom post type in bbpress forum boardfind
wp-content/plugins/bbpress/templates/default/bbpress/loop-single-reply.phptransfer this to your pc and edit
before line 56 which says
<?php do_action( 'bbp_theme_after_reply_author_details' ); ?>
add the following
<?php echo 'hello' ; ?>
and save
create a directory on your theme called ‘bbpress’
ie wp-content/themes/%your-theme-name%/bbpresswhere %your-theme-name% is the name of your theme
Then transfer the file you saved above and put in in the directory called bbpress that you created above, so you end up with
wp-content/themes/%your-theme-name%/bbpress/loop-single-reply.phpbbPress will now use this template instead of the original
You should now see ‘hello’ where you want the neighborhood field
If you get this far, then come back
In reply to: Replace topic subscription textok, try this
add_filter( 'gettext', 'rew_change_text', 20, 3 ); //This function changes the text wherever it is quoted function rew_change_text( $translated_text, $text, $domain ) { if ( $text == 'Subscribe' ) { $translated_text = 'Watch'; } if ( $text == 'Unsubscribe' ) { $translated_text = 'Unwatch'; } return $translated_text; }
In reply to: Replace topic subscription textuntested, but this should work
add_filter ('bbp_before_get_topic_subscribe_link_parse_args' , 'change_subscribe') ; function change_subscribe ($args) { $args['subscribe'] = 'Watch' ; $args['unsubscribe'] = 'Unwatch' ; return $args ; }
Put this in your child theme’s function file –
ie wp-content/themes/%your-theme-name%/functions.php
where %your-theme-name% is the name of your theme
or use