SMF Shop

SMFShop => Completed Additions => Items => Topic started by: SKETCHi on April 22, 2006, 04:23:38 am

Title: Some Name Alteration Items
Post by: SKETCHi on April 22, 2006, 04:23:38 am
You must have the Display Name CSS (http://www.dansoftaustralia.net/downloads/file/20/Display-Name-CSS-Item.html) item installed in order for these items to work. The Display Name CSS (http://www.dansoftaustralia.net/downloads/file/20/Display-Name-CSS-Item.html) item adds an SQL field to your smf_members table and these files add CSS to that field.

I didn't realize there was a forum, so I had thrown these into the bug tracker :). Anyway, I had a friend of mine whip up a couple items, and I did a little fixing myself, here is what we came up wtih.

Change Name Color (Change_Color.php)
A drop down menu containing three shades of all ROYGBIV colors. Users choose which color they want to use from the list.

Change Name Background Color (Change_Bg_Color.php)
The same as the name color change, but with background colors instead. The same colors are used.

Change Name Style (Change_Style.php)
Bold, Italic, Underline, Overline, Line-through, Uppercase and Lowercase can be added to usernames via a drop down menu.

Change Name Colors & Styles (Change_All.php)
This item has three drop down menus containing all of the above items.

Items attached below as txt files. Remove the .txt extension before uploading. Or, Download ZIP of All Items (http://www.graphicaddicts.net/helpinghand/NameAlterations.zip).

If you have any suggestions, please add them. Enjoy :)

Edited by Daniel15 on 8th October 2006: Changed link to 'Display Name CSS' item
Title: Re: Some Name Alteration Items
Post by: tazpot on April 22, 2006, 08:49:26 am
 ;D Nice one SKETCHi i might use some of those when i get chance  O0
Title: Re: Some Name Alteration Items
Post by: SKETCHi on April 22, 2006, 02:13:34 pm
Thanks tazpot, happy to help :). Last year I had actually requested these items be made, then I saw that wonderful CSS item and figured it was my chance to get these made :).
Title: Re: Some Name Alteration Items
Post by: Daniel15 on May 14, 2006, 10:19:17 am
Heh, I just installed your 'Change Name Colors & Styles (Change_All.php)' item here :)
I completely forgot about these items until now :P

SKETCHi: I added your item to the 'Downloads' section of this website.
Title: Re: Some Name Alteration Items
Post by: Sady on May 15, 2006, 03:24:09 am
I added these to my forum but whenever I click "use item" after selecting my color/bg choices, etc., I get the following error:

Unknown column 'shop_nameStyle' in 'field list'
File: /Applications/MAMP/htdocs/forum/Sources/shop/items/Change_Bg_Color.php
Line: 86

the error is the same for each of the four files, just a different line number.  Any ideas what could be going wrong?
Title: Re: Some Name Alteration Items
Post by: Daniel15 on May 20, 2006, 09:05:13 am
You need to install the 'Change Display Name CSS (http://www.daniel15.com/index.php?ind=downloads&op=entry_view&iden=3)' item for these items to work. These items rely on the Change Display Name CSS item to be installed. You install that item using the Package Manager.
Title: Re: Some Name Alteration Items
Post by: SKETCHi on May 24, 2006, 01:55:40 am
Sorry Sady, I should have clearified that in the topic post. I have added the information now so there will be no further confusion.
Title: Re: Some Name Alteration Items
Post by: geezmo on June 13, 2006, 03:21:55 am
This is a great shop item, but how can I revert all changed usernames back to normal? My shop items have a validity of only one month so after one month, all items bought will revert to the original, including these name alterations.
Title: Re: Some Name Alteration Items
Post by: Daniel15 on June 16, 2006, 09:25:21 pm
Quote
This is a great shop item, but how can I revert all changed usernames back to normal? My shop items have a validity of only one month so after one month, all items bought will revert to the original, including these name alterations.
To allow someone to revert their own name back to normal, install the 'Reset Display Name CSS (http://www.daniel15.com/index.php?ind=downloads&op=entry_view&iden=4)' item. However, from what I can tell, you want to reset everyone's name style?

If so, then use this MySQL query:
Code: [Select]
UPDATE smf_members SET shop_NameStyle = ''
Or, use this PHP script:
Code: [Select]
<?php
require("SSI.php");
db_query("UPDATE smf_members SET shop_NameStyle = ''"__FILE____LINE__);
?>

Title: Re: Some Name Alteration Items
Post by: Pat on July 25, 2006, 01:35:02 pm
How do I fix this?

Unknown column 'shop_nameStyle' in 'field list'
File: /home/angel25/public_html/test/Sources/shop/items/Change_All.php
Line: 121

