Below I'll explain how you can add a refresh button next to the image verification image. Usefull for people when they can't read the verification tag.
Look for:
Replace this with:
And presto, one refresh button ready to go.
Tested in IE7 and Fx2<br><br>Post edited by: notexa, at: 2007/09/02 02:35
Look for:
if ( trim($paramsvalues->imagever) == 'Yes' ) {
$imver = '<input name="chrono_verification" type="text" id="chrono_verification" value="">
  <img src="'.$mosConfig_live_site
.'/administrator/components/com_chronocontact/chrono_verification.php">';
}
Replace this with:
if ( trim($paramsvalues->imagever) == 'Yes' ) {
$imver = '<script type="text/javascript">
function RefreshImageVer(imgverform) {
var randnum = Math.random();
var newverimage = \''.$mosConfig_live_site.'/administrator/components/com_chronocontact/chrono_verification.php?\'+randnum;
imgverform.imgver.src=newverimage;
}
</script>
<input name="chrono_verification" type="text" id="chrono_verification" value="">
  <img src="'.$mosConfig_live_site
.'/administrator/components/com_chronocontact/chrono_verification.php" name="imgver" id="imgver">
  <input type="button" value="refresh" onclick="RefreshImageVer(this.form);" />';
}
And presto, one refresh button ready to go.
Tested in IE7 and Fx2<br><br>Post edited by: notexa, at: 2007/09/02 02:35
I tried the code replacement but no refresh button shown even though I refresh browser many times.<br><br>Post edited by: adrianmak, at: 2007/09/03 02:32
Could you attach the php file in which you made the changes ?
Then I'll have a look at it.
ps. The normal image verification is working ?
Then I'll have a look at it.
ps. The normal image verification is working ?
Hi Notexa,
I'm trying to get this to work under rel. 2.3.6, having problems so I thought I'd reach out to see if you still had this working or does it need some changes in the new release? I have a another thread on my issue and Bob has been kind enough to have been helping with suggestions but I thoguht I'd check in to see if you still have this working?
Thanks
Brian
I'm trying to get this to work under rel. 2.3.6, having problems so I thought I'd reach out to see if you still had this working or does it need some changes in the new release? I have a another thread on my issue and Bob has been kind enough to have been helping with suggestions but I thoguht I'd check in to see if you still have this working?
Thanks
Brian
Hi Brian,
What types of problems you have ? at the latest version we changed the verification script path so could you remove /administrator from the paths ?
Cheers
Max
What types of problems you have ? at the latest version we changed the verification script path so could you remove /administrator from the paths ?
Cheers
Max
Hi Max,
To avoid creating a another thread on my questions, I had originally been working with Bob over on this thread
I know both you and Bob are bust helping us all but if you get a chance to jump on over to this thread I'm hoping you might be able to help...
Thanks
Brian<br><br>Post edited by: GreyHead, at: 2007/11/23 00:06
To avoid creating a another thread on my questions, I had originally been working with Bob over on this thread
I know both you and Bob are bust helping us all but if you get a chance to jump on over to this thread I'm hoping you might be able to help...
Thanks
Brian<br><br>Post edited by: GreyHead, at: 2007/11/23 00:06
Hi Brian,
Sorry, I'm away on the road for the weekend and don't have Joomla on this laptop. Hopefully Max will chip in.
Bob
Sorry, I'm away on the road for the weekend and don't have Joomla on this laptop. Hopefully Max will chip in.
Bob
Hi Brian,
Iam working on a new solution for this!
Iam working on a new solution for this!
This is the code with few modifications and should work very fine with V2.3.6 :
Cheers
Max
if ( trim($paramsvalues->imagever) == 'Yes' ) {
$imver = ' <script type="text/javascript">
function loadchronocap(){
document.getElementById(\'imgbutton\').value = \'Loading\';
document.getElementById(\'imgbutton\').disabled = true;
img = document.getElementById(\'imgver\');
//Change the image
img.src = \''.$mosConfig_live_site.'/components/com_chronocontact/chrono_verification.php?imtype='.$paramsvalues->imtype.'&p=\' + Math.random();
document.getElementById(\'imgbutton\').value = \'Refresh image\';
document.getElementById(\'imgbutton\').disabled = false;
}
</script>
<input name="chrono_verification" type="text" id="chrono_verification" value="">
<div id="imgajax"><img name="imgver" id="imgver" src="'.$mosConfig_live_site
.'/components/com_chronocontact/chrono_verification.php?imtype='.$paramsvalues->imtype.'"></div>
<input type="button" id="imgbutton" value="Refresh image" onclick="loadchronocap()">
';
}
Cheers
Max
Thanks Bob!!🙂
Hi Max,
MANY THANKS!!! This worked a charm🙂 thanks for the great support.
Brian
MANY THANKS!!! This worked a charm🙂 thanks for the great support.
Brian
Hi all,
I would like to add this function to my forms, but I can't find "ChronoForm.php" file, I guess that is "ChronoContact.php" file but I'm not sure.
Can you update the FAQ question about this giving us the right path to get the file that we must change?
Thanks in advance!
Jos
I would like to add this function to my forms, but I can't find "ChronoForm.php" file, I guess that is "ChronoContact.php" file but I'm not sure.
Can you update the FAQ question about this giving us the right path to get the file that we must change?
Thanks in advance!
Jos
Hi Bob,
I tried to apply this adjustment but nothing happens, maybe because my "ChronoContact.php" is little different that in FAQ... this is my code:
Any clue?
Thanks in advance
Jos
I tried to apply this adjustment but nothing happens, maybe because my "ChronoContact.php" is little different that in FAQ... this is my code:
if ( trim($paramsvalues->imagever) == 'Yes' ) {
$imver = '<input name="chrono_verification" type="text" id="chrono_verification" value="">
<img src="'.$mosConfig_live_site
.'/components/com_chronocontact/chrono_verification.php?imtype='.$paramsvalues->imtype.'">';
}
Any clue?
Thanks in advance
Jos
Hi Jos,
It's late here now and Max has tweaked the imageverification code a bit in 2.3.7. I'll have a look in the morning when my brain is awake.
Bob
It's late here now and Max has tweaked the imageverification code a bit in 2.3.7. I'll have a look in the morning when my brain is awake.
Bob
Hi Jos,
Fixed a couple of problems in the FAQ code that were out of date. Please try this - find this code in chronocontact.php (around line 70 in 2.3.7)
Bob
Fixed a couple of problems in the FAQ code that were out of date. Please try this - find this code in chronocontact.php (around line 70 in 2.3.7)
if ( trim($paramsvalues->imagever) == 'Yes' ) {
$imver = '<input name="chrono_verification" type="text" id="chrono_verification" value="">
<img src="' . $mosConfig_live_site . '/components/com_chronocontact/chrono_verification.php?imtype=' . $paramsvalues->imtype . '">';
}
and replace it with this: if ( trim($paramsvalues->imagever) == 'Yes' ) {
$imver_url = $mosConfig_live_site
.'/components/com_chronocontact/chrono_verification.php?imtype='
.$paramsvalues->imtype;
$imver = '<script type="text/javascript">
function RefreshImageVer(imgverform) {
var randnum = Math.random();
var newverimage = \''.$imver_url.'\'+randnum;
imgverform.imgver.src=newverimage;
}
</script>
<input name="chrono_verification" type="text" id="chrono_verification" value="">
<img src="'.$imver_url.'" name="imgver" id="imgver">
<input type="button" value="refresh" onclick="RefreshImageVer(this.form);" />';
}
There is still a little bug with this. When you refresh the image changes to the 'Without fonts' version. I think this is because $_GET['imtype'] isn't preserved with the JavaScript refresh. Maybe this can be fixed later but it isn't a big issue.
Bob
Hi Vince,
Not sure what Max has planned. Personally I'd like to see it there (and an easier way of managing the layout of the imageverification block too).
Bob
Not sure what Max has planned. Personally I'd like to see it there (and an easier way of managing the layout of the imageverification block too).
Bob
Thank you very much for your help Bob, I will try.
Regards
Jos
BTW... now I'm using 2.3.7, I paid for a License but with the update I get again the "Chorno" link at the bottom, can you help me with that?<br><br>Post edited by: joayala, at: 2008/01/11 01:05
Regards
Jos
BTW... now I'm using 2.3.7, I paid for a License but with the update I get again the "Chorno" link at the bottom, can you help me with that?<br><br>Post edited by: joayala, at: 2008/01/11 01:05
This topic is locked and no more replies can be posted.