Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Daniel15

Pages: 1 [2] 3 4 ... 72
16
General SMFShop Discussion / Re: CronJob: How To?
« on: March 22, 2008, 11:51:30 am »
If that doesn't work, grab the script from http://www.daniel15.com/forum/index.php/topic,31.0.html, give it a random name like dointerest2342351.php (so other members can't run it), then put it in your forum's directory. In the "define file to run" box, enter in the name of the file.

17
Completed Requests / Re: I need shop bottons to Dilber MC
« on: March 22, 2008, 11:47:08 am »
Please search in the future; this has already been done. Take a look at http://www.daniel15.com/forum/index.php/topic,342.0.html

18
General SMFShop Discussion / Re: Bug you Forum
« on: March 22, 2008, 11:45:17 am »
Uh, no, you haven't... SMF is secure :P
Keeping this just for fun :P

19
Installation Problems / Re: Installation not working
« on: March 22, 2008, 11:44:42 am »
Are you sure the path is correct? It needs to be the same path as the one you use in your FTP client (usually something like /httpdocs/forum or /www/forum/ or similar).

20
Requested additions / Re: Altering the steal item.
« on: February 15, 2008, 10:58:12 am »
Change your Sources/shop/items/Steal.php file to this:
Code: [Select]
<?php
/**********************************************************************************
* SMFShop item                                                                    *
***********************************************************************************
* SMFShop: Shop MOD for Simple Machines Forum                                     *
* =============================================================================== *
* Software Version:           SMFShop 3.0 (Build 12)                              *
* $Date:: 2007-02-03 11:53:31 +1100 (Sat, 03 Feb 2007)                          $ *
* $Id:: Steal.php 95 2007-02-03 00:53:31Z daniel15                              $ *
* Software by:                DanSoft Australia (http://www.dansoftaustralia.net/)*
* Copyright 2005-2007 by:     DanSoft Australia (http://www.dansoftaustralia.net/)*
* Support, News, Updates at:  http://www.dansoftaustralia.net/                    *
*                                                                                 *
* Forum software by:          Simple Machines (http://www.simplemachines.org)     *
* Copyright 2006-2007 by:     Simple Machines LLC (http://www.simplemachines.org) *
*           2001-2006 by:     Lewis Media (http://www.lewismedia.com)             *
***********************************************************************************
* This program is free software; you may redistribute it and/or modify it under   *
* the terms of the provided license as published by Simple Machines LLC.          *
*                                                                                 *
* This program is distributed in the hope that it is and will be useful, but      *
* WITHOUT ANY WARRANTIES; without even any implied warranty of MERCHANTABILITY    *
* or FITNESS FOR A PARTICULAR PURPOSE.                                            *
*                                                                                 *
* See the "license.txt" file for details of the Simple Machines license.          *
* The latest version of the license can always be found at                        *
* http://www.simplemachines.org.                                                  *
**********************************************************************************/

if (!defined('SMF'))
die('Hacking attempt...');

