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
https://forums.phpfreaks.com/topic/62327-link-modification/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.