unsavouryindividual
Forum Replies Created
-
Sorry to waste your time. I am rebuilding from scratch. If it’s any consolation I’ll likely need one of your extensions soon.
Hi,
Sorry for the big gap in time. I’ve been busy.
I’ve installed WP on localhost with no other plugins and the Twenty-Twentry Three theme. The embedded registration and login forms simply don’t work. The registration form refreshes the page and the login form refreshes the page and reports “No user found with that username or email.”
There’s really no reason I can think of that it won’t work. For now I’ll make my own forms, so the issue isn’t urgent for me personally.Hi,
I received no error, just a page refresh and “username or password not recognised” notice. I can tell you for certain this isn’t user error as I use a password manager and the same password worked later.
I used the regular WP form also.However, re-enabling the problematic option didn’t reproduce the problem, so I can’t tell you much more. Something very odd is happening that may be beyond your plugin. On the event that it is, I’m sorry I’ve wasted your time. I’ll troubleshoot further and either get back to you or mark this resolved.
Thanks
Forum: Fixing WordPress
In reply to: Trouble with require once in a pluginThank you @alanfuller. You’re right that the file was present, just that $detect wasn’t defined. Your addition fixed my code!
Happy holidays
Forum: Fixing WordPress
In reply to: Trouble with require once in a pluginThat’s a fair point @alanfuller. I suppose I want more granular control that won’t be possible with CSS.
I know that my require is pointing toward the file because I got it wrong the first time and this following code doesn’t give me a ‘not found’ warning. So I assume the file has been included.
require_once __DIR__ . '/Mobile_Detect.php'; function subscribe_form(){ if ( $detect->isMobile() ) { $form_widget = new \MailPoet\Form\Widget(); return $form_widget->widget(array('form' => 1, 'form_type' => 'php')); }} add_shortcode('subscribe', 'subscribe_form');
$detect is defined in the github file I linked above and I’m able to call it everywhere except within a function in a plugin.
Why did my embedded link to the github project become “The page I need help with”? Good to be aware of for the future.
Thank you for your time
Forum: Developing with WordPress
In reply to: Help using javascript in archive loopThanks to bcworkz I have solved my puzzle. Here’s my work for anybody who might happen along here in the future.
Inside the loop:
<button style="background:#289700;" onclick="playEpisodes(<?php echo get_the_ID();?>)">Play Episode</button> <div style="display:none" id="invis-image<?php echo get_the_ID();?>"><?php echo $image[0];?></div> <div style="display:none" id="invis-mp3<?php echo get_the_ID();?>"><?php echo the_field('link'); ?></div> <div style="display:none" id="invis-url<?php echo get_the_ID();?>"><?php echo the_permalink(); ?></div>
Outside loop:
<script> function playEpisodes(theID) { // Make player visible document.getElementById("player").style.display = "inherit"; // Calculate Source IDs var imageElement = "invis-image" + theID; var mp3Element = "invis-mp3" + theID; var urlElement = "invis-url" + theID; // Insert the image var invisimg = document.getElementById(imageElement).innerHTML; document.getElementById("player-img").src = invisimg; // Insert URL var invisurl = document.getElementById(urlElement).innerHTML; document.getElementById("ep-url").action = invisurl; // Insert the mp3 var invismp3 = document.getElementById(mp3Element).innerHTML; // Play the mp3 document.getElementById("audio-source").src = invismp3; document.getElementById("download").href = invismp3; var audio = document.getElementById('audio-source'); audio.play(); document.getElementById("ply").style.display = "none"; document.getElementById("pse").style.display = "inline-block"; } </script>
And my player:
<div style="display:none" id="player" class="pcast-player"> <img id="player-img" style="width: 100px;float: left;padding: 10px;" src=""> <div class="pcast-player-controls"> <button id="ply" title="Play" class="pcast-play"><i class="fa fa-play"></i></button> <button id="pse" title="Pause" class="pcast-pause"><i class="fa fa-pause"></i></button> <button title="Remind" class="pcast-rewind"><i class="fa fa-fast-backward"></i></button> <button title="Forward" class="pcast-forward"><i class="fa fa-fast-forward"></i></button> <span class="pcast-currenttime pcast-time">00:00</span> <progress class="pcast-progress" value="0"></progress> <span class="pcast-duration pcast-time">00:00</span> <button title="Change Speed" class="pcast-speed">1x</button> <button title="Mute" class="pcast-mute"><i class="fa fa-volume-up"></i></button> <button title="Download" class="pcast-down"><a id="download" style="color:#fff" href="" class="fa fa-download" download=""></a></button> <form style="display:inline-block;" id="ep-url" method="get" action=""><button type="submit" title="Visit episode page">Episode details</button></form> <audio id="audio-source" src=""></audio> </div>
The functionality is that the button is clicked within an item in the loop, the fixed position player appears (display:none to display:inherit) with the post’s data loaded into it, it plays automatically, and can be replaced by clicking a button in another item – starting the process over again.
Thanks to the whole WordPress community!
Forum: Developing with WordPress
In reply to: Help using javascript in archive loopThank you @bcworkz ! This didn’t occur to me.
My reasoning behind me choosing to not simply switch the display attributes (good idea, by the way) is because I’m targeting an <audio> tag also and want to avoid having an invisible audio file playing on top of the currently selected one.
I could also just learn how to pause the hidden element with JQuery, come to think of it lolForum: Developing with WordPress
In reply to: Help using javascript in archive loopExcuse my noobish mistake. I forgot to change my onclick variable, but my function no longer wants to play ball.
Forum: Plugins
In reply to: [Podcast Player - Your Podcasting Companion] Can’t read my feedPlease forgive me. I’m very stressed this week. I should have been more attentive.
Thank you
Forum: Plugins
In reply to: [Custom Post Type UI] “CPT UI” brings me to “About”@tw2113 It seems this issue is technically solved. I’ll have to live with a workaround if I want to keep using this other plugin.
Thank you for your timeForum: Plugins
In reply to: [Custom Post Type UI] “CPT UI” brings me to “About”@tw2113 Yes, that URL brings me to the correct page.
I’m using Admin Menu Editor. This may also just be user error. Sorry if that’s the case
Forum: Developing with WordPress
In reply to: Registering multiple custom feeds errorThanks @bcworkz I’m more of a javascript guy and function layouts are confusingly similar.
Can you look at this amended code for my second feed and tell me if there’s something off? Do I add_action again? It doesn’t seem generate the feed or an error, either way.add_action('init', 'crRSS'); function crRSS(){ add_feed('cr', 'crRSSFunc'); } function crRSSFunc(){ get_template_part('rss', 'cr'); }
- This reply was modified 4 years, 1 month ago by unsavouryindividual. Reason: Old code snippet needed updating
Forum: Developing with WordPress
In reply to: Custom RSS not validatingThank you for your time @bcworkz, but I’m afraid it may have been abused. For whatever magical reason I can’t comprehend, player.fm started reading my feed and it’s working fine on Spotify.
The only thing I can do to help anyone potentially in my position is to say don’t bother with Google Play Podcasts namespaces – those people don’t know what they’re doing. Also, take a look at how my feed is arranged for an idea of what podcast aggregators are looking for.
Forum: Developing with WordPress
In reply to: Custom RSS not validatingHi and thanks @bcworkz
That’s strange. I imagined it was hierarchical when I followed a tutorial to that URL.
What’s also strange is that w3.org thinks it’s fine. Podbase thinks it’s fine. Brave Browser and Firefox display it like any ordinary unstyled feed, while Opera displays it without errors in its inbuilt feed reader.I should have shared the function snippet I was instructed to use:
add_action('init', 'customRSS'); function customRSS(){ add_feed('tab', 'customRSSFunc'); } function customRSSFunc(){ get_template_part('rss', 'tab'); }
I’ve solved my own puzzle!
.rpwwt-widget li { display:flow-root; } .rpwwt-widget img { float:left; }
- This reply was modified 4 years, 4 months ago by unsavouryindividual.