oxxyfx
Forum Replies Created
-
Forum: Plugins
In reply to: [Awesome Weather Widget] Any way to convert the wind speed to kph?I actually used 60 instead of 300 above that way I saw the refreshed values after every 60 seconds
Forum: Plugins
In reply to: [Awesome Weather Widget] Any way to convert the wind speed to kph?For those like me, if you need to get this here is what you need to do. Add the following lines to your funtions.php:
add_filter('awesome_weather_wind_speed_text', 'hvrcf_awesome_weather_wind_speed_text'); function hvrcf_awesome_weather_wind_speed_text() { return $wind_speed_text = " km/h"; } add_filter('awesome_weather_wind_speed', 'hvrcf_awesome_weather_wind_speed'); function hvrcf_awesome_weather_wind_speed( $val ) { return $wind_speed = round ( $val * 3.6 ); }
please be aware that the default refresh cache is set to 30 minutes, so if you change anything on this code, you will see the results after you refresh in 30 minutes. To change that, you can add to the same functions.php:
add_filter('awesome_weather_cache', 'hg_awesome_weather_cache'); function hg_awesome_weather_cache() { return 300; // IN SECONDS }
Just don’t forget to change it back after you finished testing.
Forum: Plugins
In reply to: [Awesome Weather Widget] Change m/s to mph using shortcodesHello, so how would you do the same to display kph in the widget? I think the number is correct there showing m/s, to display kph we would need to multiply the number with 3.6 as well and then change the “m/s” text to “kph” as well.
Forum: Plugins
In reply to: [Participants Database] Separate edit record for admins and for membersWell, I tried all the variations from above and it did not give me results. So I guess the problem is that I am not reading the incoming url correctly?
Forum: Plugins
In reply to: [Participants Database] Separate edit record for admins and for membersOk, thank you for that, of course you are right, my lack of experience in programming php and web solutions really shows ?? So after all that, scratching my head around how to do this, I came up with the following code:
add_filter( ‘pdb-record_edit_page ‘, ‘change_edit_page_link’ ); function change_edit_page_link($url) { $urlnew = "https://somewebsite.com/wp/updaterecord/?"; $url_array = explode("?", $url); $privateid = $url_array[1]; if ( current_user_can( ‘edit_pages’ ) ) { return $url; } else { $urlnew .= $privateid; return $urlnew; } }
We must be getting closer ??
Forum: Plugins
In reply to: [Participants Database] Separate edit record for admins and for membersThanks for those links. I do not want to overcomplicate this and I sort of came up with the following code snippet. I have to mention that this is my first attempt to write any PHP code, so thank you for being a patient tutor ??
add_filter( ‘pdb-record_edit_page ‘, ‘change_edit_page_link’ );
function change_edit_page_link() {if ( current_user_can( ‘edit_pages’ ) ) {
return ‘https://someurl.com/edit_page_for_admin’;
} else {
return ‘https://someurl.com/edit_page_for_members’;
}}
Please don’t laugh….
Forum: Plugins
In reply to: [Participants Database] Separate edit record for admins and for membersNot really, this is the first time I heard about them. I guess this requires quite a bit more research from my end.
Would I add this piece of code to the functions.php?
Forum: Plugins
In reply to: [Participants Database] Separate edit record for admins and for membersThank you for that. I have searched your site back and forth trying to find some information on how can I use the pdb-record_edit_page filter, but I cannot find the right source. Would you be kind enough to point me to the correct direction.
Forum: Plugins
In reply to: [Participants Database] Change title of pdb_single result pageThank you! Changed the Group name and now it looks exactly as we need it. Brilliant!
Forum: Plugins
In reply to: [Contact Form 7] Attachment file as variableHello,
I want to send the membership card in attachment. The membership card is located at
https://mywebsite.com/wp/wp-content/uploads/participants-database/55769.pdf
where the 55769 is the [maac] variable. So I would need to make an attachment as:
uploads/participants-database/[maac].pdf
which comes back as an error, because it does not accept the variable in the attachment field.
Oxy.
I also have this issue on a brand newly installed plugin. The Global Setting and user permissions are empty. I also created a calendar and cannot set it to “Available”, plugin version: Version 2.5.7 with WordPress 5.4.1 running ColourMag theme. Running PHP version: 7.4.6
- This reply was modified 4 years, 9 months ago by oxxyfx.
I guess I just figured it out, I just had to remove the text from the “header (optional)” field and that solved the problem. Thank you.