Maian Script World on Facebook Maian Script World on Twitter Maian Script World - Latest News Maian Script World on YouTube Maian Script World on LinkedIn


Please Read

You are required to register before you can post. This is via a custom verification system. Please post any problems you are encountering here and I`ll do my best to respond as soon as I can. Please note that a reply WILL be posted to all queries, so do not double post. There are no guarantees when a reply will appear but I do my best to answer all within 3/4 days max. Bumping topics won`t make the slightest difference.

IMPORTANT: Posts in English ONLY please, thank you! Any other languages will be ignored and your message deleted.
SEARCH: Use the search option to see if your question has been answered on the forum before. Or check the relevant script docs.
CUSTOMER: If you have purchased a commercial version of any of my software, using the contact option at the licence centre ensures a faster response.
AUTO DELETION: Accounts older than 5 days, with no posts or topics, are automatically deleted. Only register if you are thinking of posting.
PRIVATE MESSAGES: Private messages are currently disabled.
LINKS: Any links posted are 'NOFOLLOW' and will not be picked up by search engines.

You are not logged in.

#1 08-02-2011 08:27:41

teze
Members
From: Moscow never sleep
Registered: 23-05-2009
Posts: 80

Showing error message on pickup page

Hi David, i have some questions.

1)
how to show error message, when user clicks to blank input message without pickup code?

http://www.maianscriptworld.com/demos/greetings/index.php?cmd=pickup&code=

or, how to block blank input click with js?

2) how to release preview and send buttons on primary page simultaneously? ( i mean a opportunity to send a card without preview)

3) and question about captcha) anybody installed it and maybe share worked codes for me?)

Offline

#2 09-02-2011 08:37:26

msworld
Administrator
From: United Kingdom (Great Britain)
Registered: 09-05-2006
Posts: 7,119

Re: Showing error message on pickup page

In the relevant template you can do:

<?php
if (isset($_GET['code']) && $_GET['code']=='') {
echo 'Please enter code..';
}
?>

Preview is required as this loads some hidden form fields. Changing it to not have a preview would be a little tricky and require many changes.


- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
David Ian Bennett - Lead Developer
www.maianscriptworld.co.uk

Offline

#3 10-02-2011 06:24:38

teze
Members
From: Moscow never sleep
Registered: 23-05-2009
Posts: 80

Re: Showing error message on pickup page

msworld wrote:

In the relevant template you can do:

<?php
if (isset($_GET['code']) && $_GET['code']=='') {
echo 'Please enter code..';
}
?>

where i put it? i paste this code in pickup template, but it doesnt work.  can u assist with this? may be i need to paste this code in index.php, but i have already triend, doesn't work too.

Offline

#4 10-02-2011 08:27:54

msworld
Administrator
From: United Kingdom (Great Britain)
Registered: 09-05-2006
Posts: 7,119

Re: Showing error message on pickup page

I assume it can go in the showcard.tpl.php template file. Or in the main index.php file. On line 3288 find:

$code = (isset($_GET['code']) ? strip_tags($_GET['code']) : '');

So, after that.

if ($code=='') {
  echo 'Error';
  exit;
}


- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
David Ian Bennett - Lead Developer
www.maianscriptworld.co.uk

Offline

#5 11-02-2011 12:26:47

teze
Members
From: Moscow never sleep
Registered: 23-05-2009
Posts: 80

Re: Showing error message on pickup page

it doesnt work too) after it i see blank white page with text: error smile

Offline

#6 12-02-2011 06:44:48

msworld
Administrator
From: United Kingdom (Great Britain)
Registered: 09-05-2006
Posts: 7,119

Re: Showing error message on pickup page

Yes, so that means its working because thats what that code does. You can adapt it better if you want to.


- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
David Ian Bennett - Lead Developer
www.maianscriptworld.co.uk

Offline

Board footer

2Checkout.com is an authorized reseller of goods and services provided by Maian Script World.© 2003-2013 David Ian Bennett. All Rights Reserved | Forum: FluxBB

Privacy Policy | Refund Policy