Author |
Message |
neralex
Site Admin
![](modules/Forums/images/avatars/201442295664a46e4575d46.jpg)
Joined: Aug 22, 2007
Posts: 1775
|
Posted:
Fri Jun 10, 2011 7:50 pm |
|
hey!
i have found in many themes the same xHTML error. i mean the anchor to display the last post in a thread.
example file: themes/fisubice/forums/viewtopic_body.tpl
search:
php Code:<a name="{postrow.U_POST_ID}"></a>
|
this is not XHTML valid. in xHTML must start the name with a letter, not with with a number only. after a look into the Forums module, i found a solution for me.
open modules/Forums/index.php and search:
php Code:$last_post .= '<a href="' . append_sid("viewtopic.$phpEx?" . POST_POST_URL . '=' . $forum_data[$j]['forum_last_post_id']) . '#' . $forum_data[$j]['forum_last_post_id'] . '"><img src="' . $images['icon_latest_reply'] . '" border="0" alt="' . $lang['View_latest_post'] . '" title="' . $lang['View_latest_post'] . '" /></a>';
|
look to: '#'
and change to: '#p'
open modules/Forums/viewforum.php and search:
php Code:$last_post_url = '<a href="' . append_sid("viewtopic.$phpEx?" . POST_POST_URL . '=' . $topic_rowset[$i]['topic_last_post_id']) . '#' . $topic_rowset[$i]['topic_last_post_id'] . '"><img src="' . $images['icon_latest_reply'] . '" alt="' . $lang['View_latest_post'] . '" title="' . $lang['View_latest_post'] . '" border="0" /></a>';
|
look to: '#'
and change to: '#p'
open modules/Forums/viewtopic.php and search:
php Code:$mini_post_url = append_sid("viewtopic.$phpEx?" . POST_POST_URL . '=' . $postrow[$i]['post_id']) . '#' . $postrow[$i]['post_id'];
|
look to: '#'
and change to: '#p'
example for fisubice theme:
open themes/fisubice/forums/viewtopic_body.tpl and search:
php Code:<a name="{postrow.U_POST_ID}"></a>
|
change it to:
php Code:<a name="p{postrow.U_POST_ID}"></a>
|
Edit (19.10.2014): added shortlinks changes
open /ShortLinks/GT-Forums.php
find:
php Code:'"(?<!/)modules.php\?name=Forums&file=viewtopic&(t|p)=([0-9]*)#([0-9]*)((\")|(&sid=[a-zA-Z0-9]*))"',
|
change it to:
php Code:'"(?<!/)modules.php\?name=Forums&file=viewtopic&(t|p)=([0-9]*)#p([0-9]*)((\")|(&sid=[a-zA-Z0-9]*))"',
|
find:
php Code:'ftopic\\1-\\2.html#\\3\\4',
|
change it to:
php Code:'ftopic\\1-\\2.html#p\\3\\4',
|
open .htaccess
find Rewrite rule:
apache Code:RewriteRule ^ftopic(t|p)-([0-9]*).html#([0-9]*) modules.php?name=Forums&file=viewtopic&$1=$2#$3 [L]
|
change it to:
apache Code:RewriteRule ^ftopic(t|p)-([0-9]*).html#p([0-9]*) modules.php?name=Forums&file=viewtopic&$1=$2#p$3 [L]
|
done! |
Last edited by neralex on Sun Oct 19, 2014 1:01 pm; edited 4 times in total |
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
montego
Site Admin
![](modules/Forums/images/avatars/0c0adf824792d6d341ef4.gif)
Joined: Aug 29, 2004
Posts: 9457
Location: Arizona
|
Posted:
Sat Jun 11, 2011 8:43 pm |
|
Just an fyi (I agree with the approach by the way), this could break existing ShortLinks and/or SE cached links. One might want to figure out a nice .htaccess 301 redirect rule to cover the change once made. |
_________________ Only registered users can see links on this board! Get registered or login!
Only registered users can see links on this board! Get registered or login! |
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
neralex
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Sun Jun 12, 2011 5:47 am |
|
do you have another issue to fix it, without a crash of your shortlinks? |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
montego
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Sun Jun 12, 2011 8:16 am |
|
The RN team will have to see this and respond as I cannot speak for them. I just wanted to point out the potential "snags" that will need to be addressed.
BTW, ShortLinks won't "crash" per se, but these links may not be tapped properly. The issue of links not being found is an issue even if one is not using ShortLinks. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
spasticdonkey
RavenNuke(tm) Development Team
![](modules/Forums/images/avatars/48fb116845dfecf66294c.gif)
Joined: Dec 02, 2006
Posts: 1693
Location: Texas, USA
|
Posted:
Sun Jun 12, 2011 3:23 pm |
|
While I agree in a perfect world this should be addressed, there is unfortunately more involved in fixing this than the template files. These links persist within the forums search functions, as well as nukeFEED, most forum blocks, Your_Account, and probably a multitude of other places
This same discussion came up 2-3 years ago, and at the time I think the consensus was there were more important issues to address. The same probably holds true today considering the amount of work involved and the fact that it is phpbb2 related.
I've noticed some themes have achieved compliance by removing the anchor tags altogether.. Although many links will forward to the page and not jump to the post in question as intended. For me personally, I would rather have it work correctly and tolerate a few minor compliance errors. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
neralex
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Mon Jun 13, 2011 2:35 pm |
|
...it's pity, but i can understand that. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
64bitguy
The Mouse Is Extension Of Arm
![](modules/Forums/images/avatars/183ecd6a404a3683445de.gif)
Joined: Mar 06, 2004
Posts: 1164
|
Posted:
Tue Jun 14, 2011 1:33 pm |
|
neralax... While the comments above are indeed true, don't lose faith in the fix... Some of us changed all of our templates and globals for GoogleTap way (way... ) back to your "p" or even "post" (I think raven changed his in GT like 6 or 7 years ago!).
I'm a compliance nut, so while it may not be adapted into the core RN Solution, having it work and be standards compliant is truly the way to go.
If you were to find them all as well as fix any impacted GT relationships (if there are any) so the links are all functional and compliant from all pages that use them, I would only comment that I doubt the community would feel badly about you doing that work. I would simply continue to modify your original post to add whatever other pages need the fix.
Given evolution directions of the RN solution however, again I would comment that these fixes may not become part of the baseline; but from a user perspective a fix is still a fix!
The SE rule would be a wildcard to replace all # calls with a #p btw.... and the same thing would apply in the outbound GT rule.
Just my two cents. |
_________________ Steph Benoit
100% Section 508 and W3C HTML5 and CSS Compliant (Truly) Code, because I love compliance. |
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
|