Page 1 of 1

Signature break length

Posted: Sun Apr 10, 2005 8:37 am
by Noonster
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

Posted: Sun Apr 10, 2005 11:11 am
by CTCNetwork
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:

Posted: Mon Apr 11, 2005 7:31 am
by Noonster
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

Posted: Mon Apr 11, 2005 7:45 am
by flogger12
there is no % code for that sort of thing,


robert

Posted: Mon Apr 11, 2005 7:47 am
by Noonster
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

Re: Signature break length

Posted: Mon Apr 11, 2005 8:39 am
by TasDevil
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.

Posted: Mon Apr 11, 2005 8:43 am
by Noonster
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

Posted: Mon Apr 11, 2005 12:12 pm
by Noonster
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

Posted: Mon Apr 11, 2005 2:18 pm
by Mr. Sharkey
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 />'

Posted: Mon Apr 11, 2005 2:38 pm
by Noonster
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

Posted: Mon Apr 11, 2005 2:41 pm
by Black Fluffy Lion
Use this instead:

Code: Select all

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

Posted: Mon Apr 11, 2005 2:44 pm
by Noonster
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

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

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...