News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Open Links to new window

Started by Zalvador, July 19, 2008, 07:18:14 PM

Previous topic - Next topic

Zalvador

SMFv2 beta 3.1
Custom theme.
Author Myself

Image Upload Script

I wrote a custom theme that is with no errors. Runs great. You have to love SMF. I wrote into the index.template.php a script to be able to click on a image and be redirected to another site so as to upload the images. Again it works like a dream. No errors after 5 days. Used heavy. The down side is it opens in the same window. I would like it to open in a new window.

As this script is a custom script an in the index.template.php I can not use the forum settings to get it to open in it's own window.

I fully understand that you do not support custom themes and scripts. However I want to write it correctly for the SMF format. I am sure it is a simple adjustment to the script. As the members here that support SMF write scripts I was hoping to get the script adjustment.

000000's in the following script URL's are just that 0's to replace the actual link.

Quote// display Upload Image
   echo '
   
      <table width="100%" cellpadding="0" cellspacing="0" border="0" >
         <tr>';

         if($context['user']['is_logged'])
echo '
<td class="titlebg2" height="32">
<a href="http://000000.com/"> <img src="', $settings['images_url'], '/english/THost1.gif" style="margin: 2px;" alt="" />
<br>
<a href="http://www.000000.net/hosting"> <img src="', $settings['images_url'], '/english/Image Upload.gif" style="margin: 2px;" alt="" />             
</td>
';

Thank you in advance to any help that can be offered

Zal

Deaks

in the link tag add target="_blank"


    <a href="http://000000.com/" target="_blank"> <img src="', $settings['images_url'], '/english/THost1.gif" style="margin: 2px;" alt="" /></a>
    <br />
    <a href="http://www.000000.net/hosting" target="_blank"> <img src="', $settings['images_url'], '/english/Image Upload.gif" style="margin: 2px;" alt="" /></a>             


you should also close your hyperlinks and breaks should be self closed so <br> becomes <br />
~~~~
Former SMF Project Manager
Former SMF Customizer

"For as lang as hunner o us is in life, in nae wey
will we thole the Soothron tae owergang us. In truth it isna for glory, or wealth, or
honours that we fecht, but for freedom alane, that nae honest cheil gies up but wi life
itsel."

Zalvador

Thank you. I will get to this after dinner. Thank you ever so much.

Zalvador

I wanted to stop back and express how well the information you gave me worked. It opened to a new page so my members can stay in their post and load their graphic  images and add the image links to their posts. Not one error with three people testing.

Thank you very much.

Zal

Advertisement: