1
General SMFShop Discussion / Re: Some Ideas I'm kicking around...
« on: March 24, 2007, 12:21:47 pm »
"2. Rob the Bank item."
We already have that one?
We already have that one?
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.
<?php
/**********************************************************************************
* SMFShop item *
***********************************************************************************
* SMFShop: Shop MOD for Simple Machines Forum *
* =============================================================================== *
* Software Version: SMFShop 3.0 (Build 12) *
* $Date:: 2007-01-18 19:26:55 +1100 (Thu, 18 Jan 2007) $ *
* $Id:: ChangeOtherTitle.php 79 2007-01-18 08:26:55Z 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_ChangeOtherMessage extends itemTemplate
{
function getItemDetails()
{
$this->authorName = 'Max';
$this->authorWeb = 'http://TheGaff.net/Forums';
$this->authorEmail ='webmaster@thegaff.net';
$this->name = 'Change Other Member\'s Display Name';
$this->desc = 'Change someone else\'s Display Name';
$this->price = 300;
$this->require_input = true;
$this->can_use_item = true;
}
function getUseInput()
{
global $context, $scripturl, $settings, $txt;
return 'User\'s name: <input type="text" name="username" size="50" />
<a href="' . $scripturl . '?action=findmember;input=username;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 />
New Display Name: <input type="text" name="newdisplayname" size="50" />';
}
function onUse()
{
global $db_prefix;
if (!isset($_POST['username']))
die('ERROR: Please enter a username!');
if (!isset($_POST['newdisplayname']))
die('ERROR: Please enter a new display name!');
// This code from PersonalMessage.php5. It trims the " characters off the membername posted,
// and then puts all names into an array
$_POST['username'] = strtr($_POST['username'], array('\\"' => '"'));
preg_match_all('~"([^"]+)"~', $_POST['username'], $matches);
$userArray = array_unique(array_merge($matches[1], explode(',', preg_replace('~"([^"]+)"~', '', $_POST['username']))));
// We only want the first memberName found
$user = $userArray[0];
$result = db_query("
UPDATE {$db_prefix}members
SET realName = '{$_POST['newdisplayname']}'
WHERE memberName = '$user'", __FILE__, __LINE__);
return 'Successfully changed ' . $user . '\'s Personal name to ' . $_POST['newdisplayname'];
}
}
?>
Exactly, I'm sure it's very possibleas in?
I think he means, if you give a name, you earn a few credits. Then again, anyone can give a name.
I could but I'm not sure how that would help :p
No problems here. My default skin is renamed and everything and I now use the WoW Theme by StormLrd.
And I can view the pets.
Maybe xfollowthereaperx can post a screenshot of a user profile?
actually no...it seems to be working fine on my forum...let me attach my version and see if that fixes it for you...just remember to change the board number in the code for the itemThanks so much
You need to have the default skin. If you don't--just look at the profile.template file for the default skin and manually apply the same changes to your skin.Im not sure if you're talking to me but I just looked at my default skin and it didn't have view pets
Whose forum has it?I'm a little confused with all the codes going around and I'd like to use some of the new things like viewing people's pets
Ya dont have to code dude. You van view peoples pets bij clikcing on their forum name en clicking on the "view pet" link beneath their profile.