Board Logo

 Username:    Password:    Stay logged in: Welcome Guest. Please Login or Register.  Nov 21st, 2017, 06:00am

Coding Forum
Important News
Remember to add where the code goes in the headers/footers.

Also, please check the list of codes on the Hacks board, especially if you have an error. The code may already have been corrected.
Thanks.
Welcome to the Conforums Hacks Board!

Please follow these simple rules.

1. No spamming.
2. Do not advertise your board in here!
3. Keep on topic, or the thread will be locked.
4. No flame wars.
5. No bringing up old topics.

Please note: For codes other than those submitted in the Hacks Forum, please ask for permission to use from the creator. Be aware that coding queries in the Coding Forum become public domain. If you still seek coding help but find it inconvenient to display it publicly then please PM one of the moderators. We encourage all queries to be submitted here in hopes to help other members who might have the same question. Thank you.

Helpful sites
Google
Dynamic Drive

The Staff
Roger
Dave
Gizzy



« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: Can Reply from board be to the last page?  (Read 1175 times)
kady
Member


member is offline

Avatar




Homepage PM

Gender: Female
Posts: 63
xx Can Reply from board be to the last page?
« Thread started on: Sep 9th, 2014, 12:30pm »

I just added a Reply button to the boards by adding the code to the footer, thinking it would save a page click, but the Reply makes the start be like the first page. Is there a way to make the reply show the last page of posts?
User IP Logged

Dalton
Ex-Shiny Gold Star Club Member
Conforums Administrator


member is offline

Avatar



AIM
Homepage PM

Gender: Male
Posts: 1771
xx Re: Can Reply from board be to the last page?
« Reply #1 on: Sep 10th, 2014, 02:51am »

I went through your boards footers and am going to assume that you were referring to this code

Code:
<script language="Javascript">
<!--
if(location.href.indexOf("action=") == -1){
var TR = document.getElementsByTagName('TR')
for(tr=0; tr<TR.length; tr++){
for(td=0; td<TR[tr].cells.length; td++){
if(TR[tr].cells[td].width=="48%"){
var tcell = TR[tr].cells[td]
if(document.all)
var ntd = TR[tr].insertCell();
else if(tcell.className=="catbg")
var ntd = TR[tr].insertCell(6);
else
var ntd = TR[tr].insertCell(7);
if(tcell.rowSpan == "2")
ntd.rowSpan = "2";
if(tcell.className=="catbg"){
ntd.innerHTML="Reply"
ntd.className="catbg"; 
} else
ntd.className="windowbg"; 
tcell.width="43%"
if(tcell.className=="windowbg"){
var thread= tcell.innerHTML.substr(tcell.innerHTML.indexOf("num=") +4,10)
var board= location.href.substring(location.href.indexOf("board=") +6)
ntd.innerHTML="<a href=\"index.cgi?action=post&board=" + board + "&num=" + thread +"&start=\">Reply</a>"
}}}}}
// -->
</script> 


Im going to think about it the reply as it is shows the first page because it uses &start= which defaults to 0 eg the first post in the thread. Our URL system uses post numbers to determine the page, 15 30 and 45 and so on in intervals of 15. Now if the threads were part of the url and not called by a perl function I could use jquery and a little ajax magic and preform a head request to see if the page existed and determine what page to pull up from there, but thats now how our system works. So off the top of my head I cannot think of a way to make it show the last page but Ill ponder it for a bit.
« Last Edit: Sep 10th, 2014, 02:52am by Dalton » User IP Logged

User Image
kady
Member


member is offline

Avatar




Homepage PM

Gender: Female
Posts: 63
xx Re: Can Reply from board be to the last page?
« Reply #2 on: Sep 10th, 2014, 11:38pm »

Thanks.

Or even the last ten replies would be great, if not even better, if it's even possible.

I completely understand the difference and I saw that the start had no number. I just find it cool that clicking on the link from the forum brings one to the first unread post, while clicking on the link from the info center brings one to the last page. So I was hoping something could be used similar to this method for the replying button from the board page.
User IP Logged

kady
Member


member is offline

Avatar




Homepage PM

Gender: Female
Posts: 63
xx Re: Can Reply from board be to the last page?
« Reply #3 on: Sep 21st, 2014, 3:50pm »

Let me know if there's a new code that will make that reply be from the last page or last 10 posts. Until then I'll just remove it.
User IP Logged

Dalton
Ex-Shiny Gold Star Club Member
Conforums Administrator


member is offline

Avatar



AIM
Homepage PM

Gender: Male
Posts: 1771
xx Re: Can Reply from board be to the last page?
« Reply #4 on: Sep 22nd, 2014, 6:00pm »

Ive currently not found a way to reliably put it on the last page.
User IP Logged

User Image
Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

Back To Top
Donate $6.99 for 50,000 Ad-Free Pageviews!

| |

This forum powered for FREE by Conforums ©
Sign up for your own Free Message Board today!
Terms of Service | Privacy Policy | Conforums Support | Parental Controls