Note: It appears that your database may require an upgrade. Your forum files are currently at version SMF 1.0.7, whereas your database is at version SMF 1.0.2. It is recommended that you execute the latest version of upgrade.php.
Title: Re: Some Name Alteration Items
Post by: Daniel15 on July 26, 2006, 08:40:38 am
You need to install the 'Display Name CSS (http://www.daniel15.com/index.php?ind=downloads&op=entry_view&iden=3) item for this to work.
Title: Re: Some Name Alteration Items
Post by: GeneralERA on August 15, 2006, 01:29:04 am
Ha! I wish I had seen this, I made something like this just a minute ago. Mine was a text field where the members entered a hex code, an RGB code or a color name, but this is nicer.  :) Ahh, mine works well enough, but nice work on this!
Title: Re: Some Name Alteration Items
Post by: Razor Heretic on August 20, 2006, 12:56:23 pm
for some reason It is not letting me add  Change_Color and Change_All
I am getting errors.
Title: Re: Some Name Alteration Items
Post by: SKETCHi on August 20, 2006, 03:09:12 pm
Could you paste the error messages here? I can't tell you what's wrong unless I see the errors :).
Title: Re: Some Name Alteration Items
Post by: Razor Heretic on August 22, 2006, 09:00:12 am
okay this is bizarre they all 4 work now.
I tried the 2 that did not work again and nwo they are perfect. how odd.

Title: Re: Some Name Alteration Items
Post by: Albadon on October 08, 2006, 06:03:52 am
Can't see Display Name CSS Mod anywhere? Is this just because the site is under construction? When is it gonna be up and fully funning?
Title: Re: Some Name Alteration Items
Post by: Daniel15 on October 08, 2006, 10:49:49 am
Sorry, due to the recent site redesign, they've been moved to the DanSoft Australia site (as I though they'd fit in better there, along with SMF). See http://www.dansoftaustralia.net/downloads/2/Items.html for the items section, and http://www.dansoftaustralia.net/downloads/file/20/Display-Name-CSS-Item.html for this particular item.

I've updated the original post to reflect the new URL's ;)
Title: Re: Some Name Alteration Items
Post by: Albadon on October 09, 2006, 12:20:48 am
OK, thanks. I fount it. Do i also need the files in addition to Display Name CSS Mod for these items here to work?
Title: Re: Some Name Alteration Items
Post by: Daniel15 on October 13, 2006, 07:25:26 pm
Yes, once you install the Display Name CSS item via the Package Manager, install these ones. To do so, copy them into your Sources/shop/items directory, and then go to 'Add Item' in the SMFShop admin panel.
Title: Re: Some Name Alteration Items
Post by: geezmo on October 22, 2006, 12:01:33 am
Not sure if this's been asked before, but does the Change Color of Name also show up in the Users Online list in forum index? I know the colors of usernames change when in the boards, but I want to know if the colors show up in the Online users list too.
Title: Re: Some Name Alteration Items
Post by: Daniel15 on October 22, 2006, 12:32:39 pm
Quote
but does the Change Color of Name also show up in the Users Online list in forum index?
Yes, it should... It does on this forum (my name is red)
Title: Re: Some Name Alteration Items
Post by: geezmo on October 23, 2006, 03:15:43 am
Hi Daniel15, but is that red color you bought from the Shop or is it automatic as an admin of the forum? As admin of my forum, my color in the Users Online is red but I bought a shop item that made my username blue with a green background but this did not show up in the Users Online list. My username is still colored red although in the boards my username appears as blue with green background.
Title: Re: Some Name Alteration Items
Post by: TechnoDragon on October 23, 2006, 05:16:23 am
it only affects the style in the posts and members list...the online list and several other ares stay with the membergroup colors
Title: Re: Some Name Alteration Items
Post by: inkstains on October 27, 2006, 11:05:28 am
why can't i download the files? it keeps taking me to the login form then back to the index

EDIT: it was just the first file but i downloaded the whole package instead so all sorted
Title: Re: Some Name Alteration Items
Post by: Daniel15 on October 27, 2006, 06:16:30 pm
Quote
Hi Daniel15, but is that red color you bought from the Shop or is it automatic as an admin of the forum? As admin of my forum, my color in the Users Online is red but I bought a shop item that made my username blue with a green background but this did not show up in the Users Online list. My username is still colored red although in the boards my username appears as blue with green background.
Oh, sorry, that must have been it. I guess I was wrong, then :P

Quote
it only affects the style in the posts and members list...the online list and several other ares stay with the membergroup colors
Oh, right... Well, I'll see if I can fix that soon ;)
Title: Re: Some Name Alteration Items
Post by: cbn on January 03, 2007, 06:36:23 am
Nice. Thanks
Title: Re: Some Name Alteration Items
Post by: perplexed on April 04, 2007, 12:32:03 am
is there a font changing item or how I would I make the changes to make one?
Title: Re: Some Name Alteration Items
Post by: Daniel15 on April 05, 2007, 08:12:07 pm
Quote
is there a font changing item or how I would I make the changes to make one?
Add a new Display Name CSS item to your forum. For the style, do something like
Code: [Select]
font-family: <name of the font>
For example
Code: [Select]
font-family: Georgia
Title: Re: Some Name Alteration Items
Post by: perplexed on April 05, 2007, 08:44:16 pm
thanks Daniel, I will attempt this

do you see any problems with chaning the actual font?  I wondered why no one had created an item for it already
Title: Re: Some Name Alteration Items
Post by: perplexed on April 05, 2007, 09:52:47 pm
Quote
is there a font changing item or how I would I make the changes to make one?
Add a new Display Name CSS item to your forum. For the style, do something like
Code: [Select]
font-family: <name of the font>
For example
Code: [Select]
font-family: Georgia


Ok  I tried to make this using another item but it didnt change the font, it did nothing.

