Ubercms - Badge Shop

Page 1 of 2 12 LastLast
Results 1 to 25 of 35
  1. #1
    Account Upgraded | Title Enabled! Mikehunt is offline
    MemberRank
    Jun 2010 Join Date
    Look behind YouLocation
    332Posts

    Ubercms - Badge Shop

    This is my Second release, And it is probably the Best for Ubercms that I have released so Far.

    PLEASE NOTE:

    You MUST! Have your OWN! C_images directory for this to work.

    Pixel Badge Shop. (You can change between charging the buyer pixels or credits)


    Follow these steps to get YOUR shop :P

    1) Download the file -->pixelshop.rar<-- Dont trust? dont download...

    2) Run This into your Database:

    Code:
    -- phpMyAdmin SQL Dump
    -- version 3.2.4
    -- http://www.phpmyadmin.net
    --
    -- Host: localhost
    -- Generation Time: Jan 28, 2011 at 07:15 PM
    -- Server version: 5.1.41
    -- PHP Version: 5.3.1
    
    SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
    
    
    /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
    /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
    /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
    /*!40101 SET NAMES utf8 */;
    
    --
    -- Database: `hobboa`
    --
    
    -- --------------------------------------------------------
    
    --
    -- Table structure for table `badges`
    --
    
    CREATE TABLE IF NOT EXISTS `badges` (
      `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
      `badge_id` varchar(100) NOT NULL,
      `item_price` int(250) NOT NULL DEFAULT '1000',
      `end_code` varchar(120) NOT NULL DEFAULT 'gif',
      KEY `id` (`id`)
    ) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=10 ;
    
    --
    -- Dumping data for table `badges`
    --
    
    INSERT INTO `badges` (`id`, `badge_id`, `item_price`, `end_code`) VALUES
    (1, '70S', 1000, 'gif'),
    (2, 'ADM2', 1000, 'gif'),
    (3, '50S', 1000, 'gif'),
    (4, 'AC1', 10000, 'gif'),
    (5, 'AU_ACMI', 1000, 'gif'),
    (6, 'AWSM1', 1000, 'gif'),
    (7, 'BBBH2', 1000, 'gif'),
    (8, 'BE2', 1000, 'gif'),
    (9, 'BGWV2', 1000, 'gif');
    
    /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
    /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
    /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
    2.5) Now run THIS into your Database BUT DO NOT EDIT IT!!!!!!

    Code:
    -- phpMyAdmin SQL Dump
    -- version 3.2.4
    -- http://www.phpmyadmin.net
    --
    -- Host: localhost
    -- Generation Time: Jan 28, 2011 at 08:30 PM
    -- Server version: 5.1.41
    -- PHP Version: 5.3.1
    
    SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
    
    
    /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
    /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
    /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
    /*!40101 SET NAMES utf8 */;
    
    --
    -- Database: `hobboa`
    --
    
    -- --------------------------------------------------------
    
    --
    -- Table structure for table `pixel_shop`
    --
    
    CREATE TABLE IF NOT EXISTS `pixel_shop` (
      `id` int(250) NOT NULL AUTO_INCREMENT,
      `name` varchar(250) DEFAULT NULL,
      PRIMARY KEY (`id`)
    ) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ;
    
    --
    -- Dumping data for table `pixel_shop`
    --
    
    INSERT INTO `pixel_shop` (`id`, `name`) VALUES
    (1, 'Battle Banzai'),
    (2, 'Promotional furni'),
    (3, 'Exchange'),
    (4, 'Christmas Furni');
    
    /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
    /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
    /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;

    3) Now, Add this to your Htaccess

    Code:
    RewriteRule ^badgeshop$ ./badgeshop.php
    4) Add this to your CSS (IF YOU DONT HAVE A CSS FILE SEE 4.5)
    Code:
    #general_message2
    
    
    {
    
    
    	padding: 5px;
    
    
    	font-size: 10px;
    
    	margin-right: -588px;
    	float: right;
    
    	font-family: Verdana;
    
    
    	width: 738px;
    
    
    	color: #E2001A;
    
    
    	border-width: 1px;
    
    
    	border-color: #E2001A;
    
    
    	border-style: solid;
    
    
    	background-color: #FFF4F2;
    
    
    }
    
    
    .boxbadge {
    	padding:10px;
    	margin-right: 100px;
    	width:60px;
    	height:70px;
    	font-size:10px;
    	background-color:#F6F6F6;
    	border:1px dotted navy;
    }
    
    #overview_overlay_badge
    
    {
    
    
    	padding: 10px;
    
    
    	margin: 22px;
    
     	margin-right: -750px;
    
    	float: right;
    
    
    	width: 728px;
    
    
    	border-width: 1px;
    
    
    	border-color: #CCC;
    
    
    	border-style: solid;
    
    
    	background-color: #FFFFFF;
    
    
    }

    4.5) If you DONT Have a css file (WHY NOT?) doesn't matter.

    Put THE BELOW CODE at the TOP OF YOUR comp-badge.tpl file

    Code:
    <style>
    #general_message2
    
    
    {
    
    
    	padding: 5px;
    
    
    	font-size: 10px;
    
    	margin-right: -588px;
    	float: right;
    
    	font-family: Verdana;
    
    
    	width: 738px;
    
    
    	color: #E2001A;
    
    
    	border-width: 1px;
    
    
    	border-color: #E2001A;
    
    
    	border-style: solid;
    
    
    	background-color: #FFF4F2;
    
    
    }
    
    
    .boxbadge {
    	padding:10px;
    	margin-right: 100px;
    	width:60px;
    	height:70px;
    	font-size:10px;
    	background-color:#F6F6F6;
    	border:1px dotted navy;
    }
    
    #overview_overlay_badge
    
    {
    
    
    	padding: 10px;
    
    
    	margin: 22px;
    
     	margin-right: -750px;
    
    	float: right;
    
    
    	width: 728px;
    
    
    	border-width: 1px;
    
    
    	border-color: #CCC;
    
    
    	border-style: solid;
    
    
    	background-color: #FFFFFF;
    
    
    }
    </style>

    Here are the images of the shop in action (IN ORDER)

    Code:
    This is the HK editing (The Badge at the bottom will be brought)
    (Yes. I know this is just an edit of User badges, but it seemed easier that way)
    
    
    
    
    This is BEFORE buying the badge (Bottom left)
    
    
    
    
    This is AFTER buying the badge (Notice the pixels have decreased)
    
    
    
    
    This shows the Badge has been successfully added to user_badges
    
    
    
    
    This shows the badge in-game
    
    

    Remember to thank me if you liked it :P



    I give NO credits to anybody but myself, as I designed/coded it.




    EDIT!!!

    For fixing the issue of being able to buy without pixels, or getting minus pixels when buying to many,

    This fix makes it so once you hit 0 pixels, or if you just dont have enough to buy the badge, it wont give it to you, and wont remove any of your pixels.


    Code:
    Look for 
    
    // Subtract the coins from the user like a foo does to a foo foo
    
    in the purchasebadge.php file
    
    Add THIS BELOW it.
    
    $h = dbquery("SELECT item_price FROM badges");
    $usercred = dbquery("SELECT activity_points FROM users WHERE username='$_SESSION[UBER_USER_N]'");
    $g = $usercred - $row['item_price'];
    
    Now look for
    
    $tt = dbquery("SELECT * FROM users WHERE username='$_SESSION[UBER_USER_N]'");
    
    And Replace That WHOLE LINE with 
    $tt = dbquery("SELECT * FROM users WHERE username='$_SESSION[UBER_USER_N]'   AND activity_points >= 'item_price'");
    THIS WONT WORK IF YOU HAVE VARYING PIXEL PRICES!

    If this helped you. Dont forget to thank me for my work XD
    Last edited by Mikehunt; 30-01-11 at 12:11 PM.


  2. #2
    Enthusiast Inesperto is offline
    MemberRank
    Jun 2010 Join Date
    32Posts

    Re: Ubercms - Badge Shop

    I'm going to test it! :-P

    PS= First post!

  3. #3
    Account Upgraded | Title Enabled! Mikehunt is offline
    MemberRank
    Jun 2010 Join Date
    Look behind YouLocation
    332Posts

    Re: Ubercms - Badge Shop

    Quote Originally Posted by Inesperto View Post
    I'm going to test it! :-P

    PS= First post!


    Lol.

    Hope it works for you :P

  4. #4
    Account Upgraded | Title Enabled! taylan is offline
    MemberRank
    Feb 2009 Join Date
    GermanyLocation
    336Posts

    Re: Ubercms - Badge Shop

    i got the following error:
    "Pixelshop doesnt exists"

    Can u post the SQL Code for Pixelshop pls ;)

  5. #5
    Account Upgraded | Title Enabled! Mikehunt is offline
    MemberRank
    Jun 2010 Join Date
    Look behind YouLocation
    332Posts

    Re: Ubercms - Badge Shop

    Quote Originally Posted by taylan View Post
    i got the following error:
    "Pixelshop doesnt exists"

    Can u post the SQL Code for Pixelshop pls ;)

    Pixelshop doesnt exist?

    If you mean Pixel_shop

    Sure :P

    Code:
    -- phpMyAdmin SQL Dump
    -- version 3.2.4
    -- http://www.phpmyadmin.net
    --
    -- Host: localhost
    -- Generation Time: Jan 28, 2011 at 08:30 PM
    -- Server version: 5.1.41
    -- PHP Version: 5.3.1
    
    SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
    
    
    /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
    /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
    /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
    /*!40101 SET NAMES utf8 */;
    
    --
    -- Database: `hobboa`
    --
    
    -- --------------------------------------------------------
    
    --
    -- Table structure for table `pixel_shop`
    --
    
    CREATE TABLE IF NOT EXISTS `pixel_shop` (
      `id` int(250) NOT NULL AUTO_INCREMENT,
      `name` varchar(250) DEFAULT NULL,
      PRIMARY KEY (`id`)
    ) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ;
    
    --
    -- Dumping data for table `pixel_shop`
    --
    
    INSERT INTO `pixel_shop` (`id`, `name`) VALUES
    (1, 'Battle Banzai'),
    (2, 'Promotional furni'),
    (3, 'Exchange'),
    (4, 'Christmas Furni');
    
    /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
    /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
    /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;

    You just need to Run this in your Database.
    Dont bother editing it :P

  6. #6
    Apprentice HotelHb is offline
    MemberRank
    Jan 2011 Join Date
    12Posts

    Re: Ubercms - Badge Shop

    What css and where is it?

  7. #7
    Account Upgraded | Title Enabled! taylan is offline
    MemberRank
    Feb 2009 Join Date
    GermanyLocation
    336Posts

    Re: Ubercms - Badge Shop

    Thank u , worked....
    Which CSS File should i add the code ?
    How is the CSS File called?
    Answer pls ;)

  8. #8
    Account Upgraded | Title Enabled! Mikehunt is offline
    MemberRank
    Jun 2010 Join Date
    Look behind YouLocation
    332Posts

    Re: Ubercms - Badge Shop

    Quote Originally Posted by taylan View Post
    Thank u , worked....
    Which CSS File should i add the code ?
    How is the CSS File called?
    Answer pls ;)


    Instead of adding the CSS File, Just put this AT THE VERY TOP OF THE comp-badge.tpl


    Code:
    <STYLE>
    
    #general_message2
    
    
    {
    
    
    	padding: 5px;
    
    
    	font-size: 10px;
    
    	margin-right: -588px;
    	float: right;
    
    	font-family: Verdana;
    
    
    	width: 738px;
    
    
    	color: #E2001A;
    
    
    	border-width: 1px;
    
    
    	border-color: #E2001A;
    
    
    	border-style: solid;
    
    
    	background-color: #FFF4F2;
    
    
    }
    
    
    
    
    
    
    .boxbadge {
    	padding:10px;
    	margin-right: 100px;
    	width:60px;
    	height:70px;
    	font-size:10px;
    	background-color:#F6F6F6;
    	border:1px dotted navy;
    }
    
    
    #overview_overlay_badge
    
    {
    
    
    	padding: 10px;
    
    
    	margin: 22px;
    
     	margin-right: -750px;
    
    	float: right;
    
    
    	width: 728px;
    
    
    	border-width: 1px;
    
    
    	border-color: #CCC;
    
    
    	border-style: solid;
    
    
    	background-color: #FFFFFF;
    
    
    }
    </STYLE>

  9. #9
    Account Upgraded | Title Enabled! taylan is offline
    MemberRank
    Feb 2009 Join Date
    GermanyLocation
    336Posts

    Re: Ubercms - Badge Shop

    Okay thank u very much bro, it worked but u should try to add a messagebox after somebody bought the badges.

    AFK coding a messagebox ....

    ---------- Post added at 09:42 PM ---------- Previous post was at 09:40 PM ----------

    i bought a lot of badges but dont knowed that i bought it because no messages apeared like "You have buy the Badge : ADM2

  10. #10
    Account Upgraded | Title Enabled! Mikehunt is offline
    MemberRank
    Jun 2010 Join Date
    Look behind YouLocation
    332Posts

    Re: Ubercms - Badge Shop

    Quote Originally Posted by taylan View Post
    Okay thank u very much bro, it worked but u should try to add a messagebox after somebody bought the badges.

    AFK coding a messagebox ....

    ---------- Post added at 09:42 PM ---------- Previous post was at 09:40 PM ----------

    i bought a lot of badges but dont knowed that i bought it because no messages apeared like "You have buy the Badge : ADM2

    Yeah,
    If someone is generous enough to tell me how to limit someone to buying ONLY ONE.

    I can fix it...

    Or someone can put a message box on it :P

  11. #11
    Account Upgraded | Title Enabled! taylan is offline
    MemberRank
    Feb 2009 Join Date
    GermanyLocation
    336Posts

    Re: Ubercms - Badge Shop

    :S one Problem ....

    I purchased a lot of Badges and forgoted how much pixels does my acc have...
    Now my Account is -4350 Pixels.

    My Question:
    Can everybody buy all badges without to pay pixels if he has 0 pixels, because he has than -(Pixel amount) like -500 Pixels because he bought more badges and dont has any pixels more ...
    So can anybody use that as a bug ?

    Or cant i buy any badges if i have
    -4350 Pixels
    becouse i dont have enough pixels ....

    hope u can understand me , im from turkey but live currently at germany and u know thats not easy to speak English perfekt like u guys here at ragezone ... ^^
    Last edited by taylan; 28-01-11 at 09:54 PM.

  12. #12
    Account Upgraded | Title Enabled! Mikehunt is offline
    MemberRank
    Jun 2010 Join Date
    Look behind YouLocation
    332Posts

    Re: Ubercms - Badge Shop

    Quote Originally Posted by taylan View Post
    :S one Problem ....

    I purchased a lot of Badges and forgoted how much pixels does my acc have...
    Now my Account is -4350 Pixels.

    My Question:
    Can everybody buy all badges without to pay pixels if he has 0 pixels, because he has than -(Pixel amount) like -500 Pixels because he bought more badges and dont has any pixels more ...
    So can anybody use that as a bug ?

    Or cant i buy any badges if i have
    -4350 Pixels
    becouse i dont have enough pixels ....

    hope u can understand me , im from turkey but live currently at germany and u know thats not easy to have the full knowdeledge of English ^^


    Yeah, sorry.

    But Like I said, I need the code to limit it so If you dont have enough, you cannot buy it.

  13. #13
    Apprentice HotelHb is offline
    MemberRank
    Jan 2011 Join Date
    12Posts

    Re: Ubercms - Badge Shop

    When I give to buy a plate I get:

    Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started al purchasebadge.php:3) in global.php on line 28

    How to fix?

  14. #14
    Account Upgraded | Title Enabled! taylan is offline
    MemberRank
    Feb 2009 Join Date
    GermanyLocation
    336Posts

    Re: Ubercms - Badge Shop

    oh okay , hope somebody can post the code ....
    here i coded the Messagebox Script!

    add this to the End of the purchasebadge.php file
    ( At the Bottom )

    Code:
    <script type="text/javascript">
    <!--
    
    alert ("You have successfully bought the Badge .")
    
    // -->
    </script>';

  15. #15
    Account Upgraded | Title Enabled! Mikehunt is offline
    MemberRank
    Jun 2010 Join Date
    Look behind YouLocation
    332Posts

    Re: Ubercms - Badge Shop

    Quote Originally Posted by HotelHb View Post
    When I give to buy a plate I get:

    Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started al purchasebadge.php:3) in global.php on line 28

    How to fix?
    Nothing is wrong.

    That will ALWAYS appear.


    (If you havent already)

    Put this at the top of your purchasebadge file:

    <HEAD><meta http-equiv="REFRESH" content="0;url=javascript:history.go(-1)"></HEAD>

    ---------- Post added at 09:03 PM ---------- Previous post was at 09:00 PM ----------

    Quote Originally Posted by taylan View Post
    oh okay , hope somebody can post the code ....
    here i coded the Messagebox Script!

    add this to the End of the purchasebadge.php file
    ( At the Bottom )

    Code:
    <script type="text/javascript">
    <!--
    
    alert ("You have successfully bought the Badge .")
    
    // -->
    </script>';

    Frickin' Awesome :P thanks

    ---------- Post added at 09:05 PM ---------- Previous post was at 09:03 PM ----------

    Suprised PeJump2 Hasn't Flamed/Insulted the coding yet :P

  16. #16
    Enthusiast Klopser is offline
    MemberRank
    Dec 2008 Join Date
    47Posts

    Re: Ubercms - Badge Shop

    Please fix the bugg of you can buy without pixels :S

  17. #17
    Apprentice HotelHb is offline
    MemberRank
    Jan 2011 Join Date
    12Posts

    Re: Ubercms - Badge Shop

    Was already an established
    I went out this

    for desert, I'm Spanish, so Spanish media out

  18. #18
    Account Upgraded | Title Enabled! Mikehunt is offline
    MemberRank
    Jun 2010 Join Date
    Look behind YouLocation
    332Posts

    Re: Ubercms - Badge Shop

    Quote Originally Posted by HotelHb View Post
    Was already an established
    I went out this

    for desert, I'm Spanish, so Spanish media out

    Run this into your Database, BUT DONT EDIT IT.



    Code:
    -- phpMyAdmin SQL Dump
    -- version 3.2.4
    -- http://www.phpmyadmin.net
    --
    -- Host: localhost
    -- Generation Time: Jan 28, 2011 at 08:30 PM
    -- Server version: 5.1.41
    -- PHP Version: 5.3.1
    
    SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
    
    
    /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
    /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
    /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
    /*!40101 SET NAMES utf8 */;
    
    --
    -- Database: `hobboa`
    --
    
    -- --------------------------------------------------------
    
    --
    -- Table structure for table `pixel_shop`
    --
    
    CREATE TABLE IF NOT EXISTS `pixel_shop` (
      `id` int(250) NOT NULL AUTO_INCREMENT,
      `name` varchar(250) DEFAULT NULL,
      PRIMARY KEY (`id`)
    ) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ;
    
    --
    -- Dumping data for table `pixel_shop`
    --
    
    INSERT INTO `pixel_shop` (`id`, `name`) VALUES
    (1, 'Battle Banzai'),
    (2, 'Promotional furni'),
    (3, 'Exchange'),
    (4, 'Christmas Furni');
    
    /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
    /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
    /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;

  19. #19
    Account Upgraded | Title Enabled! taylan is offline
    MemberRank
    Feb 2009 Join Date
    GermanyLocation
    336Posts

    Re: Ubercms - Badge Shop

    hope somebody can fix it and post the fixed code here ... :(

  20. #20
    Account Upgraded | Title Enabled! Mikehunt is offline
    MemberRank
    Jun 2010 Join Date
    Look behind YouLocation
    332Posts

    Re: Ubercms - Badge Shop

    Quote Originally Posted by Klopser View Post
    Please fix the bugg of you can buy without pixels :S
    Its not that easy...

    You will have to wait for a while,

    Or change it over to credits (by replacing "activity_points" with "credits" in the purchasebadge.php file.

  21. #21
    Enthusiast Klopser is offline
    MemberRank
    Dec 2008 Join Date
    47Posts

    Re: Ubercms - Badge Shop

    I want pay with pixels but you can fix the bugg?

  22. #22
    swagggggg Livar is offline
    MemberRank
    Oct 2008 Join Date
    United KingdomLocation
    2,272Posts

    Re: Ubercms - Badge Shop

    Nice release, ;o are you using my edit of ubercms?

  23. #23
    Account Upgraded | Title Enabled! Mikehunt is offline
    MemberRank
    Jun 2010 Join Date
    Look behind YouLocation
    332Posts

    Re: Ubercms - Badge Shop

    Quote Originally Posted by PowahAlert View Post
    Nice release, ;o are you using my edit of ubercms?

    Yups ;P

    But Im Remaking it myself. :P

    As you can tell


    Also,
    This is going to be perhaps my final Custom release for a while, as if I am making myself a custom hotel, I want custom pages for it XD

  24. #24
    Apprentice HotelHb is offline
    MemberRank
    Jan 2011 Join Date
    12Posts

    Re: Ubercms - Badge Shop

    now I get it from the db and if the rest, but buy them anyway (;

  25. #25
    Enthusiast Klopser is offline
    MemberRank
    Dec 2008 Join Date
    47Posts

    Re: Ubercms - Badge Shop

    Please fix the bugg of pixels



Page 1 of 2 12 LastLast

Advertisement