1
horkthegreen
links to other xoops modules from inside News?

I've been looking for almost an hour and can't find this...

In modules like News and Liase, I'm using bbCode to insert a url. When I click on the link, it opens it in another window.

How do I create a local link in a News story that opens a page within XOOPS in the same window? Such as a link to the Downloads section?

Sorry... this has got to be easy.. I just haven't been able to find it.

Thanks in advance.

2
brash
Re: links to other xoops modules from inside News?
  • 2006/5/17 1:19

  • brash

  • Friend of XOOPS

  • Posts: 2206

  • Since: 2003/4/10


Not sure with bbcode, but with HTML you should be able to use target="_self"
IT Headquarters
Innovative IT Solutions

3
iHackCode
Re: links to other xoops modules from inside News?

with the current bbcode set up i dont know. i can only suggest using a modified siteurl bbcode

Link...

siteurl=modules/newbb/viewtopic.php?topic_id=40749&forum=7&post_id=219300#forumpost219308] Link...[/ siteurl ]

*i added a space next to the [ and ] . the code tag didnt want to show the code.

yes it opens in a new window .but i suggest modifying class/module.textsanitizer.php

old code:
$patterns[] = "/[siteurl=(['"]?)([^"'<>]*)\1](.*)[/siteurl]/sU";
        
$replacements[] = '.XOOPS_URL.'/\2" target="_blank">\3';


newcode:
$patterns[] = "/[siteurl=(['"]?)([^"'<>]*)\1](.*)[/siteurl]/sU";
        
$replacements[] = '.XOOPS_URL.'/\2" target=[color=FF0000]"_self"[/color]>\3';


then it will open in the current window.
CBB / LatestNews / Publisher / XM-Spotlight

(ノ◕ヮ◕)ノ*:・゚✧

4
horkthegreen
Re: links to other xoops modules from inside News?

I did find that in News using an HTML hyperlink with a relative path worked to open the page in the same browser. Like this:

I have added the files to the <a href="/modules/mydownloads/">Downloadsasection.


However, I wasn't able to get this same thing to work with the Liase module, so I'm going to go ahead and do the hack and then use the siteurl bbcode (which I didn't even know about before... I was just using url as the bbcode).

(I don't normally like to do hacks, as you have to keep applying them after each upgrade, and I'm not that organized. )

Note that if HTML is supported in your editor, you should be able to use

I have added the files to the <a href="http://www.mysite.com/modules/mydownloads/" target="_self">Downloadsasection.


to also make the page load in the current browser.

Thanks for your help on this!

Login

Who's Online

340 user(s) are online (267 user(s) are browsing Support Forums)


Members: 0


Guests: 340


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits