Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Saturday, October 17, 2026
About Us
Magazine
Open Source
CVS
Services
Index  »  Projects  »  phpMyEdit  »  Forum  »  Field with URLs

phpMyEdit General     Field with URLs
Post new topic   Reply to topic    
 
dieglopviana     Joined: 12 Sep 2007   Posts: 13   Location: Brazil
Post Posted: 2007-10-22 13:50
Back to top  Reply with quote     

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     Joined: 12 Sep 2007   Posts: 13   Location: Brazil
Post Posted: 2007-10-22 16:28
Back to top  Reply with quote     

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

My code is this:

Code:
$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     Joined: 12 Sep 2007   Posts: 13   Location: Brazil
Post Posted: 2007-10-25 18:06
Back to top  Reply with quote     

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     Joined: 12 Sep 2007   Posts: 13   Location: Brazil
Post Posted: 2007-10-25 20:27
Back to top  Reply with quote     

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     Joined: 17 Dec 2003   Posts: 236  
Post Posted: 2007-10-26 10:02
Back to top  Reply with quote     

Could you post what you have actually put?

 
dieglopviana     Joined: 12 Sep 2007   Posts: 13   Location: Brazil
Post Posted: 2007-10-26 13:18
Back to top  Reply with quote     

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

Code:

$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     Joined: 12 Sep 2007   Posts: 13   Location: Brazil
Post Posted: 2007-10-29 03:47
Back to top  Reply with quote     

Help me please!!!

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

 
binc     Joined: 29 Oct 2007   Posts: 1  
Post Posted: 2007-10-29 10:58
Back to top  Reply with quote     

Hi,

Try to add this:

Code:
$opts['fdd']['link_for_download']['URL'] = '$value';


and change this:

Code:
$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     Joined: 12 Sep 2007   Posts: 13   Location: Brazil
Post Posted: 2007-10-29 14:14
Back to top  Reply with quote     

binc

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

Code:
$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:
Code:

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

The correct is:
Code:
localhost/project/job.php


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

 
ajh     Joined: 17 Dec 2003   Posts: 236  
Post Posted: 2007-10-30 11:14
Back to top  Reply with quote     

Try the following:
Code:

$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     Joined: 12 Sep 2007   Posts: 13   Location: Brazil
Post Posted: 2007-10-30 13:35
Back to top  Reply with quote     

ajh

This is my code now:
Code:

$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

 
Post new topic   Reply to topic    

Copyright © 2002-2006 Platon Group
Site powered by Metafox CMS
Go to Top · Feedback form · Application form
Report bug on PLATON.SK website · Terms of use · Privacy policy