a-base Posted June 23, 2006 Share Posted June 23, 2006 Hello everybody!I've been playing a round with some different RSS parsers in PHP. I found one to my liking, there's just one problem, when clicking links, they are opened in the same window. I want them to be opened in a new window. It should be really easy to do I think. I'm a PHP newb but I think I should get "target=_new" in there somewhere?Anyone have an idea for me? Thanx in advance [img src=\"style_emoticons/[#EMO_DIR#]/smile.gif\" style=\"vertical-align:middle\" emoid=\":smile:\" border=\"0\" alt=\"smile.gif\" /][a href=\"http://www.a-base.dds.nl/forum/rss/temp.txt\" target=\"_blank\"]code of the RSS parser[/a][a href=\"http://www.a-base.dds.nl/forum/rss/temp.php\" target=\"_blank\"]result[/a] Quote Link to comment https://forums.phpfreaks.com/topic/12758-rss-parser/ Share on other sites More sharing options...
phpstuck Posted June 23, 2006 Share Posted June 23, 2006 <a target="_blank" href="http://www.yahoo.com">YAHOO LINK</a> Quote Link to comment https://forums.phpfreaks.com/topic/12758-rss-parser/#findComment-48926 Share on other sites More sharing options...
a-base Posted June 23, 2006 Author Share Posted June 23, 2006 thanx for your help phpstuck, but I'm still stuck heheI think it's the code on line 87 I have to alter.current code:[code]print ("\n<div class=\"itemtitle\"><a href=\"" . $rss_channel["ITEMS"][$i]["LINK"] . "\">" . $rss_channel["ITEMS"][$i]["TITLE"] . "</a></div>"[/code]I changed it to:[code]print ("\n<div class=\"itemtitle\"><a target="_blank" href=\"" . $rss_channel["ITEMS"][$i]["LINK"] . "\">" . $rss_channel["ITEMS"][$i]["TITLE"] . "</a></div>"[/code]but this is giving me a php error. I don't know where else to put that target bit. Quote Link to comment https://forums.phpfreaks.com/topic/12758-rss-parser/#findComment-48932 Share on other sites More sharing options...
phpstuck Posted June 23, 2006 Share Posted June 23, 2006 Are you getting a parse error? Quote Link to comment https://forums.phpfreaks.com/topic/12758-rss-parser/#findComment-48934 Share on other sites More sharing options...
a-base Posted June 23, 2006 Author Share Posted June 23, 2006 I'm getting a syntax parse error.[a href=\"http://www.a-base.dds.nl/forum/rss/temp2.txt\" target=\"_blank\"]code of the edited RSS parser[/a][a href=\"http://www.a-base.dds.nl/forum/rss/temp2.php\" target=\"_blank\"]result[/a] Quote Link to comment https://forums.phpfreaks.com/topic/12758-rss-parser/#findComment-48935 Share on other sites More sharing options...
phpstuck Posted June 23, 2006 Share Posted June 23, 2006 I think I know what the problem is... I thinkWhen you echo or print you start withecho "something inside these quotes";but if you sayecho "somthing "important" in these quotes";it will generate a syntax error because you have double quotes inside the start and end double quotes. Try changing the starting and ending quotes to single quotes, if that dosen't work change the start and end back to doubles and all of the quotes inside (in your code for everything) to single quotes.Let me know, but that has happened to me more than once and driven me crazy for hours trying to figure it out. Quote Link to comment https://forums.phpfreaks.com/topic/12758-rss-parser/#findComment-48938 Share on other sites More sharing options...
Allen4172 Posted June 24, 2006 Share Posted June 24, 2006 a-base,Change[code]print ("\n<div class=\"itemtitle\"><a target="_blank" href=\"" . $rss_channel["ITEMS"][$i]["LINK"] . "\">" . $rss_channel["ITEMS"][$i]["TITLE"] . "</a></div>"[/code]To this:[code]print ("\n<div class=\"itemtitle\"><a target=\"_blank\" href=\"" . $rss_channel["ITEMS"][$i]["LINK"] . "\">" . $rss_channel["ITEMS"][$i]["TITLE"] . "</a></div>"[/code]That should take care of the parser error. Quote Link to comment https://forums.phpfreaks.com/topic/12758-rss-parser/#findComment-49040 Share on other sites More sharing options...
a-base Posted June 24, 2006 Author Share Posted June 24, 2006 [!--quoteo(post=387422:date=Jun 24 2006, 01:12 PM:name=MikeAAAAA)--][div class=\'quotetop\']QUOTE(MikeAAAAA @ Jun 24 2006, 01:12 PM) [snapback]387422[/snapback][/div][div class=\'quotemain\'][!--quotec--]That should take care of the parser error.[/quote]oh my goodness was that all, yep it works now.thanx for your help guys [img src=\"style_emoticons/[#EMO_DIR#]/smile.gif\" style=\"vertical-align:middle\" emoid=\":smile:\" border=\"0\" alt=\"smile.gif\" /] Quote Link to comment https://forums.phpfreaks.com/topic/12758-rss-parser/#findComment-49082 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.