class 
item_Steal extends itemTemplate
{
function getItemDetails()
{
$this->authorName 'Daniel15';
$this->authorWeb 'http://www.dansoftaustralia.net/';
$this->authorEmail 'dansoft@dansoftaustralia.net';

$this->name 'Steal Credits';
$this->desc 'Try to steal credits from another member!';
$this->price 50;

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

function getUseInput()
{
global $context$scripturl$settings$txt;
return '
Steal From: <input type="text" name="stealfrom" id="membername" size="50" />
<a href="' 
$scripturl '?action=findmember;input=membername;quote=0;sesc=' $context['session_id'] . '" onclick="return reqWin(this.href, 350, 400);"><img src="' $settings['images_url'] . '/icons/assist.gif" border="0" alt="' $txt['find_members'] . '" /> Find Member</a><br />';
}

function onUse()
{
global $db_prefix$ID_MEMBER;

// Check some inputs
if (!isset($_POST['stealfrom']) || $_POST['stealfrom'] == '') die('ERROR: Please enter a username to steal from!');

// This code from PersonalMessage.php. It trims the " characters off the membername posted, 
// and then puts all names into an array
$_POST['stealfrom'] = strtr($_POST['stealfrom'], array('\\"' => '"'));
preg_match_all('~"([^"]+)"~'$_POST['stealfrom'], $matches);
$userArray array_unique(array_merge($matches[1], explode(','preg_replace('~"([^"]+)"~'''$_POST['stealfrom']))));

// We only want the first memberName found
$user $userArray[0];

// Get stealee's (person we're stealing from) money count
$result db_query("
SELECT money
FROM 
{$db_prefix}members
WHERE memberName = '
{$user}'"__FILE____LINE__);

// If user doesn't exist
if (mysql_num_rows($result) == 0)
die('ERROR: The specified user doesn\'t exist!');

$row mysql_fetch_assoc($result);

// Get random amount between 0 and amount of money stealee has
$steal_amount mt_rand(0$row['money']);

// Take this money away from stealee...
$result db_query("
UPDATE 
{$db_prefix}members
SET money = money - 
{$steal_amount}
WHERE memberName = '
{$user}'
LIMIT 1"
__FILE____LINE__);
//...and give to stealer (robber)
$result db_query("
UPDATE 
{$db_prefix}members
SET money = money + 
{$steal_amount}
WHERE ID_MEMBER = 
{$ID_MEMBER}
LIMIT 1"
__FILE____LINE__);

// If reducing Karma doesn't work, replace
// 'karmaBad = karmaBad + 10' with 'karmaGood = karmaGood - 10'
$result db_query("
UPDATE 
{$db_prefix}members
SET karmaBad = karmaBad + 15
WHERE ID_MEMBER = 
{$ID_MEMBER}"__FILE____LINE__);

if ($steal_amount 50)
return 'Steal successful, although you only stole ' $steal_amount '!';
else
return 'Successfully stole ' $steal_amount ' from ' $user '! It\'s their fault they don\'t have their money in the bank!';
}
}

?>


21
Installation Problems / Re: Shop misreading CHMODS
« on: February 15, 2008, 10:53:30 am »
Quote
shows text "No such file or directory", but I know that the directory is there!
Make sure the path is correct. it should look something like eg:
/public_html/.....
or
/httpdocs/....

And not like eg:
/home/......./public_html/
/var/www/vhosts/....../httpdocs

22
Installation Problems / Re: Help Install ApolloBB Shop Button
« on: February 15, 2008, 08:32:28 am »
Attached is the edited file, upload this one and you should have a "shop" link in the menu bar :)

23
Requested additions / Re: Credits can be minus
« on: February 15, 2008, 08:12:30 am »
Please run this SQL query in phpMyAdmin (on the "SQL" tab):
Code: [Select]
ALTER TABLE `smf_members` CHANGE `money` `money` DECIMAL( 9, 2 ) NOT NULL DEFAULT '0.00'Then it should let you use negative numbers :)

24
Installation Problems / Re: Help Install ApolloBB Shop Button
« on: February 15, 2008, 08:03:54 am »
Ah yeah... That error means that you didn't edit index.template.php properly, and caused an error in it. If you attach the file here, I'll edit it for you :)

25
Coding / Re: Interest Cron Job with Go Daddy
« on: February 15, 2008, 08:03:07 am »
Try this:
/usr/bin/php -q $HOME/html/emperium/forums/Sources/shop/dointerest.php" > "$HOME/html/emperium/forums/interest_log.htm

26
Coding / Re: shop button?
« on: February 15, 2008, 08:01:54 am »
I was kind a noob when I made the shop, I didn't add a text string in the normal files for it. So just do something like:
   echo '
               <li', $current_action == 'shop' ? ' id="active"' : '', '><a href="', $scripturl, '?action=shop">Shop</a></li>';

27
Completed Requests / Re: Shop button for Candy
« on: February 15, 2008, 08:00:13 am »

28
Shop Button Requests / Re: Shop Button Request for Blueace
« on: February 15, 2008, 07:58:10 am »
Hello
Do you have a copy of the ZIP file for this theme? The one on the SMF site appears to be corrupted.

29
Completed Requests / Re: Button / shop link for theme Smooth IT
« on: February 15, 2008, 07:55:08 am »
Yep, <li> tags makes it easy... No image editing needed :D

Take a look at http://www.dansoftaustralia.net/smfshop_wiki/Themes/sMooth-lt :)

30
Completed Requests / Re: Shop button for bluBlur
« on: February 15, 2008, 07:50:16 am »
Already exists: http://www.dansoftaustralia.net/smfshop_wiki/Themes/bluBlur
Please search in the future :)

Pages: 1 [2] 3 4 ... 72