mamikel
Forum Replies Created
-
Forum: Plugins
In reply to: [Contact Form 7] Keeping fields from refreshing on submitThanks,
I’ll enjoy a bourbon (Jim Beam of course) on your behalf then ??Forum: Plugins
In reply to: [Contact Form 7] Keeping fields from refreshing on submitThanks Drunkard100 – you know, it feels odd referring to you as Drunkard100 Looks like we’d reached the same conclusion in relation to the clearForm() method. One question, are you defining a field as dynamic or how to you distinguish between fields you want reset and fields that aren’t?
cheers
MattForum: Plugins
In reply to: [Contact Form 7] Keeping fields from refreshing on submitI have a solution which suits my purposes. Perhaps this will also suffice for anyone else seeking a similar workaround.
In the contact-form-7 plugin directory, open scripts.js in your text-editor of choice and comment out the line which clears the form as per the code below:if (1 == data.mailSent) { //$(data.into).find('form').resetForm().clearForm(); ro.addClass('wpcf7-mail-sent-ok');
I suppose ideally, this would be able to be set on a field by field basis in the contact form html, but the above solution works for what I need.
Forum: Plugins
In reply to: [Contact Form 7] Keeping fields from refreshing on submitHi Drunkard100,
did you have any luck with this? I have the exact same question. Did you have any success finding a solution?
thanks
MattForum: Plugins
In reply to: External DB authentication – consume webservice instead?Just looking at the plugin, is there a bug on line 450?
It has:
if ($id = username_exists($username)) { //just do an update
should this be
if ($id == username_exists($username)) { //just do an update
cheers
MattForum: Fixing WordPress
In reply to: Prevent access to the dashboard?I suppose it would help if I gave a bigger picture of what I’m trying to do ??
I’ve just come across the absolute privacy plugin and think that’s probably a good starting point.
I actually want to authenticate users via a webservice call and once authenticated, the user can view any of the published pages within the site. Unauthenticated users cannot view any of the published pages – they will be presented with the login screen. The authenticated user cannot view the dashboard.
A user can be authenticated in two ways. They can either login via the login screen, or they can click on a menu item in one of our other applications. In the case where the user clicks on a menu item in one of our applications, our website is opened in a browser window with an encrypted timestamped key in the query string.
Either way, the user must get to the site via the wp-login.php form.
If the user arrives at the login and a key is provided, a webservice is called to verify the key and retrieve some user information.
If the user arrives at the login screen and no query string is provided, they must provide a username and password which is authenticated through another webservice.If the appropriate webservice call above returns a positive result (i.e. the login or encrypted key is correct), I need to populate some global variables and/or extend the user object with the results of the webservice – unsure which makes the most sense – need advice on this one?? But I also need to have the user assume the non-registered user role to access the site.
I think I’ve made some headway with the Absolute Privacy plugin but have a few questions:
Am I correct in surmising that it’s best to extend the WP_User object to contain our user specific (non-wordpress) information? (This information should not be persisted in the WordPress database). Presumably, the WP_User object will be available site wide under the logged in session?
Would I need to register a dedicated wordpress user for each visitor to the site or could I reuse one? There is only one role for users so no requirement to restrict functionality on a per user/role basis. But obviously, I don’t want session cross over.
I have copied the code from here as a starting point and it is getting called so I just need advice on
a) is this the logical place to put my webservice calls?
b) how do I then tell wordpress to authenticate my user?thanks again
Matt
and one of two webservices is called (one to authenticate using the encrypted key, the other to authenticate using the username and password).
Forum: Fixing WordPress
In reply to: Prevent access to the dashboard?Hmmm, I have close to what I want by setting the user’s role to “no role for this site” and am getting comments like
“you don’t have sufficient permissions”
“Cheatin’ uh?”what I would ideally like is to redirect the user to the home page (or the login page) if the user is not logged in.
any thoughts?
thanks
Matt
Forum: Fixing WordPress
In reply to: Getting a list of pages (but not as links)Wow!! thanks heaps alchmyth – I did come across the get_pages method and have been trying to get my head around how to pass arguments to it. A working example like this is great for me to build on.
Forum: Fixing WordPress
In reply to: Display Post headers from in Category In a Page as linksah ok I see, thanks very much again Peter
Forum: Fixing WordPress
In reply to: Display Post headers from in Category In a Page as linksGreat, thanks Peter. All displaying fine and the link works and takes me to the FAQ post. Just one more thing, when I click on an FAQ, the single.php template is used to render the FAQ post – naturally, I don’t want the title to say News & Events as it does currently. How might I hide the title and instead put in a link back to the FAQ page? i.e. how do I test that I’m here as a result of the user clicking on a category?
` <?php if (category=’faq’):?>
//insert link back to faq??
<h4 >
<a href=”javascript:history.back();”>
Back to FAQ
</a>
</h4>
<?php else:?>
<div id=”page-title”>
<div id=”page-title-inner”>
<div class=”title”>
<h1>
News & Events
</h1>
</div>
</div>
</div>
<?php endif;?>`Forum: Fixing WordPress
In reply to: Permalinks for site hosted on Windows ServerHmmm, now at least I have an idea of what’s going on. My site is sitting in a subfolder of another wordpress site.
Whenever I visit the Permalink Settings page, a web.config file is written. If I then view the site on the server, I get an error about a duplicate rule:Module: RewriteModule
Notification: SendResponse
Handler: StaticFile
Error Code: 0x800700b7
Config Error: Cannot add duplicate collection entry of type ‘rule’ with unique key attribute ‘name’ set to ‘wordpress’If I rename the rule, the site is at least functional. Perhaps with this in mind, I can at least start to work out why the pretty permalinks do not work, whereas the default do.
Forum: Fixing WordPress
In reply to: Permalinks for site hosted on Windows ServerThanks Clayton, I’ll try. It’s a bit overwhelming to be honest and even just visiting the permalinks settings within the WordPress site breaks my site. I think things must be configured to enable Permalinks as my site sits under our main site which is using Permalinks and the main site works fine – but this was set up by a WordPress guru who has since moved on. I guess the hard thing is not knowing what he’s done in order to get it working.
Forum: Themes and Templates
In reply to: Populate sidebar with posts from a categorythanks Santosh, yes you are spot on, that’s exactly what I want to do but was hoping for some guidance as to how as I’m new to WordPress and have only had limited experience with php so am kind of fumbling around a bit.
My training-template (copied from page.php) is listed below, and I suppose I should really try to understand what each part is doing – but as always, I’ve been given very little time to produce a result.
<?php /* Template Name: Training Template */ ?> <?php get_header();?> <!-- BEGIN OF PAGE TITLE --> <?php if (have_posts()) : ?> <div id="page-title"> <div id="page-title-inner"> <div class="title"> <h1><?php the_title();?></h1> </div> <div class="dot-separator-title"></div> <div class="description"> <?php global $post;?> <?php $short_desc = get_post_meta($post->ID, '_short_desc', true ); ?> <p><?php echo $short_desc;?></p> </div> </div> </div> <!-- END OF PAGE TITLE --> <!-- BEGIN OF CONTENT --> <div id="content"> <div id="content-left"> <div class="maincontent"> <?php while (have_posts()) : the_post();?> <?php the_content();?> <?php endwhile;?> </div> </div> <?php endif;?> <?php get_sidebar();?> </div> <!-- END OF CONTENT --> <?php get_footer();?>
Forum: Fixing WordPress
In reply to: Uh oh – Using Permalinks – broke siteHi,
thanks for replying. I did find a thread that mentioned the .htaccess file but upon searching through the wordpress folder, I don’t appear to be one.However, I’ve resolved the issue by deleting everything except my theme and putting a fresh copy of the wordpress files into my site folder. Probably, not the ideal solution but fortunately, I haven’t gone too far down the path as yet.
I did also delete the permalink entry from the wp_options table (more out of desperation than any clear understanding what I was doing though).
I guess I ideally just want to have meaningful links so instead of
<website>?page_id=9 I’d have <website>/news etc. I’m feeling a little overwhelmed by the amount of information available, so if you know of an easily digestible article on this and how to avoid the Permalink issue, that would be much appreciatedcheers
Matt