Jump to content

tougirl

Members
  • Content count

    3
  • Joined

  • Last visited

Everything posted by tougirl

  1. I modified the link_listing.php for that it posts the flash. osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ class linkListingBox extends tableBox { function linkListingBox($contents) { $this->table_parameters = 'class="linkListing"'; $this->tableBox($contents, true); } } // Fonction of ManMachine of contributions "Flash Banners" function mm_output_flash_movie_for_link_manager($name, $movie, $width = '' , $height = '' , $background = '' , $parameters = '') { if(tep_not_null($width)) { $movie_width = 'width="'.$width.'"'; } if(tep_not_null($height)) { $movie_height = 'height="'.$height.'"'; } if(tep_not_null($parameters)) { $flash_movie = $movie . '?' . $parameters; } else { $flash_movie = $movie; } $flash = '<object type="application/x-shockwave-flash" data="'.$movie.'" '.$movie_width.' '.$movie_height.'>' . "\n"; $flash .= '<param name="movie" value="'.$flash_movie.'" />' . "\n"; if(tep_not_null($background)) { $flash .= '<param name="bgcolor" value="#'.$background.'" />' . "\n"; } else { $flash .= '<param name="wmode" value="transparent" />' . "\n"; } $flash .= '</object>' . "\n"; return $flash; } // End Fonction of ManMachine of contributions "Flash Banners" $listing_split = new splitPageResults($listing_sql, MAX_LINKS_DISPLAY, 'l.links_id'); if ( ($listing_split->number_of_rows > 0) && ( (PREV_NEXT_BAR_LOCATION == '1') || (PREV_NEXT_BAR_LOCATION == '3') ) ) { ?> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="smallText"><?php echo $listing_split->display_count(TEXT_DISPLAY_NUMBER_OF_LINKS); ?></td> <td class="smallText" align="right"><?php echo TEXT_RESULT_PAGE . ' ' . $listing_split->display_links(MAX_LINKS_DISPLAY, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></td> </tr> </table> <?php } $list_box_contents = array(); for ($col=0, $n=sizeof($column_list); $col<$n; $col++) { switch ($column_list[$col]) { case 'LINK_LIST_TITLE': $lc_text = TABLE_HEADING_LINKS_TITLE; $lc_align = ''; break; case 'LINK_LIST_URL': $lc_text = TABLE_HEADING_LINKS_URL; $lc_align = ''; break; case 'LINK_LIST_IMAGE': $lc_text = TABLE_HEADING_LINKS_IMAGE; $lc_align = 'center'; break; case 'LINK_LIST_DESCRIPTION': $lc_text = TABLE_HEADING_LINKS_DESCRIPTION; $lc_align = 'center'; break; case 'LINK_LIST_COUNT': $lc_text = TABLE_HEADING_LINKS_COUNT; $lc_align = ''; break; } if ($column_list[$col] != 'LINK_LIST_IMAGE') { $lc_text = tep_create_sort_heading($HTTP_GET_VARS['sort'], $col+1, $lc_text); } $list_box_contents[0][] = array('align' => $lc_align, 'params' => 'class="linkListing-heading"', 'text' => ' ' . $lc_text . ' '); } if ($listing_split->number_of_rows > 0) { $rows = 0; $listing_query = tep_db_query($listing_split->sql_query); while ($listing = tep_db_fetch_array($listing_query)) { $rows++; if (($rows/2) == floor($rows/2)) { $list_box_contents[] = array('params' => 'class="linkListing-even"'); } else { $list_box_contents[] = array('params' => 'class="linkListing-odd"'); } $cur_row = sizeof($list_box_contents) - 1; $openMode = (LINKS_OPEN_NEW_PAGE == 'True') ? 'blank' : 'self'; for ($col=0, $n=sizeof($column_list); $col<$n; $col++) { $lc_align = ''; switch ($column_list[$col]) { case 'LINK_LIST_TITLE': $lc_align = ''; $lc_text = $listing['links_title']; break; case 'LINK_LIST_URL': $lc_align = ''; $lc_text = '<a href="' . tep_get_links_url($listing['links_id']) . '" target="_' . $openMode . '">' . $listing['links_url'] . '</a>'; break; case 'LINK_LIST_DESCRIPTION': $lc_align = ''; $lc_text = $listing['links_description']; break; case 'LINK_LIST_IMAGE': $lc_align = 'center'; if (tep_not_null($listing['links_image_url'])) { // Test of ManMachine of contributions "Flash Banners" changed for Links Manager (Koechler Estelle 17/06/05) // Addition of the test if the image is a file flash or an image. if ( substr($listing['links_image_url'], -3, 3) == 'swf' ) { $size = getimagesize($listing['links_image_url']); $size[0] = $size[0]/3; $size[1] = $size[1]/3; $lc_text = '<a href="' . tep_get_links_url($listing['links_id']) . '" target="_' . $openMode . '">' . mm_output_flash_movie_for_link_manager( $listing['links_title'], $listing['links_image_url'] , $size[0] , $size[1]) . '</a>'; } else { // End Test of ManMachine of contributions "Flash Banners" changed for Links Manager (Koechler Estelle 17/06/05) $lc_text = '<a href="' . tep_get_links_url($listing['links_id']) . '" target="_' . $openMode . '">' . tep_links_image($listing['links_image_url'], $listing['links_title'], LINKS_IMAGE_WIDTH, LINKS_IMAGE_HEIGHT) . '</a>'; } } else { $lc_text = '<a href="' . tep_get_links_url($listing['links_id']) . '" target="_' . $openMode . '">' . tep_image(DIR_WS_IMAGES . 'pixel_trans.gif', $listing['links_title'], LINKS_IMAGE_WIDTH, LINKS_IMAGE_HEIGHT, 'style="border: 3px double black"') . '</a>'; } break; case 'LINK_LIST_COUNT': $lc_align = ''; $lc_text = $listing['links_clicked']; break; } $list_box_contents[$cur_row][] = array('align' => $lc_align, 'params' => 'class="linkListing-data"', 'text' => $lc_text); } } new linkListingBox($list_box_contents); } else { $list_box_contents = array(); $list_box_contents[0] = array('params' => 'class="linkListing-odd"'); $list_box_contents[0][] = array('params' => 'class="linkListing-data"', 'text' => TEXT_NO_LINKS); new linkListingBox($list_box_contents); } if ( ($listing_split->number_of_rows > 0) && ((PREV_NEXT_BAR_LOCATION == '2') || (PREV_NEXT_BAR_LOCATION == '3')) ) { ?> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="smallText"><?php echo $listing_split->display_count(TEXT_DISPLAY_NUMBER_OF_LINKS); ?></td> <td class="smallText" align="right"><?php echo TEXT_RESULT_PAGE . ' ' . $listing_split->display_links(MAX_LINKS_DISPLAY, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></td> </tr> </table> <?php } ?> I utilised a contribution of ManMachine : "Flash Banners". Now, the script functions well. I added the page in the contribution Link manager for those which want to use it. :thumbsup:
  2. Yes, I tested that but the flash doesn't appear. It is necessary to insert : <object><embed></embed></object> at the place where it put the image for see the flash.
  3. I have the contribution "links manager" and I will want to insert flash image. Thanks for your help. :blush:
×