Platon Technologies
neprihlásený Prihlásiť Registrácia
SlovakEnglish
open source software development oslavujeme 10 rokov vývoja otvoreného softvéru! Streda, 25. november 2026
O nás
Magazín
Otvorený softvér
CVS
Služby
Index  »  Projekty  »  phpMyEdit  »  Fórum  »  Field with URLs

phpMyEdit General     Field with URLs
Odoslať novú tému   Odpovedať na tému    
 
dieglopviana     Založený: 12.09.2007   Príspevky: 13   Bydlisko: Brazil
Príspevok Zaslal: 2007-10-22 13:50
Návrat hore  Odpovedať s citátom     

Hi to all...

Sorry by my english ok!

I have a field in the table to register URLs, but can happen not to have one, so I would like to show a message, rather than link, example:

With URL:
url_here

Without URL:
Link unavailable

I await help.

Thanks ...

 
dieglopviana     Založený: 12.09.2007   Príspevky: 13   Bydlisko: Brazil
Príspevok Zaslal: 2007-10-22 16:28
Návrat hore  Odpovedať s citátom     

I tried to do so, most did not work ...

My code is this:

Kód:
$opts['fdd']['link_for_download']['URL'] = 'http://$value';
$opts['fdd']['link_for_download']['URLdisp'] = 'Click here for access the link';
$opts['fdd']['link_for_download']['URLtarget'] = '_blank';

$opts['fdd']['link_for_download']['sql|LF'] =
   'if(link_for_download = "", CONCAT("Link unavailable"), link_for_download)';


 
dieglopviana     Založený: 12.09.2007   Príspevky: 13   Bydlisko: Brazil
Príspevok Zaslal: 2007-10-25 18:06
Návrat hore  Odpovedať s citátom     

Doug, I tried to do here, but I win not, without wanting to abuse, as would be for my case? The name of my field is link_for_download ...

Thanks ...

 
dieglopviana     Založený: 12.09.2007   Príspevky: 13   Bydlisko: Brazil
Príspevok Zaslal: 2007-10-25 20:27
Návrat hore  Odpovedať s citátom     

Yet no win, when the field it's empty, show the field in white and when have a record, show the url, instead of link for download...

 
ajh     Založený: 17.12.2003   Príspevky: 236  
Príspevok Zaslal: 2007-10-26 10:02
Návrat hore  Odpovedať s citátom     

Could you post what you have actually put?

 
dieglopviana     Založený: 12.09.2007   Príspevky: 13   Bydlisko: Brazil
Príspevok Zaslal: 2007-10-26 13:18
Návrat hore  Odpovedať s citátom     

ajh , my code is this for the field link_for_download...

Kód:

$opts['fdd']['link_for_download'] = array(
  'name'     => 'Link for download',
  'select'   => 'T',
  'maxlen'   => 100,
  'size'     => 45,
  'options'  => 'ACVP',
  'sort'     => true
);

$opts['fdd']['link_for_download']['escape'] = false;

$opts['fdd']['link_for_download']['sql|LF'] =
   'if(link_for_download <> "",
      CONCAT("<a href="http://$value/", link_for_download, ">",
      link_for_download, "</a>"), "No link for download")';


 
dieglopviana     Založený: 12.09.2007   Príspevky: 13   Bydlisko: Brazil
Príspevok Zaslal: 2007-10-29 03:47
Návrat hore  Odpovedať s citátom     

Help me please!!!

I'm from Brazil, are you understand my english?

 
binc     Založený: 29.10.2007   Príspevky: 1  
Príspevok Zaslal: 2007-10-29 10:58
Návrat hore  Odpovedať s citátom     

Hi,

Try to add this:

Kód:
$opts['fdd']['link_for_download']['URL'] = '$value';


and change this:

Kód:
$opts['fdd']['link_for_download']['sql|LF'] =
   'if(link_for_download <> "", link_for_download
      , "No link for download")';


Hope it works for you. (BTW: Your English is understandable (and I am from a non-English country))

 
dieglopviana     Založený: 12.09.2007   Príspevky: 13   Bydlisko: Brazil
Príspevok Zaslal: 2007-10-29 14:14
Návrat hore  Odpovedať s citátom     

binc

Our I arrived to be happy to think that he had given certain, more still not worked. My code:

Kód:
$opts['fdd']['link_para_download'] = array(
  'name'     => 'Link para download',
  'help'     => '<font color="#000000">- Digite o link sem o http://</font>',
  'select'   => 'T',
  'maxlen'   => 100,
  'default'  => 'Link indisponível',
  'size'     => 45,
  'options'  => 'ACVP',
  'sort'     => true
);

$opts['fdd']['link_para_download']['URL'] = '$value';
$opts['fdd']['link_para_download']['URLdisp'] = 'Clique Aqui para acessar o link';
$opts['fdd']['link_para_download']['URLtarget'] = '_blank';

$opts['fdd']['link_para_download']['sql|LF'] =
   'if(link_para_download <> "", "link_for_download","No link for download")';



Now shows the url + the url of variable $value. Example:
Kód:

http://localhost/project/localhost/project/job.php

The correct is:
Kód:
localhost/project/job.php


And the field in white, show in white same...

 
ajh     Založený: 17.12.2003   Príspevky: 236  
Príspevok Zaslal: 2007-10-30 11:14
Návrat hore  Odpovedať s citátom     

Try the following:
Kód:

$opts['fdd']['link_para_download'] = array(
  'name'     => 'Link para download',
  'help'     => '<font color="#000000">- Digite o link sem o http://</font>',
  'select'   => 'T',
  'maxlen'   => 100,
  'default'  => 'Link indisponível',
  'size'     => 45,
  'options'  => 'ACVP',
  'sort'     => true
);

$opts['fdd']['link_para_download']['escape'] = false;
$opts['fdd']['link_para_download']['sql|LF'] =
   'if(link_para_download <> "", CONCAT("<a href=",link_para_download,"> Clique aqui para acessar o link </a>),"No link for download")';


You need to remove any URL options as the above generates the URL manually.

 
dieglopviana     Založený: 12.09.2007   Príspevky: 13   Bydlisko: Brazil
Príspevok Zaslal: 2007-10-30 13:35
Návrat hore  Odpovedať s citátom     

ajh

This is my code now:
Kód:

$opts['fdd']['link_para_download'] = array(
  'name'     => 'Link para download',
  'help'     => '<font color="#000000">- Digite o link sem o http://</font>',
  'select'   => 'T',
  'maxlen'   => 100,
  'default'  => 'Link indisponível',
  'size'     => 45,
  'options'  => 'ACVP',
  'sort'     => true
);

$opts['fdd']['link_para_download']['escape'] = false;
$opts['fdd']['link_para_download']['sql|LF'] =
   'if(link_para_download <> "",
   CONCAT("<a href=",link_para_download,"> Clique aqui para acessar o link </a>",
   "No link for download")';

more no worked yet, show this:
www.yahoo.com

and the correct is:
Click here or No link

 
Odoslať novú tému   Odpovedať na tému    

Copyright © 2002-2006 Platon Group
Stránka používa redakčný systém Metafox
Na začiatok · Odkazový formulár · Prihláška
Upozorniť na chybu na PLATON.SK webstránke · Podmienky použitia · Ochrana osobných údajov