Jump to content

Link modification


DanV

Recommended Posts

Hi

 

I'm relatively new to PHP and this one's a bit tricky.

 

Following is the code for showing a dictionary link button/tab in an SMF forum:

 

/ Show the [Dictionary] button.

echo ($current_action=='Dictionary' || $context['browser']['is_ie4']) ? '' : '' , '

<li class="' , $current_action == 'dictionary' ? 'current' : '' , '"><a href="http://dictionary.com" ', $scripturl, '?action=Dictionary">' , $txt['Dictionary'] , '</a></li>';

 

I found a script elsewhere for a popup window and for the link you're supposed to have this:

 

a href="http://dictionary.com" onclick="NewWindow(this.href,'name','400','400','yes');return false">Dictionary</a>

 

(left out the < at the beginning for my posting here since it was turning it into a link)

 

Is there a way of configuring these two together so both the button shows and the popup window works?

 

The basic difference between the two is:  ', $scripturl, '?action=Dictionary">' , $txt['Dictionary'] ,

 

I've tried different configurations but all I'm getting is the dreaded Template Parse Error.

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.