Author |
Message |
spasticdonkey
RavenNuke(tm) Development Team

Joined: Dec 02, 2006
Posts: 1693
Location: Texas, USA
|
Posted:
Wed Jan 28, 2009 9:33 am |
|
Well I noticed that the anchor tags were missing from viewtopic_body.tpl in the CT_RN theme. There was also an issue with a <P> tag inside of a <SPAN>
FIND in CT_RN/forums/viewtopic_body.tpl
Code:<span class="name"><strong>{postrow.POSTER_NAME}</strong></span><br />
<span class="postdetails">
<p align="center">{postrow.POSTER_AVATAR}</p><br />
{postrow.POSTER_RANK}<br />
{postrow.RANK_IMAGE}<br />
{postrow.POSTER_JOINED}<br />
{postrow.POSTER_POSTS}<br />
{postrow.POSTER_FROM}</span>
|
Replace with
Code:<span class="name"><a id="{postrow.U_POST_ID}"></a><strong>{postrow.POSTER_NAME}</strong></span><br />
<p align="center">
{postrow.POSTER_AVATAR}</p>
<span class="postdetails"><br />
{postrow.POSTER_RANK}<br />
{postrow.RANK_IMAGE}<br />
{postrow.POSTER_JOINED}<br />
{postrow.POSTER_POSTS}<br />
{postrow.POSTER_FROM}</span>
|
This fixes MOST of the html errors, although you will still get warnings for the anchor id starting with a number, which I'm pretty sure is a problem in all of the themes.... |
|
|
|
 |
fkelly
Former Moderator in Good Standing

Joined: Aug 30, 2005
Posts: 3312
Location: near Albany NY
|
Posted:
Wed Jan 28, 2009 11:10 am |
|
Good catch SpasticDonkey. It looks to me like if we change the
Code:<span class="name"><a id="{postrow.U_POST_ID}"></a><strong>{postrow.POSTER_NAME}</strong></span><br />
to <span class="name"><a name="{postrow.U_POST_ID}"></a><strong>{postrow.POSTER_NAME}</strong></span><br />
|
i.e., changing id to name, all the validation errors go away. I figured this out by comparing the code in fisubice and ravenice with that in CT_RN.
I will post this in our internal tracking system and see if we can get it included into 2.3.01.
-- off topic but I have to say this: maintaining all these different tpl files for all these different themes and looking at the subtle differences between three viewtopics_body.tpl files ... it is just a software maintenance nightmare. There is SO MUCH code is that is almost identical but not quite that it just strikes me there has to be a better way.
Maybe this is something we can look at if we get to a PHPBB3 bridge. |
|
|
|
 |
spasticdonkey

|
Posted:
Wed Jan 28, 2009 11:41 am |
|
fkelly wrote: | i.e., changing id to name, all the validation errors go away. I figured this out by comparing the code in fisubice and ravenice with that in CT_RN |
Well I thought that was kind of a pick-your-poison scenario, since I get warnings for:
Tidy wrote: | In XHTML, the "name" attribute has been deprecated and replaced by the "id" attribute. If you want to keep both tags for compatibility reasons, the values should be the same. This error is generated when only the "name" attribute exists and that tidy try to copy the value of the name in the id attribute. But an "id" must begin with a letter (A-Za-z). |
Quote: | -- off topic but I have to say this: maintaining all these different tpl files for all these different themes and looking at the subtle differences between three viewtopics_body.tpl files ... it is just a software maintenance nightmare. There is SO MUCH code is that is almost identical but not quite that it just strikes me there has to be a better way.
Maybe this is something we can look at if we get to a PHPBB3 bridge. |
Ya I too looked at the Fisubice version of the TPL file and almost just copied the entire thing over since it was so close... but decided that may not be a good idea.. In a perfect world it would be nice to just have one theme to maintain, and have all the styling done by CSS alone... |
|
|
|
 |
fkelly

|
Posted:
Wed Jan 28, 2009 12:37 pm |
|
Good research again. I have posted this issue in our internal tracking system and put the fixed code up into the repository for 2.3.01. Raven and the other experts there can take a look before we go live with it and make adjustments if necessary. I am using the W3C validator and it is "passing" the revised code but I'm sure you are right. I'm not sure what the right solution is since we are trying to use the poster_id, which is a number, as an anchor. We could prepend that with an alphabetic character I suppose but then we'd need to do the same thing to any place where the anchor is present. I don't know that the juice is worth the squeeze. |
|
|
|
 |
spasticdonkey

|
Posted:
Mon Oct 08, 2012 12:11 pm |
|
|
|
 |
hicuxunicorniobestbuildpc
The Mouse Is Extension Of Arm