When you go to use the item,there is a dropdown box with 5 fonts - displaying in the actual fonts - but when I use it, it does nothing.

I am posting the code I have, I used the change style item and changed stuff to 'font' but I dont know how to code so its probably missing something important:

Code: [Select]
<?php

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

| SMFSHOP (Shop MOD for Simple Machines Forum) |

|         (c) 2005 DanSoft Australia           |

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

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



//File: Change_Font.php

//This item allows users to change their name font 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_Font extends itemTemplate {

    function 
getItemDetails() {
        
$this->name "Change Name Font!";
        
$this->desc "Change the font of your display name to: Arial, Comic Sans, Courier, Papyrus, Times, Verdana.";
        
$this->price 75;

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



    function 
getUseInput() {

        return 
'Select a Font: <select name="font_" size="1" id="color">
     <option value="font-family: Arial" style="font-family: Arial">Arial</option>
<option value="font-family: Comic Sans MS" style="font-family: Comic Sans MS">Comic Sans MS</option>
<option value="font-family: Courier New" style="font-family: Courier New">Courier New</option>
        <option value="font-family: Papyrus" style="font-family: Papyrus">Papyrus</option>
<option value="font-family: Times New Roman" style="font-family: Times New Roman">Times New Roman</option>
<option value="font-family: Verdana" style="font-family: Verdana">Verdana</option>

  </select>'
;

    }



    function 
onUse() {

        global 
$db_prefix$ID_MEMBER;

        

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



        return 
"Successfully updated your display name font!";

    }



}



?>

Sorry but I dont know how to make it work
Title: Re: Some Name Alteration Items
Post by: David on April 06, 2007, 01:34:08 am
Try this:

Code: [Select]
<?php

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

| SMFSHOP (Shop MOD for Simple Machines Forum) |

|         (c) 2005 DanSoft Australia           |

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

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



//File: Change_Font.php

//This item allows users to change their name font 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_Font extends itemTemplate {

    function 
getItemDetails() {
        
$this->name "Change Name Font!";
        
$this->desc "Change the font of your display name to: Arial, Comic Sans, Courier, Papyrus, Times, Verdana.";
        
$this->price 75;

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



    function 
getUseInput() {

        return 
'Select a Font: <select name="font_" size="1" id="color">
    <option value="">Select One</option>
    <option value="font-family: Arial" style="font-family: Arial;color:#FFFFFF;background-color:#000000">Arial</option>
<option value="font-family: Comic Sans MS" style="font-family: Comic Sans MS">Comic Sans MS</option>
<option value="font-family: Courier New" style="font-family: Courier New">Courier New</option>
    <option value="font-family: Papyrus" style="font-family: Papyrus">Papyrus</option>
<option value="font-family: Times New Roman" style="font-family: Times New Roman">Times New Roman</option>
<option value="font-family: Verdana" style="font-family: Verdana">Verdana</option>

  </select>'
;

    }



    function 
onUse() {

        global 
$db_prefix$ID_MEMBER;

        

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



        return 
"Successfully updated your display name font!";

    }



}



?>
Title: Re: Some Name Alteration Items
Post by: perplexed on April 06, 2007, 01:38:40 am
thanks David, but I tried it and it didnt work either.

I wonder if there is something that prevents the actual font from being changed in smf?
Title: Re: Some Name Alteration Items
Post by: David on April 06, 2007, 01:52:29 am
Hmmm I tried it too and it did work for me (comes as a bit of a shock I know.) Would you mind giving a few details? SMF version for instance...anything in the error log from this item?
Title: Re: Some Name Alteration Items
Post by: perplexed on April 06, 2007, 01:57:18 am
smf 1.1.2 and no errors.  It says that I successfully used the item but then it doesnt change the font

I tried twice - comic sans and papyrus - to no avail
Title: Re: Some Name Alteration Items
Post by: David on April 06, 2007, 02:05:49 am
I'm on SMF 1.1.2 too so it can't be that.

Silly questions as I'll bet you've got them sorted already...bear with me.

Have you got the ChangeDisplayNameCSS.php file installed (yes I know the answer already...you have)?

Have you tried clearing your browser cache after the font change?

 I suppose it's best to ask the obvious things just to get them out of the way but I don't have any other ideas as to why it wouldn't work for you but does for me.

 Actually...try a reboot so as to completely clear all temp settings then give it another go if you'd be so kind.
Title: Re: Some Name Alteration Items
Post by: perplexed on April 06, 2007, 02:09:31 am
changdisplaynamecss.php - yes as I have other name changing things working

browser cache - yes again

I might try it my other forum and see what happens


oh - just wondering, will the name resetter reset font as well as the other name change items?
Title: Re: Some Name Alteration Items
Post by: David on April 06, 2007, 02:12:48 am
Well...it is for me so what can I say but yes.

 I've got it working on a test forum of mine and will give you an account so you can play with it if that would help...in fact you can have an admin account as it's a test forum if that too would be of use.
Title: Re: Some Name Alteration Items
Post by: David on April 06, 2007, 04:47:48 am
I've added quite a few more fonts and put the whole lot into the change all item:

Code: [Select]
<?php

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

| SMFSHOP (Shop MOD for Simple Machines Forum) |

|         (c) 2005 DanSoft Australia           |

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

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



