DaDaBIK
This forum is devoted to the discussion about the software DaDaBIK database front-end
the PHP Database application generator for MySQL, PostgreSQL and SQLite; also available for Wordpress.

Steve
Help needed creating urls from results page
April 08, 2004 03:53PM
Where in the code can I create urls from the results. http://www.upwardkids.com/tools/results.php Displays several fields and I would like the Title and Urls fields to be actual url's to the corresponding url for that row. I would also like to do the for the admin page when a Show all Records are listed

Thanks
Eugenio
Re: Help needed creating urls from results page
April 11, 2004 04:29AM
Steve wrote:

> Where in the code can I create urls from the results.
> http://www.upwardkids.com/tools/results.php Displays several
> fields and I would like the Title and Urls fields to be actual
> url's to the corresponding url for that row. I would also like
> to do the for the admin page when a Show all Records are
> listed

Perform a search, click on a coloumn header to sort the results, copy the resulting URL; this is the URL that show the results of the search.



(Latest version of DaDaBIK when this message was posted: 3.0 beta)
George
Re: Help needed creating urls from results page
April 11, 2004 10:37AM
I had the same difficulty.'

I can not display the correct url link on the page because < changed to &lt; and > changed to &gt; in source HTML file.

Even if on bababik display page shown correct url link, but when I view the source file, < and > has been changed because PHP scrpit.

For Characts < and >, how should I change the < and > in csv file in order late for PHP to compile correct < and > in
bababik HTML output so that user can click that link to external page.
George
Re: Help needed creating urls from results page
April 11, 2004 10:45AM
I can not display the correct url link on the page because < changed to [& l t ;] 4 characters and > changed to [& g t ;] 4 characters in source HTML file.

I'm not understanding a single thing ya'll are speaking about? George are you discussing my issue or something else. Anyways I would really like a way to add tags to the php page so that the returned results are links...
George
Re: Help needed creating urls from results page
April 11, 2004 04:28PM
I know that php has function of html_entity_decode() may do the job, but I have not figured out where to put this function in which php file to get the url link in the table cell so that you click that link to another page or url. Some one good about PHP may know how to do it.
Well, I believe just adding the apporiate href tags may do this? I'm not quite sure how the results page will handle this though...
Where in which php file are you making the changes?
OK, now i feel dumb =)

I edited the root results.php page $url and placed it in an href to make it display as a link, and the admin section can be change using the web interface: admin/admin.php and go into the table then edit the specific field and change the type to web and it will display as a link in the admin section if you need that capibility
Eugenio
Re: Help needed creating urls from results page
April 12, 2004 01:34PM
Steve wrote:

> OK, now i feel dumb =)
>
> I edited the root results.php page $url and placed it in an
> href to make it display as a link, and the admin section can be
> change using the web interface: admin/admin.php and go into the
> table then edit the specific field and change the type to web
> and it will display as a link in the admin section if you need
> that capibility

I'm sorry but I'm not understanding your problems, Steve, George please describe them better.



(Latest version of DaDaBIK when this message was posted: 3.0 beta)
George
Re: Help needed creating urls from results page
April 12, 2004 08:11PM
Hi, Eugenio

Thanks for you prompt reply.

DaDaBik can make field types of Image and URL
which already are very good features. I am for sure that DaDaBik can do what I want to do, although I am not good at PHP, but may be can do some modifications if I know how.

1. I am using DaDaBik to search book database.
I'd like one field is book's icon (image file), when user click that icon, the url link to another much detailed infomation page about that book. So far I can not use that field type of image to do the URL links.

2. About the field type of URL. If I put real URL in a field and make that field type of URL, click that URL, it works! But it has to be a real URL (but I don't want user to see a long URL). What if I put "click here" in the field, yes, you can click this link but error message. How can I make "click here" to be a link to another page? (becaue of HTML_ENTITY_ENDODE, html tag does not work in PHP, "<" becomes & l t ; you will not see these 4 characters if I put them together, you only see "<", I want make PHP compiler keep "<" as "<" in generated HTML page, it may work.)

If this will not take too much of your time, I really want this great program ever better.

Best Regards,
Eugenio
Re: Help needed creating urls from results page
April 13, 2004 01:27AM
George wrote:

> Hi, Eugenio
>
> Thanks for you prompt reply.
>
> DaDaBik can make field types of Image and URL
> which already are very good features. I am for sure that
> DaDaBik can do what I want to do, although I am not good at
> PHP, but may be can do some modifications if I know how.
>
> 1. I am using DaDaBik to search book database.
> I'd like one field is book's icon (image file), when user
> click that icon, the url link to another much detailed
> infomation page about that book. So far I can not use that
> field type of image to do the URL links.
> 2. About the field type of URL. If I put real URL in a field
> and make that field type of URL, click that URL, it works! But
> it has to be a real URL (but I don't want user to see a long
> URL). What if I put "click here" in the field, yes, you can
> click this link but error message. How can I make "click here"
> to be a link to another page? (becaue of HTML_ENTITY_ENDODE,
> html tag does not work in PHP, "<" becomes & l t ; you will not
> see these 4 characters if I put them together, you only see
> "<", I want make PHP compiler keep "<" as "<" in generated HTML
> page, it may work.)
>
> If this will not take too much of your time, I really want
> this great program ever better.

You can't do those things without changing some code; the function you have to change is get_field_correct_displaying and working on the "image" and "url" part.



(Latest version of DaDaBIK when this message was posted: 3.0 beta)
George
Re: Help needed creating urls from results page
April 13, 2004 07:10PM
Thanks Eugenio for your hints. If I can make it, I will let you know. Thanks again!
George
Re: Help needed creating urls from results page
April 13, 2004 09:43PM
Hi, Eugenio

I do appriciate your help!

Following is what I have done:

field type = image_file
field content type = url
In business_logic.php:
@line 2009, I change htmlspecialchars() -> html_entity_decode()
@line 2011, I change $field_to_display = $field_value;

field content now can be any valid image linkage html tags such as

<a href='e:\dadabik_doc.htm'><img src='e:/minixampp/htdocs/bababik/images/t_7100005892.jpg'></a>

on table, click image thumbnail, displays dadabik_doc.htm

or word link like this:

<a href='e:\dadabik_doc.htm'>click here</a>

on table, click "click here", displays dadabik_doc.htm.

DaDaBik is a great MySQL database management program written in PHP. I will support the author for his generous contribution to the public and vote this program the best at hotscripts.com.

Sorry, only registered users may post in this forum.

Click here to login