link to a file in a paragraph

Phoca Download - download manager
jegbertzen
Phoca Member
Phoca Member
Posts: 21
Joined: 01 Aug 2009, 20:12

link to a file in a paragraph

Post by jegbertzen »

How can I add a link to a file in a paragraph? The link to a file is a div, which is a block element, so it seems not possible...
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48566
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: link to a file in a paragraph

Post by Jan »

Hi, sorry I don't understand?
If you find Phoca extensions useful, please support the project
jegbertzen
Phoca Member
Phoca Member
Posts: 21
Joined: 01 Aug 2009, 20:12

Re: link to a file in a paragraph

Post by jegbertzen »

when you add a link to a file in the editor, a div element is created around the link. In this way you cannot add a link to a file on a word in a paragraph, as a div is not an inline element. How can I remove the div?
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48566
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: link to a file in a paragraph

Post by Jan »

Hi, I think, then you need to customize the code (to remove the div) or set in CSS that the div will be inline.

Jan
If you find Phoca extensions useful, please support the project
jegbertzen
Phoca Member
Phoca Member
Posts: 21
Joined: 01 Aug 2009, 20:12

Re: link to a file in a paragraph

Post by jegbertzen »

Hi Jan,

This can be an option but DIV elements are no inline elements. SPAN elements are. I think this would be a good improvement for your plugin, so users can add links in paragraphs.

Something else strange happens in my editor (using JCE):

I add this in the editor:
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis in tortor orci, a convallis sapien. Mauris diam massa, egestas in congue ac, hendrerit id dolor. Phasellus elementum odio quis erat faucibus mollis. Donec condimentum augue sed odio ultricies tempus. Suspendisse tempor ultrices nisi, sit amet pulvinar ipsum molestie eget. Donec auctor fringilla dui sed laoreet. Donec egestas elementum augue sit amet mattis. Phasellus et suscipit sem. Aliquam tristique quam a purus cursus vitae vulputate odio feugiat. Duis nec urna a ipsum gravida aliquam. Donec at justo id felis fermentum mattis. Sed vitae odio et elit gravida cursus ac ac velit.{phocadownload view=file|id=1|text=Link tekst|target=s} Maecenas sodales enim nec mauris placerat ac vehicula lacus tempor. Proin non malesuada est. In sapien mi, varius et luctus at, tristique eget sem. Aenean dapibus nisl vel dolor blandit interdum a vitae lectus. Etiam placerat, orci ut volutpat aliquet, lorem mi tincidunt ligula, in sollicitudin erat odio vel ligula. Phasellus felis tellus, lacinia ac tincidunt id, volutpat eget ipsum. Morbi suscipit ultricies ornare.

This is rendered in the FE

<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis in tortor orci, a convallis sapien. Mauris diam massa, egestas in congue ac, hendrerit id dolor. Phasellus elementum odio quis erat faucibus mollis. Donec condimentum augue sed odio ultricies tempus. Suspendisse tempor ultrices nisi, sit amet pulvinar ipsum molestie eget. Donec auctor fringilla dui sed laoreet. Donec egestas elementum augue sit amet mattis. Phasellus et suscipit sem. Aliquam tristique quam a purus cursus vitae vulputate odio feugiat. Duis nec urna a ipsum gravida aliquam. Donec at justo id felis fermentum mattis. Sed vitae odio et elit gravida cursus ac ac velit.</p>
<div class="phocadownloadfile32">
<a target="_self" href="/index.php?option=com_phocadownload&view=category&download=1:grondstromenbeleid-midden-holland&id=3:bodem">Link tekst</a>
</div>
Maecenas sodales enim nec mauris placerat ac vehicula lacus tempor. Proin non malesuada est. In sapien mi, varius et luctus at, tristique eget sem. Aenean dapibus nisl vel dolor blandit interdum a vitae lectus. Etiam placerat, orci ut volutpat aliquet, lorem mi tincidunt ligula, in sollicitudin erat odio vel ligula. Phasellus felis tellus, lacinia ac tincidunt id, volutpat eget ipsum. Morbi suscipit ultricies ornare.
<p></p>

As you see the second paragraph is not placed in a <P> when I place the code inline in the backend.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48566
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: link to a file in a paragraph

Post by Jan »

Hi, no experiences with the JCE :-(

With inline DIV, I meant:

Code: Select all

<style>
div.inline {
 display: inline;
}
</style>

<div class="inline">This div is an inline element</div>
If you find Phoca extensions useful, please support the project
jegbertzen
Phoca Member
Phoca Member
Posts: 21
Joined: 01 Aug 2009, 20:12

Re: link to a file in a paragraph

Post by jegbertzen »

this works, but the first link to a file in the text seems to close the paragraph. see: http://ismh.ismh.nl/index.php?option=co ... Itemid=373

This page should show 2 inline links.

This is the fact with different editors.

see http://ismh.ismh.nl/index.php?option=co ... Itemid=373 link 'functieprofiel'
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48566
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: link to a file in a paragraph

Post by Jan »

Hi, in such case you need to recheck all your CSS, if it is not set on other place with different settings.

Jan
If you find Phoca extensions useful, please support the project
jegbertzen
Phoca Member
Phoca Member
Posts: 21
Joined: 01 Aug 2009, 20:12

Re: link to a file in a paragraph

Post by jegbertzen »

Hi Jan,

This has nothing to do with the CSS. In the backend this is my code:

<p>De kwalificatie ambtenaren zijn aangesteld op basis van een {phocadownload view=file|id=6|text=functieprofiel|target=s} en werken volgens het {phocadownload view=file|id=7|target=s}, dat is opgesteld naar aanleiding van de uitkomsten van het onderzoek.</p>
<p><strong>Contactgegevens kwalificatieambtenaar <br /></strong>telefoon (0182) 545 544</p>

Which is correct, right?

on the frontend:

<p>De kwalificatie ambtenaren zijn aangesteld op basis van een </p>
<div class="phocadownloadfile32">
<a target="_self" href="/index.php?option=com_phocadownload&view=category&download=6:functieprofiel-kwalificatieplicht&id=4:kwalificatieplicht&Itemid=433">functieprofiel</a>
</div>
en werken volgens het
<div class="phocadownloadfile32">
<a target="_self" href="/index.php?option=com_phocadownload&view=category&download=7:werkplan-kwalificatieplicht&id=4:kwalificatieplicht&Itemid=433">werkplan kwalificatieplicht</a>
</div>
, dat is opgesteld naar aanleiding van de uitkomsten van het onderzoek.
<p></p>

So as you can see, the first phocadownloadfile seems to create incorrect HTML.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48566
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: link to a file in a paragraph

Post by Jan »

Hi, no idea what you mean with not correct HTML?
If you find Phoca extensions useful, please support the project
Post Reply