Forum Replies Created
-
Hello
I have manage to config a script so that the members can add item to sell.
All other guest can se it on front page.In the profile users can see ads and how many.
The script is using grafityforms and add the product in to post types.But i have problelm with the edit…
I need a little bit help…
No demo is available
I have manage to rewrite a plugin, but I´m wondering one thing…
I have create the db to wp_cars
but when i connect to the db all i se is blank page:
function cars_get_total_posted($user_id=false){ if(!$user_id) $user_id=bp_displayed_user_id (); //Needs revisist global $wpdb; $count=$wpdb->get_var($wpdb->prepare("SELECT count('*') FROM {$wpdb->cars} WHERE post_author=%d AND post_type=%s AND (post_status='publish'||post_status='draft')",$user_id, cars_get_posttype())); return intval( $count); }
Hope someone can help me.
Now i have menage to rewrite a plugin to match the users demands…
They can add cars, image, info… 🙂Now i only nedd to add the select box for the brands…
and the link the the page that show all the info….hello
I´m not finish yet, but I have also figured out to add top menu and under sub.
I have one top and 3 sub menu..And i can see a page that i have in my theme…
now i need to manage to add the info… 😐
i dont whant to show the script but i can show a image
Hello
Thanks for the answer…
I have made a types ” Car ”
And then i add in the function.php :function bp_setup_sub_nav() { global $bp; // Add a nav item for this bp_core_new_nav_item( array( 'name' => __( 'SubNav', 'bp-subnavy' ), 'slug' => 'subnav', 'default_subnav_slug' => 'subnav', 'screen_function' => 'bp_subnav_screen_settings_menu', 'position' => 60 ) ); } add_action( 'bp_setup_nav', 'bp_setup_sub_nav' ); function bp_subnav_screen_settings_menu() { add_action( 'bp_template_content', 'bp_subnav_screen_settings_content' ); bp_core_load_template( apply_filters( 'bp_core_template_plugin', 'members/single/plugins' ) ); } function bp_subnav_screen_settings_content() { echo '<form name="profile" action="" method="post" enctype="multipart/form-data"> <?php wp_nonce_field("update-profile_" . $user_ID) ?> <input type="hidden" name="from" value="profile" /> <input type="hidden" name="action" value="update" /> <input type="hidden" name="checkuser_id" value="<?php echo $user_ID ?>" /> <input type="hidden" name="dashboard_url" value="<?php echo get_option("dashboard_url"); ?>" /> <input type="hidden" name="user_id" id="user_id" value="<?php echo $user_id; ?>" /> <table width="100%" cellspacing="0" cellpadding="0" border="0"> <tr> <td>Bilmärke</td> <td>[types usermeta=”my-select” user_id=”1?]</td> </tr> <tr> <td>Bilmodell</td> <td><input type="text" name="wtf_car-model" id="wtf_car-model" value="" size="30" style="width:97%" /></td> </tr> <tr> <td>Årsmodell</td> <td><input type="text" id="wpcf-arsmodell" name="wpcf_arsmodell" value="" size="30" style="width:97%" /></td> </tr> <tr> <td>Effekt / Vridmoment</td> <td><input type="text" name="wtf_effekt-vrid" id="wtf_effekt-vrid" value="" size="30" style="width:97%" /></td> </tr> <tr> <td>Motor, växellåda och avgassystem</td> <td><textarea class="theEditor" name="wtf_car-engine" id="wtf_car-engine" cols="60" rows="4" style="width:97%"></textarea></td> </tr> <tr> <td>Effekt och prestanda </td> <td><textarea class="theEditor" name="wtf_car-effect" id="wtf_car-effect" cols="60" rows="4" style="width:97%"></textarea></td> </tr> <tr> <td>Chassi</td> <td><textarea id="wpcf-textarea-chassi" name="wpcf_chassi" rows="5" cols="60" rows="4" style="width:97%"></textarea></td> </tr> <tr> <td>Fälgar, däck och bromsar</td> <td><textarea class="theEditor" name="wtf_car-tire" id="wtf_car-tire" cols="60" rows="4" style="width:97%"></textarea></td> </tr> <tr> <td>Interiör / Inredning</td> <td><textarea class="theEditor" name="wtf_car-interior" id="wtf_car-interior" cols="60" rows="4" style="width:97%"></textarea></td> </tr> <tr> <td>Bilstereo och multimedia</td> <td><textarea class="theEditor" name="wtf_car-stereo" id="wtf_car-stereo" cols="60" rows="4" style="width:97%"></textarea></td> </tr> <tr> <td>Exteriör / Styling/td> <td><textarea class="theEditor" name="wtf_car-styling" id="wtf_car-styling" cols="60" rows="4" style="width:97%"></textarea></td> </tr> <tr> <td>Framtidsplaner</td> <td><textarea class="theEditor" name="wtf_car-planer" id="wtf_car-planer" cols="60" rows="4" style="width:97%"></textarea></td> </tr> <tr> <td align="center" colspan="2"><input type="submit" value="Update" /></td> </tr> </table> <input type="hidden" name="action" value="update" /> </form>'; }
But i dont now how i can the information from the dashboard car:
Becouse there i can add manual cars…But i whant that the users can add cars.
add_filter('manage_edit-cars_columns', 'add_new_cars_columns'); function add_new_cars_columns($listings_columns) { $new_columns['cb'] = '<input type="checkbox" />'; $new_columns['title'] = _x('Car name', 'column name'); $new_columns['author'] = __('Owner'); $new_columns['thumbnail'] = __('Thumbnail'); $new_columns['make'] = __('Make'); $new_columns['date'] = _x('Date', 'column name'); $new_columns['ratings'] = __('Ratings'); return $new_columns; } add_action('manage_cars_posts_custom_column', 'manage_cars_columns', 10, 2); function manage_cars_columns($column_name, $id) { global $post; switch ($column_name) { case 'id': echo $id; break; case 'thumbnail': echo get_the_post_thumbnail( $post->ID, 'car_poster' ); break; case 'make': $post_type = get_post_type($post_id); $terms = get_the_terms($post_id, 'make'); if ( !empty($terms) ) { foreach ( $terms as $term ) $post_terms[] = "<a href='edit.php?post_type=cars&make={$term->slug}'> " . esc_html(sanitize_term_field('name', $term->name, $term->term_id, $taxonomy, 'edit')) . "</a>"; echo join( ', ', $post_terms ); } else echo '<i>No terms.</i>'; break; case 'condition': $post_type = get_post_type($post_id); $terms = get_the_terms($post_id, 'condition'); if ( !empty($terms) ) { foreach ( $terms as $term ) $post_terms[] = "<a href='edit.php?post_type=cars&condition={$term->slug}'> " . esc_html(sanitize_term_field('name', $term->name, $term->term_id, $taxonomy, 'edit')) . "</a>"; echo join( ', ', $post_terms ); } else echo '<i>No terms.</i>'; break; default: break; } // end switch } ?>
Hello
Did you find a solution to you car problem, I searching that plugin my self.
I wonderng if i would rewrite the portfolio plugin to match the add members cars.I hope that we can help each other….
Hello..
I whant to try to manage it my self…
I whant to have a comunity where members can sign up.
And in every member page the user can add a car that they own.
Add image, text för the car.
And other member can rate that car.And the user can add blogg, topics, gallery, friends based on theirs profile (user)
But i dont now where to begine.
With plugin do i need, how can i make the registration form…