Discovery Gaming Community
Problem with Anchors - Printable Version

+- Discovery Gaming Community (https://discoverygc.com/forums)
+-- Forum: Rules & Requests (https://discoverygc.com/forums/forumdisplay.php?fid=6)
+--- Forum: Site & Forum Feedback (https://discoverygc.com/forums/forumdisplay.php?fid=14)
+--- Thread: Problem with Anchors (/showthread.php?tid=8477)

Pages: 1 2


Problem with Anchors - Mere_Mortal - 05-12-2008

Fragment identifiers are not working. Why? <strike>Because they have no ID defined</strike> Because the anchors are not created.


Problem with Anchors - Mere_Mortal - 06-12-2008

Is this ever going to get fixed?


Problem with Anchors - Virus - 06-13-2008

Doesn't seem like it. Minor inconvenience, eh?


Problem with Anchors - Mere_Mortal - 06-13-2008

I would rather say a major inconvenience, but that's just me. It is minor actually compared to everything else that goes on around here, so I can't complain.

It can't be that hard to fix, assuming the source of the problem is known. I don't know this forum software though, except for some small-scale moderator work, but nothing with regards to the PHP. If this was phpBB, I could pretty much assert what needs doing without even looking at your side, that's how simple it is.


Problem with Anchors - Igiss - 06-14-2008

Forum software is Invision Power Board. Sorry, but I can't remember such things to be configurable anywhere in the board's admin panel. If you can lead me to how it can be fixed, I'll try. Right now, I don't know where to start...


Problem with Anchors - Mere_Mortal - 06-14-2008

It won't be in the ACP because it's not something that's typically changed. It's a default behaviour of all BBs whereby clicking the new post links will scroll to that message when the page has loaded. Basically, something must have been altered in one of the PHP files, probably viewtopic.php if that exists. With that said, it could be a template file at fault.

Here's an extract from the phpBB viewtopic template...

Code:
<a name="{postrow.U_POST_ID}">
This is making the anchor for the page to scroll to. In viewtopic.php there is $postrow[$i]['post_id'] which defines the above.

If you were to look at the source for a topic page, you would notice that no post has...

Code:
<a name=\"entry$post_id\">
...applied to it, so this has been omitted somewhere. Where exactly that would be in the PHP files I don't know as I have never used IPB at its core. Try the viewtopic.php file or whatever it is for IPB and also the viewtopic template file.

I've just noticed something...the change theme button! Now I realise this only affects the Deep Blue theme, the other three work fine (well, they seem to scroll a bit off, but at least it works). So you will be able to refer to the PHP and/or template files for the other themes to make comparisons.


Problem with Anchors - Igiss - 06-15-2008

This is the part of code that's used to generate links:

Code:
<a title="{ipb.lang['tt_link']}" href="#" onclick="link_to_post({$post['pid']}); return false;">#{$post['post_count']}</a>

If I understand correctly, this part of code is omitted from Deep Blue skin:

Code:
<a name="entry{$post['pid']}"></a>

True that it's missing, but inserting it into Deep Blue skin template in the same place had no effect. Links still don't generate. I mean the links like "Post #7" at the top of this post.


Problem with Anchors - Mere_Mortal - 06-15-2008

The first bit of code appears to be working, that just provides the link for a specific post. Following that link in the browser should of course scroll to it, which it doesn't.

The second is what you're looking for so far as the PHP is concerned and if you've included it where it should have been, then something else is wrong. Try comparing the template files for viewtopic.



Problem with Anchors - Mere_Mortal - 06-15-2008

Ah, I misread your post. The link on each post does look to be wrong. The href itself is not important because it's an onclick script function, as long as that is executed, which it is, it's fine. In any case, this is not what needs attention so far as the missing anchors are concerned, although the relevant code may appear just before this link is made.

Quote:but inserting it into Deep Blue skin template in the same place
When you say "template", are you referring to the theme in general or the template file itself (in other words, .tpl not .php)?


Problem with Anchors - Igiss - 06-15-2008

I refer to "HTML templates" accessible from IPB admin panel. Templates are divided into several sections, each section containing many separate pieces of code. One of them is responsible for displaying topic view.

Deep Blue appears to have lots of differences compared to standard in this template (Blue Solution uses default template from basic IPB skin). So, I'm not really sure what needs to be changed. Probably it depends on some other templates that I just cannot find.