Jump to content

  •  

  • Tutorial info Visit support topic

    • Added on: Jan 20 2009 06:31 PM
    • Views: 931
     


    * * * * *
    0 Ratings

    Desctiption in lightbox

    If you want to see file name instead of text 'null', read this tutorial.

    Posted by Spanner on Jan 20 2009 06:31 PM
    Standard IP.Dowloads shows on screen with enable lightbox text 'null', as you see in image below.

    Posted Image


    If you eliminate this faul the same as image below:


    Posted Image

    follow the steps below:

    open sources/components_public/downloads/display.php:

    find:

    if( $category['coptions']['opt_filess'] )
    		{
    			$this->output = str_replace( "<!--SCREENSHOT_DISPLAY-->", $this->ipsclass->compiled_templates['skin_downloads']->screenshot_inline( array( 'file_ssname' => $file['file_ssname'], 'file_ssurl' => $file['file_ssurl'], 'file_id' => $file['file_id'], 'thumb_x' => $category['coptions']['opt_thumb_x'] ) ), $this->output );
    		}

    replace to:

    if( $category['coptions']['opt_filess'] )
    		{
    			$this->output = str_replace( "<!--SCREENSHOT_DISPLAY-->", $this->ipsclass->compiled_templates['skin_downloads']->screenshot_inline( array( 'file_ssname' => $file['file_ssname'], 'file_ssurl' => $file['file_ssurl'], 'file_id' => $file['file_id'], 'thumb_x' => $category['coptions']['opt_thumb_x'], 'file_name' => $file['file_name'] ) ), $this->output );
    		}


    go to ACP -> LOOK & FEEL -> skin -> Edit Template HTML -> skin_downloads (Non-Default Group) -> screenshot_inline

    replace all to:

    <tr>
    <td colspan='2' class='row1' align='center' valign='middle'>
    <if="$id['file_ssname']!=''">
    <a href='{$this->ipsclass->base_url}autocom=downloads&amp;req=display&amp;code=ss&amp;full=1&amp;id={$id['file_id']}' onclick="PopUp('{$this->ipsclass->base_url}autocom=downloads&amp;req=display&amp;code=ss&amp;full=1&amp;id={$id['file_id']}','SS','640','480',1,1,1); return false;" <if="$this->ipsclass->vars['idm_ss_popup'] == 'l'">rel='lightbox'</if> title="{$id['file_name' ]}"><img src='{$this->ipsclass->base_url}autocom=downloads&amp;req=display&amp;code=ss&amp;id={$id['file_id']}' border='0' alt='{$this->ipsclass->lang['filescreenshot']}: {$id['file_name' ]}' /></a>
    <else />
     <if="$id['file_ssurl']">
     	<if="$ssurl=@getimagesize($id['file_ssurl']) AND $ssurl[0]>$id['thumb_x']">
     		<a href='{$id['file_ssurl']}' onclick="PopUp('{$id['file_ssurl']}','SS','640','480',1,1,1); return false;" <if="$this->ipsclass->vars['idm_ss_popup'] == 'l'">rel='lightbox'</if> title="{$id['file_name' ]}"><img src='{$id['file_ssurl']}' width='{$id['thumb_x']}' border='0' alt='{$this->ipsclass->lang['filescreenshot']}: {$id['file_name' ]}' /></a>
     	<else />
     		<if="$ssurl=@getimagesize($id['file_ssurl']) AND $ssurl[1]>$id['thumb_y']">
     			<a href='{$id['file_ssurl']}' onclick="PopUp('{$id['file_ssurl']}','SS','640','480',1,1,1); return false;" <if="$this->ipsclass->vars['idm_ss_popup'] == 'l'">rel='lightbox'</if> title="{$id['file_name' ]}"><img src='{$id['file_ssurl']}' height='{$id['thumb_y']}' border='0' alt='{$this->ipsclass->lang['filescreenshot']}: {$id['file_name' ]}' /></a>
     		<else />
     			<a href='{$id['file_ssurl']}' onclick="PopUp('{$id['file_ssurl']}','SS','640','480',1,1,1); return false;" <if="$this->ipsclass->vars['idm_ss_popup'] == 'l'">rel='lightbox'</if> title="{$id['file_name' ]}"><img src='{$id['file_ssurl']}' border='0' alt='{$this->ipsclass->lang['filescreenshot']}: {$id['file_name' ]}' /></a>
     		</if>
     	</if>
     <else />
     {$this->ipsclass->lang['ss_notavail2']}
     </if>
    </if>
    </td>
    </tr>

    From now your screens will look the same as: http://www.ipsbeyond...amp;showfile=11


    In addition we add unique alt atribute for image :)


    Copyright 2009 by Spanner IPSBeyond.pl

    Powered by Tutorials 1.4.1 © 2012, by Michael McCune