News:

Wondering if this will always be free?  See why free is better.

Main Menu

Go up button in posts

Started by Dzonny, August 08, 2009, 05:54:44 AM

Previous topic - Next topic

Dzonny

Link to Mod

Go up button in posts
Author: Dzonny

Version 1.0
For smf 1.1.10 and 2.0RC1.2


o: This mod will create button for users, so they can 'go up' within click.

For custom themes, mod have to be installed manually by editing /Themes/custom theme/Display.template.php as it is shown in parse for this mod.
Also you'll have to upload image in your /Themes/custom theme/images/buttons/ directory.


cepsi

wow this is gr8 was thinking i needed something like this just yesterday  :D

Dzonny

Thanks cepsi, i'm glad that you like it...

Marcus Forsberg



Dzonny


Neo_TE

One More Info..

If you guys are using a CUSTOM THEME, then COPY the included file "icon_up.gif" to

"./Themes/Your_Theme_Directory/images/buttons".   8)

instead of "./Themes/default/images/buttons".

Tested with DILBERMC Theme.. Works Perfectly.

Thanks.   ;D

Costa

God mod mate
very usefull

Farewell
-Costa
Hugo "Costa" Fernandes - PT SMF
Todas as MP's a pedir ajuda são sujeitas a radioactividade, microondas, queimadas e atiradas borda fora.

"At least someone appreciates the fact that I am doing and not thinking..."
"Laziness is counter-revolutionary."

Dzonny

Quote from: Neo_TE on August 08, 2009, 04:36:57 PM
One More Info..

If you guys are using a CUSTOM THEME, then COPY the included file "icon_up.gif" to

"./Themes/Your_Theme_Directory/images/buttons".   8)

instead of "./Themes/default/images/buttons".

Tested with DILBERMC Theme.. Works Perfectly.

Thanks.   ;D

Yes, and Display.template has to be edited as well... :P
You're welcome.. :)

Quote from: Costa on August 08, 2009, 09:34:56 PM
God mod mate
very usefull

Farewell
-Costa

Thanks. :D

TheListener

Installed this on a forum using the blackrain v2 theme on 2.0rc1-2.

No problems at all.

Didn't even have to do editing to get the image on the theme.

TheListener

Think my latest error may be linked to this mod  :(

Undefined index: topbottom4
Apply Filter: Only show the errors from this file
File:/Sources/Subs.php
Line: 3816


8: Undefined index: smf251
Apply Filter: Only show the errors from this file
File: //Sources/Subs.php
Line: 3816


Attachment included

Dzonny

Error isn't related to subs.php...
Which language are you using as your default language?
Please attach index.english.php (if you're using english..)

TheListener


Dzonny

Okay, please upload thisone, and browse your forum to see if there is still error...  8)

TheListener


Dzonny

Quote from: TheListener on August 13, 2009, 06:55:38 AM
Exact same error  :(
Please upload /Themes/default/Display.template.php to see it...

TheListener

You want it here as an attachment?

Dzonny


TheListener


Dzonny

Quote from: TheListener on August 13, 2009, 08:08:28 AM
As requested
thanks.

However, i don't see any errors now...
Please make shoure that you've deleted errors from error log and then browse the forum to see if there is new some?
Also, can i take a look at your forum please?

Regards.


Dzonny


TheListener

The button is there.

Attachment supplied.

Forbs

   
I like the mod, congratulations on the effort ...

Dzonny

@TheListener - You have some language strings missing. Did you still get the first error showing?
It should be fixed. Are you using enslish as your default language, no english-utf8 or something else?

Quote from: Forbs on August 14, 2009, 05:07:51 AM
   
I like the mod, congratulations on the effort ...

Thanks for your comment.. :)
Glad you like it.

@ngel

Hi,

Tried on a french version but the text for the up was not displayed.

I changed

Quote$up_button = create_button('icon_up.gif', 'smf251', 'topbottom4', 'align="middle"');

by

Quote$up_button = create_button('icon_up.gif', 'smf251', 'go_up', 'align="middle"');

Dzonny

Hello there @ngel,

Which forum version are zou running?

Please, attach your index.language.php here, i suppouse that should be index.french.php.

Regards.

@ngel

Hi,

I use the SMF 2.0 RC1.2

The file index.french.php standard file without any modifications.

There is no information about "topbottom4"
Quote
$txt['go_up'] = 'En haut';

$txt['go_down'] = 'En bas';

Regards,


Dzonny

Okay @ngel, thank's on your comment, i will fix this error shourtly...

Is your problem solved now?

@ngel

#29
Quote from: Dzonny on August 21, 2009, 11:00:34 AM
Okay @ngel, thank's on your comment, i will fix this error shourtly...

Is your problem solved now?

Yes, problem is solved.

It may be a good idea to add the Go Down functionnalities.  But for that, you need to modify


// Go up button by Dzonny
echo'
<a href="#top"><strong>', $up_button, '</strong></a>'; ]]></add>


by


// Go up button by Dzonny
echo'
<a href="#top"><strong>', $up_button, '</strong></a>';
echo'
<a href="#lastPost"><strong>', $down_button, '</strong></a>';]]></add>


and


$up_button = create_button('icon_up.gif', 'smf251', 'go_up', 'align="middle"');]]></add>


by


$up_button = create_button('icon_up.gif', 'smf251', 'go_up', 'align="middle"');
$down_button = create_button('icon_down.gif', 'smf251', 'go_down', 'align="middle"');]]></add>


and finally, in file "forum.css" :


div.postarea .keyinfo
{
float: left;
width: 60%;
}

to (for french language)

div.postarea .keyinfo
{
float: left;
width: 50%;
}


Regards,

TheListener

Dzonny

Sorry I aint been back lately but I now use a laptop.

Sure takes getting used to after so many years of using a desktop.

The error is still present.

Dzonny

@ngel, thanks for the tip...


TheListener - Try to add
$txt['go_up']
Instead of ,,topbottom4,,


TheListener

Quote from: Dzonny on August 21, 2009, 11:47:55 AM
@ngel, thanks for the tip...


TheListener - Try to add
$txt['go_up']
Instead of ,,topbottom4,,

I wouldn't know where to look. :-[

Dzonny

Quote from: TheListener on August 21, 2009, 01:00:14 PM
Quote from: Dzonny on August 21, 2009, 11:47:55 AM
@ngel, thanks for the tip...


TheListener - Try to add
$txt['go_up']
Instead of ,,topbottom4,,

I wouldn't know where to look. :-[

Please upload this file and browse your forum then to see if there is error exist...

TheListener


Dzonny

Can you please provide me admin account on that forum and send me detalis abot it on pm?

Regards.

TheListener

Hiya bud.

Will get an account set up for ya when ya ready.

Norv

Dzonny: please check out the mod package, as present on the mod site currently: there is no language file edit in it, be it for the plain english version, or another, on SMF 2.0 RC1.2. There is only the edits in Display.template.php, but they are using variables that are not defined (like the issue TheListener is reporting).
Installing on a fresh test SMF 2.0 RC1.2 installation leads to the same little 'undefined' complaints.
To-do lists are for deferral. The more things you write down the later they're done... until you have 100s of lists of things you don't do.

File a security report | Developers' Blog | Bug Tracker


Also known as Norv on D* | Norv N. on G+ | Norv on Github

Advertisement: