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

Different signature if you donate

Discussion in 'Styling and Customization Questions' started by mmoore5553, Mar 7, 2012.

  1. mmoore5553

    mmoore5553 Well-Known Member

    Okay I have a slight issue and not sure how to code it as i not sure if it is the best way so here goes.

    I have donations on forum and when someone gives a certain amount they get a different image in there signature.

    What is the best way to do this ?

    I thought about creating different usergroup but that is a lot of work just for an image , then i thought of custom user field but not sure how that would work.

    I have about ten images.

    I just want something pretty simple to check mark or add for my other ads to do .

    Let me know your thoughts . Thanks again.
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    It depends how you want to track the donations. If you are collecting donations through the user upgrade system then it is easiest to create a donation group. The upgrade puts users into that group. Then edit this template:

    Admin CP -> Appearance -> Templates -> message

    Add the red 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 is="{xen:helper ismemberof, $message, 4}">
    				<img src="path/to/image.gif" />
    Enter the group id and image location.
    Mythotical likes this.
  3. mmoore5553

    mmoore5553 Well-Known Member

    I am confused about how I would understand the code a tad but ...what is the upgrade system do. I do not mind manually promoting them but i watched about it on Kier video but did not understand how to implement it. Can you explain a little.
  4. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    The system is fairly intuitive:

    Admin CP -> Users -> List User Upgrades

    Point it to your Paypal email address and create an upgrade. Set a price and group for the upgrade.
  5. mmoore5553

    mmoore5553 Well-Known Member

    Oh i understand what you are doing now. I was just wondering if i could make a check box which i can check in profile and then have it in the signature if this selected then show this image .I would like to make it where only admins can see and set it. Or the userfield if this usergroup then this picture. Does that make sense. I do not want donation or anything to be kept up with. I know in other forum software i did this easy but not seeing an easy way yet.

    I would hate to make 10 usergroups but i will. Just looking for a faster way.
  6. mmoore5553

    mmoore5553 Well-Known Member

    Okay i think i found a way to make a custom userfield and I have added checkbox and made it not viewable in profile. Now how do i know the custom field id so i can code if this custom field then this img.

    custom field name is donate.
  7. mmoore5553

    mmoore5553 Well-Known Member

    I am having issues when i put this to pull image

    <xen:if is="{$user.donate.gold}">



    I am not sure if i got verbiage right for pulling it.
  8. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Or in the message template it would be:

    mmoore5553 likes this.
  9. mmoore5553

    mmoore5553 Well-Known Member

    So curious the custom field i created was donate . Then i have checkbox for gold and platinum. I want different image for each once i just check mark

    would i just change field id to gold ?
  10. mmoore5553

    mmoore5553 Well-Known Member

    Okay that works but i would have to make a custom field for each image i guess. I did not know if checkbox i could just add each name after it.

    Is there a place i can read about variable and how to manipulate them ?
  11. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Any single-selection field should work. I would do a Drop down selection or Radio Buttons.
  12. mmoore5553

    mmoore5553 Well-Known Member

    yeah i figured out how to do it with checkboxes

    <xen:if is="{$message.customFields.gold.gold}">

    show content here


    <xen:if is="{$message.customFields.gold.plantinum}">

    show this content


    where can i read how to manipulate the variables ?
  13. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    You can use this helper to see what is inside of a template variable:

    {xen:helper dump, $var}
    mmoore5553 likes this.

Share This Page