Welcome Guest [Log In] [Register]
We hope you enjoy your visit.

You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Add Reply
Merge Double Posts; Opera - Firefox - IExplorer
Topic Started: Oct 23 2005, 09:15 AM (5,314 Views)
RedKrazyKid
Member
 *   *   *  
Name
Merge Double Posts
Opera - Firefox - IExplorer

Description:
When a person double posts, their second post is merged in with the first one. Not just the second one, but any double post after that.
This script leaves the first post on the page alone.

I'd tell you it was by design to distinguish the first post in the topic, but that'd be a lie. Can't figure out what I did. xD

Preview
Tower City

In that topic, go to the parent forum. Notice the number of replies compared to the number of visible posts.

Code

Code:
 
<script language="javascript">if(window.location.href.match('showtopic=')) {var authorname = new Array();var track = 0;var x = document.getElementsByTagName('div');for(i=0;i<x.length;i++) {if(x[i].className == 'postcolor') {x[i].id = 'post' + track;authorname[track] = x[i].parentNode.parentNode.parentNode.parentNode.rows[0].cells[0].firstChild.firstChild.innerHTML;if(track > 1) {if(authorname[track] == authorname[(Math.floor(track) - 1)]) {document.getElementById('post' + (Math.floor(track) - 1)).innerHTML += '<br /><br />' + x[i].innerHTML;document.getElementById('post' + (Math.floor(track) - 1)).id = x[i].id;x[i].id = '';x[i].parentNode.parentNode.parentNode.parentNode.style.display = 'none';}}track = Math.floor(track) + 1;}}}</script>


It goes in the footer.
Offline Profile Quote Post Goto Top
 
Viral.
Member Avatar
Member
 *   *   *   *   *   *  
that is the best if it works, thx rkk

woot, first to post
Offline Profile Quote Post Goto Top
 
Flokkert
High-Handed Spam Slayer
 *   *   *   *   *  
Very very nice Code. I will definately be using it on one of my forums.

Flokkert
Offline Profile Quote Post Goto Top
 
Chris
Member Avatar
Member
 *   *   *   *   *  
yay!! :D
Offline Profile Quote Post Goto Top
 
Chris
Member Avatar
Member
 *   *   *   *   *  
another dreat code :D
Offline Profile Quote Post Goto Top
 
.Scott
Member Avatar
aka slayer766
 *   *   *   *   *   *   *  
Dang! And RedKrazyKid does it again! Great job man, and like I always say Keep it up with these great codes! :D
Offline Profile Quote Post Goto Top
 
pangolin123
Member
 *   *  
I have been seeing your codes and u make some of the coolest codes in IF. keep it up.
Offline Profile Quote Post Goto Top
 
Viral.
Member Avatar
Member
 *   *   *   *   *   *  
no, he makes the BEST codes on if
Offline Profile Quote Post Goto Top
 
dx169
Quit
 *   *   *   *   *   *  
NICE this is very useful!
Offline Profile Quote Post Goto Top
 
RedKrazyKid
Member
 *   *   *  
Thanks everyone. :)
Offline Profile Quote Post Goto Top
 
dx169
Quit
 *   *   *   *   *   *  
red ur sure makin lots of cool codes =D
Offline Profile Quote Post Goto Top
 
RedKrazyKid
Member
 *   *   *  
dx169
October 23, 2005 12:39 PM
red ur sure makin lots of cool codes =D

I try. B)

:P

I'm getting a lot of cool modification ideas pm's at IFSkinZone. (I'm Epsilekt there.)

It's the ideas that are cool, I can't think of any. So... PM me ideas. :ermm:
Offline Profile Quote Post Goto Top
 
Viral.
Member Avatar
Member
 *   *   *   *   *   *  
ive seen someone on ifskinzone called RedCrazyKid with the xact same sig and avy, is that u aswell/ when u gonna get another code like this
Offline Profile Quote Post Goto Top
 
Iverson
Touch Of Death
 *   *   *   *   *  
nice code!
Offline Profile Quote Post Goto Top
 
Binny
Member
 *   *  
This code gave the forum I use some sort of error.

We added the code and it worked fine to start with. Double posts would be merged, it was great, but then, we would post, and the topic wouldn't show us our posts. Yep, our posts we're not showing up on topics! And then, on the 10% of occasions when we could post, double posting started happening again. It would say 'Last post Binny' if I had tried to post but it just wouldn't show. Everyone was having this problem. And if when you were replying, you scrolled down to see the last 10 replys, you could see everything everyone had tried to post that wasn't sowing on the topic. So I deleted the code and all the hidden posts came back and all the trouble stopped...
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
Go to Next Page
« Previous Topic · Code Snippets · Next Topic »
Add Reply