link to a file in a paragraph

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

Re: link to a file in a paragraph

Post by jegbertzen »

adding phocadownload links, causes text to run out of the <P> as shown below in bold:

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

That is what I am trying to say. If you look at the code that I have send from the editor, you will see correct code.
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 still don't understand or I see it wrong (HTML), I see nothing wrong with:

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

Maybe you should not add the whole plugin between the <p></p> but between the <div></div> area ... so maybe then the editor will not stop the p tag

:idea:
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 »

Last try from my side... did you compare the backend code with the frontend code, that I posted?

I like to have my text properly made up in <p> instead of <div>

Any way my goal is to add a phocadownload link on a word in a paragraph of text, but the first link does something with the paragraph! see for example: http://www.orangeplayground.nl/cjgparks ... Itemid=105

I also have sent you a login, so you can check it yourself.
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 have compared it and I understand it, try to see this similar post:

http://www.webmasterworld.com/html/3560080.htm

In some document types (XHTML ???) divs are not allowed in p tags, so it is possible that this is the reason why the p tag is ended and why to use divs to insert the plugin code into the article.

The plugin code is a large block so divs are needed there, but there is no reason why the article should have plugin inside p tags. So the easiest solution (if it will work, no experiences) is to add the code to div tag in the article.

In fact this issue is not related to Phoca Plugin but to the formatting the html in the article. :idea: and there will be problem with all possible plugins which render some block of information on the site, I think. :idea:

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 »

Oh tnx for the answer... hmm not sure what to do with it now. I have not experienced it before. Guess I need to force div text containers instead of paragraphs, but I am not sure if that is according to W3C...

great tool by the way, PhocaDownload!
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 »

but I am not sure if that is according to W3C
Sorry, I don't understand, using p or div is not important issue, it does not influence anything, important on the site is its content, not the tags used for displaying the content.

Jan
If you find Phoca extensions useful, please support the project
plamen
Phoca Professional
Phoca Professional
Posts: 101
Joined: 16 Mar 2014, 13:23

Re: link to a file in a paragraph

Post by plamen »

Old thread ...

I am using PD module and have the following inside article:

Code: Select all

<p>bla-bla: {phocadownload view=file|id=18|text=foo|target=s}.</p>
this is producing output like:

Code: Select all

<p>bla-bla: <div class="phocadownloadfile32"><a href="/component/phocadownload/category/10-obyavi?download=18:obyava" target="_self" >foo</a></div>.</p>
but:Why <p> tag can't contain <div> tag inside it?

My DOCTYPE is HTML5
I am using JCE, may be other editors also place <p> tags automaticly in articles.
So, how to avoid <div> inside <p>?
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 this should be a question on editor's developer, there are two ways how the <p> tag will be added:

- by user
- by editor automatically

If this happen to me, the only way is to see the html source code of the article and change the p tag to div.

But as written, this should be a question on editor's developer, if there is e.g. some option to prevent from adding <p> tags automatically :idea:

Jan
If you find Phoca extensions useful, please support the project
plamen
Phoca Professional
Phoca Professional
Posts: 101
Joined: 16 Mar 2014, 13:23

Re: link to a file in a paragraph

Post by plamen »

Yes, there is a option in JCE a row to be marked as div instead of paragraph.
Image
so to following code should reside on a separate row as div

Code: Select all

<div>{phocadownload view=file|id=18|text=foo|target=s}</div>
Image
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, thank you very much for the info.

Jan
If you find Phoca extensions useful, please support the project
Post Reply