Update of /cvsroot/stack/stack-1-0/scripts
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28391/scripts
Modified Files:
stackUtility.php
Log Message:
Hints added
Index: stackUtility.php
===================================================================
RCS file: /cvsroot/stack/stack-1-0/scripts/stackUtility.php,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -d -r1.23 -r1.24
*** stackUtility.php 20 Jun 2005 15:42:55 -0000 1.23
--- stackUtility.php 27 Jun 2005 08:26:40 -0000 1.24
***************
*** 696,699 ****
--- 696,700 ----
*/
function stack_castext_to_display($strin, &$locals, $display,&$errs) {
+ global $stack_web_url;
// (1) Looks for the name of each $local as such a dummy string
***************
*** 739,750 ****
}
// (2) Take out everything between <html> stuff </html>
! $html ='';
if (substr('<html>',$strin)) { // We have something to do.
preg_match_all('|<html>(.*)</html>|U',$strin,$html_match);
- $html_no=0;
foreach ($html_match[1] as $val) {
$html_no++;
--- 740,768 ----
}
+
+ // (1.5) Convert <hint> stuff </hint> tags to text.
+
+ $html ='';
+ if (substr('<hint>',$strin)) { // We have something to do.
+
+ preg_match_all('|<hint>(.*)</hint>|U',$strin,$html_match);
+
+ foreach ($html_match[1] as $val) {
+ $sr = '<hint>'.$val.'</hint>';
+ $rep = '<html><a href="javascript:HelpPopup(\''.$val.'\',\'fact\');"><img align="middle" border="0" alt="Question value" src="'.$stack_web_url.'/pics/help.gif" /></a></html>';
+ $strin = str_replace($sr,$rep,$strin);
+ }
+
+ }
+
+
// (2) Take out everything between <html> stuff </html>
! $html ='';
! $html_no = 0;
if (substr('<html>',$strin)) { // We have something to do.
preg_match_all('|<html>(.*)</html>|U',$strin,$html_match);
foreach ($html_match[1] as $val) {
$html_no++;
|