mugitty Posted January 24, 2003 Posted January 24, 2003 I've seen a lot of threads about this type of problem, but I can't quite sort how to accomplish the task. I have a box in column_right for a support desk, including the messengers contrib that calls ICQ and Yahoo status images from those sites. Whenever I move to a secure page, I get the "secure and non-secure" warning, I suspect because of these 2 images. I've also seen Linda's posts about wrapping them in an 'if' statement, but I keep getting parse errors after trying that. I suspect that it's because I'm trying to put the statement within a section of php code, but I'm not sure. The affected code (unamended) is below. You will see that there are 2 images called-one from ICQ and one from Yahoo. Can anyone tell me how to script this to eliminate the warnings? <!-- support //--> <tr> <td> <?php $info_box_contents = array(); $info_box_contents[] = array('align' => 'left', 'text' => BOX_HEADING_SUPPORT ); new infoBoxHeading($info_box_contents, false, true); define('ENTRY_ICQ_NUMBER', '222438900'); define('ENTRY_YAHOO_ID', 'fx_help'); $info_box_contents = array(); $info_box_contents[] = array('align' => 'center', 'text' => BOX_SUPPORT_TEXT . '<br>' . '<a href="http://support.farmex.now.tc"><img src="images/ps2_28331.gif" border="0" alt="PartSearch"></a><br><br> or, if we are online,<br>you can reach us at: <br><br><a href="http://web.icq.com/whitepages/message_me/1,,,00.icq?uin=' . ENTRY_ICQ_NUMBER . '&action=message" target="_blank"><img src="http://web.icq.com/whitepages/online?icq=' . ENTRY_ICQ_NUMBER . '&img=5" border="0" alt="ICQ"></a> <a href="http://edit.yahoo.com/config/send_webmesg?.target=' . ENTRY_YAHOO_ID . '&.src=pg" target="_blank"><img src="http://opi.yahoo.com/online?u=' . ENTRY_YAHOO_ID . '&m=g&t=4" border="0" alt="Yahoo Messenger"></a>' ); new infoBox($info_box_contents); ?> </td> </tr> <!-- support_eof //--> Thanks to anyone who can help :) ... if you want to REALLY see something that doesn't set up right out of the box without some tweaking, try being a Foster Parent!
Ajeh Posted January 24, 2003 Posted January 24, 2003 You could use an IF statement to hide it: if ($HTTPS=='on') { // do nothing } else { // put code here }
mugitty Posted January 24, 2003 Author Posted January 24, 2003 Linda; Thanks for your response. Can I put the 'IF' statement within the PHP block or do I have to close the PHP just before the image call, insert the 'IF', then reopen PHP, etc... in other words, can I just enter the statement like below? <?php $info_box_contents = array(); $info_box_contents[] = array('align' => 'left', 'text' => BOX_HEADING_SUPPORT ); new infoBoxHeading($info_box_contents, false, true); define('ENTRY_ICQ_NUMBER', '222438900'); define('ENTRY_YAHOO_ID', 'fx_help'); $info_box_contents = array(); $info_box_contents[] = array('align' => 'center', 'text' => BOX_SUPPORT_TEXT . '<br>' . '<a href="http://support.farmex.now.tc"><img src="images/ps2_28331.gif" border="0" alt="PartSearch"></a><br><br> or, if we are online,<br>you can reach us at: <br><br><a href="http://web.icq.com/whitepages/message_me/1,,,00.icq?uin=' . ENTRY_ICQ_NUMBER . '&action=message" target="_blank">if ($HTTPS=='on') {} else {</a>' ); new infoBox($info_box_contents); ?> Sorry I'm being so dense about this, I just can't seem to nail this one down. ... if you want to REALLY see something that doesn't set up right out of the box without some tweaking, try being a Foster Parent!
Dane Morgan Posted April 22, 2003 Posted April 22, 2003 For ICQ you can merely access the images via their secure server. Change <a href="http://web.icq.com/whitepages/message_me/1,,,00.icq?uin=' . ENTRY_ICQ_NUMBER . '&action=message" target="_blank"><img src="http://web.icq.com/whitepages/online?icq=' . ENTRY_ICQ_NUMBER . '&img=5" border="0" alt="ICQ"></a> To <a href="https://web.icq.com/whitepages/message_me/1,,,00.icq?uin=' . ENTRY_ICQ_NUMBER . '&action=message" target="_blank"><img src="https://web.icq.com/whitepages/online?icq=' . ENTRY_ICQ_NUMBER . '&img=5" border="0" alt="ICQ"></a> And now customers can reach you via ICQ from your secure pages without generating errors. No errors are generated by displaying secure images on nonsecure pages so this is all that is required, Though you could also use a conditional expression to serve secure ICQ images to secure pages and nonsecure images to nonsecure pages. Education does not occur by chance, but it must be sought for with ardor. `Abigail Adams
Recommended Posts
Archived
This topic is now archived and is closed to further replies.