secure Posted August 1, 2003 Posted August 1, 2003 First of all I created an iframe to call best_seller.php on my root directory in index.html file. <p> </p> <p> </p> <p> </p> <IFRAME name="bestseller" id="bestseller" marginheight="0" marginwidth="0" style="border:solid blue 1px" frameborder="0" class="ta" align="center" src="../../catalog/test.php"></IFRAME> <p> </p> <p> </p> than I created a test page and put these codes on test.php for to make it work properly. <?php require('includes/application_top.php'); require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_DEFAULT); ?> <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> <html <?php echo HTML_PARAMS; ?>> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title><?php echo TITLE; ?></title> <base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>"> <link href="udzone.css" rel="stylesheet" type="text/css"> </head> <body STYLE="background-color:transparent" bgcolor="000000" leftmargin="0" topmargin="0" rightmargin="0" bottommargin="0" marginwidth="0" marginheight="0" scroll="no"><table border="0" width="0" cellspacing="3" cellpadding="3"> <tr> <td width="0" align="center" valign="top"><table border="0" width="0" cellspacing="0" cellpadding="2"> <?php require(DIR_WS_BOXES . 'best_sellers.php'); ?> </table> Final page is best_seller.php I also make some changes on it for to allow transparency. <?php/* $Id: best_sellers.php,v 1.20 2003/02/10 22:30:57 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2003 osCommerce Released under the GNU General Public License */ if (isset($current_category_id) && ($current_category_id > 0)) { $best_sellers_query = tep_db_query("select distinct p.products_id, pd.products_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c where p.products_status = '1' and p.products_ordered > 0 and p.products_id = pd.products_id and pd.language_id = '" . $languages_id . "' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and '" . $current_category_id . "' in (c.categories_id, c.parent_id) order by p.products_ordered desc, pd.products_name limit " . MAX_DISPLAY_BESTSELLERS); } else { $best_sellers_query = tep_db_query("select distinct p.products_id, pd.products_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_ordered > 0 and p.products_id = pd.products_id and pd.language_id = '" . $languages_id . "' order by p.products_ordered desc, pd.products_name limit " . MAX_DISPLAY_BESTSELLERS); } if (tep_db_num_rows($best_sellers_query) >= MIN_DISPLAY_BESTSELLERS) { ?> <body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"> <tr> <td> <table align="center" width="100" border="0" cellspacing="0" cellpadding="0" class="infoboxborder"> <tr> <td> <table width=100 border=0 cellpadding=0 cellspacing=0 class="infoBoxContents"> <tr> <td width="100" colspan=0 bgcolor="#0000FF"> </td> </tr> <tr> <td background="transparent"> <?php $rows = 0; $bestsellers_list = '<table border="0" width="100" cellspacing="0" cellpadding="1">'; while ($best_sellers = tep_db_fetch_array($best_sellers_query)) { $rows++; $bestsellers_list .= '<tr><td class="infoBoxContents" valign="top">' . tep_row_number_format($rows) . '.</td><td class="infoBoxContents"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $best_sellers['products_id']) . '">' . $best_sellers['products_name'] . '</a></td></tr>'; } $bestsellers_list .= '</table>'; $info_box_contents = array(); $info_box_contents[] = array('text' => $bestsellers_list); new infoBox($info_box_contents); ?> </td> </tr> </table> </div></td> </tr> </table> </td> </tr> <?php } ?> <!-- best_sellers_eof //--> OK it is working properly but i need it to open in the current window(in index.html) and not the iframe.What happens is if there a guest click on iframe (test.php > best_seller.php) it opens the product in iframe instead of parent_ window? So my question is how would i put _parent into that code for it to work properly? I am not familiar with Php so I don't know what to do. I also make a page for to test if iframe can target to _parent window and used a javascript. iframetest.htm <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><HEAD> <TITLE>Frame Transparency</title> <meta http-equiv="Content-Type" content="text/html; charset=windows-1254"></HEAD> <BODY background="images/main/dip_fon.gif"> <H1>You can see this banner through the transparent frame.</h1> <script language="JavaScript"> function onw() { window.open(iframe_name.location,'_blank','menubar=yes,scrollbars=yes,resizable=no'); } </script> <table width="75%" border="1"> <tr> <td><IFRAME NAME="location" SRC="iframtestsrc.htm" ALLOWTRANSPARENCY="true" > </IFRAME></td> </tr> </table> </BODY> </HTML> iframesrc.htm <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html> <head> <title>Untitled Document</title> <meta http-equiv="Content-Type" content="text/html; charset=windows-1254"> <BODY bgcolor="#FF0000" STYLE="background-color:transparent" > <font color="#FFFF00"><a href="aramatest.htm" target="_parent">test test test</a></font> </body> </head> </html> My first goal was to keep iframe transparent and make it open in _parent window.I achieved to do that but I dont know how to integrate this with php
wizardsandwars Posted August 2, 2003 Posted August 2, 2003 No, you will not. ------------------------------------------------------------------------------------------------------------------------- NOTE: As of Oct 2006, I'm not as active in this forum as I used to be, but I still work with osC quite a bit. If you have a question about any of my posts here, your best bet is to contact me though either Email or PM in my profile, and I'll be happy to help.
secure Posted August 3, 2003 Author Posted August 3, 2003 Yes I won't because I FOUND it by myself! It is only just one word! If I couldn't find it I would continue to update.No matter what you have said!! $bestsellers_list .= '<tr><td class="infoBoxContents" valign="top">' . '.</td><td class="infoBoxContents"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $best_sellers['products_id']) . '" target="_parent">
Guest Posted August 3, 2003 Posted August 3, 2003 Yes I won't because I FOUND it by myself! It is only just one word! If I couldn't find it I would continue to update.No matter what you have said!! Who died and made you so important? :roll: Jerk!
secure Posted August 3, 2003 Author Posted August 3, 2003 Knowledge is for sharing not for hiding. I used my update right like everyone.But I am much more determined to learn :D
Guest Posted August 3, 2003 Posted August 3, 2003 Yes I won't because I FOUND it by myself! It is only just one word! If I couldn't find it I would continue to update.The mods would have eventually locked the thread (which if you had bothered to read the forum rules, you would have known), since you weren't updating. Updating would involve adding actual information, which you didn't do. Btw, this is not your forum. It is the osC core team's. You have no rights here. They graciously allow you to use their forums. If you continue with your attitude, you will eventually do something that will sufficiently annoy someone with authority and they will withdraw this privilege (i.e. ban your account). Cheers, Matt
secure Posted August 4, 2003 Author Posted August 4, 2003 I think you all are more willing to teach me ethics and non-ethics rather than php! I just only asked a small question thats all. You are not obliged to answer it but I'm obliged to learn it. So if you have more ethics about this please keep it yourself and dont read this thread if its annoying you.
Guest Posted August 4, 2003 Posted August 4, 2003 So if you have more ethics about this please keep it yourself and dont read this thread if its annoying you. Who the hell do you think you are? :roll: You do not now nor will you ever have any say in how this forum is run. Period. Get over it and move on with your life.
Guest Posted August 4, 2003 Posted August 4, 2003 BTW...I, for one, will never help you with anything ever in this forum. I bet I'm not the only one that feels this way now. All so you could be a jerk. Was it worth it? :roll:
secure Posted August 4, 2003 Author Posted August 4, 2003 BTW...I, for one, will never help you with anything ever in this forum. Why do you all are speaking in the behalf of everone? You re not moderators, you re not other users! So shut up! If you have more comments just PM me don't flood here! This is support forum Could moderators lock this thread before I start to swear?
Guest Posted August 4, 2003 Posted August 4, 2003 Could moderators lock this thread before I start to swear? Ooooooooooooooo! I'm sure you've scared everyone off with that one. :roll:
loxly Posted August 4, 2003 Posted August 4, 2003 Did you consider that a large number of people are using browsers that do not yet support iframes? You are showing a lot of people a blank page. There are several contributions that will show your products outside of your catalog. There is an xml contrib, an rss contrib and a "Catalog Anywhere" contrib. [no external urls in signatures please, kthanks]
secure Posted August 4, 2003 Author Posted August 4, 2003 loxly I searched the forum and came up only with this solution.I also asked how to use it in this forum but I cant get an answer.I am not familiar with php but I also wanted to use transparent background to make boxes similar to my design. I think there is no way of using transparent backgrounds other than iframes. http://www.balkanoglu.com/index.php Yes I consider about it.I think people must learn to update their browsers or other softwares.At the same time most browsers are java disabled.So I prefered advanced users. Thanks for your suggestions I will look at them
Recommended Posts
Archived
This topic is now archived and is closed to further replies.