YaBB Community and Support Forum
YaBB Home About YaBB Download YaBB YaBB Support Customize Your Forum Development Contribute to the Project
  Welcome, Guest. Please Login or Register


 
Page Index Toggle Pages: 1
Topic Tools
 
How do I remove BR's in Template? (Read 1,390 times)
 Oct 4th, 2010 at 11:14am
There are no actions to perform.  

Lopa 
Junior Member
**
Offline
Posts: 95
Australia


None
How do I remove BR's in Template?
I want to remove two <br>'s from the locations below as determined with view source - They're not in the html - because I fixed all of the <br>'s, so they must be in the perl script?

1. Good Afternoon YaBB Administrator, <br>you have <a href="http://127.0.0.1/cgi-bin/forum/YaBB.pl?action=im">0 messages</a>  &nbsp;</td>


2.
Code Select All
		return F;
	}
	// Password_strength_meter end
// -->
</script>

		<br>

			</td></tr>
		</table>

		<br clear="all">

		<!-- content table end --> 




I've read perl for dummies, stupids and donkey's and found this >

Code Select All
$something =~ s~<br \/>~\n~g; 



In YaBB I found at least one <br> that seems to have the / missing?

Code Select All
$signature =~ s/<br.*?>/\n/g; 



So I can only assume that it should look like this?

Code Select All
$signature =~ s/<br \/.*?>/\n/g; 



However, I don't want to try to fix them because I ain't no perl coder - What I would like to know is where to remove them - ONLY if they are not nested and are going to interfere with other script requirements.
 
I make mistakes - That's how I learn.
WWW  
IP Logged  
 Reply #1 - Oct 4th, 2010 at 1:30pm
There are no actions to perform.  

Derek Barnstorm 
Support Team
YaBB Next Team
Development Team
Beta Testers
****
Offline
Posts: 1,269
United Kingdom


YaBB 2.5
Re: How do I remove BR's in Template?
Lopa wrote on Oct 4th, 2010 at 11:14am:
1. Good Afternoon YaBB Administrator, <br>you have <a href="http://127.0.0.1/cgi-bin/forum/YaBB.pl?action=im">0 messages</a>  &nbsp;</td>

This is actually in default.html:

Code (HTML)Select All
               <td align="left" valign="middle" height="40">{yabb uname}<br />{yabb im}{yabb admin_alert}</td> 


I have no idea why you are missing the forward slash though - it should be there.

As for the second one, I haven't tracked that down yet...
 
 
IP Logged  
 Reply #2 - Oct 4th, 2010 at 2:57pm
There are no actions to perform.  
Captain John 
Ex Member


None
Re: How do I remove BR's in Template?
Lopa wrote on Oct 4th, 2010 at 11:14am:
I've read perl for dummies, stupids and donkey's


  You realize br is html, not perl

http://www.w3schools.com/tags/tag_br.asp
 
 
IP Logged  
 Reply #3 - Oct 4th, 2010 at 3:37pm
There are no actions to perform.  
Carsten 
Ex Member


None
Re: How do I remove BR's in Template?
Why are you showing the 'br' tags without the terminating slash in your code examples?? In the original code they all have the slash as they should have.

----------

2. is found in 'MyCenter.pl':
Code Select All
        $MCContent .= qq~
            $showProfile
        <br />
        ~;
 



----------

Lopa wrote on Oct 4th, 2010 at 11:14am:
In YaBB I found at least one <br> that seems to have the / missing?

Code Select All
$signature =~ s/<br.*?>/\n/g; 



So I can only assume that it should look like this?

Code Select All
$signature =~ s/<br /.*?>/\n/g; 



No no - that would make no sense at all. The regex is made that way (i guess) to take care of new as well as very old signatures from way back when yabb used HTML (as opposed to XHTML) where there was no terminating slash in the tags.

The dot (.) means 'anything' - the asterisk (*) means 'none or some' and the question mark (?) means 'until the first instance of the following'. Put it together it says: None or some of anything until first instance of >
« Last Edit: Oct 4th, 2010 at 3:49pm by N/A »  
 
IP Logged  
 Reply #4 - Oct 4th, 2010 at 10:41pm
There are no actions to perform.  

Lopa 
Junior Member
**
Offline
Posts: 95
Australia


None
Re: How do I remove BR's in Template?
Embarrassed Embarrassed

Thanks people because if this has/is driving you nuts - welcome to the club!  Grin

It appears that View Selection Source with FF is stripping the slashes for some reason?

DOM Selection:
Code Select All
	</tr>
</tbody></table>
<input name="formsession" value="10247D0D382F317D043C1F1F7D1B322F28303C393034335D0" type="hidden"></form>
		<br> 



Whereas View Page Source doesn't!  Wink

Code Select All
	</tr>
</table>
<input type="hidden" name="formsession" value="10247D0D382F317D043C1F1F7D1B322F28303C393034335D0" /></form>
		<br /> 



And now that I found that out - I should be able to find the <br /> I want to remove.  Cool

@CJ - It was this that threw me because I've never seen it before and assumed that it was an outdated br? But Carsten's explanation makes it quite clear as to its function.  Tongue
Code (Perl)Select All
$signature =~ s/<br.*?>/\n/g 



Anyway CJ, here's where it was.  Tongue
Code Select All
		$MCContent .= qq~
			$showProfile
		<br /> 

« Last Edit: Oct 5th, 2010 at 11:25am by Lopa »  
I make mistakes - That's how I learn.
WWW  
IP Logged  
 Reply #5 - Oct 5th, 2010 at 3:57pm
There are no actions to perform.  
Captain John 
Ex Member


None
Re: How do I remove BR's in Template?
Simply a line break after the string showprofile is displayed.
 
 
IP Logged  
Page Index Toggle Pages: 1
Topic Tools
 

Get Yet another Bulletin Board at SourceForge.net. Fast, secure and Free Open Source software downloads Support This Project BoardMod - YaBB features and templates YaBB Codex - support on installation and usage YaBB Toolbar for your browser

YaBB Facebook Group Page

Vulnerability Scanner

Valid RSS Valid XHTML Valid CSS Powered by Perl
YaBB Chat and Support Community » Powered by YaBB 3.0 Beta!
YaBB Forum Software © 2000-2011. All Rights Reserved.