Signature break length

This is an archive of the phpBB 2.0.x support forum. Support for phpBB2 has now ended.
Forum rules
Following phpBB2's EoL, this forum is now archived for reference purposes only.
Please see the following announcement for more information: viewtopic.php?f=14&t=1385785
Locked
Noonster
Registered User
Posts: 37
Joined: Thu Jan 20, 2005 9:45 pm
Location: East Yorkshire, UK
Contact:

Signature break length

Post by Noonster » Sun Apr 10, 2005 8:37 am

The current signature break on the forum is set to _________________
Which only goes a small way accross the screen.

Is there a way to change this to span 100% the width of the forum area??

Cheers
Darren

User avatar
CTCNetwork
Former Team Member
Posts: 15424
Joined: Fri Dec 19, 2003 3:50 am
Location: In that Volvo behind you!
Contact:

Post by CTCNetwork » Sun Apr 10, 2005 11:11 am

Hi,

Yes, this can be changed quite easily. . .

Use a Good Text Editor like [urlwww.editplus.com]EditPlus2[/url] to edit your viewtopic.php and search for that string or:-

Code: Select all

	if ( $user_sig != '' )
	{
		$user_sig = '<br />~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~<br />' . str_replace("\n", "\n<br />\n", $user_sig);
As you can see I have edited mine already :D
This around line 1300 or so..

Hope this helps,

Des. . . :wink:
Density:- Not just a measurement~Its a whole way of Life.! ! !
| Welcome! | RTFM!!! | Search! It's Easy! | Problem? | Spam? | Advice! |

Noonster
Registered User
Posts: 37
Joined: Thu Jan 20, 2005 9:45 pm
Location: East Yorkshire, UK
Contact:

Post by Noonster » Mon Apr 11, 2005 7:31 am

CTCNetwork wrote: Hi,

Yes, this can be changed quite easily. . .

Use a Good Text Editor like [urlwww.editplus.com]EditPlus2[/url] to edit your viewtopic.php and search for that string or:-

Code: Select all

	if ( $user_sig != '' )
	{
		$user_sig = '<br />~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~<br />' . str_replace("\n", "\n<br />\n", $user_sig);
As you can see I have edited mine already :D
This around line 1300 or so..

Hope this helps,

Des. . . :wink:


Thanks for the link to the text editor - its better than the one i was using ;)

Ok... so thats how you change it
- Is there no code to enter to make it go all the way accross then??
- I thought you may have been able to use a % code ??

Because say you extend the standard
-------------
to say
------------------------------------------------------------------------------------------

that might fill my width but might be too long/short for someone else.

IE... if a 100% was used in the code it would alway span the whole width correctly

SORRY if that makes no sence
But i hope you understand

Thanks for your help with this
Daz

flogger12
Registered User
Posts: 14936
Joined: Tue Nov 25, 2003 2:13 am

Post by flogger12 » Mon Apr 11, 2005 7:45 am

there is no % code for that sort of thing,


robert

Noonster
Registered User
Posts: 37
Joined: Thu Jan 20, 2005 9:45 pm
Location: East Yorkshire, UK
Contact:

Post by Noonster » Mon Apr 11, 2005 7:47 am

flogger12 wrote: there is no % code for that sort of thing,


robert


Thanks Robert
- Its a shame :(

Oh well will just change it then.

Thanks
Darren

TasDevil
Registered User
Posts: 319
Joined: Tue Mar 15, 2005 5:49 am

Re: Signature break length

Post by TasDevil » Mon Apr 11, 2005 8:39 am

Noonster wrote: The current signature break on the forum is set to _________________
Which only goes a small way accross the screen.

Is there a way to change this to span 100% the width of the forum area??


I don't know how to integrate that correctly into viewtopic.php, but you can use a very small GIF (e.g. 1x1 pixel) instead of the underscore and use a code similar to:

Code: Select all

<IMG src="images/line.gif" width='100%' height='1'>
Tas.

Noonster
Registered User
Posts: 37
Joined: Thu Jan 20, 2005 9:45 pm
Location: East Yorkshire, UK
Contact:

Post by Noonster » Mon Apr 11, 2005 8:43 am

Good think Tas...
- So if i get a gif of ---
- Save it
- Link it into text like you put above and insert that in where ____________ currently is then jobs done...

Will test it later :D

Noonster
Registered User
Posts: 37
Joined: Thu Jan 20, 2005 9:45 pm
Location: East Yorkshire, UK
Contact:

Post by Noonster » Mon Apr 11, 2005 12:12 pm

if ( $user_sig != '' && $userdata['user_allowsignature'] != 0 )
{
$user_sig = '_________________<br />' . str_replace("\n", "\n<br />\n", $user_sig);
} else $user_sig = '';

$message = str_replace("\n", "\n<br />\n", $message);


^^ Thats the current text i have in the viewtopic.

Anyone got any ideas how to implement the idea Tas had above as i cant seem to get it working :(

Cheers
Daz

Mr. Sharkey
Registered User
Posts: 635
Joined: Sun Mar 28, 2004 5:42 pm

Post by Mr. Sharkey » Mon Apr 11, 2005 2:18 pm

In this line:

Code: Select all

$user_sig = '_________________<br />' . str_replace("\n", "\n<br />\n", $user_sig); 
Everything between the single quotes is echoed onto the screen as HTML:

Code: Select all

'_________________<br />' 
Would be replaced by:

Code: Select all

'<IMG src="images/line.gif" width='100%' height='1'><br />'
640 useless posts, at least one too many

Noonster
Registered User
Posts: 37
Joined: Thu Jan 20, 2005 9:45 pm
Location: East Yorkshire, UK
Contact:

Post by Noonster » Mon Apr 11, 2005 2:38 pm

Mr. Sharkey wrote: In this line:

Code: Select all

$user_sig = '_________________<br />' . str_replace("\n", "\n<br />\n", $user_sig); 
Everything between the single quotes is echoed onto the screen as HTML:

Code: Select all

'_________________<br />' 
Would be replaced by:

Code: Select all

'<IMG src="images/line.gif" width='100%' height='1'><br />'


Yeah thats exactly what i was doing
although mine said

Code: Select all

'<IMG src="images/sig.gif" width='100%' height='1'><br />'
^^ Only change is sig.gif as thats what i called it

This is the error message i am getting when i upload the file and then try and view a forum

Code: Select all

Parse error: parse error, unexpected T_LNUMBER in /home/corsa/public_html/forum/viewtopic.php on line 1236
Thanks for your help
Darren

User avatar
Black Fluffy Lion
Former Team Member
Posts: 6057
Joined: Sat Dec 15, 2001 11:37 am

Post by Black Fluffy Lion » Mon Apr 11, 2005 2:41 pm

Use this instead:

Code: Select all

'<IMG src="images/sig.gif" width="100%" height="1"><br />'

Noonster
Registered User
Posts: 37
Joined: Thu Jan 20, 2005 9:45 pm
Location: East Yorkshire, UK
Contact:

Post by Noonster » Mon Apr 11, 2005 2:44 pm

Black Fluffy Lion wrote: Use this instead:

Code: Select all

'<IMG src="images/sig.gif" width="100%" height="1"><br />'


Fantastic mate
- Works a treat :D

Cheers
Darren

Mr. Sharkey
Registered User
Posts: 635
Joined: Sun Mar 28, 2004 5:42 pm

Post by Mr. Sharkey » Mon Apr 11, 2005 3:59 pm

Code: Select all

'<IMG src="images/line.gif" width='100%' height='1'><br />'
Dang, that's what I get for simply copy-and-pasting instead of throughly checking what the previous user wrote. No additional single quotes allowed in a text string...
640 useless posts, at least one too many

Locked

Return to “2.0.x Support Forum”

cron