#eb7100
33409
0
1
Nov 24, 2024 4:27:37 GMT -8
Brian
48,130
November 2004
smashmaster3
|
Post by Brian on Mar 1, 2015 12:24:49 GMT -8
Nothing in my code needs to be changed. You're supposed to change your HTML to work with the code.
Right now you've got this in your global header. You'd change it to this.
You'd do the same thing to your top/bottom buttons in the layout templates, or add the class if it's not there.
|
|
inherit
133488
0
Nov 26, 2024 13:31:45 GMT -8
toetapping
1,583
November 2008
toetapping
|
Post by toetapping on Mar 1, 2015 16:10:00 GMT -8
This is what I have in my global Header
<script type="text/javascript"> // Back to top onclick fix function scrollClick(){ $('.to-top').click(function(){ scroll(0,0); }); $('.to-bottom').click(function(){ scroll(0,document.body.scrollHeight); }); } $(document).ready(function(){ scrollClick(); }); proboards.on('afterSearch',function(){ scrollClick(); }); </script>
<script> $(document).ready(function() { if(proboards.data('route').name == "user" && proboards.data('user').is_logged_in != 1) { $('div.container.show-user').html('<div class="title-bar"><h2>Error</h2></div><div class="content cap-bottom" style="padding:5px;">You do not have permission to view this page</div>'); } }); </script>
<style type="text/css"> /* Resize All in One Images - Global Header */ /* Signature - Posting Images - Avatar Quote */ div.signature img {max-width:320px !important; max-height:240px !important;} div.message img {max-width:640px !important; max-height:480px !important;} div.message .avatar_size_quote img {max-width:30px !important; max-height:30px !important;} </style>
<div style="text-align: right;"> <ul class="controls"> <a class="to-bottom" onclick ="scroll(0,document.body.scrollHeight);"><img src="Down" border="0" alt="Down"/></a> </ul> </div> <script type="text/javascript"> // Back to top onclick fix function scrollClick(){ $('.edited_by').each(function(){ if($(this).children('a').first().attr('onclick') == "scroll(0,0);") $(this).children('a').first().click(function(){ scroll(0,0); }); }); } $(document).ready(function(){ scrollClick(); }); proboards.on('afterSearch',function(){ scrollClick(); }); </script>
this is my Post List.
<div class="container posts"> <div class="title-bar"> <ul class="controls"> {if $[reply_button]} <li style="display: inline-block; padding-right: 8px;"><a onclick="scroll(0,document.body.scrollHeight);">To Bottom</a></li><li style="display: inline-block;">$[reply_button]</li> {/if} </ul> <h1>$[thread.subject]</h1> </div> <div class="control-bar ui-helper-clearfix $[scroll_class]"> $[search] <div class="controls"> $[action_menu] </div> <div class="float-left">$[thread.icons]</div> $[pagination] </div> <div class="content cap-bottom"> $[thread.labels] $[poll] <table class="list" role="presentation"> <tbody class="$[list_class]"> $[post_list] </tbody> </table> {if !$[quick_reply]}{if $[bottom_reply_button]} <div class="reply_button pad-all-double">$[bottom_reply_button]<br class="clear" /></div> {/if}{/if} </div> </div> $[quick_reply]
Hope you can help me with these codes.
|
|
#eb7100
33409
0
1
Nov 24, 2024 4:27:37 GMT -8
Brian
48,130
November 2004
smashmaster3
|
Post by Brian on Mar 1, 2015 16:29:57 GMT -8
Anything that says this: Can be changed to this: And anything that says this: Can be changed to this: That's all there is to it.
|
|
inherit
133488
0
Nov 26, 2024 13:31:45 GMT -8
toetapping
1,583
November 2008
toetapping
|
Post by toetapping on Mar 1, 2015 19:03:09 GMT -8
I have changed line 29 to this <a class="to-bottom" <a class="to-bottom" onclick="scroll(0,document.body.scrollHeight);">"><img src="Down" border="0" alt="Down"/></a>
If I change line 36 to this <a class="to-top" onclick="scroll(0,0);">
The down button doesn't work plus the UP button(Up/Down button) in the threads.
|
|
inherit
First Contributor
66253
0
Mar 18, 2024 11:09:20 GMT -8
aRMY83
2,925
December 2005
army83
|
Post by aRMY83 on Mar 1, 2015 19:35:58 GMT -8
I have changed line 29 to this <a class="to-bottom" <a class="to-bottom" onclick="scroll(0,document.body.scrollHeight);">"><img src="Down" border="0" alt="Down"/></a> If I change line 36 to this <a class="to-top" onclick="scroll(0,0);"> The down button doesn't work plus the UP button(Up/Down button) in the threads. You have this: <a class="to-bottom" <a class="to-bottom" onclick="scroll(0,document.body.scrollHeight);">"><img src="Down" border="0" alt="Down"/></a> and it should be this: <a class="to-bottom" onclick="scroll(0,document.body.scrollHeight);"><img src="Down" border="0" alt="Down"/></a>
|
|
inherit
133488
0
Nov 26, 2024 13:31:45 GMT -8
toetapping
1,583
November 2008
toetapping
|
Post by toetapping on Mar 1, 2015 20:07:13 GMT -8
Thanks you aRMY83
I now have line 29. as a class="to-bottom" onclick="scroll(0,document.body.scrollHeight);"><img src="Down" border="0" alt="Down"/></a>
I don't know what to do with this <a class="to-top" onclick="scroll(0,0);">
I put it on my line 36 and it didn't work.
This is my line 36 if($(this).children('a').first().attr('onclick') == "scroll(0,0);") If I put it there. The down button doesn't work plus the UP button(Up/Down button) in the threads.
|
|
inherit
First Contributor
66253
0
Mar 18, 2024 11:09:20 GMT -8
aRMY83
2,925
December 2005
army83
|
Post by aRMY83 on Mar 2, 2015 4:25:48 GMT -8
Hello toetappingJust checked your source and in your Global Header you have both of Brian codes: (not sure why you do?) </script><script type="text/javascript"> // Back to top onclick fix function scrollClick(){ $('.to-top').click(function(){ scroll(0,0); }); $('.to-bottom').click(function(){ scroll(0,document.body.scrollHeight); }); } $(document).ready(function(){ scrollClick(); }); proboards.on('afterSearch',function(){ scrollClick(); }); </script>
<script type="text/javascript"> // Back to top onclick fix function scrollClick(){ $('.edited_by').each(function(){ if($(this).children('a').first().attr('onclick') == "scroll(0,0);") $(this).children('a').first().click(function(){ scroll(0,0); }); }); } $(document).ready(function(){ scrollClick(); }); proboards.on('afterSearch',function(){ scrollClick(); }); </script> Remove this one (second one above) and see if that helps.
|
|
inherit
133488
0
Nov 26, 2024 13:31:45 GMT -8
toetapping
1,583
November 2008
toetapping
|
Post by toetapping on Mar 2, 2015 10:45:01 GMT -8
Thank you everyone who has helped me. All buttons go down now but my UP button on picture below doesn't go up now.
|
|
#eb7100
33409
0
1
Nov 24, 2024 4:27:37 GMT -8
Brian
48,130
November 2004
smashmaster3
|
Post by Brian on Mar 2, 2015 10:56:11 GMT -8
|
|
inherit
133488
0
Nov 26, 2024 13:31:45 GMT -8
toetapping
1,583
November 2008
toetapping
|
Post by toetapping on Mar 2, 2015 10:58:21 GMT -8
In each thread Brian.
|
|
inherit
First Contributor
66253
0
Mar 18, 2024 11:09:20 GMT -8
aRMY83
2,925
December 2005
army83
|
Post by aRMY83 on Mar 2, 2015 11:23:34 GMT -8
You have this:
<div class="edited_by"><a onclick="scroll(0,0);">
Change it to this:
<div class="edited_by"><a class="to-top" onclick="scroll(0,0);">
Go to Admin > Structure > Layout Templates > Thread > Post List and make those changes.
|
|
inherit
133488
0
Nov 26, 2024 13:31:45 GMT -8
toetapping
1,583
November 2008
toetapping
|
Post by toetapping on Mar 2, 2015 11:45:12 GMT -8
Thank you very much aRMY83. This seems to be a saga because now where I have Bottom in picture below isn't working. Is this all due Firefox 36.0
|
|
#eb7100
33409
0
1
Nov 24, 2024 4:27:37 GMT -8
Brian
48,130
November 2004
smashmaster3
|
Post by Brian on Mar 2, 2015 11:58:46 GMT -8
Go to Themes > Layout Templates > Thread and change line 5 to this:
|
|
inherit
First Contributor
66253
0
Mar 18, 2024 11:09:20 GMT -8
aRMY83
2,925
December 2005
army83
|
Post by aRMY83 on Mar 2, 2015 12:00:52 GMT -8
You have this:
<li style="display: inline-block; padding-right: 8px;"><a onclick="scroll(0,document.body.scrollHeight);">To Bottom</a></li>
Change it to this:
<li style="display: inline-block; padding-right: 8px;"><a class="to-bottom" onclick="scroll(0,document.body.scrollHeight);">To Bottom</a></li><li style="display: inline-block;">$[reply_button]</li>
Go to Admin > Structure > Layout Templates > Thread and make those changes.
|
|
inherit
First Contributor
66253
0
Mar 18, 2024 11:09:20 GMT -8
aRMY83
2,925
December 2005
army83
|
Post by aRMY83 on Mar 2, 2015 12:01:25 GMT -8
Sorry Brian as I did not see your post.
|
|