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 : Pimp My Site! > Shout Box help
Ayiana (New Admin) 2/22/2010 2:45 PM EST : RE: Shout Box help
Ayiana
Posts: 1498
Zomgawsh Poster

Oh no, it isn't that I'm using a pre-made theme, quite the contrary.  I've adopted the use of your theme selector so that my guild members can choose their theme - a no-graphics theme for slow connections, working on a visually-impaired accessible theme, etc.  But since there are multiple themes, the Full Custom Box is empty.

As you said, I added it to the end of my CSS section for shoutbox customization and it works like a charm.  Once again, you're the best.

~Ayiana
TopBottom

Ayiana (New Admin) 2/22/2010 3:47 PM EST : RE: Shout Box help
Ayiana
Posts: 1498
Zomgawsh Poster

I do have one more shoutbox related question.  Is there a way to make just the shoutbox portion of your page refresh at regular intervals?

~Ayiana
TopBottom

Mottie (MVP) 2/22/2010 4:44 PM EST : RE: Shout Box help
GuildPortal MVP
Mottie
Posts: 3884
Zomgawsh Poster

Hi Ayiana!

I can't think of an easy way to do the shoutbox refresh, since the data is stored on the server... I'd say submit a feature request.
TopBottom

_Shulkie_ (Guild Admin) 5/1/2010 9:34 AM EST : RE: Shout Box help
_Shulkie_
Posts: 467
Fingers of Fury!

not a refresh shoutbox but a neat (i think) little addition to neaten up your page formatting - scrollable shoutbox with hidden scrollbar and controls to move up and down when you hover over

you can see an example here XBushidoX homepage

<script type="text/javascript">
//functions for scroller
var scrolling = null;
function scroll_up() {
var d = document.getElementById('scroller');
d.scrollTop = d.scrollTop - 5;
scrolling = window.setTimeout(function() { scroll_up();}, 100);
}
function scroll_down() {
var d = document.getElementById('scroller');
d.scrollTop = d.scrollTop + 5;
scrolling = window.setTimeout(function() {scroll_down();}, 100);
}
function stop_scroll() {window.clearTimeout(scrolling);}
 
$(document).ready(function(){
//move text box to top - thanks mottie
 var tmp = $('div[id*="_pnlNewShout"]');
 tmp.parent().prepend( tmp.html() + "<br><br>" );
 tmp.html('');
//add dive around shoutbox list, then add controls
$(".gpWidget-shout span[id*=xmlShouts]").wrap("<div id='scroller' style='width:100%; height : 250px; overflow : hidden;'></div>");
$(".gpWidget-shout #scroller").before("<div style='text-align: right;'>Scroll <a style='cursor:hand;' ='scroll_up();' ='stop_scroll();'>Up</a> | <a style='cursor:hand;' ='scroll_down();' ='stop_scroll();'>Down</a></div>")
.bind('mousewheel', function(e,d){
  var speed = Math.floor(Math.abs(d)) * 30,
  top = $(this).scrollTop();
  top = (d > 0) ? top - speed :  top + speed;
  $(this).scrollTop(top);
  return false;
 });
})
</script>


I will post this to your site also mottie

Update: 10/30/2010 - I hope Shulkie doesn't mind, but I've updated the script above to work with the change in shout box layout as well as including mousewheel support.
Update: 11/2/2010 - Changed again due to new layout.
Cheers, Shulkie
TopBottom

Mottie (MVP) 5/1/2010 12:40 PM EST : RE: Shout Box help
GuildPortal MVP
Mottie
Posts: 3884
Zomgawsh Poster

Hi _Skulkie_!

Very nice! But I have to say, I'm too impatient to use the link to scroll all the way to the bottom, so you could just add this bit of scripting to add mousewheel functionality 
<script type="text/javascript" src="http://www.axiomfiles.com/Files/258012/jquery.mousewheel.js"></script>
<script type="text/javascript">
$(document).ready(function(){
 $('#scroller').bind('mousewheel', function(e,d){
  var speed = Math.floor(Math.abs(d)) * 10,
  top = $(this).scrollTop();
  top = (d > 0) ? top - speed :  top + speed;
  $(this).scrollTop(top);
  return false;
 });
})
</script>
TopBottom

_Shulkie_ (Guild Admin) 5/1/2010 1:27 PM EST : RE: Shout Box help
_Shulkie_
Posts: 467
Fingers of Fury!

ta very much will add that in forthwith
Cheers, Shulkie
TopBottom

Arahila (New Admin) 5/4/2010 11:14 AM EST : RE: Shout Box help
Arahila
Posts: 25
Becoming Adept!

Is Mottie's code a replacement or an addition?
TopBottom

Mottie (MVP) 5/4/2010 1:34 PM EST : RE: Shout Box help
GuildPortal MVP
Mottie
Posts: 3884
Zomgawsh Poster

Hi Arahila!

It's an addition to the code already written by Shulkie 
TopBottom

Mottie (MVP) 10/30/2010 8:38 AM EST : RE: Shout Box help
GuildPortal MVP
Mottie
Posts: 3884
Zomgawsh Poster

Updated my post about adding CSS to make a shout box scrollable as well as Shulkie's script - I hope you don't mind!
TopBottom

Mottie (MVP) 11/2/2010 7:29 PM EST : RE: Shout Box help
GuildPortal MVP
Mottie
Posts: 3884
Zomgawsh Poster

Updated Shulkie's script to work with the new layout.
TopBottom

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