//File: Change_All_2.php

//This item allows users to change their name color, background color and style from three separate
//drop down menus.


//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_All_2 extends itemTemplate {

    function 
getItemDetails() {
        
$this->name "Change Name Fonts, Colors and Style!";
        
$this->desc "Change the text font, color, style and background color of your display name.";
        
$this->price 75;

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



    function 
getUseInput() {

        return 
'Select a Font: <select name="font_" size="1" id="color">
    <option value="">Select One</option>
    <option value="font-family: Arial" style="font-family: Arial;color:#FFFFFF;background-color:#000000">Arial</option>
<option value="font-family: Arial Black" style="font-family: Arial Black">Arial Black</option>
<option value="font-family: Arial Narrow" style="font-family: Arial Narrow">Arial Narrow</option>
<option value="font-family: Arial Unicode MS" style="font-family: Arial Unicode MS">Arial Unicode MS</option>
<option value="font-family: Book Antiqua" style="font-family: Book Antiqua">Book Antiqua</option>
<option value="font-family: Bookman Old Style" style="font-family: Bookman Old Style">Bookman Old Style</option>
<option value="font-family: Century Gothic" style="font-family: Century Gothic">Century Gothic</option>
<option value="font-family: Comic Sans MS" style="font-family: Comic Sans MS">Comic Sans MS</option>
<option value="font-family: Courier New" style="font-family: Courier New">Courier New</option>
    <option value="font-family: Garamond" style="font-family: Garamond">Garamond</option>
<option value="font-family: Georgia" style="font-family: Georgia">Georgia</option>
<option value="font-family: Impact" style="font-family: Impact">Impact</option>
<option value="font-family: Lucida Console" style="font-family: Lucida Console">Lucida Console</option>
<option value="font-family: Lucida Sans Unicode" style="font-family: Lucida Sans Unicode">Lucida Sans Unicode</option>
<option value="font-family: Palatino Linotype" style="font-family: Palatino Linotype">Palatino Linotype</option>
<option value="font-family: Papyrus" style="font-family: Papyrus">Papyrus</option>
<option value="font-family: Times New Roman" style="font-family: Times New Roman">Times New Roman</option>
<option value="font-family: Trebuchet MS" style="font-family: Trebuchet MS">Trebuchet MS</option>
<option value="font-family: Verdana" style="font-family: Verdana">Verdana</option>

  </select>
      
   <br /><br />

Select a Text Color: <select name="color_" size="1" id="color">
    <option value="">Select One</option>
    <option value="color:#FFFFFF" style="color:#FFFFFF;background-color:#000000">White</option>
    <option value="color:#000000" style="color:#000000">Black</option>
    <option value="color:#d80000" style="color:#d80000">Light Red</option>
<option value="color:#b70000" style="color:#b70000">Medium Red</option>
<option value="color:#750000" style="color:#750000">Dark Red</option>
    <option value="color:#FF9000" style="color:#FF9000">Light Orange</option>
<option value="color:#D37C00" style="color:#D37C00">Medium Orange</option>
<option value="color:#AF6B00" style="color:#AF6B00">Dark Orange</option>
<option value="color:#FFFC00" style="color:#FFFC00">Light Yellow</option>
<option value="color:#D3D100" style="color:#D3D100">Medium Yellow</option>
<option value="color:#AFAD00" style="color:#AFAD00">Dark Yellow</option>
<option value="color:#14D800" style="color:#14D800">Light Green</option>
<option value="color:#11B700" style="color:#11B700">Medium Green</option>
<option value="color:#0B7500" style="color:#0B7500">Dark Green</option>
<option value="color:#0061D8" style="color:#0061D8">Light Blue</option>
<option value="color:#0038B7" style="color:#0038B7">Medium Blue</option>
<option value="color:#002975" style="color:#002975">Dark Blue</option>
<option value="color:#7A00D8" style="color:#7A00D8">Light Indigo</option>
<option value="color:#6300B7" style="color:#6300B7">Medium Indigo</option>
<option value="color:#3F0075" style="color:#3F0075">Dark Indigo</option>
<option value="color:#B200D8" style="color:#B200D8">Light Violet</option>
<option value="color:#8E00B7" style="color:#8E00B7">Medium Violet</option>
<option value="color:#5B0075" style="color:#5B0075">Dark Violet</option>
  </select>
  
   <br /><br />
        
    Select a Background Color: <select name="bgcolor_" size="1" id="color">
    <option value="">Select One</option>
    <option value="background-color:#FFFFFF" style="background-color:#FFFFFF">White</option>
    <option value="background-color:#000000" style="background-color:#000000;color:#FFFFFF">Black</option>
    <option value="background-color:#d80000" style="background-color:#d80000">Light Red</option>
<option value="background-color:#b70000" style="background-color:#b70000">Medium Red</option>
<option value="background-color:#750000" style="background-color:#750000">Dark Red</option>
    <option value="background-color:#FF9000" style="background-color:#FF9000">Light Orange</option>
<option value="background-color:#D37C00" style="background-color:#D37C00">Medium Orange</option>
<option value="background-color:#AF6B00" style="background-color:#AF6B00">Dark Orange</option>
<option value="background-color:#FFFC00" style="background-color:#FFFC00">Light Yellow</option>
<option value="background-color:#D3D100" style="background-color:#D3D100">Medium Yellow</option>
<option value="background-color:#AFAD00" style="background-color:#AFAD00">Dark Yellow</option>
<option value="background-color:#14D800" style="background-color:#14D800">Light Green</option>
<option value="background-color:#11B700" style="background-color:#11B700">Medium Green</option>
<option value="background-color:#0B7500" style="background-color:#0B7500">Dark Green</option>
<option value="background-color:#0061D8" style="background-color:#0061D8">Light Blue</option>
<option value="background-color:#0038B7" style="background-color:#0038B7">Medium Blue</option>
<option value="background-color:#002975" style="background-color:#002975">Dark Blue</option>
<option value="background-color:#7A00D8" style="background-color:#7A00D8">Light Indigo</option>
<option value="background-color:#6300B7" style="background-color:#6300B7">Medium Indigo</option>
<option value="background-color:#3F0075" style="background-color:#3F0075">Dark Indigo</option>
<option value="background-color:#B200D8" style="background-color:#B200D8">Light Violet</option>
<option value="background-color:#8E00B7" style="background-color:#8E00B7">Medium Violet</option>
<option value="background-color:#5B0075" style="background-color:#5B0075">Dark Violet</option>
  </select>
  
  <br /><br />
        
    Select a Style: <select name="style_" size="1" id="color">
    <option value="">Select One</option>
    <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>
  </select>'
;
  
  

    }



    function 
onUse() {

        global 
$db_prefix$ID_MEMBER;

        

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



        return 
"Successfully updated your display name colors and style!";

    }



}



