https://antibiotiqueaugmentin.com/surdosage-augmentin-bebe/
× This is the optional Forum header for the Suggestion Box.

hyperlink from MySQL table

  • DukEz7
  • DukEz7's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
12 years 6 months ago #1319

Hey again, guys :kiss:

Well, a have another problem actually.

One of my tables in MySQL contains a lot of hyperlinks. How can i make all of them clickable, when they display in your component?

what file i have to edit?

thanks! :kiss:

Please Log in or Create an account to join the conversation.

More
12 years 6 months ago #1320

Hi,

To be able to help you I need some more information about your data structure. What do you mean by "One of my tables in MySQL contains a lot of hyperlinks". Is it that you have one text field with html (<a>) tags in it - or do you have multiple url addresses in one field, or is it that you have one url address in one field?

Anyway the links are generated in components/com_grid/GridBuilder.php around line 520.

Last edit: 12 years 6 months ago by tomaz.

Please Log in or Create an account to join the conversation.

  • DukEz7
  • DukEz7's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
12 years 6 months ago #1321

well, i actually have an field in my table that contains www adresses

i.imgur.com/DnBUf.jpg - here it is

and when i try to display it with TableJX , it is not linkable

i.imgur.com/KCPq4.jpg - the problem is here

Please Log in or Create an account to join the conversation.

More
12 years 6 months ago #1322

Hi,

This is possible without hacking. You may want to use the "Link" option. Tick the checkbox "Link?" for the column that you want to be displayed as links. Another grid with linkable columns will appear. Select the same column in the dropdown box, and choose "url" option. This should do the job.

Regards,
Tomaž

Please Log in or Create an account to join the conversation.

  • DukEz7
  • DukEz7's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
12 years 5 months ago #1324

well, i actually know about this feature, but the link looks like [http://mysitename/www.LINK.com]

what i have to do to remove mysitename from this link?

Last edit: 12 years 5 months ago by DukEz7.

Please Log in or Create an account to join the conversation.

  • DukEz7
  • DukEz7's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
12 years 5 months ago #1325

oh, i'm done with it :D

changed

$output = '<a href="'.$link.'">'.$data.'</a>'; (line 528)

to

$output = '<a href="http://'.$link.'">'.$data.'</a>';


thanks thomaz!

Last edit: 12 years 5 months ago by DukEz7.

Please Log in or Create an account to join the conversation.

Moderators: tomaz
Time to create page: 0.167 seconds

Contact Us

Contact us on Discord

Contact us on Facebook