HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


Redirecting on a new page

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#37754 (In Topic #8493)
Avatar

Fan in action

howto?

I've managed to make a redirecting forum topic, so now it opens a new page over the Forum page!! How can i let it open a new explorer page with the recirected page in it, so the Forum does not dissapear??

thnx


 
Back to the top
 
Posted
Rating:
#37760
Avatar

Well-settled

How do you have done this?? with html code? some more details please….  ;)
Back to the top
 
Posted
Rating:
#37765

Non-joined user

Harry said

How do you have done this?? with html code? some more details please….  ;)
 

At the option : Redirecting , ive inserted a http://***** now when you click this topic you get redirected to another internet page.

My question is, can i let the new page Popup in a new window?? So the forum does not close??

thnx

Back to the top
 
Posted
Rating:
#37770
Avatar

Community saint

 Your link should look something like this:

<a href="http://www.TheSiteToSendThemTo.com" target="_blank">Click Here</a>

The target="_blank" indicates to open the link in a new page.

The Click Here is the words that you will see within the link.

Some of the other targets are:
_parent
_self
_top

For an explanation of the use of the target command click here.
 

Rick Henson

OCP 4.3.2 & 5.0.1
PHP 5.2.5
MySQL 5.0.51a
FireFox 3.6.8
Back to the top
 
Posted
Rating:
#37772
Avatar

Thanks Rick. Because this is being driven by an ocPortal feature he'll need to code it into the OCF_FORUM_IN_CATEGORY template.
I think changing line 6 from:

Code

      <a class="field_name" href="{FORUM_URL*}">{+START,FRACTIONAL_EDITABLE,{FORUM_NAME},name,_SEARCH:admin_ocf_forums:type=__ed:id={ID}}{FORUM_NAME*}{+END}</a>
to:

Code

      <a {+START,IF,{$NOT,{$IN_STR,{FORUM_URL},forumview}}}target="_blank" title="{!NEW_WINDOW}" {+END}class="field_name" href="{FORUM_URL*}">{+START,FRACTIONAL_EDITABLE,{FORUM_NAME},name,_SEARCH:admin_ocf_forums:type=__ed:id={ID}}{FORUM_NAME*}{+END}</a>
will work :).

It's a little bit fiddlier than a normal template edit because of how 'FORUM_URL' is worked out in the PHP code. I had to put a little logic in there- "If FORUM_URL does not contain forumview in the URL then open it in a new window"


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#37773
Avatar

Fan in action

Works like a charm :thumbs:
Back to the top
 
1 guests and 0 members have just viewed this: None
Control functions:

Quick reply   Contract

Your name:
Your message: