Sign Up! Login: Password: New User? Forgot? Support
Top Mods!
Wowhead Search
by sonofsamedi
Digital Clock
by Wolfar15
Admin Forums
Welcome to the GuildPortal Help Community! These forums are for admin-to-admin help.
Available Forums
Forums : Feature Discussion > Massive waste of space on certain "widgets"
Huthur (New Admin) 1/12/2010 9:35 AM EST : Massive waste of space on certain "widgets"
Huthur
Posts: 458
Fingers of Fury!

I'm getting a bit fed up of all the space that is wasted on some of the content boxes. Look at this two examples:

Events
There are 30 upcoming events, with 4 shown.


Most Recent Posts
RE: AFK
mcicepit
1/12/2010 3:02 PM


RE: AFK
Appinta
1/12/2010 2:28 PM


RE: Awards/rewards
Huthur
1/12/2010 2:11 PM


RE: Awards/rewards
Stormert
1/12/2010 1:53 PM


RE: AFK
Stormert
1/12/2010 1:49 PM


RE: AFK
Huthur
1/12/2010 9:55 AM


RE: AFK
Triyan
1/12/2010 9:31 AM


RE: Awards/rewards
Triyan
1/12/2010 9:27 AM

RSS


Events:
Why is the person responsible for event shown in this widget? What possible uses can it have? Most portals have a few people who handle the events, and people usually know when to contact if they have questions.

Please remove the User link.


Most Recent Posts:
This is the biggest sinner of them all! First of all, WHY is there two spaces between each item? And why can't the person that replied and the date be on the same line, to save some more space?

The best thing would be to have a alternative Recent Posts box, with only "Last active Posts". Not each replay. From my example above, it would then look like this:

Most Recent Forum Activity
AFK (5 replays)
Last Poster: mcicepit

Awards/rewards (3 replays)
Last Poster: Huthur

RSS

This would save a ton of space, and you'll get rid of what most people don't care about anyway.
Please consider this!


Best regards Carl

TopBottom

Mottie (MVP) 1/25/2010 2:15 PM EST : RE: Massive waste of space on certain "widgets"
GuildPortal MVP
Mottie
Posts: 3883
Zomgawsh Poster

Hi Huthur!
  • See this post to get script that will modify the event widget.
  • And see this post to get a script that will modify the recent post widget.
Both scripts are in one file, so you can combine both scripts as follows:
<script type="text/javascript" src="http://www.axiomfiles.com/Files/258012/events-posts.js"></script>
<script type="text/javascript">
$(document).ready(function(){
 modifyRecentPosts();
 hideNewEvents({
  hideNewMonths: 3,   // hide events more than x # of months in the future
  hideUser:      true // hide the user that added the event
 });
})
</script>

TopBottom

Huthur (New Admin) 2/4/2010 6:03 AM EST : RE: Massive waste of space on certain "widgets"
Huthur
Posts: 458
Fingers of Fury!

Great! It worked well for the Event widget, but I can't see any differences on the Last posts widget. I even tried to post only the "Last posts" script, but it did nothing. The script says something about events. Are you sure you have not messed up the sources here?
TopBottom

Mottie (MVP) 2/4/2010 9:57 AM EST : RE: Massive waste of space on certain "widgets"
GuildPortal MVP
Mottie
Posts: 3883
Zomgawsh Poster

Hi Huthur!

The last post script only removes duplicates, I looked at your site but you don't have any posts showing up in that widget for me to see anything (likely because of my public access level). So you won't see a difference unless there are multiple replies in a thread.

I just checked and the script is working. Maybe it appears that the source is messed up because both the events script and recent post script are in the same file named "events-posts.js"?

Oh, but I did have to add notes to both posts, when you add the script, make sure the editor is in both <> HTML mode and Raw/Script mode (upper right corner). The second <script> tag will get removed if you don't have it in both.
TopBottom

Huthur (New Admin) 2/4/2010 10:19 AM EST : RE: Massive waste of space on certain "widgets"
Huthur
Posts: 458
Fingers of Fury!

