Author Topic: [SOLVED] Need Shop help...  (Read 3068 times)

Offline K-Lynn

[SOLVED] Need Shop help...
« on: September 23, 2007, 05:19:44 am »
I want to know how to change back the names once you have changed it a color and now just want it back to normal.  I also want to know how my members can take certain things off like the BOLD, italics or color feature.  They can change there colors fine but once they activate the bold it always stays bold. 

Also how can you make different colors other than - purple, green, red, black, yellow, orange and pink.  I want ones like aqua or a dark pink.  Is this possible?

Offline inkstains

Re: Need Shop help...
« Reply #1 on: September 24, 2007, 12:40:57 am »
hmm don't know why they weren't offered as options in the item but i just checked the name style item on my forum and you're right there is no option to reverse.

just edit your Change_Style.php and replace it's content with the below code no need to re-install through admin or anything. and you will have two new options Decoration none and Transform none

Code: [Select]
<?php

/**********************************************\

| SMFSHOP (Shop MOD for Simple Machines Forum) |

|         (c) 2005 DanSoft Australia           |

|      http://www.dansoftaustralia.net/        |

\**********************************************/



//File: Change_Style.php

//This item allows users to change their name style using a drop down menu.


//NOTE: This item requires that the DisplayNameCSS addon item be installed!

//Authors Website: www.graphicaddicts.net


//VERSION: 1.0

//DATE: April 21st 2006



class item_Change_Style extends itemTemplate {

    function 
getItemDetails() {
        
$this->name "Change Name Style (Bold, Italic, etc.)!";
        
$this->desc "Change the style of your display name to: Bold, Italic, Underline, Overline or Line Through.";
        
$this->price 75;

        
$this->require_input true;
        
$this->can_use_item true;
    }



    function 
getUseInput() {

        return 
'Select a Style: <select name="style_" size="1" id="color">
    <option value="font-weight:bold" style="font-weight:bold">Bold</option>
<option value="font-style:italic" style="font-style:italic">Italic</option>
<option value="text-decoration:overline" style="text-decoration:overline">Overline</option>
<option value="text-decoration:underline" style="text-decoration:underline">Underline</option>
<option value="text-decoration:line-through" style="text-decoration:line-through">Line Through</option>
<option value="text-transform: uppercase" style="text-transform: uppercase">Uppercase</option>
<option value="text-transform: lowercase" style="text-transform: lowercase">Lowercase</option>
<option value="text-transform:none" style="text-transform:none">Transform none</option>
<option value="text-decoration:none" style="text-decoration:none">Decoration none</option>
  </select>'
;

    }



    function 
onUse() {

        global 
$db_prefix$ID_MEMBER;

        

        
$result db_query("UPDATE {$db_prefix}members
                            SET shop_nameStyle = 
                                concat(shop_nameStyle,'
{$_POST['style_']};')
                            WHERE ID_MEMBER = 
{$ID_MEMBER}",
                            
__FILE____LINE__);



        return 
"Successfully updated your display name style!";

    }



}



?>


 :)

Offline K-Lynn

Re: Need Shop help...
« Reply #2 on: September 24, 2007, 06:54:09 am »
thanks I will try it out and let you know how it works

Offline K-Lynn

Re: Need Shop help...
« Reply #3 on: September 25, 2007, 02:09:44 am »
Ok thanks, it worked...

Offline Daniel15

Re: [SOLVED] Need Shop help...
« Reply #4 on: November 26, 2007, 10:41:47 am »
Quote
I want to know how to change back the names once you have changed it a color and now just want it back to normal.  I
There's a "Reset display name style" item available on the Wiki, I think.