[weblinks are indirect] Strange weblink behaviour

More
11 years 4 months ago #38141 by rottenberg
hello

I'm using an extended weblink field to manage the parameters of a site which transcode youtube video to MP3.

in the field I give :
    - the youtube link (as given in youtube) in the url field
    - the name of the video in the attached text field

The url field content is systematically changed in the page display

For instance the youtube url is :

the url in the display page becomes :
/index.php/fr/weblink/33/238/1

If I run the /index.php/fr/weblink/33/238/1 , no problem the good Youtube url runs.

But my problem is that the youtube url is not the good one. With nonumber I add before the content of the url the address of a transcodification center (youtube 2 mp3).

In this case the complete URL to be used is :
convert2mp3.net/en/index.php?p=c ... m/watch?v= Youtube video url

In my case the url should have been :
convert2mp3.net/en/index.php?p=c ... zGwSFc3E4I

I get :
convert2mp3.net/en/index.php?p=c ... k/33/238/1

and of course this is a bad address.

How can I force the content fof the url to get always the real youtube one and not an interpreted one

thank you for help
best regards
Michel

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

More
11 years 4 months ago #38143 by ggppdk
Hello,

the title of your post is rather inappropriate,
but your explanation of what you are trying to achieve is very good

the web-links are by default 'hidden', 'non-public', you get via an indirect way by making a call to a server task,

in effect you want a parameter to allow the weblink, extended-weblink field to display the actual URL instead of the indirect link


-- 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.

More
11 years 4 months ago #38144 by rottenberg
Sorry for the title.
I didn't known that weblink was an indirect link. That explains my problem.

in effect you want a parameter to allow the weblink, extended-weblink field to display the actual URL instead of the indirect link


I could have created 2 multi values text-fields (one for the url and one for the corresponding text.
But It's a little bit hard to explain to someone who is not knowing how works hyperlink, to check that there is for each url a corresponding text.

It's why I have chosen to use extended weblink.

Do you think it's possible to get extended weblink with the real url and not an indirect one ?

I may get another way of working for my problem :

I'm using Nonumber rereplacer and prefix and suffix value are mainly use as tags used to embed some php code in the page.
Is there a way to decode the indirect url value and get the real one ?

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

More
11 years 4 months ago #38145 by ggppdk
Hello,

Most important reason for using a server call is to count URL hits

So it is really trivial to add a parameter to allow usage of the real actual URL, but hits counting will not work.

-- in extendedweblink.php replace:
Code:
$href = JRoute::_( 'index.php?option=com_flexicontent&fid='. $field->id .'&cid='.$field->item_id.'&ord='.($n+1).'&task=weblink' );
with:
Code:
if ( $field->parameters->get( 'use_direct_link', 0 ) ) $href = $value['link']; else $href = JRoute::_( 'index.php?option=com_flexicontent&fid='. $field->id .'&cid='.$field->item_id.'&ord='.($n+1).'&task=weblink' );

[edited by ggppdk, bellow: corrected filename]
and in extendedweblink.xml add a new parameter:
Code:
<field name="use_direct_link" type="list" default="0" label="Use direct link" description="Add direct links to the URLs. Normally an indirect link to your site web server is made to get the real URL and also count hits. This will disable hits counting"> <option value="0">No, </option> <option value="1">Yes, (also disable hits counting)</option> </field>

Please test and i will commit this feature


-- 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.

More
11 years 4 months ago #38146 by rottenberg
Thank you very much.

I have tested : Its working.

Just 2 remarks :
    - In the post you
wrote and in extendedweblink.php add a new parameter: The file of course is not extendedweblink.php but extendedweblink.xml (just for those who may use this patch.
- I have added the new parameter at the end of the xml file. I think this parameter is to be put elsewhere.


Once more Flexicontent is a great product. I'm discovering the Universal flexicontent module, a little bit difficult to use without a documentation (I'm sure that I don't use a lot of availibility) but those I use are extra.

I'm using now this module to replace the category menu.
And with the module anywhere plugin, I write only 1 article and he is automatically duplicate in a lot of place in my site.

thank you to all Flexicontent team for this great extension.

best regards
Michel

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

More
11 years 4 months ago #38150 by ggppdk
Hello,
this change (+new parameter) will be committed for both weblink and extendedweblink fields for v2.0.3

Regards


-- 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: 1.218 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