Leto
Forum Replies Created
-
This seems to work:
global $mingleforum; global $wpdb ; $lastvisit = $mingleforum->last_visit(); $threads = $wpdb->get_results("select distinct($mingleforum->t_threads.id) from $mingleforum->t_posts inner join $mingleforum->t_threads on $mingleforum->t_posts.parent_id = $mingleforum->t_threads.id where $mingleforum->t_posts.date > '$lastvisit' order by $mingleforum->t_posts.date desc"); $num_new_posts = count($threads, 0);
Actually, I am close to solving this myself, based on other non-Mingle threads. The following code works out the number of posts (non-forum posts?) in the last day:
$allDay = date('Y-m-d H:i:s', strtotime('-1 day')); global $wpdb ; $numpost = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->posts WHERE post_status = 'publish' AND post_type = 'post' AND post_date > '$allDay'");
I could probably attempt something similar with the Mingle posts.
Hi Steve,
I have been having similar problems, and so far have invested several hours trying to solve them. I think Jonathon is expecting you to have a specific place for registration, at which his registration form will appear. This can be achieved with the appropriate shortcodes on a new page.
The problem is that the ‘Register’ link in the default login widget, which I have put in a sidebar, points instead to https://yoursite/wp-login.php?action=register
It is not immediately apparent to a user of this plugin that this standard wordpress login/register page, which Jonathon’s plugin points to by default, is not actually looked after by his plugin and is guaranteed to produce errors when his plugin is running. Logging out also points to this page, so the sequence of logging out and then clicking on the ‘Register’ link at the wordpress logout page will also cause problems.
I suspect you are expected to redirect all ‘Register’ links to the registration page, and perhaps redirect ‘Forgot password’ links to yet another page, but there are rather unclear warnings in the plugin widget telling you not to automatically redirect URLS unless your widget is unique. What counts as unique, when the widget appears on every page? It is also not clear that the same URL will work for all the desired actions (login, register, forgot password, etc).
I haven’t yet found an easy way to have a login widget on my home page and have its ‘Register’ link point to the appropriate registration form, short of editing the plugin code directly. This will be my next approach and I will let you know if I have any success.
Cheers,
Craig.
Hi Jonathon,
Yes, I got it all working nicely.
I have a button up the top of my header that calls a custom javascript function. That function checks whether the contents of your widget password field have string length>1 and, if so, submits the form. If not, it scrolls your widget into view.
The automatic focus in your original code did not quite work for me, so I commented out the relevant line of code. It set the focus on the username field, which still left the password field off the page. It also meant the slider at the top of my page was partially out of view when the page first opened.
May I suggest you have an option, in the next release, of turning off the automatic focusing?
Anyway, thanks for the plugin. I had a look at several other login options and this was by far the neatest, especially with my minor modifications.
Cheers,
Craig (Kanjipad).
Sorry, the pasted code went live on me…
<a href="#" onclick="document.getElementById('loginform').submit(); return false;" title = "Login"> <img src="<?php echo bloginfo('stylesheet_directory');?>/images/Login.png" alt="Login" width="32" height="32" </a>
This worked:
<a href="#" title="Login"> <img src="<?php echo bloginfo('stylesheet_directory');?>/images/Login.png" alt="Login" width="32" height="32" </a>
[Moderator Note: Please post code or markup snippets between backticks or use the code button. As it stands, your code may now have been permanently damaged/corrupted by the forum’s parser.]
Hi Daniel,
As a part-time software programmer I can sympathise with your situation. It is very hard to test every configuration unless you are a big company like Microsoft.
I have had to delete this plugin because I had too many backups and my account got suspended three times, including one while I was trying to fix the issue just five minutes after the last suspension was cleared. I may have misunderstood the scheduler – you might want to look at the interface you’ve provided. I had thought I was asking for weekly backups, but got several a few minutes apart.
Good luck with the debugging,
Cheers,
Kanjipad.
(cerebware.pcriot.com).