• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

2 Different Sigs for 2 Different Forum Styles?:

CritiKiL

Active member
#1
Ok. I have a regular forum style and then I have a mobile one. The regular style I want it to show 'one type' of signature of the user, but when switched to the mobile style I want a second signature type to show. Both types of sigs should be editable in the persons profile area (ex: Sig 1 style and Sig 2 style). BUT 'Sig 1' style will only show in the regular forum and the 'Sig 2' style will only show in the mobile style. Thanks in advance ;-)
 

0xym0r0n

Well-known member
#2
I would replace the signature area with a custom user field option in the template :) *like my psn/xbl/steam tutorial but find the template wrapper for the posts and remove the signature bit and replace with custom user field entry*
 

CritiKiL

Active member
#3
I would replace the signature area with a custom user field option in the template :) *like my psn/xbl/steam tutorial but find the template wrapper for the posts and remove the signature bit and replace with custom user field entry*
Sounds difficult to do. Was looking for someone with the knowledge to provide me with the solution of just me adding or removing existing code? Thanks though, 0xym0r0n (n)
 

0xym0r0n

Well-known member
#4
Ah and I didn't think about the bbcode showing :) My idea would work and it's fast but I've not a clue how to get bbcode working with it :p
Otherwise I'd just make a TMS and attach it here for you.
Maybe there's a callback method or something I'll look into it. I just disable mine on mobile
Code:
.message .signature
{
display: none;
}
^Source: http://xenforo.com/community/threads/disable-signature-for-a-specific-style.35005/

And the template is message

Code:
        <xen:if is="{$visitor.content_show_signature} && {$message.signature}">
 

0xym0r0n

Well-known member
#6
Not looking to disable "anything" bro.
I understand I guess what I'm trying to do is explain how to do it, if no one provides you an add-on.

You disable the normal signature on your mobile style, then you add the custom signature code in the message template of mobile theme. If the original signature is not disabled by css or removed in the template, then you will get two signatures.

That's what I mean.

I'll make an template modification if no one beats me to it. I've got to release a few things tonight anyways.
 

CritiKiL

Active member
#9
sig_test1.png sig_test2.png

I want the best of both worlds. I want my animated sigs (nobody else can make them but me - it seems!) to show on forum and then I want a 'solid mobile-version' to show from the mobile. I would of course make both versions of sigs for my clan members.
 

Jake Bunce

XenForo moderator
Staff member
#11
You can edit this template directly:

Admin CP -> Appearance -> Templates -> message

And use this variable to output a specific field anywhere you want (you must enter the field_id of your custom field):

Code:
{$message.customFields.field_id}
So you can replace the signature with a different custom field by editing that template in each style.
 

CritiKiL

Active member
#12
You can edit this template directly:

Admin CP -> Appearance -> Templates -> message

And use this variable to output a specific field anywhere you want (you must enter the field_id of your custom field):

Code:
{$message.customFields.field_id}
So you can replace the signature with a different custom field by editing that template in each style.
I'm trying to but am getting lost in this Jake. How will this code be able to allow me to post up two signature spots in the profile areas, but each style show a different one? For example, there's a place already for one sig input. I'm rusty on the custom field creation and how to set them correctly, so could you give me point-by-point instructions? Thanks man.
 

Jake Bunce

XenForo moderator
Staff member
#13
You can create custom fields in your:

Admin CP -> Users -> Custom User Fields

Then edit that template:

Admin CP -> Appearance -> Templates -> message

Find this signature code:

Code:
		<xen:if is="{$visitor.content_show_signature} && {$message.signature}">
			<div class="baseHtml signature ugc{xen:if $message.isIgnored, ' ignored'}"><aside>{xen:raw $message.signatureHtml}</aside></div>
		</xen:if>
Replace with:

Code:
		<xen:if is="{$visitor.content_show_signature} && {$message.customFields.field_id}">
			<div class="baseHtml signature ugc{xen:if $message.isIgnored, ' ignored'}"><aside>{$message.customFields.field_id}</aside></div>
		</xen:if>
 

CritiKiL

Active member
#15
Update, but not what I wanted:

I proceeded to add this to the code you gave me above and 'only used the url link' of the sig image itself. But originally the sig's are automatically resized and this way does not seem to do that at all (sigs are not resized automatically):

Code:
<xen:if is="{$visitor.content_show_signature} && {$message.customFields.sig2}">
  
                <img src="{$message.customFields.sig2}" />
 
                </xen:if>
I basically just wanted to be able to put the 'same BBCode' of a different sig into a custom user field but without being able to make the custom user field understand BBCode it's not going to work out. Anyway I can get this working 'with autoresizing' working? I'm sure that I did some mod for the sigs and other images to resize themselves...
 

CritiKiL

Active member
#17
I see. Would changing the input from BBcode to html code allow a way to do this without extensive addon? And is there an available addon for the BBCode already, or would someone have to make one from scratch?
 

CritiKiL

Active member
#18
Ok, I have another question. When I use the XFS Mobile it does not resize my sig "because the sig uses five separate files. How can I fix it so that all the files together are resized? ~ it resizes one file with no problem but when it's more than one file in the sig box it doesn't resize any of them.
 
#20
Is there a way to disable signatures in certain forums or to make a change to the default "Show people's signatures with their messages" to be unchecked on current groups and new registers ?