Doubt: Open links last message from SSI.php in a new window ...

Started by rasen24, April 30, 2011, 03:07:43 PM

Previous topic - Next topic

rasen24

First of all, my English is not very good, apologies if there are spelling mistakes or do not express myself correctly.

Hi, I have a coding problem, I get strange characters when calling the latest posts via SSI.php, is a joomla problem, I searched and there is no way to make the characters look good, so that I did put an iframe on joomla and that this is  who called the latest posts via ssi.php. Result: Perfect. Since the characters are not rare, but when you click one of the last posts, it opens in the iframe box, so that the forum is not as it should, my question, Is there any code  which may change in SSI.php, so that pressing any link of the latest messages, open it in a new window instead of the iframe?

studying the code in the SSI.php. In the "Recent topic list" I found 4 lines of code with the attribute "href" referring to what I need.

Code (Line 1) Select


Original line: 'link' => '<a href="'. $scripturl.'?board='. $row['ID_BOARD'].'.0">. "$ row ['bname']. '</ a>''

modified line, 'link' => '<a href="'. $scripturl.'?board='. $row['ID_BOARD'].'.0" target="_blank">. "$ row ['bname']. '</ a>'


Result: Perfect! Links to the various subforums will open in a new window.

Code (Line 2) Select


Original line: 'link' => empty ($ row ['ID_MEMBER'])? $ row ['posterName']: '<a href="'. $scripturl.'?action=profile;u='. $row['ID_MEMBER'].'">'. $ row ['posterName']. '</ a>'

modified line, 'link' => 'link' => empty ($ row ['ID_MEMBER'])? $ row ['posterName']: '<a href="'. $scripturl.'?action=profile;u='. $row['ID_MEMBER'].'" target="_blank">. "$ row ['posterName']. '</ a>'


Result: Perfect! Links to user profiles that wrote the last message or post open in a new window.

So far right, the problem is now...

Code (Line 3) Select


Original line: 'link' => '<a href = "'. $ scripturl. '? topic = '. $ row ['ID_TOPIC'].. 'msg'. $ row ['ID_MSG']." # new "> '. $ row ['subject']. '</ a> ',

modified line, 'link' => '<a href = "'. $ scripturl. '? topic = '. $ row ['ID_TOPIC'].. 'msg'. $ row ['ID_MSG']." # new "target = "_blank"> '. $ row ['subject']. '</ a> ',


Result: Does not work! The written post, is open in the same window.

Code (Line 4) Select


Original line: ', $ post [' poster '] [' link '],'
', $ post [' new ']? '': '<a href="'. $scripturl.'?topic='. $post['topic'].'.msg'. $post['new_from'].';topicseen#new"> <img src = "'. $ settings [' images_url '].'/ '. $ context ['user '] [' language '].' / new.gif" alt = "'. $ txt [302]." "border = "0" /> </ font> </ a> ', '

modified line: ', $ post [' poster '] [' link '],'
', $ post [' new ']? '''<a href = "'. $ scripturl. '? topic = '. $ post ['topic'].. 'msg'. $ post ['new_from']. '; topics # new" target = "_blank "> <img src = " '. $ settings [' images_url '].'/ '. $ context ['user '] [' language '].' / new.gif "alt = " '. $ txt [302 ]. '"border =" 0 "/> </ font> </ a> ', '


Result: Does not work! The written message or post, is open in the same window.

Any solution?

Greetings and thank you for your attention!

Advertisement: