Weblinks field enhacement - direct or internal links

More
12 years 1 month ago - 12 years 4 days ago #24293 by gruz
Currently the weblinks field uses only joomla com_weblinks way to show links.

I.e. my testarea localhost website is test.oscargo.rua/

So if I add a link to my web-site like this gruz.org.ua the output in the HTML is like this test.oscargo.rua/projects/weblink/19/81/1 , but when clicked, it's redirected to gruz.org.ua
[img
[img


And in some cases people may want to show direct links. So my suggestion is to add an option here:
[img


So if set to yes, then
[img


Language strings for administrator/language/en-GB/en-GB.com_flexicontent.ini
Code:
FLEXI_DIRECT_LINK="Direct links?" FLEXI_DIRECT_LINK_DESC="If No, then the outbound links are changed from direct urls into internal urls."

File plugins/flexicontent_fields/weblink/weblink.xml line about 23 after
Code:
<fieldset name="group-weblink">
add
Code:
<field name="directlink" type="radio" default="0" label="FLEXI_DIRECT_LINK" description="FLEXI_DIRECT_LINK_DESC"> <option value="0">FLEXI_NO</option> <option value="1">FLEXI_YES</option> </field>

File plugins/flexicontent_fields/weblink/weblink.php line about 290, line
Code:
$field->{$prop}[] = $value ? '<a href="' . JRoute::_( 'index.php?fid='. $field->id .'&cid='.$field->item_id.'&ord='.($n+1).'&task=weblink' ) . '" title="' . $value['title'] . '"' . $target . '>'.( $usetitle ? $value['title'] : $this->cleanurl($value['link']) ).'' : '';
replace with
Code:
if (!empty($value)) { $link = ''; if ($directlink) { $link = $value['link']; } else { $link = JRoute::_( 'index.php?fid='. $field->id .'&cid='.$field->item_id.'&ord='.($n+1).'&task=weblink' ); } $field->{$prop}[] = $value ? '<a href="' . $link . '" title="' . $value['title'] . '"' . $target . '>'.( $usetitle ? $value['title'] : $this->cleanurl($value['link']) ).'' : ''; }

J2.5
FC - 2.0 - Rev 1612 (since 17-00 30.12.2012)
Last edit: 12 years 4 days ago by gruz.

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

More
12 years 1 month ago #24295 by micker
good propose !

FLEXIcontent is Free but involves a very big effort on our part.
Like the our support? (for a bug-free FC, despite being huge extension) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing reviews. Thanks![/size]

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

More
12 years 5 days ago #25085 by gruz
Don't forget, please.

J2.5
FC - 2.0 - Rev 1612 (since 17-00 30.12.2012)

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

More
12 years 4 days ago #25101 by ggppdk
Your code will be tested and added soon:

code.google.com/p/flexicontent/i ... ail?id=432

Thanks for contribution


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

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

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.281 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline