Page Index Toggle Pages: 1 ... 3 4 [5] 6 7  Send TopicPrint
Very Hot Topic (More than 25 Replies) Shoutbox 5.5 for YaBB 2.4 (Read 79916 times)
mick
Senior Member
****
Offline


I love YaBB

Posts: 345
Location: Dorsten
Joined: Nov 29th, 2005
Gender: Male
Re: Shoutbox 5.5 for YaBB 2.4
Reply #60 - Dec 28th, 2009 at 9:01pm
Print Post  
But you are sure, that you modded the css-files in your
Board? Do you have the code that thm posted, in your
normal css-files?

  
Back to top
WWW  
IP Logged
 
THEWISEOLDOWL
New Member
*
Offline


I Love YaBB 2!

Posts: 23
Joined: Dec 28th, 2009
Re: Shoutbox 5.5 for YaBB 2.4
Reply #61 - Dec 28th, 2009 at 9:09pm
Print Post  
the mod is running fine, the code is in the defualt.css and yabb2.1 as it should be, when i am using a white or other background it shows up perfectly, when i use the black backgroung i can't change the font color to show up on the black background.
posting a screen shot
  
Back to top
 
IP Logged
 
THEWISEOLDOWL
New Member
*
Offline


I Love YaBB 2!

Posts: 23
Joined: Dec 28th, 2009
Re: Shoutbox 5.5 for YaBB 2.4
Reply #62 - Dec 28th, 2009 at 9:18pm
Print Post  
like this...before


after.
  
Back to top
 
IP Logged
 
mick
Senior Member
****
Offline


I love YaBB

Posts: 345
Location: Dorsten
Joined: Nov 29th, 2005
Gender: Male
Re: Shoutbox 5.5 for YaBB 2.4
Reply #63 - Dec 28th, 2009 at 9:33pm
Print Post  
You didn't have an "extra" css-file for your black template? If you
have one, you need to copy the code into this css-file.
  
Back to top
WWW  
IP Logged
 
THEWISEOLDOWL
New Member
*
Offline


I Love YaBB 2!

Posts: 23
Joined: Dec 28th, 2009
Re: Shoutbox 5.5 for YaBB 2.4
Reply #64 - Dec 28th, 2009 at 9:42pm
Print Post  
OK, I think i see the error, looking at the css files together as above i can see there is an error in the lower section of the black box, the template don't look right there is an alignment issue as well. I'll work on it, thanks.. * THEWISEOLDOWL
  
Back to top
 
IP Logged
 
Captain John
Senior Member
****
Offline


Pass to Port !

Posts: 264
Location: Reno Beach
Joined: Jan 18th, 2007
Gender: Male
Re: Shoutbox 5.5 for YaBB 2.4
Reply #65 - Dec 28th, 2009 at 10:29pm
Print Post  
THEWISEOLDOWL wrote on Dec 28th, 2009 at 8:54pm:
ok nothing changed


Have you added All of the above to your black.css file in the yabbfiles/Template/Forum folder ?
  

Love to live and love on the water
Back to top
 
IP Logged
 
D0T-C0M
God Member
*****
Offline



Posts: 806
Location: Tracadie
Joined: Sep 22nd, 2001
Gender: Male
Re: Shoutbox 5.5 for YaBB 2.4
Reply #66 - Mar 2nd, 2010 at 1:17pm
Print Post  
Great work on the shoutbox.  Its greatly improved since I've been involved.  One little thing that I've noticed.

When people post long strings without any spaces like when they post a long url it screws up the layout of the shoutbox.  A good idea I've seen used on other forums is when someone posts a long link the forum creates a hyperlink using the first 15 or 20 characters of the original link.

For example hxxp://www.boardmod.org/yabb2/YaBB.pl?num=1240306166/60#60  

would be hxxp://www.boardmod.org/yab...

There should also be a check for people who intentionally post long strings without spaces.  We should force a line break for strings with no spaces as to not screw the layout of the shoutbox.
  
Back to top
 
IP Logged
 
ThM
God Member
*****
Offline



Posts: 585
Location: Germany, Nds.
Joined: May 21st, 2006
Gender: Male
Re: Shoutbox 5.5 for YaBB 2.4
Reply #67 - Mar 4th, 2010 at 5:02pm
Print Post  
ok thanks. there are also some another things need to reviewed. I try to find a solution  Smiley
  

Greeting ThM
Back to top
 
IP Logged
 
Derek Barnstorm
God Member
*****
Offline



Posts: 1146
Location: Warwickshire
Joined: Mar 23rd, 2008
Gender: Male
Re: Shoutbox 5.5 for YaBB 2.4
Reply #68 - Mar 4th, 2010 at 7:57pm
Print Post  
ThM...

I can't say that I fully understand this code so you might just want to check it over, but this seems to fix the problem that DOT-COM mentioned:

In ShoutDisplay.pl find:

Code
Select All
sub my_wrap3 {
    $shout_message =~ s~(<.*>)*(\S{0,14})(\S{0,14})?(\S{0,14})?(\S{0,14})?(\S*)?(<.*>)*~$1$2 $3 $4 $5 $6$7~gi;
    $shout_message =~ s~(<.*>)?(\S{0,14})(\S{0,14})?(\S{0,14})?(\S{0,14})?(\S*)(<\/\S*>)~$1$2 $3 $4 $5 $6$7~gi;
    $shout_message =~ s~\s+~ ~gi;
} 


And replace with this (I've taken this straight from Subs.pl):

Code
Select All
sub my_wrap3 {
    $linewrap = 48;
    $message =~ s#<a href=(\S*?)(\s[^>]*)?>(\S*?)</a># my ($mes,$out,$i) = ($3,"",1); { while ($mes ne "") { if ($mes =~ s/^(<.+?>)//) { $out .= $1; } elsif ($mes =~ s/^(&.+?;|\[ch\d{3,}\]|.)//) { last if $i > $linewrap; $i++; $out .= $1; if ($mes eq "") { $i--; last; } } } } "<a href=$1$2>$out" . ($i > $linewrap ? "..." : "") . "</a>" #eig;
} 


The highlighted '48' is obviously the number of characters before the line wraps, so you can change it to whatever you think best (or even make it a variable so it can be changed in Shoutbox Settings).
  

WrapShouts.png ( 20 KB | Downloads )
WrapShouts.png
Back to top
 
IP Logged
 
ThM
God Member
*****
Offline



Posts: 585
Location: Germany, Nds.
Joined: May 21st, 2006
Gender: Male
Re: Shoutbox 5.5 for YaBB 2.4
Reply #69 - Mar 4th, 2010 at 8:56pm
Print Post  
That's great Derek ...... many, many thanks  Thumbs Upsup: Thumbs Upsup:
  

Greeting ThM
Back to top
 
IP Logged
 
Derek Barnstorm
God Member
*****
Offline



Posts: 1146
Location: Warwickshire
Joined: Mar 23rd, 2008
Gender: Male
Re: Shoutbox 5.5 for YaBB 2.4
Reply #70 - Mar 4th, 2010 at 9:13pm
Print Post  
No problem - Glad to be of some use. Smiley
  
Back to top
 
IP Logged
 
Derek Barnstorm
God Member
*****
Offline



Posts: 1146
Location: Warwickshire
Joined: Mar 23rd, 2008
Gender: Male
Re: Shoutbox 5.5 for YaBB 2.4
Reply #71 - Mar 4th, 2010 at 11:40pm
Print Post  
Sorry ThM, but this has been bugging me all night. Anyway, there's a much cleaner way of doing it (because it's already working)...

ShoutDisplay.pl already requires Subs.pl, so all you need to do is this:

Totally remove this sub:

Code
Select All
sub my_wrap3 {
    $shout_message =~ s~(<.*>)*(\S{0,14})(\S{0,14})?(\S{0,14})?(\S{0,14})?(\S*)?(<.*>)*~$1$2 $3 $4 $5 $6$7~gi;
    $shout_message =~ s~(<.*>)?(\S{0,14})(\S{0,14})?(\S{0,14})?(\S{0,14})?(\S*)(<\/\S*>)~$1$2 $3 $4 $5 $6$7~gi;
    $shout_message =~ s~\s+~ ~gi;
} 


Find x2:

Code
Select All
		&my_wrap3; 


And replace with:

Code
Select All
		&wrap2; 


Now the wrap is actually working, but it's set to 80 - So the only thing that you actaully need to add to your code is this:

Code
Select All
$linewrap = 48; 


Hope that makes sense...






  
Back to top
 
IP Logged
 
ThM
God Member
*****
Offline



Posts: 585
Location: Germany, Nds.
Joined: May 21st, 2006
Gender: Male
Re: Shoutbox 5.5 for YaBB 2.4
Reply #72 - Mar 5th, 2010 at 8:39pm
Print Post  
Thanks again Derek, works .....  Thumbs Upsup:

I've added a variable
Code
Select All
$linewrap = $lwshouts; 

so the admin can set in the shoutbox settings after how many chars comes a linebreak. Same we have in ShoutAdmin.pl ......



  

Greeting ThM
Back to top
 
IP Logged
 
Derek Barnstorm
God Member
*****
Offline



Posts: 1146
Location: Warwickshire
Joined: Mar 23rd, 2008
Gender: Male
Re: Shoutbox 5.5 for YaBB 2.4
Reply #73 - Mar 5th, 2010 at 9:18pm
Print Post  
Great stuff! I'm glad it worked out alright.
  
Back to top
 
IP Logged
 
D0T-C0M
God Member
*****
Offline



Posts: 806
Location: Tracadie
Joined: Sep 22nd, 2001
Gender: Male
Re: Shoutbox 5.5 for YaBB 2.4
Reply #74 - Mar 6th, 2010 at 12:50pm
Print Post  
ThM and Derek, Great stuff I wasn't expecting such a fast response. I have just a few questions and a suggestion.

In forums with "Auto-link URLs? " disabled, if a user copies the url and pastes to his browser does the link with a linebreaked URL still work? With "Auto-link URLs? " enabled does the link work?

I can live with a manual setting for linebreak but I suggest it would be easier for the average user if you just set the linebreak variable to whatever the admin determines the width of the shoutbox to be?

For example,  If the user chooses 400 for the shoutbox width than make the line break at
$linewrap= $shout_width - (width of the vertical scrollbar if used + width of margins).

Great work guys, this mod is the best.
« Last Edit: Mar 6th, 2010 at 2:48pm by D0T-C0M »  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1 ... 3 4 [5] 6 7 
Send TopicPrint