?>

Title: Re: Some Name Alteration Items
Post by: David on April 06, 2007, 04:51:20 am
Updated Change Font item with more fonts:

Code: [Select]
<?php

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

| SMFSHOP (Shop MOD for Simple Machines Forum) |

|         (c) 2005 DanSoft Australia           |

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

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



//File: Change_Font.php

//This item allows users to change their name font 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_Font extends itemTemplate {

    function 
getItemDetails() {
        
$this->name "Change Name Font!";
        
$this->desc "Change the font of your display name to: Arial, Comic Sans, Courier, Papyrus, Times, Verdana.";
        
$this->price 75;

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



    function 
getUseInput() {

        return 
'Select a Font: <select name="font_" size="1" id="color">
    <option value="">Select One</option>
    <option value="font-family: Arial" style="font-family: Arial;color:#FFFFFF;background-color:#000000">Arial</option>
    <option value="font-family: Arial Black" style="font-family: Arial Black">Arial Black</option>
<option value="font-family: Arial Narrow" style="font-family: Arial Narrow">Arial Narrow</option>
<option value="font-family: Arial Unicode MS" style="font-family: Arial Unicode MS">Arial Unicode MS</option>
<option value="font-family: Book Antiqua" style="font-family: Book Antiqua">Book Antiqua</option>
<option value="font-family: Bookman Old Style" style="font-family: Bookman Old Style">Bookman Old Style</option>
<option value="font-family: Century Gothic" style="font-family: Century Gothic">Century Gothic</option>
<option value="font-family: Comic Sans MS" style="font-family: Comic Sans MS">Comic Sans MS</option>
<option value="font-family: Courier New" style="font-family: Courier New">Courier New</option>
    <option value="font-family: Garamond" style="font-family: Garamond">Garamond</option>
<option value="font-family: Georgia" style="font-family: Georgia">Georgia</option>
<option value="font-family: Impact" style="font-family: Impact">Impact</option>
<option value="font-family: Lucida Console" style="font-family: Lucida Console">Lucida Console</option>
<option value="font-family: Lucida Sans Unicode" style="font-family: Lucida Sans Unicode">Lucida Sans Unicode</option>
<option value="font-family: Palatino Linotype" style="font-family: Palatino Linotype">Palatino Linotype</option>
<option value="font-family: Papyrus" style="font-family: Papyrus">Papyrus</option>
<option value="font-family: Times New Roman" style="font-family: Times New Roman">Times New Roman</option>
<option value="font-family: Trebuchet MS" style="font-family: Trebuchet MS">Trebuchet MS</option>
<option value="font-family: Verdana" style="font-family: Verdana">Verdana</option>

  </select>'
;

    }



    function 
onUse() {

        global 
$db_prefix$ID_MEMBER;

        

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



        return 
"Successfully updated your display name font!";

    }



}



?>
Title: Re: Some Name Alteration Items
Post by: perplexed on April 06, 2007, 04:58:10 am
thanks - rub it in lol

*wishes mine would work*


update:  I tried it on my other forum and it works!   So I dont know whats wrong with the testforum though I had some problems I posted about in another thread  :D

thanks for fixing the code so that it worked after my pathetic attempt.  I have ideas but just don't know how to code lol
Title: Re: Some Name Alteration Items
Post by: David on April 06, 2007, 05:49:33 am
My pleasure...especially when I'm rubbing things in.

 I'm learning as I go as regards coding (have been for quite a few decades on quite a few programming languages...show me anyone who does any coding who isn't in the same boat) and make use of W3 schools quite a bit (especially for php)...you could do worse.

 Anyhow, had you not started the ball rolling I'd not have done some fixes so how about we share the honours?

 Glad it's working on your other forum...at least you got something out of it.
