<a name="jump1"></a>

Get help with installation and running phpwcms here. Please do not post bug reports or feature requests here.
Post Reply
colech
Posts: 178
Joined: Thu 25. Mar 2004, 01:01
Location: Washington, USA
Contact:

<a name="jump1"></a>

Post by colech »

This code is bugging the heck out of me. It is found in the file include/inc_front/content.article.inc.php on line 86:

Code: Select all

$content["main"] .= "<a name=\"jump".$row["article_id"]."\"></a>";
I was trying to make an article that would be exactly 450 pixels high. So I created a new article with the article title hidden (by checking the "hide" checkbox) and added an HTML content part with the sole contents of:

Code: Select all

{SPACER:1x450}
Unfortunately when I viewed the source for this page, I found that the HTML inserted in the place of the {CONTENT} tag was as follows:

Code: Select all

<a name="jump3"></a><br /><img src="img/leer.gif" border="0" width="1" height="450" alt="" />
...this make the article a height of 450 pixels plus an extra line break (not to mention a mysteriously empty anchor tag). Why is this HTML still being added to the beginning of the article. In fact a better question would be...

"What is the purpose of this empty anchor at all?"
while !sleeping {
work_on(phpwcms);
}
// Check out our web development company!
// "Your business has character... don't hide it!"
frold
Posts: 2151
Joined: Tue 25. Nov 2003, 22:42

Post by frold »

I guess is when you check "top" when creating a article so a top-icon is inserted - that way you get a shortcut to the top of the page...

Understand?
http://www.studmed.dk Portal for doctors and medical students in Denmark
Karla
Posts: 223
Joined: Tue 26. Oct 2004, 11:56

Post by Karla »

Articles with "summary field" filled in and "plain text" content types seem to always have an anchor assigned to them, when visible. There may be others, I didn't check.

Since many of the ~other~ content types rely on the user to program their layout and purpose via HTML, PHP & replacement tags -or- are a predefined object... I THINK phpWCMS leaves anchoring to the user.

BTW those are NOT ~empty~ anchors. Add a content part with the coding to call that anchor... such as:

Code: Select all

<A HREF="#jump3">Jump to SPACER</a>
and it WILL be a ~working~ link that JUMPS to that anchor!!!! :wink:
colech
Posts: 178
Joined: Thu 25. Mar 2004, 01:01
Location: Washington, USA
Contact:

Post by colech »

Hmmmm... thankyou for you replies. As soon as I get a chance I will look into these comments further.

No one has addressed the reasoning behind why <br /> was added just after the anchor yet. This is unexpected behavior for a typical phpWCMS user who wants an exact height of an article.... such as myself.
while !sleeping {
work_on(phpwcms);
}
// Check out our web development company!
// "Your business has character... don't hide it!"
Pauli
Posts: 92
Joined: Mon 30. Aug 2004, 11:53

Post by Pauli »

I had the same problem, I solved it here:

include/inc_front/content/cnt14.article.inc.php

Code: Select all

//$content["main"] .= ($crow["acontent_html"]) ? "<br />".$crow["acontent_html"] : "";
$content["main"] .= ($crow["acontent_html"]) ? "".$crow["acontent_html"] : "";
so this is where the <br /> is coming from
Karla
Posts: 223
Joined: Tue 26. Oct 2004, 11:56

Post by Karla »

Yes, that was discussed here:

http://www.phpwcms.de/forum/viewtopic.php?t=4213

apparently, there are still a few other places :cry:
colech
Posts: 178
Joined: Thu 25. Mar 2004, 01:01
Location: Washington, USA
Contact:

Post by colech »

Karla wrote:Yes, that was discussed here:

http://www.phpwcms.de/forum/viewtopic.php?t=4213

apparently, there are still a few other places :cry:
Thanks for the tip. I suppose it still seems that this is not "expected behavior" for a CMS. I would really like to see this problem addressed before the release of ver 1.2. I believe that OG could solve this problem quite easily.
while !sleeping {
work_on(phpwcms);
}
// Check out our web development company!
// "Your business has character... don't hide it!"
Post Reply