Topic: Back To Top by Ophidian

##
##
##        Mod title:  Back To Top
##
##      Mod version:  1.0
##   Works on PunBB:  1.0.1
##     Release date:  2003-09-01
##           Author:  Ophidian (ophidian@killerjuggalos.net)
##
##      Description:  Puts a link into your board that allows you to move back
##                    to the top of the page.
##
##   Affected files:  /include/template/main.tpl
##                    footer.php
##
##       Affects DB:  No
##
##                    Generated with ModGenerator (http://modgen.cactuz.nu/)
##                    on: 2003-09-01 19:22:59
##
##       DISCLAIMER:  Please note that "mods" are not officially supported by
##                    PunBB. Installation of this modification is done at your
##                    own risk. Backup your forum database and any and all
##                    applicable files before proceeding.
##
##

This is my first one here, so be nice...

I guess I just give ya the link?

http://www.killerjuggalos.net/users/bla … readme.txt

2

Re: Back To Top by Ophidian

Awesome. You should probably upload this to http://punres.cactuz.nu so it's with all of the other mods.

"You start coding. I'll go find out what they want." - Computer Analyst to Programmer

Re: Back To Top by Ophidian

A few remarks:

- You only need to have one SAVE/UPLOAD. Put it at the end.
- Step 6 is corrupt or something. I don't know if this is a bug in ModGen or if you screwed up :)

"Programming is like sex: one mistake and you have to support it for the rest of your life."

4

Re: Back To Top by Ophidian

i like it big_smile

Re: Back To Top by Ophidian

Actually there's going to be 2 save/uploads because there's two files... correct?

And I'm not sure what that error is you're talking about... could you please be more specific?

Re: Back To Top by Ophidian

SAVE/UPLOAD includes all files.

What I meant was the last row in section 6. The HTML stuff after "exit($tpl_main);" isn't supposed to be there.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

Re: Back To Top by Ophidian

Oh, I see what you're saying... I don't think that was me. I think that may be a glitch with the ModGen.

8

Re: Back To Top by Ophidian

Seems this mod is dead, but it shouldn't be too difficult making a similar one for 1.2.x?
It would be cool to have a "back to top" link in each post, for those of us who have at times very long threads in the forums.

Re: Back To Top by Ophidian

do you really need one since you have the breadcrumbs at the bottom?

10

Re: Back To Top by Ophidian

Can anyone fix it up again? I would really like to have it!

11

Re: Back To Top by Ophidian

I dont understand the comment about breadcrumbs.. that doesnt help.
If you're reading post 15 in a list of 30 and want to use the menu, you have to scroll for ages to get back to the top. If there was a link saying "back to top" next to Report and Quote, it would make site navigation much easier.
Should be hard to accomplish, I'm sure.

Re: Back To Top by Ophidian

ok, well 99% of the time i just want to go to the forum view or the forum index, and if i want to go to the top it quicker for me to scroll lol

13

Re: Back To Top by Ophidian

finger -> home

14 (edited by Endre 2005-03-17 19:13)

Re: Back To Top by Ophidian

I'm surprised you're so reluctant to listen to requests. This is a very common feature in forums, for a reason. It's been directly requested by my users, so it's obviously something that some people use.
I'm not saying you should make the mod, but dont laugh off the need for it.

Finger-home? So lets just remove the refresh-button in all browsers, since we can hit F5.

Re: Back To Top by Ophidian

sounds good to me wink

we're not not-listening we're just giving alternatives that may be better/easier solutions

16

Re: Back To Top by Ophidian

I don't think educating 2000 users on shortcut-use is easier than simply inserting a link in the posts

17

Re: Back To Top by Ophidian

Paul wrote:

finger -> home

Damn, you've just boosted my productivity level 10 fold.

Ranks up there with the backspace key for going back a page smile

Re: Back To Top by Ophidian

i got a Intelimouse recently and it has a back button on the side, its so amazing, its a good as a scroll wheel big_smile

19

Re: Back To Top by Ophidian

So there's no one who has it?

On my PunBB forum we have project threads, and those can be VERY big with much text and pictures. When the threads get so big, the little scrollbar gets tiny so it takes long time to scroll even with a good scrollmouse.

20 (edited by CodeXP 2005-03-18 15:50)

Re: Back To Top by Ophidian

Why not just do something like this?

At the top of the page, add just below '<div id="shadow_wrapper">':

<a id="top" name="top" />

At the bottom of the *.tpl file(s) just above '</body>' add:

<div id="go_top">
    <div class="pun">
        <a href="#top">Back to top</a>
    </div>
</div>

Add the following to your CSS:

div#go_top {display:none} /*this will hide the navigation for browsers like IE that can't handle fixed DIV's */
body > div#go_top {display:block;position: fixed;left:0em;bottom:0em;top:auto;right:auto;} /* This shows the 'back to top' nav link for browsers with real CSS support */

This should take care of the problem without modifying any of the .php files smile

Edit: fixed code

Re: Back To Top by Ophidian

but that won't work on IE? and IE users are the ones that need stuff like this (in general)

22

Re: Back To Top by Ophidian

Connorhd wrote:

but that won't work on IE? and IE users are the ones that need stuff like this (in general)

That's true... but you could always use a javascript to position it instead if you want smile In general, I don't think one should compromise *to* much to make a page compatible with IE though because that's part of the reason a lot of users don't switch to something better... Why would they switch if all pages looks right in their current browser?

Re: Back To Top by Ophidian

but since like 80% of people are still using IE you HAVE to support it

24

Re: Back To Top by Ophidian

Connorhd wrote:

but since like 80% of people are still using IE you HAVE to support it

While that's true, it doesn't mean that every feature on a page have to work with IE. For example, something like this "tweak" will enhance the site for those using a good browser, but at the same time not ruin anything for IE users smile