Hmmm. Strange. I've added your code from your first replay in this thread. I've used the HTML tag each time. I also used the raw mode this time, but nothings changing. Can this line really hide duplicates? (modifyRecentPosts();). I don't really see much more that this code that is directed at the posts widget. You can add a user to our site if you want to test it.

Events works as expected, but the recent posts still have a lot of duplicates:




Events
There are 6 upcoming events, with 5 shown.



TopBottom

Mottie (MVP) 2/4/2010 11:04 AM EST : RE: Massive waste of space on certain "widgets"
GuildPortal MVP
Mottie
Posts: 3883
Zomgawsh Poster

Hi Huthur!

That is strange! The sample you posted here in the forums of your recent post widget doesn't contain a table. Here is an example of a recent post widget from my test site:

Recent Posts
Post Title Poster Posted
Test Mottie 2/2/2010 1:35 PM
RE: Test Mottie 10/10/2009 12:40 PM
RE: Test Mottie 10/10/2009 12:40 PM
Test2 mottie2 1/12/2009 4:24 AM
Test Mottie 1/12/2009 4:18 AM

RSS


Hmmm, I'm going to apply to your site, please add me as a member so I can see some posts in the recent posts widget and I'll try to figure out what's going on
TopBottom

Huthur (New Admin) 2/4/2010 6:10 PM EST : RE: Massive waste of space on certain "widgets"
Huthur
Posts: 458
Fingers of Fury!

I'm talking about the standalone widget on all other pages than the forum page. I never use the Recent Posts underneath the forums anyway, so I don't really care about that one I'll throw the code in the footer as well, so we can check if it works for the forum Recent Post widget.


*Edit*
Nope. Did not help at all. Just a {2} at the bottom now.
TopBottom

Mottie (MVP) 2/4/2010 7:08 PM EST : RE: Massive waste of space on certain "widgets"
GuildPortal MVP
Mottie
Posts: 3883
Zomgawsh Poster

Hi Huthur!

Hmmm, ok that is very odd. Could you try deleting the recent post widget and re-adding it?

Also, the code in the page footer is kind of messed up. It seems to be missing the following - or something like it, I'm guessing - "})</style>"
TopBottom

Mottie (MVP) 2/5/2010 1:59 AM EST : RE: Massive waste of space on certain "widgets"
GuildPortal MVP
Mottie
Posts: 3883
Zomgawsh Poster

Hi Huthur!

Ok, after a bit of work, I got the script to work in your unique case. I still don't know why but your recent post widget doesn't seem to be the same as any other I've seen. As you can see in the post where I included an example from one of my test sites, it has a table with alternating row colors that highlight when you hover over them. Also your events widget was slightly less unique ( it doesn't have a "blkContent" class like all of the other sites I've seen ), but I had to modify the script slightly to make it update the numbers at the bottom correctly.

All that being said, remove the bit of code you have in your welcome widget, then replace the code you have in your Footer Area with this (the only difference is the "2" at the end of the script file name - in orange):
<script type="text/javascript" src="http://www.axiomfiles.com/Files/258012/events-posts2.js"></script>
<script type="text/javascript">
$(document).ready(function(){
 modifyRecentPosts();
 hideNewEvents({
  hideNewMonths: 3,   // hide events more than x # of months in the future
  hideUser:      true // hide the user that added the event
 });
})
</script>
TopBottom

Huthur (New Admin) 2/5/2010 3:12 AM EST : RE: Massive waste of space on certain "widgets"
Huthur
Posts: 458
Fingers of Fury!

The widegets is supposed to be standard. This is strange. Now I can't even increase the number of posts in the widget. It's stuck at 8 no matter what. One time I managed to successfully increased it, and at that time the widget had a lot of space between two of the posts in the widget. After I set the max icon size in the forum display options it was all reset, and now I can't increase it again.

The script seems to work, but it still produces some mess at the footer.


*Edit*
Actually, the script only seems to work in the Welcome widget, not in the footer

After I save the footer code I end up with the script missing everything after the hideNewMonths line...
Some of the code is stripped. And now, the names in the event is showing. Darn. The portal seems to do what it pleases.
TopBottom

Admins Online
There are   members online.
So-and-so has logged on!
%title%
%message%