jpweber Posted October 24, 2006 Posted October 24, 2006 Hello. When I link to tvdmap.pdf from my contact_us page, it's quite bizarre. Searched for answers, tinkered with code, still can't get it. My includes/languages/english/contact_us.php: define('CONTACT_MAP_LINK','http://www.thevisiondepot.com/tvdmap.pdf'); My /contact_us.php: <?php echo nl2br(STORE_NAME_ADDRESS); if (!CONTACT_MAP_LINK == '') { echo '<br><br><a href="' . tep_href_link(FILENAME_REDIRECT, 'action=url&goto=' . urlencode(eregi_replace('http://','',CONTACT_MAP_LINK)), 'NONSSL', false, false) . "\" target=_blank>" . tep_image_button('button_map.gif', IMAGE_BUTTON_MAP) . '</a>'; } ?> The negative result: Hover over the "map" link in my contact_us page, and you'll see it points to http://www.thevisiondepot.com/redirect.php...om%2Ftvdmap.pdf The forward slash / is being converted (I think) by redirect.php to %2F. Anyone have any suggestions as to what I can do to solve this, get rid of the %2F, and put the forward slash back in there? This is a tough one, but thanks all for anyone who can take a little time on this. Jason Simple 1-2-3 Intructions on how to get, install and configure SSL The Google Sandbox explained Simple to follow instructions on how to change the look of your OSC How To Make A Horrible OSC Website my toolbox: All things WordPress-related - All things Adobe-related - PHP Designer 2007 - Codecanyon Junkie - Crimson Editor - Winmerge - phpMyAdmin - WS_FTP my installed contributions: Category Banners, File Upload feature-.77, Header Tags, Sort_Product_Attributes_1, XSellv2.3, Price Break 1.11.2, wishlist 3.5, rollover_category_images_v1.2, Short_Description_v2.1, UPSXML_v1_2_3, quickbooks qbi_v2_10, allprods v4.4, Mouseover-effect for image-buttons 1.0, Ultimate_SEO, AAP 1.41, Auto Select State Value, Fast Easy Checkout, Dynamic SiteMap v2.0, Image Magic, Links Manager 1.14, Featured Products, Customer Testimonials, Article Manager, FAQ System, and I'm sure more ...
squeekit Posted October 24, 2006 Posted October 24, 2006 i got some questions: - why do you switch the quote system midstream? "\" target=_blank>" if you stay with single quotes for php then you can use double quotes without the need to escape them (the doublequotes) - do you really need to place this in an IF statement? - do you really need the full (absolute) path to tvdmap.pdf? - with target="_blank" you don't really need to call the redirect - do you? - and so these seem as there're not needed as well: 'action=url&goto=' 'urlencode' 'eregi_replace' below are two alternatives you might try - <?php echo nl2br(STORE_NAME_ADDRESS); if (!CONTACT_MAP_LINK == '') { echo '<br><br><a href="' . tep_href_link(CONTACT_MAP_LINK, 'NONSSL', false, false) . '" target="_blank">' . tep_image_button('button_map.gif', IMAGE_BUTTON_MAP) . '</a>'; } ?> note: this second example pulls the statement out of the IF and also it assumes the page this code is to appear on is in the root and so it goes directly to 'tvdmap.pdf' (thus totally eliminating the need for CONTACT_MAP_LINK) <?php echo nl2br(STORE_NAME_ADDRESS); echo '<br><br><a href="' . tep_href_link('tvdmap.pdf', 'NONSSL', false, false) . '" target="_blank">' . tep_image_button('button_map.gif', IMAGE_BUTTON_MAP) . '</a>'; ?> perhaps you can mixmatch the above to get it to work for what you want... sidenote: i'm not too sure "Tell A Friend" works from the site map - maybe some other things there also need checking - you probably just haven't got to the point of refining that yet though - and well, also, i wasn't looking too deep into this - i might be wrong...
Guest Posted October 24, 2006 Posted October 24, 2006 Doesnt % also appear when its a space, empty space? Just a though. Matt
jpweber Posted October 24, 2006 Author Posted October 24, 2006 Hi Squeek. I used your second solution, taking out the IF ... because what you said made sense. I was getting the "unable to determine page link .... known methods NONSSL, SSL" error, so I just took that out, and now it works great! Thanks a bunch! Also, you're right -- great catch. I took the "tell a friend" link out of the site map; it has something to do with Chemo's contribution, so I'd take the time to figure it out, but I don't think it's necessary. Regardless, thank you for putting the time in to read my post and respond with good information -- solved my problems completely. Have a good one! Jason Simple 1-2-3 Intructions on how to get, install and configure SSL The Google Sandbox explained Simple to follow instructions on how to change the look of your OSC How To Make A Horrible OSC Website my toolbox: All things WordPress-related - All things Adobe-related - PHP Designer 2007 - Codecanyon Junkie - Crimson Editor - Winmerge - phpMyAdmin - WS_FTP my installed contributions: Category Banners, File Upload feature-.77, Header Tags, Sort_Product_Attributes_1, XSellv2.3, Price Break 1.11.2, wishlist 3.5, rollover_category_images_v1.2, Short_Description_v2.1, UPSXML_v1_2_3, quickbooks qbi_v2_10, allprods v4.4, Mouseover-effect for image-buttons 1.0, Ultimate_SEO, AAP 1.41, Auto Select State Value, Fast Easy Checkout, Dynamic SiteMap v2.0, Image Magic, Links Manager 1.14, Featured Products, Customer Testimonials, Article Manager, FAQ System, and I'm sure more ...
boxtel Posted October 24, 2006 Posted October 24, 2006 Hello. When I link to tvdmap.pdf from my contact_us page, it's quite bizarre. Searched for answers, tinkered with code, still can't get it. My includes/languages/english/contact_us.php: My /contact_us.php: The negative result: Hover over the "map" link in my contact_us page, and you'll see it points to The forward slash / is being converted (I think) by redirect.php to %2F. Anyone have any suggestions as to what I can do to solve this, get rid of the %2F, and put the forward slash back in there? This is a tough one, but thanks all for anyone who can take a little time on this. urlencode I guess. Treasurer MFC
Recommended Posts
Archived
This topic is now archived and is closed to further replies.