Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Michael Simpson

    (@msimpson)

    Don’t you automatically get links to download the files when using [cfdb-table] shortcode?

    Thread Starter jorgehawkins

    (@jorgehawkins)

    I need to put the download link on a click-able image. Like an icon.

    Thread Starter jorgehawkins

    (@jorgehawkins)

    This is what I’ve done.

    $objInfo is the CFDBIterator object, as seen in tutorials I’ve read. I use a while loop to add rows to a custom table I’m making.

    while ($row = $objInfo->nextRow())  {
    
    	 printf('<tr><td>%s</td><td>%s</td><td colspan="2">%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td></tr>',
    			$row['Miembro'], $row['your-date'], $row['Concepto'], 'Pendiente', $row['Transaccion'], $row['SaldoFinal'],
    			$row['Archivo'], "Borrar|Editar");
    
    	 }
    
    	 echo '</table>';

    All the other fields work perfectly, but $row['Archivo'] (Archivo stands for file) gets an unusable string, instead of a link.

    I need to get a link as well.

    Plugin Author Michael Simpson

    (@msimpson)

    If $row[‘Archivo’] represents an uploaded file, then

    $row[‘Archivo’] = the file name
    $row[‘Archivo_URL’] = the download URL for the file

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Link to download file from CFDB’ is closed to new replies.