Title: Re: Some Name Alteration Items
Post by: perplexed on April 06, 2007, 06:26:19 am
ok, its a deal :)

I think I might have to reinstall my testforum from backup and start over.  It was probably working all along but the dumb forum wasnt co-operating lol

thanks again
Title: Re: Some Name Alteration Items
Post by: Craig!! on April 16, 2007, 11:34:17 pm
What do I name this and where do I put it..?

Really cool Item man!! :)
Title: Re: Some Name Alteration Items
Post by: David on April 16, 2007, 11:42:58 pm
Thanks!

 The names are in the files...the single function one is to be named Change_Font.php and the multiple function one Change_All_2.php

 You put them, like all shop items, in the "Sources/shop/items/ " directory. And use them in the same way as any other shop item. Obviously it would be wise for you to charge more for items that do more but that is for you to set up when arranging the handling of them via the shop admin screens.

 I have now made a further item that extends the functions of the Change_All_2.php by adding control over borders (a rather large selection of different borders)...the file is too big to post here and I can't add it as a zip file because this forum has attachments disabled. If you want it PM me...I may well make a fourth file giving the borders control as a single function. The new file is to be called Change_All_3.php
Title: Re: Some Name Alteration Items
Post by: Craig!! on April 18, 2007, 12:49:00 am
Ok.. thanks man!! ;D
Title: Re: Some Name Alteration Items
Post by: ShadowStriker on June 17, 2007, 01:17:31 am
they dont work
Title: Re: Some Name Alteration Items
Post by: David on June 17, 2007, 03:17:45 am
They do for me, and I'm as sure as I can be that they work for others...perplexed confirmed it for instance.
Title: Re: Some Name Alteration Items
Post by: perplexed on June 17, 2007, 09:25:35 am
They do for me, and I'm as sure as I can be that they work for others...perplexed confirmed it for instance.

yep yep yep, I have it working on my site - the version with the fonts, colours, italics, background colours etc.  It works great.

No problems at all
Title: Re: Some Name Alteration Items
Post by: David on June 17, 2007, 09:32:57 am
No problems at all

 You realise you've jinxed it now I suppose?
Title: Re: Some Name Alteration Items
Post by: ShadowStriker on June 17, 2007, 09:34:35 am
On use: "Unknown column 'shop_nameStyle' in 'field list'
File: /home/strikere/public_html/forums/Sources/shop/items/Change_Color.php
Line: 86 "
Title: Re: Some Name Alteration Items
Post by: perplexed on June 17, 2007, 09:36:42 am
No problems at all

 You realise you've jinxed it now I suppose?

nope  I have faith :)


On use: "Unknown column 'shop_nameStyle' in 'field list'
File: /home/strikere/public_html/forums/Sources/shop/items/Change_Color.php
Line: 86 "

did you install that css item thingy first as you need that installed for this one to work?  or have a search under 'unknown column shop_nameStyle' here  eg http://www.daniel15.com/forum/index.php/topic,677.msg3608.html#msg3608
Title: Re: Some Name Alteration Items
Post by: David on June 17, 2007, 09:42:42 am
Precisely right Perplexed...it's stated quite clearly in the first post of this topic and the error reported by ShadowStriker has been reported before with the same diagnosis too...

@ ShadowStriker

 Really I don't mean to be unkind but please read all of the topic before reporting an error or saying a product doesn't work...the chances are that more often than not your problem will have been resolved before for somebody else and the answer will be in the past postings as in this case.
Title: Re: Some Name Alteration Items
Post by: ShadowStriker on June 17, 2007, 09:45:19 am
yes I'm sry, it works on use, but now (Only tried it with bold) I tested it and my name is not bold.
Title: Re: Some Name Alteration Items
Post by: David on June 17, 2007, 09:47:35 am
Exactly which item have you tried?
Title: Re: Some Name Alteration Items
Post by: ShadowStriker on June 17, 2007, 09:49:59 am
change the style
Title: Re: Some Name Alteration Items
Post by: David on June 17, 2007, 09:53:58 am
 I know that the change style item in the first post of this topic works properly, providing that you have the item that Perplexed pointed you to installed as well...it's been downloaded and used by a lot of members here with no unresolved problems outstanding for it. Have you now installed that item?

Display name CSS item http://www.dansoftaustralia.net/downloads/file/20/Display-Name-CSS-Item.html (http://www.dansoftaustralia.net/downloads/file/20/Display-Name-CSS-Item.html)
Title: Re: Some Name Alteration Items
Post by: David on June 17, 2007, 09:58:39 am
nope&nbsp; I have faith :)

 Are you putting her up for ransom?
Title: Re: Some Name Alteration Items
Post by: ShadowStriker on June 17, 2007, 10:11:43 am
I just downloaded this one: http://www.leaderless.net/tp-downloads/DisplayNameCSS_Item_0.1fix.tar.gz is it right?
Title: Re: Some Name Alteration Items
Post by: David on June 17, 2007, 10:25:32 am
No...use the link I gave you above...you want     Shop Item: Change Display Name CSS      1.0

