Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: Dzonny on August 08, 2009, 05:54:44 AM

Title: Go up button in posts
Post by: Dzonny on August 08, 2009, 05:54:44 AM
Link to Mod (http://custom.simplemachines.org/mods/index.php?mod=2053)

Go up button in posts
Author: Dzonny (http://www.simplemachines.org/community/index.php?action=profile;u=154709)

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.

Title: Re: Go up button in posts
Post by: cepsi on August 08, 2009, 08:09:51 AM
wow this is gr8 was thinking i needed something like this just yesterday  :D
Title: Re: Go up button in posts
Post by: Dzonny on August 08, 2009, 08:28:01 AM
Thanks cepsi, i'm glad that you like it...
Title: Re: Go up button in posts
Post by: Marcus Forsberg on August 08, 2009, 08:35:37 AM
Good job, Dzonny. :)
Title: Re: Go up button in posts
Post by: alex30 on August 08, 2009, 08:38:31 AM
Thank you.
Title: Re: Go up button in posts
Post by: Dzonny on August 08, 2009, 12:44:05 PM
Quote from: Nas on August 08, 2009, 08:35:37 AM
Good job, Dzonny. :)
Thank you Nas... :)

Quote from: alex30 on August 08, 2009, 08:38:31 AM
Thank you.
You're welcome :D

Title: Re: Go up button in posts
Post by: 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
Title: Re: Go up button in posts
Post by: Costa on August 08, 2009, 09:34:56 PM
God mod mate
very usefull

Farewell
-Costa
Title: Re: Go up button in posts
Post by: Dzonny on August 09, 2009, 04:32:31 AM
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
Title: Re: Go up button in posts
Post by: TheListener on August 10, 2009, 11:39:25 PM
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.
Title: Re: Go up button in posts
Post by: TheListener on August 13, 2009, 06:30:40 AM
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
Title: Re: Go up button in posts
Post by: Dzonny on August 13, 2009, 06:33:16 AM
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..)
Title: Re: Go up button in posts
Post by: TheListener on August 13, 2009, 06:36:39 AM
Attachment included
Title: Re: Go up button in posts
Post by: Dzonny on August 13, 2009, 06:47:02 AM
Okay, please upload thisone, and browse your forum to see if there is still error...  8)
Title: Re: Go up button in posts
Post by: TheListener on August 13, 2009, 06:55:38 AM
Exact same error  :(
Title: Re: Go up button in posts
Post by: Dzonny on August 13, 2009, 07:00:53 AM
Quote from: TheListener on August 13, 2009, 06:55:38 AM
Exact same error  :(
Please upload /Themes/default/Display.template.php to see it...
Title: Re: Go up button in posts
Post by: TheListener on August 13, 2009, 07:05:21 AM
You want it here as an attachment?
Title: Re: Go up button in posts
Post by: Dzonny on August 13, 2009, 07:46:11 AM
Quote from: TheListener on August 13, 2009, 07:05:21 AM
You want it here as an attachment?

Yes please...
Title: Re: Go up button in posts
Post by: TheListener on August 13, 2009, 08:08:28 AM
As requested
Title: Re: Go up button in posts
Post by: Dzonny on August 13, 2009, 09:33:17 AM
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.
Title: Re: Go up button in posts
Post by: TheListener on August 13, 2009, 07:28:13 PM
The forum is at www.visionaryhosting.info (http://www.visionaryhosting.info)
Title: Re: Go up button in posts
Post by: Dzonny on August 14, 2009, 04:57:53 AM
Quote from: TheListener on August 13, 2009, 07:28:13 PM
The forum is at www.visionaryhosting.info (http://www.visionaryhosting.info)
Did you have button in your posts as it should be?
Title: Re: Go up button in posts
Post by: TheListener on August 14, 2009, 05:07:43 AM
The button is there.

Attachment supplied.
Title: Re: Go up button in posts
Post by: Forbs on August 14, 2009, 05:07:51 AM
   
I like the mod, congratulations on the effort ...
Title: Re: Go up button in posts
Post by: Dzonny on August 14, 2009, 05:38:55 AM
@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.
Title: Re: Go up button in posts
Post by: @ngel on August 20, 2009, 05:33:01 PM
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"');
Title: Re: Go up button in posts
Post by: Dzonny on August 21, 2009, 04:28:09 AM
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.
Title: Re: Go up button in posts
Post by: @ngel on August 21, 2009, 05:13:22 AM
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,

Title: Re: Go up button in posts
Post by: 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?
Title: Re: Go up button in posts
Post by: @ngel on August 21, 2009, 11:26:32 AM
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,
Title: Re: Go up button in posts
Post by: TheListener on August 21, 2009, 11:30:00 AM
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.
Title: Re: Go up button in posts
Post by: Dzonny on August 21, 2009, 11:47:55 AM
@ngel, thanks for the tip...


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

Title: Re: Go up button in posts
Post by: 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. :-[
Title: Re: Go up button in posts
Post by: Dzonny on August 21, 2009, 01:13:54 PM
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...
Title: Re: Go up button in posts
Post by: TheListener on August 21, 2009, 01:33:46 PM
Exact same error.
Title: Re: Go up button in posts
Post by: Dzonny on August 22, 2009, 12:28:16 PM
Can you please provide me admin account on that forum and send me detalis abot it on pm?

Regards.
Title: Re: Go up button in posts
Post by: TheListener on August 28, 2009, 11:49:40 AM
Hiya bud.

Will get an account set up for ya when ya ready.
Title: Re: Go up button in posts
Post by: Norv on September 05, 2009, 04:27:04 PM
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.