Visualizzazione dei risultati da 1 a 3 su 3
  1. #1

    modifica allinemento immagini

    Buongiorno a tutti, scrivo per chiedervi un piccolo aiuto, se possibile.

    ho questa porzione di file:

    Codice PHP:
    //print_r($file_list);

                
    if ($sfl_listdir == && is_array($dir_list) && is_array($file_list))
                    
    $full_list array_merge($dir_list$file_list);
                elseif (
    is_array($file_list))
                    
    $full_list $file_list;
                elseif (
    $sfl_listdir == && is_array($dir_list))
                    
    $full_list $dir_list;
                else
                    
    $full_list null;
                if (
    is_array($full_list)) {
                    foreach (
    $full_list as $lfile) {

                    
    //while (false !== ($lfile = readdir($bib))) {

                    //$sfl_listdir 

                    //$sfl_browsedir

                        
    $fdir = (substr($lfile['name'], 05) === "*dir*");

                        if(
    $lfile['name'] != "." && $lfile['name'] != ".." && !preg_match("/^\..+/"$lfile['name']) && $lfile['name'] != "index.html") {
                            if (
    $idx >= $idx_endat) {
                                
    $session->set'sfl_nextindex'$idx);
                                
    $session->set'sfl_stopindex'$idx $sfl_maxfiles);
                                break;
                            }
                            
    $idx += 1;
                            if (
    $idx $idx_startat && $idx <= $idx_endat) {
                                
    $tmpfile "<nobr>";
                                
    $tmpthumb "";
                                
    $is_img false;
                                if ((
    $sfl_imgthumbs === '1' || $sfl_imgthumbs === '2') && !$fdir) {
                                    
    //Check image

                                    
    if ((filesize($sfl_dirlocation.DS.$lfile['name']) <= $sfl_disablegdthreshold) || ($sfl_disablegdthreshold == 0)) {
                                        if (
    $img = @getimagesize($sfl_dirlocation.DS.$lfile['name'])) {
                                            
    // Show thumbnail
                                        //if($img = @getimagesize($baseurl.str_replace(" ", "%20", $lfile['name']))) {        
                                            //list($width, $height, $type, $attr) = getimagesize($baseurl.str_replace(" ", "%20", $lfile['name'])); 
                                            
    list($width$height$type$attr) = getimagesize($sfl_dirlocation.DS.$lfile['name']); 
                                            if ((
    $height $sfl_thumbheight) && ($sfl_thumbkeepaspect === '1'))
                                                     
    $tmpthumb "<img border=\"0\" height=$sfl_thumbheight src=\"".$baseurl.str_replace(" ""%20"$lfile['name'])."\"/>";
        else
                                                     
    $tmpthumb "<img border=\"0\" height=$sfl_thumbheight width=$sfl_thumbheight src=\"".$baseurl.str_replace(" ""%20"$lfile['name'])."\"/>";    

        
    $is_img true;

                                        } else {

              
    // no thumbnail and show icon

                 
    if ($sfl_showicon == 1)

                                                
    $tmpfile .= "<img height=\"24\" src=\"".JURI::root().$sfl_basepath."images/file.png\"/>";

                                        }

                                    } else {

                                        
    $tmpfile .= "<img height=\"24\" src=\"".JURI::root().$sfl_basepath."images/file.png\"/>";

                                    }

                                

                                } elseif (
    $fdir) {

                                    
    $lfile['name'] = substr($lfile['name'], 5);

                                    
    $tmpfile .= "<img height=\"24\" src=\"".JURI::root().$sfl_basepath."images/directory.png\"/>";

                                } elseif (
    $sfl_showicon == 1) {

                                        
    $tmpfile .= "<img height=\"24\" src=\"".JURI::root().$sfl_basepath."images/file.png\"/>";

                                }

                                

                                

                                if (
    $fdir) {

                                    if (
    $sfl_browsedir == 1)

                                        
    $tmpfile .= "<a class=\"sfl_btnBrowseDir\" rel=\"" $sfl_dirlocation.DS.$lfile['name'] . "\" href=\"javascript: void(0);\">".$lfile['name']."</a>";

                                    else

                                        
    $tmpfile .= $lfile['name'];

                                } else {

                                    
    // Add thumb-nail as clickable, empty string if no thumb option

                                    
    $linktext $tmpthumb;

                                    if (
    $sfl_imgthumbs !== '2' || !$is_img) {

                                        
    // Add the filename if it is not an image and/or thumb is not created

                                        
    $linktext .= $lfile['name'];

                                    }

                                    
    $tmpfile .= "<a href=\"".$baseurl.str_replace(" ""%20"$lfile['name'])."\" target=\"blank\">".$linktext."</a>";

                                }

                                

                                
    // Show size but not for directories

                                
    if ($sfl_showfilesize === '1' && !$fdir

                                    
    $tmpfile .= " (".ModSimpleFileListerHelperv10::getFileSizePP(filesize($sfl_dirlocation.DS.$lfile['name'])).")"
    Spero di aver preso il "pezzo giusto"! il file era troppo lungo per postarlo tutto

    questo produce una immagine ridimensionata pescata da una cartella ed affianco inserisce il nome del file stesso linkabile.



    una immagine per ogni riga con il suo nome affianco.

    come si potrebbe modificare (e dove) il file per far si che le immagini siano più di una su ogni riga (opportunamente spaziate) ed il nome del file linkabile sia posizionato sotto la thumbnail?

    se avete necessità di leggere l' intero file, ditemi come postarlo o se posso caricarlo su un host e postare il link.

    grazie in anticipo a chi vorrà provare ad aiutarmi...

  2. #2
    Per fare quello che dici tu devi sfruttare un po' i div e il css:
    -crea un div principale e lo dividi in tanti div
    -utilizza il css per allinearli
    -inserisci i vari contenuti nel div

  3. #3
    potresti indicarmi eventualmente dove dovrei intervenire? non sono molto pratico di php... ma facendo delle prove potrei riuscirci... sai indicarmi leggendo quanto ho riportato dove esattamente si inizia a costruire il risultato finale? grazie mille.

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.