gdfwilliams Posted January 23, 2003 Share Posted January 23, 2003 I am in the process of building a magazine storefront. Of the magazines at my disposal are your standard newsstand fare, plus any number of wonderfully raunchy titles with covers that would make some blush (no one in this forum, of course :wink: ). SO - I am thinking that prior to showing any potentially offensive content, perhaps I should route the user through a "I'm-a-Grown-Up-Let's-See-the-Boobs" page before hitting my "Adult" category. Is anyone doing anything like this currently? Any idea how I could implement? Even better -- Since a user might stumble across such content while searching, how could I show separate images (of products within one category) depending upon whether a user has logged in? That way, guests see this: While registered/logged in users see this (or one of her more risque neighbors): Any thoughts or suggestions will be greatly appreciated. Thanks, GDW Link to comment Share on other sites More sharing options...
gdfwilliams Posted January 23, 2003 Author Share Posted January 23, 2003 Thinking out loud: I need to clean the code up, but it works (only in category view for now). In product_info.php: <?php if ($product_info_values['products_image'] != '') { ?> <?php if ($current_category_id == '44') { ?> <tr> <td align="center" class="smallText"> <?php if (tep_session_is_registered('customer_id')) { ?> <script language="javascript"><!-- document.write('<?php echo '<a href="javascript:popupWindow('' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info_values['products_id']) . '')">' . tep_image(DIR_WS_IMAGES . $product_info_values['products_image'], addslashes($product_info_values['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>'); //--></script> <noscript> <?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info_values['products_image']) . '">' . tep_image(DIR_WS_IMAGES . $product_info_values['products_image'], $product_info_values['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?> </noscript> <?php } else { ?> <img src="/images/logged_out.gif"> <?php } ?> </td> </tr> <?php } else { ?> <tr> <td align="center" class="smallText"> <script language="javascript"><!-- document.write('<?php echo '<a href="javascript:popupWindow('' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info_values['products_id']) . '')">' . tep_image(DIR_WS_IMAGES . $product_info_values['products_image'], addslashes($product_info_values['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>'); //--></script> <noscript> <?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info_values['products_image']) . '">' . tep_image(DIR_WS_IMAGES . $product_info_values['products_image'], $product_info_values['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?> </noscript> </td> </tr> <?php } } ?> <?php } ?> Link to comment Share on other sites More sharing options...
gdfwilliams Posted January 23, 2003 Author Share Posted January 23, 2003 And stick this in includes/modules/product_listing.php <?php $row = 0; while ($products = tep_db_fetch_array($listing_query)) { $row++; echo ' <td align="center" width="33%" class="smallText"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products['products_id'], 'NONSSL') . '">'; if ($current_category_id == '44') { if (tep_session_is_registered('customer_id')) { echo tep_image(DIR_WS_IMAGES . $products['products_image'], $products['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products['products_id'], 'NONSSL') . '">' . $products['products_name'] . '</a><br>'; } else { echo '<a href="' . tep_href_link(FILENAME_LOGIN, '', 'SSL') . '" class="headerNavigation"><img src="/images/logged_out.gif" border=0></a><br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products['products_id'], 'NONSSL') . '">' . $products['products_name'] . '</a><br>'; } } else { echo tep_image(DIR_WS_IMAGES . $products['products_image'], $products['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products['products_id'], 'NONSSL') . '">' . $products['products_name'] . '</a><br>'; } if ($products['specials_new_products_price'] > 0) { echo '<s>' . $currencies->display_price($products['products_price'], tep_get_tax_rate($products['products_tax_class_id'])) . '</s><br><span class="productSpecialPrice">' . $currencies->display_price($products['specials_new_products_price'], tep_get_tax_rate($products['products_tax_class_id'])) . '</span></td>' . "n"; } else { echo $currencies->display_price($products['products_price'], tep_get_tax_rate($products['products_tax_class_id'])); } echo '<br><form name="buy_now_' . $products['products_id'] . '" method="post" action="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now', 'NONSSL') . '"><input type="hidden" name="products_id" value="' . $products['products_id'] . '">' . tep_image_submit('button_buy_now.gif', TEXT_BUY . $products['products_name'] . TEXT_NOW) . '</form> '; echo '</td>' . "n"; if ((($row / 3) == floor($row / 3))) { ?> </tr> <tr> <td> </td> </tr> <tr> <?php } } ?> Link to comment Share on other sites More sharing options...
WebGeek Posted January 25, 2003 Share Posted January 25, 2003 "I'm-a-Grown-Up-Let's-See-the-Boobs" That's funny! :lol: I haven't lost my mind, I have it backed up on disk, somewhere... Link to comment Share on other sites More sharing options...
WebGeek Posted January 25, 2003 Share Posted January 25, 2003 BTW, what is the address of your site? I think I'd like to see some more of them thar' boobs. :lookround: I haven't lost my mind, I have it backed up on disk, somewhere... Link to comment Share on other sites More sharing options...
gdfwilliams Posted January 25, 2003 Author Share Posted January 25, 2003 http://www.magshack.com/index.php?cPath=44 to see the above code in action. I still need to include it on the search results pages... Link to comment Share on other sites More sharing options...
radders Posted January 25, 2003 Share Posted January 25, 2003 Fatal error: Cannot redeclare class tablebox in /home/magshack/public_html/includes/classes/new_boxes.php on line 13 Link to comment Share on other sites More sharing options...
CC Posted January 26, 2003 Share Posted January 26, 2003 David the Boob peeper said: BTW, what is the address of your site? I think I'd like to see some more of them thar' boobs. LOL!! CC. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.