Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 9,526 through 9,550 (of 32,511 total)
  • Author
    Search Results
  • #158177
    KatieKat
    Participant

    @robin-w ,

    Hi Robin,
    can I just clarify something here as my problem is different to milenushkas in that the fix of r5409 applied before adding 2618.4.diff definitely worked for subscribing to Topics and Replies.

    However there is still an outstanding issue in terms of subscribing to Forums which is exhibiting some weird behaviour. I worked on this late into the night and found your plugins and was hoping the topic- subscribe would solve the issue when subscribed to a forum but unfortunately it didn’t.

    For anyone else following this thread my understanding from @netweb (Stephen Edgar) is that when you are subscribed to a Forum a user will only be notified of New Topics and not to changes within existing ones which you need to subscribe to separately.

    So last night I tried the following:-
    1. As admin created a new topic in the backend. Absolutely no notifications received by other users subscribed to the Forum to show a new topic has been created but admin notified of pending Topic as expected.

    2. As a user created a new topic in the frontend. Absolutely no notifications received by other users subscribed to the Forum to show a new topic has been created but admin notified of pending Topic as expected.

    3. Weird behaviour. As admin created a topic in the frontend and this time a message was received by the user and admin !! However both the user message and admin message contained strange text. For the user at the beginning before the normal message of “You are receiving this email because you subscribed to a forum.” it showed the following – nb the items in bold have been changed for security purposes.

    :
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
    X-AntiAbuse: Primary Hostname – pxxxxxxxxxx.prod.phx3.secureserver.net
    X-AntiAbuse: Original Domain – aol.com
    X-AntiAbuse: Originator/Caller UID/GID – [47 12] / [47 12]
    X-AntiAbuse: Sender Address Domain – mywebsitename
    X-Get-Message-Sender-Via: pxxxxxxxxxx.prod.phx3.secureserver.net: acl_c_authenticated_local_user: myusername
    X-Source:
    X-Source-Args:
    X-Source-Dir:

    On the Admin notification I am getting the information below. However one thing I have noticed that is different to the email notifications for the topics and reply that is working is that the From details are showing as Website Name <mail@websiteurl> in the Forum notifications instead of Website Name <noreply@websiteurl>.

    The To details are showing as <noreply@websiteurl> on both the Forum Notifications and Topic/Replies Notification so somehow there is an issue with the From details picking up my default email address instead of the <noreply@websiteurl>.

    ADMIN NOTIFICATION
    noreply@mywebsitename
    A communication failure occurred during the delivery of your message. Please try resending the message later. For more tips to help resolve this issue, see DSN code 5.4.1 in Exchange Online – Office 365. If the problem continues, contact your email admin.
    The following organization rejected your message: DB3FFO11FD020.mail.protection.outlook.com.
    (NB the proper notification message is also attached within this information)

    Hope there is sufficient for you to troubleshoot this but cannot understand why a user creating a topic in the frontend and an admin creating a topic in the backend doesn’t generate any email but an admin creating a topic in the frontend does generate an email but contains spurious information for both the user and admin.

    Kind regards

    KatieKat

    #158176
    Robin W
    Moderator

    good start, but that approach gets very complicated, as whilst you have added the fields, you have not saved them or said where to save them – that requires a whole bunch of other code !

    Easier approach :

    bbpress uses wordpress registration, so it’s easier to hook to that.

    The whole bunch of code below is not my original work (but I do use it on one of my sites, so know it works) but if you have a play with it, you should be able to adapt it.

    `//add code for adding first and last name to registration

    //1. Add a new form element…
    add_action(‘register_form’,’myplugin_register_form’);
    function myplugin_register_form (){
    $first_name = ( isset( $_POST[‘first_name’] ) ) ? $_POST[‘first_name’]: ”;
    $last_name = ( isset( $_POST[‘last_name’] ) ) ? $_POST[‘last_name’]: ”;
    ?>
    <p>
    <label for=”first_name”><?php _e(‘First Name as people call you eg Dave’,’mydomain’) ?><br />
    <input type=”text” name=”first_name” id=”first_name” class=”input” value=”<?php echo esc_attr(stripslashes($first_name)); ?>” size=”25″ /></label>
    </p>
    <p>
    <label for=”last_name”><?php _e(‘Last Name’,’mydomain’) ?><br />
    <input type=”text” name=”last_name” id=”last_name” class=”input” value=”<?php echo esc_attr(stripslashes($last_name)); ?>” size=”25″ /></label>
    </p>
    <?php
    }

    //2. Add validation. In this case, we make sure first_name and last_name is required.
    add_filter(‘registration_errors’, ‘myplugin_registration_errors’, 10, 3);
    function myplugin_registration_errors ($errors, $sanitized_user_login, $user_email) {

    if ( empty( $_POST[‘first_name’] ) )
    $errors->add( ‘first_name_error’, __(‘ERROR: You must include a first name.’,’mydomain’) );
    if ( empty( $_POST[‘last_name’] ) )
    $errors->add( ‘last_name_error’, __(‘ERROR: You must include a last name.’,’mydomain’) );

    return $errors;
    }

    //3. Finally, save our extra registration user meta.
    add_action(‘user_register’, ‘myplugin_user_register’);
    function myplugin_user_register ($user_id) {
    if ( isset( $_POST[‘first_name’] ) )
    update_user_meta($user_id, ‘first_name’, $_POST[‘first_name’]);
    if ( isset( $_POST[‘last_name’] ) )
    update_user_meta($user_id, ‘last_name’, $_POST[‘last_name’]);
    }

    in essence start by looking at the end – 3. save

    and the line

    update_user_meta($user_id, ‘first_name’, $_POST[‘first_name’]);

    this is updating a user_meta field called ‘first_name’ for the user_id $user_id with the information entered in $_POST[‘first_name’]

    So it is saving the first name the user enters in a user_meta field for that user called ‘first_name’

    My plugin stores the data in a user_meta field called ‘rpi_label1’, so a find/replace to change ‘first_name’ to ‘rpi_label1’ is what is needed throughout the code. then some tidying up of things like the prompts and you should have it working.

    Give it a go, and see how you get on. IF you get it working, the deal is you post the result back here, and I can nick it for the plugin (and give you a credit) !

    If you don’t then come back with how you are getting on, and I’ll help – too tied up to do all the work myself !

    This code by the way goes in your functions file see

    Functions files and child themes – explained !

    #158173
    elucidateTX
    Participant

    Thought you said you hated code?!! 🙂

    Have you a specific registration template in mind, does your theme come with something?

    Ha no I don’t hate code! I’m just not any good at it yet. I’m using the Genesis Enterprise Pro theme.

    Here’s what I tried:
    1. Created a page and dropped the [bbp-register] shortcode into it.
    2. Copied the form-user-register.php file into the bbpress directory in my theme folder
    3. I added this form of code for each of the four rpi_label classes:

    `<div class=”rpi_label1″>
    <label for=”rpi_label1″><?php _e( ‘Class’, ‘bbpress’ ); ?>: </label>
    <input type=”text” name=”rpi_label1″ value=”<?php bbp_sanitize_val( ‘rpi_label1’ ); ?>” size=”20″ id=”rpi_label1″ tabindex=”<?php bbp_tab_index(); ?>” />
    </div>
    …for this one it’s an input field for the Class of my user

    Am I on the right track? The data entered doesn’t seem to be making it into the user database. After filling out the registration form for a test user…then going to edit the user…the data isn’t listed.

    Thanks!

    #158165
    Sebastian
    Participant

    Thanks for your time!
    But it would be possible to code it!?
    Perhaps we decide that it would be great to have this feature for our platform and hire someone.

    #158161
    Robin W
    Moderator

    Thought you said you hated code?!! 🙂

    Have you a specific registration template in mind, does your theme come with something?

    #158157

    Topic: Forum Width

    in forum Troubleshooting
    kc88
    Participant

    Hi I’m trying to reduce the width of my forum.

    Here is a link to the page. http://www.beastmodegamer.com/?page_id=2254

    I used the shortcode to insert the forum into the page. I want the forum to have a reduced width without taking up the entire width of the Page. Can anyone offer some advice?

    Thanks

    #158149
    Robin W
    Moderator

    ok, so

    create a directory on your theme called ‘bbpress’
    ie wp-content/themes/%your-theme-name%/bbpress

    where %your-theme-name% is the name of your theme

    find
    wp-content/plugins/bbpress/templates/default/bbpress/user-details.php
    Make a copy of this file, and put in in the directory called bbpress that you created above, so you end up with
    wp-content/themes/%your-theme-name%/bbpress/user-details.php

    bbPress will now use this template instead of the original

    Now edit that file so that you add a new line between line 16 & 17 which currently read

    <div id="bbp-single-user-details">
    <div id="bbp-user-avatar">
    
    

    so add

    <h1>  <?php bbp_displayed_user_field( 'display_name' ); ?> </h1>
    
    

    after this line so that you end up with

    <div id="bbp-single-user-details">
    	<h1>  <?php bbp_displayed_user_field( 'display_name' ); ?> </h1>
    	<div id="bbp-user-avatar">
    

    as the three lines.

    and save

    It should now display

    #158148
    Robin W
    Moderator

    A quick code to achieve such will be much appreciated.

    If it was I’d give it, but it would involve a rewrite of the function bbp_reply_author_link

    It’s quite do-able, but I don’t have the time – sorry !

    #158137
    Hitze
    Participant

    Delete Row 1302 “$url = add_query_arg( array( ‘redirect_to’ => urlencode( $redirect_to ) ), $url );”

    It works for me…. 😉

    #158130
    caneblu
    Participant

    @Kolya Korobochkin you are right, but i think the mistake born when admin use bbpress only on subsite, and not in wide mode. By the way, the bbpress shortcode for register isnt working.

    #158124
    Robin W
    Moderator

    ok, it hasn’t come through, so first of three replies to avoid the spam filter !

    WITHOUT CODE – I can do more if you accept coding!

    1. Alter the bbPress user profile page–adding new fields, editing existing fields and removing fields

    Try my plugin https://wordpress.org/plugins/bbp-profile-information/

    Lets you add 4 profile fields for users to update and you can optionally display these under the avatar on topics and replies.

    If you want to remove fields – that’s code, but let me know which ones you want to remove, and I’ll take a look.

    #158122
    –Q–Shadows
    Participant

    Hey fellas,

    After going through these forums for over 3 days and even thou I can across topics similar to this, the solution provided there just doesn’t work for me.

    What I am looking for is basically a simple way to distinguish easily between members of different roles, i.e., By allotting colors to Author names depending on their roles like Red for Admin, Blue for Participant, etc. This should not only display in a the topic/thread itself but also in the forum/topics list as well. A quick code to achieve such will be much appreciated.

    Next followup thing is to distinguish threads created by these members by highlighting the topic with in New Topics/Forums with the color assigned to the topic author. For ex: Threads created by Admin should be highlighted in Red.

    I have seen allot of folks here give their into helping out this growing community and I appreciate all that you guys are doing.

    Hoping someone could up with a quick set for this issue.

    Cheers.

    #158113

    In reply to: Error on deactivate

    crack00r
    Participant

    Line 65 is:
    if( is_page() || is_bbpress() ) {

    function travelify_theloop() {
    	if( is_page() || is_bbpress() ) {
    		if( is_page_template( 'templates/template-blog-large-image.php' ) ) {
    			travelify_theloop_for_template_blog_image_large();
    		}
    		elseif( is_page_template( 'templates/template-blog-medium-image.php' ) ) {
    			travelify_theloop_for_template_blog_image_medium();
    		}
    		elseif( is_page_template( 'templates/template-blog-full-content.php' ) ) {
    			travelify_theloop_for_template_blog_full_content();
    		}
    		else {
    			travelify_theloop_for_page();
    		}
    	}
    #158112
    crack00r
    Participant

    Hi, i have a wired problem.
    When i have bbpress activate, my page works fine.

    but when i deactivate the bbpress plugin, my mainpage stop working,
    and i get a php error in logs

    [10-Feb-2015 10:47:43 UTC] PHP Fatal error:  Call to undefined function is_bbpress() in /var/www/clients/client3/web3/web/wp-content/themes/travelify/library/structure/content-extensions.php on line 65
    
    #158108
    TTYP
    Participant

    Hi folks,

    I could really use some help! I’ve installed bbpress and it’s beginning to look good, but I’m having some problems with the table alignment.

    My theme is responsive but for some reason, the individual forum columns (ie freshness, topic, etc) aren’t holding their shape at all and keep running over onto the next line, making the forum look very messy on mobile.

    I have access to the CSS file but can’t figure out the code I need to make sure that the columns remain ‘fixed’, regardless of the screen size/orientation. Here’s a link – I would be very grateful if you could give me a hint as to what I need to change. I’m running wordpress 4.1 and the latest version of bbpress.

    Sweden & Denmark travel forum

    Thank you!

    #158101
    Robin W
    Moderator

    Welcome, and I wish everybody wrote such a clear problem definition !!

    Ok, what we need to do is to get bbpress to use the correct template/part of template that has the sidebar setup you want.

    This is always that hardest part of getting bbpress working, as theme authors do like to make complicated themes !

    First can you tell me what way bbpress is working in step 3 below

    Step by step guide to setting up a bbPress forum – Part 1

    #158087
    #158086

    In reply to: Oh Brother…

    markf1
    Participant

    Hi robin,

    I put my bbPress.php into the Twenty Twelve parent theme, activated the twenty tweleve theme, and the forum links still do not work / problem remains with that config.

    I tried the above with also removing the bbPress.php from my child theme. still no joy.

    I tried the above with my child theme activated. continued no luck.

    I made a page with the short code. links don’t work, problem remains.

    Thanks for your continued help!

    #158085
    Sebastian
    Participant

    I know where to add it if the code works but my basic understanding is not very good. Just html and css so far.
    What idea occurred to you?

    #158080

    In reply to: Oh Brother…

    Robin W
    Moderator

    ok, two thoughts

    1. if you put your bbpress.php into the twenty twelve parent theme, does it work ?- that will eliminate that file

    2. can you create a page and put the shortcode [bbp-forum-index] in it and see how that page works or not

    #158079
    Sebastian
    Participant

    Thanks for your reply.

    Yes thats right. I added a forum and a topic in the forum, and I want to use the reply form to let the user answerfrom another wordpress page into this specific topic – in my case I want to add the reply forum in a course page of learndash – I think they use the normal wordpress post.

    It works already with the shortcode [bbp-single-topic id=$topic_id], but then the reply form and specific topic with its answers is shown in the page. Thats too much.

    I thought of just adding the form reply and say the shortcode [bbp-reply-form] where it
    belongs to.
    Like the example: http://www.imageupload.co.uk/images/2015/02/08/shorcodeforminsidepage.jpg

    Is that possible?

    #158012

    Topic: Oh Brother…

    in forum Troubleshooting
    markf1
    Participant

    I have a custom theme site, child theme of twentytwelve. The links for the various forums and topics do not seem to be pointing to the correct places (individual forum, topic).
    http://www.telluridemountainclub.org/mtn-club-forums/

    When I click on anyone of the forums I get the “Oh Brother! No forums were found here.” message
    When I click on anyone of the topics I get the same “Oh Brother! No forums were found here.” message. I pretty sure that I have configured something incorrectly.

    In the theme folder I have put the bbPress.php. Below is the code in that file. Does my problem lie with the bbPress code that I used in this file?

    <?php

    /**
    * bbPress - Forum Archive
    *
    * @package bbPress
    * @subpackage Theme
    */

    get_header(); ?>

    <div id="p7CCM_3" class="p7CCM01 p7ccm01-fixed-960">
    <div class="p7ccm01-content-row p7ccm01-trans p7ccm01-dyn-img p7ccm-row">
    <div id="mtn-main-column-page01" class="p7ccm01-2col-auto-column1 p7ccm-col">
    <div class="p7ccm01-2col-auto-column1-cnt p7ccm01-content p7ehc-1">

    <?php do_action( 'bbp_before_main_content' ); ?>

    <?php do_action( 'bbp_template_notices' ); ?>

    <div id="forum-front" class="bbp-forum-front">

    <div class="entry-content">

    <?php bbp_get_template_part( 'content', 'archive-forum' ); ?>

    </div>
    </div><!-- #forum-front -->

    <?php do_action( 'bbp_after_main_content' ); ?>
    </div>
    </div>
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>

    Any suggestions for getting this to work will be greatly appreciated.

    Sebastian
    Participant

    Hi,

    I am using bbpress 2.5.4 and Wordporess 4.1 and everything work fine.

    Is it possibe to only display the reply form with the shortcode [bbp-reply-form] on any wordpress page or in my case at a course page from Learn Dash?
    as shown here:
    http://www.imageupload.co.uk/images/2015/02/08/shorcodeforminsidepage.jpg

    If I reply now the “Error: Topic Id is missing” (German: FEHLER: Themen-ID fehlt) appears. Ok, that’s traceable because I dint’s say the reply form where it belongs to. But adding a Topic ID to the shortcode like [bbp-reply-form id=223] doesn’t seem to be supported and nothing appears.

    Is there any way to do that? To say the reply form on any page in wordporess in which topic it should reply.

    I don’t want to add new topics to a forum or let the user select a forum from the dropdown (as described in the bbpress shorcode codex). I just want to have the reply form (without the topic posts) inside my course pages and let the people reply.

    Looking forward for any help or solutions.

    Grettings,
    Basti

    #157999
    Nicolas Korobochkin
    Participant

    @andreippo Do not change the plugin files (bbPress). Use MU plugins or write your custom plugin. I use MU. If you write custom plugin make sure what all hooks connects in the right sequence.

    Do not change the attributes passed to functions (they are correct). You can change logic inside functions and change the headers, title, text of outgoing emails.

    selena_network_ is my multisite prefix used in all functions at armyofselenagomez.com and selenaselena.ru.

    #157983
Viewing 25 results - 9,526 through 9,550 (of 32,511 total)
Skip to toolbar