Alex Howes
Forum Replies Created
-
AuthorPosts
-
Thanks, is that only possible for the Ajax chained select option?
Thanks for your answer to #2 Alex, but I think you misunderstood my first question. I have job listings which last for 30 days. If a user renews a job listing with 10 days to go (for example) the renewed listing is reset to 30 days. This means that in total they’ve lost 10 days on the listing. Is there a way to set it so that renewing the listing adds 30 days onto the previous expiry date, so that no time is lost?
Alex
August 26, 2018 at 4:44 pm in reply to: Let WPInvoicing email override GD for publish listing #444099Hi Guust,
In that link it seems that they were suggesting adding a line of code such as
if ($message_type = 'post_submit') { return; }
but that would stop the rest of the function being run, which might be problematic (since it also deals with admin emails, etc).
A simple solution might be to add a boolean $send_email in the function geodir_sendEmail in /geodirectory-functions/general_functions.php. On Ln749 add
$send_email = true
and on Ln 1000 add a filter
$send_email = apply_filters('geodir_sendEmail_bool', $send_email, $headers, $fromEmail, $fromEmailName, $toEmail, $toEmailName, $to_subject, $to_message, $extra, $message_type, $post_id, $user_id);
That way users can hook to the filter and set
$send_email = false
to prevent certain emails being sent on certain conditions. Then add
if($send_email)
around
$sent = wp_mail( $to, $subject, $message, $headers );
on Ln1002.
Although this would require a couple of changes in the core it’d give users a simple way of customising which emails they want to send (from looking in the support forums it seems quite a few people are wanting to do this.)
Alex
August 26, 2018 at 9:41 am in reply to: Let WPInvoicing email override GD for publish listing #444070Ah right, how do I deactivate the GD email? I didn’t know there was an option to do that.
AlexGreat, thanks Stiofan 🙂
Ok, I’ll do that.
August 11, 2018 at 12:57 pm in reply to: Edit link classes in geodirectory_hooks_actions.php #442029.geodir-addtofav is a sub class of .edit_link
The solution I suggested is simple. Don’t worry about it if it’s too much hassle.Alex
August 11, 2018 at 12:06 pm in reply to: Edit link classes in geodirectory_hooks_actions.php #442026Unfortunately
.single .edit_link a
targets both the claim link and the edit link.
Alex
Hi Guust,
I thought about renaming the contact field but wondered if it would cause problems further down the line, because of the content not being in phone number format?
Thanks for the information Paulo!
And sorry Guust, you’re right. I’d put that CSS in to stop more info appearing in the sidebar widgets, and hadn’t thought that site origin was using widget areas too. Thanks for letting me know 🙂
Hi Paulo,
Thanks for the advice. I’m trying to keep costs low so I might try to explore some alternatives first! 🙂
Alex
Hi Guust,
It doesn’t seem to be a CSS problem, the content just isn’t loading. When I inspect it, it isn’t there. The problem is in displaying the “more info” content in listings. Here is how it should look: http://www.barn-door.co.uk/register-a-farm/ and here is how it looks when I put it in a Site Origin editor: https://www.barn-door.co.uk/test/
The raw HTML for the Site Origin page is
<div id="pl-1720" class="panel-layout" ><div id="pg-1720-0" class="panel-grid panel-no-style" data-style="{"background_image_attachment":false,"background_display":"tile","cell_alignment":"flex-start"}" data-ratio="1" data-ratio-direction="right" ><div id="pgc-1720-0-0" class="panel-grid-cell" data-weight="1" ><div id="panel-1720-0-0-0" class="so-panel widget widget_sow-editor panel-first-child panel-last-child" data-index="0" data-style="{"background_image_attachment":false,"background_display":"tile"}" ><div class="so-widget-sow-editor so-widget-sow-editor-base"><h3 class="widget-title">[gd_listings post_type=gd_farm layout=1]</h3> <div class="siteorigin-widget-tinymce textwidget"> </div> </div></div></div></div></div>
If I strip out some of the divs it shows correctly again. The raw HTML for the working page is simply
[gd_listings post_type=gd_farm layout=1]
Let me know if you still need login details.
Thanks,
AlexHi Patrik,
Sorry, this was my fault. I added an extra line in the code meaning that it was only running on detail pages. I’ve now extended this to include preview pages too.
Thanks,
AlexHi Alex,
I’m using the code written by Paulo in the link I gave. The code is:
add_filter('geodir_detail_page_tab_list_extend', 'geodir_detail_page_tab_list_extend_profile') ; function geodir_detail_page_tab_list_extend_profile($tab_array) { global $post; // here is where we check the tab we want has info and then assign it to a global $post value. // you would change the 'gd_tab_3' to your tab key. if(isset($tab_array['gd_tab_3']['tab_content']) && $tab_array['gd_tab_3']['tab_content']){ $post->my_profile_extend = $tab_array['gd_tab_3']['tab_content']; // assign the content to global value $tab_array['gd_tab_3']['is_display']= false;// don't display the tab } // here we call a function that will get the global value and echo it. add_action('geodir_after_description_on_listing_detail','gd_extra_profile_tab_info'); return $tab_array; } // function that will get the global value and echo it. function gd_extra_profile_tab_info(){ global $post; if(isset($post->my_profile_extend) && $post->my_profile_extend){echo $post->my_profile_extend;} }
Alex
Thanks for the lightning fast response Paulo!
1) Sorted, thanks!
2) Glad I checked! 🙂
-
AuthorPosts