laurahreniucu
Forum Replies Created
-
Forum: Plugins
In reply to: [db-form] Select exampleWow, Im so sorry I haven’t seen this earlier.
Here is my solution:
[select name="sex" id="sex" id="ug_select" description="Sex" values="Male,Female"]
I hope it helps you, if you still need it.
Happy coding ??
Forum: Plugins
In reply to: [Anything Popup] Popup appearing too lowAah, yes, I remember this post. I think this was my salvation too, not the link I gave you.
I will mark this post as resolved.
Forum: Plugins
In reply to: [Anything Popup] Popup appearing too lowThis link helped me a lot. I don’t use this plugin anymore, because the client doesn’t want a pop-up anymore. But I hope this will solve your problem.
https://attractiveweb.net/howto-make-anything-popup-wordpress-plugin-responsive/
Forum: Plugins
In reply to: [Anything Popup] execute phpi would like this also ??
Is it possible to send you a private message or e-mail with screenshots to the site? Because the modifications I’m making now are on my local environment, and will be posting them live when I will manage to make the header look good ??
Hello. Thank you for the quick response.
The theme I am using is called Zoren. And it is responsive. I am a noob when it comes to css. And I can’t figure out what i’m doing wrong…
Forum: Plugins
In reply to: [NextGen Public Image Uploader (PUP)] Auto approve imagesHi and thanks for the answer.
In the meantime I used another plugin, but I will mark this as resolved for other people to use.
Thanks
Forum: Plugins
In reply to: [db-form] Select exampleNever mind. I figured it out, by checking the code
Forum: Plugins
In reply to: [TablePress - Tables in WordPress made easy] Edit directly on pageThank you for your answer. Unfortunately, it is not ??
But i will keep this plugin in mind for other projects. It’s great.
Thank you
Forum: Plugins
In reply to: [BuddyPress Docs] save new fields in databaseI found the “save” function in query-builder.php . But I couldn’t find any way to get the info inserted in the new docs form into the database.
I found:
$defaults = array( 'post_type' => $this->post_type_name, 'post_title' => $_POST['doc']['title'], 'post_name' => isset( $_POST['doc']['permalink'] ) ? sanitize_title( $_POST['doc']['permalink'] ) : sanitize_title( $_POST['doc']['title'] ), 'post_content' => sanitize_post_field( 'post_content', $doc_content, 0, 'db' ), 'post_status' => 'publish' );
But when i edit this “defaults” to add more fields it doesn’t do anything. My try:
$defaults = array( 'post_type' => $this->post_type_name, 'post_title' => $_POST['doc']['title'], 'nr_data_contract' => $_POST['nr_data_contract'], 'nr_data_fisa' => $_POST['nr_data_fisa'], 'post_name' => isset( $_POST['doc']['permalink'] ) ? sanitize_title( $_POST['doc']['permalink'] ) : sanitize_title( $_POST['doc']['title'] ), 'post_content' => sanitize_post_field( 'post_content', $doc_content, 0, 'db' ), 'post_status' => 'publish' );
“nr_data_contract” and “nr_data_fisa” are the ids of the new fields in the docs creation page.
Is there something else i have to do to get the data in the database?Thanks
Ok, so i need to configure this plugin directly from the server, right? And it is completely compatible with Buddypress? I won’t lose any data?
Forum: Plugins
In reply to: [BuddyPress Docs] Unread Docs countI managed to solve this. Here is the code if anyone needs it (i put in the functions.php file)
function bp_docs_get_unread_count_group($user_id = false, $group_id) { if ( false === $user_id ) { $user_id = bp_loggedin_user_id(); } $doc_count = 0; $unread_key = 'read_by_user_' . $user_id; $docs_args = array( 'doc_slug' => '', 'group_id' => $group_id, 'posts_per_page' => '-1' ); $query = new BP_Docs_Query( $docs_args ); $query->get_wp_query(); if ( $query->query->have_posts() ) { $docs = $query->query->posts; } if(count($docs) > 0) { foreach ($docs as $doc) { $meta=get_post_meta( $doc->ID, 'read_by_user_' . $user_id ); if($meta[0] == '1' && sizeof($meta) > 0) { $doc_count++; } } } if ( !$doc_count ) $doc_count = '0'; if( $doc_count == 0) { $doc_count = ''; } return $doc_count; }
Forum: Plugins
In reply to: [BuddyPress Docs] Send doc attachment as e-mail attachmentI want to update my question.
So, near the “Delete” button on the edit doc page, i added a “Send” button. I want this button to open a popup, where the user can write an e-mail address. After that, the attachment will be sent to that e-mail address.
How can I do this?
Forum: Plugins
In reply to: [BuddyPress Docs] Default doc permissionsHi gabokappa.
I’m not really sure, but i guess it was in “\plugins\buddypress-docs\includes\query-builder.php” in “set_up_levels” function
Search for comment (should be around line 545)
// The 'read' setting must also be saved to a taxonomy, for // easier directory queries
Below this I have
$read_setting = 'admins-mods'; bp_docs_update_doc_access( $this->doc_id, $read_setting );
I hope this solves your request.
Forum: Plugins
In reply to: [BP Group Hierarchy] Recursive functionThank you David Dean for the response.
I’m actually struggling with the recursive function. I can’t seem to make it work.
This is my code so far (the ‘else’ is just a dummy for now):
function bp_docs_get_unread_count_group($user_id = false, $group_id) { if ( false === $user_id ) { $user_id = bp_loggedin_user_id(); } $unread_post_count = 0; $children = BP_Groups_Hierarchy::has_children( $group_id ); if($children.length > 0) { foreach($children as $child) { $unread_post_count = $unread_post_count + bp_docs_get_unread_count_group($user_id,$group_id); } } else { $unread_post_count = 1; } if( $unread_post_count == 0) { $unread_post_count = ''; } return $unread_post_count; }