BTW you would be best advised to get Daniels own products from this site or from the SMF Mods or Themes sites as elsewhere you may get out of date versions.
Title: Re: Some Name Alteration Items
Post by: ShadowStriker on June 17, 2007, 10:27:09 am
download doesnt work
Title: Re: Some Name Alteration Items
Post by: David on June 17, 2007, 10:29:56 am
OK I'll attach it below.

N.B install it via the package manager as you would with any other mod.
Title: Re: Some Name Alteration Items
Post by: fuelthescene on August 15, 2007, 03:23:17 am
I installed the display name css file, but when I try to install the actual NameAlterations.zip file in the package manager, it tells me this.

The package you tried to upload either is not a valid package or has become corrupted.

What am I doing wrong?
Title: Re: Some Name Alteration Items
Post by: David on August 15, 2007, 03:32:17 am
IWhat am I doing wrong?

 Most everything really...

 The NameAlterations zip file isn't an installation package at all so the package manager won't handle it. You unpack it on your local machine then put the items into the shop items directory just like any other items.
Title: Re: Some Name Alteration Items
Post by: doon on August 22, 2007, 09:52:51 am
Installing this package will perform the following actions:                  Type Action Description
1. Extract File ./Sources/shop/items/ChangeDisplayNameCSS.php 
2. Extract File ./Sources/shop/items/ResetDisplayNameCSS.php 
3. Execute Modification ./Sources/Load.php                             Test failed  
4. Execute Modification ./Sources/MessageIndex.php              Test failed

5. Execute Modification ./Sources/BoardIndex.php                         Test successful
6. Execute Code installScript.php   


please help
Title: Re: Some Name Alteration Items
Post by: David on August 22, 2007, 10:23:12 am
Another mod you have installed has already edited the files that show fails you thus need to do a manual installation of this mod. Please read:

http://docs.simplemachines.org/index.php?topic=402.msg531#msg531 (http://docs.simplemachines.org/index.php?topic=402.msg531#msg531)

http://www.simplemachines.org/community/index.php?topic=34526.0 (http://www.simplemachines.org/community/index.php?topic=34526.0)

The following may also prove helpful:

http://modparser.dev.dansoftaustralia.net/ (http://modparser.dev.dansoftaustralia.net/)
Title: Re: Some Name Alteration Items
Post by: doon on August 22, 2007, 02:26:11 pm
Another mod you have installed has already edited the files that show fails you thus need to do a manual installation of this mod. Please read:

http://docs.simplemachines.org/index.php?topic=402.msg531#msg531 (http://docs.simplemachines.org/index.php?topic=402.msg531#msg531)

http://www.simplemachines.org/community/index.php?topic=34526.0 (http://www.simplemachines.org/community/index.php?topic=34526.0)

The following may also prove helpful:

http://modparser.dev.dansoftaustralia.net/ (http://modparser.dev.dansoftaustralia.net/)


ok ... when i try to install this mod manually

the only thing was on my webpage was this

Parse error: syntax error, unexpected '.', expecting ')' in /home/chillpar/public_html/Sources/Load.php on line 1022


ok i uploaded my
load.php
boardindex.php
messageindex.php

files... if anyone can help me out .... i will be very thankfull to him/her

Thankzzz
Title: Re: Some Name Alteration Items
Post by: doon on September 20, 2007, 09:37:32 am
okay i need help here ..... i set a background colour to my display name via dis mod ..... but i dun like that background any more ... and i dun want to hav any backgraound colour .....


how do you remove that backgroud colour ?????????


please help
Title: Re: Some Name Alteration Items
Post by: David on September 20, 2007, 09:58:19 am
Just use the Reset display name CSS item...I'll add it to this posting to save you work finding it...add it to the shop as you would any item and allow it to be bought as required.
Title: Re: Some Name Alteration Items
Post by: shelikesrain on September 20, 2007, 06:57:25 pm
Hey guys,

I'm getting confused here. So, I've installed "Change Display Name CSS 1.0", but how do I upload the new name alteration styles you've posted? When I try adding the file as a .zip, I get this error:

The package you tried to upload either is not a valid package or has become corrupted.

When I try to zip the files individually and upload it, that doesn't work either (displays the same error as above).

I also noticed another problem. After installing the Change Display Name CSS, it overrides the current colour styles for existing membergroups. Can this be prevented?

What should I do? Thanks~
Title: Re: Some Name Alteration Items
Post by: David on September 20, 2007, 07:52:16 pm
Unzip any name alteration packs...take the individual name alteration files and,  via ftp, put them in forum root/sources/shop/items and any images for them in forum root/sources/shop/item_images then install them via ACP in the shop add/edit/delete items.
Title: Re: Some Name Alteration Items
Post by: shelikesrain on September 21, 2007, 08:47:56 am
ok, I've tried that, but it doesn't appear in the shop to be edited or anything.

Would you know how to stop this mod from overriding membergroup colors by any chance as well?
Title: Re: Some Name Alteration Items
Post by: David on September 21, 2007, 09:22:38 am
Firstly new items won't appear in  the shop unless you install them via the ACP...just adding them to the right directories is only the start of the process.

 You can't restrict the items by membergroup unless you use the permissions system to block specific membergroups from access to the shop entirely.
