PDA

View Full Version : Have bbs load bottom of page instead of top from outside URL


huskermax
09-16-2014, 02:40 PM
How would I go about loading forum.php so when you click on the link it loads the page from the bottom first with an anchor? So the link would look like www.mydomain.com/bbs folder/forum.php#footer

tbworld
09-16-2014, 06:29 PM
I am not sure I understand your question, it is a bit unclear.

When forum.php is executed it loads template FORUMHOME. So you could place an anchor in "FORUMHOME right above the footer template variable. You could also place your anchor in the "footer template" directly, thus making it available on all pages.

Not sure if this is what you are looking for. :)


<a href="#footer"></a>
{vb:raw footer} <!-- footer template variable -->

huskermax
09-16-2014, 11:34 PM
I am not sure I understand your question, it is a bit unclear.

When forum.php is executed it loads template FORUMHOME. So you could place an anchor in "FORUMHOME right above the footer template variable. You could also place your anchor in the "footer template" directly, thus making it available on all pages.

Not sure if this is what you are looking for. :)


<a href="#footer"></a>
{vb:raw footer} <!-- footer template variable -->


If I can link to that and it loads the page and takes the user to the footer part that is what I want. so the URL to the bbs would be www.mydomain.com/bbsfolder/forum.php#footer

That would load the footer part of the page if one would follow that link. That is what I am trying to do. Sorry to be confusing.

tbworld
09-16-2014, 11:47 PM
That would load the footer part of the page if one would follow that link. That is what I am trying to do. Sorry to be confusing.

Should work, give it a try. As long as the user has access/permission to the page. :)

huskermax
09-16-2014, 11:53 PM
Should work, give it a try. As long as the user has access/permission to the page. :)

In fourmhome template I see the {vb:raw footer} code. I put the <a href="#footer"></a>

just above it and it did not work. Do I wrap that href code around something?

tbworld
09-17-2014, 12:38 AM
It works, but you will have to reposition the anchor to the top of your shoutbox or the template hook that it uses. :)


http://forum.huskermax.com/vbbs/forum.php#footer
--------------- Added 16 Sep 2014 at 18:56 ---------------

You could try sticking the anchor above:


{vb:raw template_hook.forumhome_below_forums}


In the FORUMHOME template.

ozzy47
09-17-2014, 09:20 AM
Why not just use:

http://forum.huskermax.com/vbbs/forum.php#footer_time

huskermax
09-17-2014, 11:22 AM
Thanks both ideas work. :)

ozzy47
09-17-2014, 11:49 AM
Yeah, I just gave you a alternative to adding additional code to the template. :)

tbworld
09-17-2014, 11:35 PM
Why not just use:
http://forum.huskermax.com/vbbs/forum.php#footer_time

Good suggestion, but he really needed below the forums, not above the footer. His explanation was in reverse notation. I think the correct lesson here is that you can use any existing #ID field on an HTML element as it is also a destination anchor. :)

ozzy47
09-17-2014, 11:42 PM
Correct, any part of the template that has a id you can anchor to, like so.

<h2 class="blockhead" id="SOME_TEXT">{vb:rawphrase some_sort_of_phrase}</h2>

So in that, id="SOME_TEXT" #SOME_TEXT would be your anchor. :)

CAG CheechDogg
09-17-2014, 11:46 PM
Correct, any part of the template that has a id you can anchor to, like so.

<h2 class="blockhead" id="SOME_TEXT">{vb:rawphrase some_sort_of_phrase}</h2>

So in that, id="SOME_TEXT" #SOME_TEXT would be your anchor. :)

NICE !!! I didn't know this lol ...:)

ozzy47
09-17-2014, 11:54 PM
Yeah it is a pretty neat trick if you want to direct someone to a specific spot on a page. :)

CAG CheechDogg
09-18-2014, 12:01 AM
Yes !!! :) ... I tried it and it kicks butt !!! Thanks my Man !!

ozzy47
09-18-2014, 12:08 AM
Not a problem. :)

tbworld
09-18-2014, 12:18 AM
Yeah it is a pretty neat trick if you want to direct someone to a specific spot on a page. :)

This is standard HTML anchoring. I think it is a mistake to refer to it as a trick -- I know not your intention.

Here is a link, for those that are interested. Since we have sidetracked this thread terribly. :)

http://www.motive.co.nz/glossary/anchor.php

huskermax
09-19-2014, 06:12 PM
Correct, any part of the template that has a id you can anchor to, like so.

<h2 class="blockhead" id="SOME_TEXT">{vb:rawphrase some_sort_of_phrase}</h2>

So in that, id="SOME_TEXT" #SOME_TEXT would be your anchor. :)

So it has to have the h2 in it. Not sure with CSS what is an ID is.

I would like to anchor a link to one spot on forum.php. I have a list of 13 boards on forum.php Would like to set up an anchor to just one of them so when someone loads the anchor link it will load the page so that board is at top.

ozzy47
09-19-2014, 07:20 PM
Link to the page, and what spot you want it to anchor to?