Sign Up! Login: Password: New User? Forgot? Support
Code 
 
 
Forums 
Forums : Widgets > Recent Posts - Hide Duplicates
Mottie (SuperAdmin) 1/25/2010 2:13 PM EST : Recent Posts - Hide Duplicates
ACK!
Mottie
Posts: 3883

0
Like

0
Dislike

Recent Posts - Hide Duplicates

GuildPortal admin site link to the original post

This script hides duplicate posts in the "Recent Posts Stand-Alone" widget. Note if there are 10 posts in the same post showing in the recent post widget, you'll end up seeing only one. This script can only modify what is already present in the widget, it can't add more recent posts. If you want to include all recent posts, look at the Most Recent Posts Display script (it does cause a bit of lag).

NOTE: Add this script to a Free Form Text/HTML type widget while in <> HTML mode AND Raw/Script mode, or to your Footer Area (Control Panel > Custom HTML & Script > Footer Area).

 Before 
 After

Code
<script type="text/javascript" src="http://www.axiomfiles.com/Files/258012/events-posts-min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
 modifyRecentPosts();
})
</script>
Customizing

  • There is nothing to customize.

Edit (2/4/2010): Added a note about having the editor in both HTML & Raw/Script mode.
Edit (3/2/2010): Fixed a problem where the script would break if you had any punctuation in your post title. File in the link above was updated.
Edit (3/17/2010): Updated the code to once again improve finding the unique posts. Also, reduced the size of the file making it "events-posts-min.js".
Characters: Mottie Motty Mortie Ooshiny Mot Fudgems
TopBottom

annikka13 (Applicant) 1/31/2010 11:58 PM EST : RE: Recent Posts - Hide Duplicates
annikka13
Posts: 160

0
Like

0
Dislike

Hi Mottie!

I must be missing something (plus I'm quite new when it comes to working with internet scripting). How do I go about inserting this script? I tried putting it into a Custom HTML widget, but no luck.

Similarly, I tried the same thing with your HTML code to get the awesome Recent Posts box that you have on display in your site (ie. you hover over the post, and get a preview). After adding a Custom HTML widget, I posted in the code and the url for my feed, but nothing appeared.

I'm sure I'm missing something obvious...can you please help?

Thanks so much for your awesome site!
TopBottom

Mottie (SuperAdmin) 2/1/2010 12:55 AM EST : RE: Recent Posts - Hide Duplicates
ACK!
Mottie
Posts: 3883

0
Like

0
Dislike

Hi Annikka13!

And welcome to my site! It looks like I forgot to mention that the code needs to be added to a Free Form Text/HTML type widget on the same page as the Recent Post widget. Also, when pasting the code, the editor should be in <> HTML mode (the middle button at the bottom of the editor). Once you add the code, switch the editor back to Design mode, then back to <> HTML mode again. If some of the script is missing then you will have to also click the "Raw/Script" link to switch the editor to raw script mode so it won't remove the extra parts of the script.

Sorry, I know it sounds like a lot of information, but hopefully this newly updated editor won't have the same problems with stripping out the extra script like the old editor did.
Characters: Mottie Motty Mortie Ooshiny Mot Fudgems
TopBottom

annikka13 (Applicant) 2/1/2010 1:36 AM EST : RE: Recent Posts - Hide Duplicates
annikka13
Posts: 160

0
Like

0
Dislike

Thank you so much, Mottie! I'll give that a try and hopefully will get more luck
TopBottom

annikka13 (Applicant) 2/1/2010 1:56 AM EST : RE: Recent Posts - Hide Duplicates
annikka13
Posts: 160

0
Like

0
Dislike

Mottie, you are AMAZING. Clicking the Raw Script link worked like a charm.
TopBottom

annikka13 (Applicant) 2/1/2010 2:27 AM EST : RE: Recent Posts - Hide Duplicates
annikka13
Posts: 160

0
Like

0
Dislike

Argh, I'm so sorry, Mottie....one more thing: I'm now using the script for Recent Posts so that users can see a preview when they hover over it. However, the preview looks like it's in html coding rather than a nice clean preview of the post itself. Any thoughts?

HUGE amount of thanks!
TopBottom

Mottie (SuperAdmin) 2/1/2010 7:26 AM EST : RE: Recent Posts - Hide Duplicates
ACK!
Mottie
Posts: 3883

0
Like

0
Dislike

Hi Annikka13!

It sounds like you are missing the updated tooltip script. Add the following code to your site's Footer Area (Control Panel > Custom HTML & Script > Footer Area) - don't forget to enable it - then modify the colors in blue to match your site.  Bunny Dance
<style type="text/css">
.tooltip, .preview, .screenshot { cursor:pointer; }
#tooltip, #tooltip2, #preview, #screenshot {
 position:absolute;
 border:1px solid #333;
 background: #222;
 color: #ddd;
 padding: 5px;
 text-align: left;
 border-radius: 1em; /* round corners, CSS3 definition */
 -moz-border-radius: 1em; /* round corners, Firefox */
 -webkit-border-radius: 1em; /* round corners, Webkit browsers: Safari & Chrome */
 opacity: 0.9; /* 90% opacity to tooltip */
 filter: alpha(opacity=90); /* 90% opacity for tooltip in IE */
 display: none;
}
</style>
<script src="http://www.axiomfiles.com/Files/258012/tooltip.js" type="text/javascript"></script>
Characters: Mottie Motty Mortie Ooshiny Mot Fudgems
TopBottom

annikka13 (Applicant) 2/1/2010 3:24 PM EST : RE: Recent Posts - Hide Duplicates
annikka13
Posts: 160

0
Like

0
Dislike

Yes, that worked great. Thanks again SO much Mottie!!
TopBottom

Mottie (SuperAdmin) 3/3/2010 12:22 AM EST : RE: Recent Posts - Hide Duplicates
ACK!
Mottie
Posts: 3883

0
Like

0
Dislike

I've updated this code... it was messing up when you included punctuation in the post title like a smiley emote ->

I've fixed the problem and uploaded the latest version to my files. If you're using this script and linking to my file, there is no need to do anything!
Characters: Mottie Motty Mortie Ooshiny Mot Fudgems
TopBottom

Merenwench (Member) 11/3/2010 4:01 PM EST : RE: Recent Posts - Hide Duplicates
Merenwench
Posts: 2772

0
Like

0
Dislike

This seemed to stop working when the shout box issue started. Panic

TopBottom

 
 
Key 
New posts No new posts
New posts ( popular ) No new posts ( popular )
New posts ( sticky ) No new posts ( sticky )
New posts ( locked ) No new posts ( locked )
 
 
Who's Online 
There are   members online.
 
 
So-and-so has logged on!
%title%
%message%