Title: Re: Some Name Alteration Items
Post by: voyager on September 23, 2007, 07:59:24 am
I downloaded the large zip file of them, and tried downloading it in the package manager, did I do something wrong? It said invalid file.
Title: Re: Some Name Alteration Items
Post by: David on September 23, 2007, 08:36:26 am
Yes...they aren't a mod package. The files are individual items for the shop. Please read the earlier questions and replies in this topic where the details of how to use them have been given already.
Title: Re: Some Name Alteration Items
Post by: voyager on September 23, 2007, 08:58:27 am
It would be much easier for you to just tell me how though, and come on, there are 6 pages of this thread, and I already have a headache.
Title: Re: Some Name Alteration Items
Post by: David on September 23, 2007, 09:22:35 am
So you couldn't even read this (the previous) page where it is answered and expect me to do it all for you?
Title: Re: Some Name Alteration Items
Post by: voyager on September 23, 2007, 09:47:06 am
Ok I saw the post that you meant, but where do I put the files once I unzip them?
Title: Re: Some Name Alteration Items
Post by: David on September 23, 2007, 09:51:53 am
On that page I answered exactly that twice! Please see reply #62 and reply #69.
Title: Re: Some Name Alteration Items
Post by: Lily Flor on October 08, 2007, 02:59:42 am
How do I get to the shop administration??? U can't see where to go, I wanted to add more items but I justo don't know how :(  :'(
someone please!! help me!
Title: Re: Some Name Alteration Items
Post by: David on October 08, 2007, 03:42:32 am
Firstly if you are using a custom theme the mod, like almost all mods, needs to be edited into it manually. In the default theme go to ACP and all the shop settings are listed under "Shop Administration" If you can't see them there then either the mod didn't install for you at all or you have your forum language wrongly set...if that is the case go to ACP>Server Settings and set your forum language to English and not English utf8. If the mod doesn't show at all them check following the preocedure of a manual install that the files it needs to edit are indeed edited and the files it needs to add have been added...the following links should help:

Please read:

http://docs.simplemachines.org/index.php?topic=402.msg531#msg531 (http://docs.simplemachines.org/index.php?topic=402.msg531#msg531)

http://www.simplemachines.org/community/index.php?topic=34526.0 (http://www.simplemachines.org/community/index.php?topic=34526.0)

The following may also prove helpful:

http://modparser.dev.dansoftaustralia.net/ (http://modparser.dev.dansoftaustralia.net/)

Mirror of the last link:

http://www.smfhacks.com/smf-package-parser.html (http://www.smfhacks.com/smf-package-parser.html)


 Add and edit as needed to complete an installation.

 To add items you need to go, via ftp, to your forum root>Sources>shop>items directory and add the items you want to add to that directory...add images for them to forum root>Sources>shop>item_images

 Once added there they can be accessed via ACP>Shop Administration>Add Edit Delete Items and installed into your forum.

Title: Re: Some Name Alteration Items
Post by: Lily Flor on October 08, 2007, 09:24:02 am
I found it... sorry I read somewhere else that you must be sign in as a administrator to see the Shop Administration... so now I see it... thanks ;)
Title: Re: Some Name Alteration Items
Post by: voyager on November 20, 2007, 09:07:03 am
Since my shop reset itself yesterday, which really, well, sucked, I was wondering where the thread was that said something about only showing the alterations on the boards and topics with posts, and not on the forum index.
Title: Re: Some Name Alteration Items
Post by: eugeniu on December 26, 2007, 04:03:02 am
Ugh...I knew how to do this a long time ago...but now I forgot. Is there any shop item that lets you reset the styles of your name? Or a mod that lets you do that? I'm in desperate need...
Title: Re: Some Name Alteration Items
Post by: David on December 26, 2007, 04:33:58 am
Reset display name style/CSS shop item...attached below (in a zip file so as to be able to post it here.)
Title: Re: Some Name Alteration Items
Post by: KnottyMars on January 25, 2009, 02:35:50 am
Great mod daniel thanks for the work. Ive installed everything and it working like a champ O0

The additional files that I uploaded to /sources/shop/items make the entries show up in the add/edit/delete portion of the shop, but when I select next, I see no options to select the style/color. It just shows the item price, qty, title and desc.

Should I be doing anything special to get the choices for these items to show? I downloaded the files from the original post (NameAlerations.zip) and I do have the DisplayNameCSS installed and its working fine.

On a side note, its kinda funny to see how many times people ask the same exact question lol.  ;D
Title: Re: Some Name Alteration Items
Post by: WBADude on April 05, 2009, 02:09:43 am
Thanks

Great mod  :)
Title: Re: Some Name Alteration Items
Post by: steve51184 on February 08, 2010, 02:30:24 pm
does this work on smf 2.0 rc2?
Title: Re: Some Name Alteration Items
Post by: steve51184 on August 22, 2010, 08:01:22 am
6.5 month bump ;)
Title: Re: Some Name Alteration Items
Post by: Shishikabob on February 02, 2011, 01:25:51 pm
I can answer for you that it does not work on 2.0.  I tried to do the edits manually but the install script wouldn't run anyway.
Title: Re: Some Name Alteration Items
Post by: hcfwesker on November 17, 2011, 12:51:33 pm

 Display Name CSS (http://www.dansoftaustralia.net/downloads/file/20/Display-Name-CSS-Item.html)

Does anyone know where to get this download.  the download on the site is only for the change CSS shop item.