Joined: Aug 13, 2009
Posts: 1123
|
Posted:
Sun Oct 19, 2014 6:35 am |
|
Hey spasticdonkey
Today was checking some files from my theme and I did this change but I came out the same validation error in this place.
Code:<td width="150" align="left" valign="top" class="{postrow.ROW_CLASS}"><span class="name"><a name="{postrow.U_POST_ID}"></a><span class="thick">{postrow.POSTER_NAME}</span></span><br /><span class="postdetails">{postrow.POSTER_RANK}<br />{postrow.RANK_IMAGE}{postrow.POSTER_AVATAR}<br /><br />{postrow.POSTER_JOINED}<br />{postrow.POSTER_POSTS}<br />{postrow.POSTER_FROM}</span><br /></td>
|
Tidy is giving me this error today. line 296 column 77 - Warning: <a> cannot copy name attribute to id
I wonder if I forgot something because I didn't have this before. Let me know if I am missing something.
Solution
Use "id" instead of "name" or use both with identical values. (None of this is working. I still get the error.
but if I remove this line the error dissapear.
Code:<a name="{postrow.U_POST_ID}"></a>
|
|
|
|
|
 |
spasticdonkey

|
Posted:
Sun Oct 19, 2014 10:59 am |
|
ya, you'll see some forum templates that have removed that line because of the validation issue. technically, in html5 an id can start with a number (unlike xhtml), or can be anything other than a space, but not sure it's good practice or not. I would still lean toward starting any id with a letter.
To fix this it would require modification of the forums module and templates, which has never been a priority due to other needs taking precedence. I have only started on an html5 forum template and haven't given much thought about this in the next version; although as I mentioned earlier it is valid in html5 so it will probably stay as-is. There is other more important changes in the templates. most notably all the depreciated table attributes (valign, width, align, and so forth.) |
|
|
|
 |
neralex
Site Admin

Joined: Aug 22, 2007
Posts: 1775
|
Posted:
Sun Oct 19, 2014 12:48 pm |
|
|
|
 |
hicuxunicorniobestbuildpc

|
Posted:
Sun Oct 19, 2014 1:13 pm |
|
Hi spasticdonkey. I can't imagen how busy u could be with forum. It is a lot of work. I do know u will come with a nice decent work. Thanks for your effort. I can not wait for it.
Hey Neralex! I tested your mod very well. Thank u very much. It is working 100% and the shortlinks are working fine. I am not getting any error in the log or in the error from panel control or even in my forum. I found lost of info when I search but it is so much data here I was lazy today going link by link
Spasticdonkey. This trick works for me.
Quote: | http://www.ravenphpscripts.com/ftopict-19984.html |
This is exactly what I did because I do know some people has mod as well. Here we go.
modules/Forums/index.php(changing # to #p)
Code:$last_post_time = create_date($board_config['default_dateformat'], $forum_data[$j]['post_time'], $board_config['board_timezone']);
$last_post = '<a href="' . append_sid("viewtopic.$phpEx?" . POST_POST_URL . '=' . $forum_data[$j]['forum_last_post_id']) . '#p' . $forum_data[$j]['forum_last_post_id'] . '">'.$forum_data[$j]['topic_title'].' <img src="' . $images['icon_latest_reply'] . '" border="0" alt="' . $lang['View_latest_post'] . '" title="' . $lang['View_latest_post'] . '" /></a>';
|
from viewtopic.php
Code:$mini_post_url = append_sid("viewtopic.$phpEx?" . POST_POST_URL . '=' . $postrow[$i]['post_id']) . '#p' . $postrow[$i]['post_id'];
|
from viewtopic_body.tpl
Code:<td width="150" align="left" valign="top" class="{postrow.ROW_CLASS}"><span class="name"><a name="p{postrow.U_POST_ID}"></a><span class="thick">{postrow.POSTER_NAME}</span></span><br /><span class="postdetails">{postrow.POSTER_RANK}<br />{postrow.RANK_IMAGE}{postrow.POSTER_AVATAR}<br /><br />{postrow.POSTER_JOINED}<br />{postrow.POSTER_POSTS}<br />{postrow.POSTER_FROM}</span><br /></td>
|
That's all folks! and Big hug to Neralex! lol
I think converting this forum to html5 is a lot of work. Good luck and let me know if u need any help. |
|
|
|
 |
neralex

|
Posted:
Sun Oct 19, 2014 1:37 pm |
|
There are more files to change, for example the forums plugin in Your_Account and all other areas where the forum links are displayed but with the examples in the old thread you can change it on the same way for hyperlinks and shortlinks. |
|
|
|
 |
|