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 - chadk

Pages: 1 [2] 3 4 5
16
Items / Re: Item: Egg your victims avatar
« on: October 23, 2006, 12:00:52 am »
I tried egging someone else with a .png and it didn't work so now I'm really confused.
If you want, I can create you an account and give you a buttload of credits for the shop
In the smf_members table, .. a couple examples:
Old Site Avatars/11.gif
egged/egged_Toni.png

I'm not sure what you mean by question 1 "how is that displayed in the profile area"

17
Items / Re: Item: Egg your victims avatar
« on: October 22, 2006, 11:52:17 pm »
t3 said her avatar was a .GIF and she's put the gif back so you can see what I tried egging.

18
Items / Re: Item: Egg your victims avatar
« on: October 22, 2006, 11:48:09 pm »
Strange. I uploaded a new JPG avatar for myself.
I egged my new avatar.
It reverted my avatar to my previous avatar that was painted.
Strange...

It looks like it couldn't over-write my previously egged avatar.  See screenshot of my profile page, the cat crossbones was the new jpg I chose, then I tried egging it.  The smiley face is my old avatar that I egged already.



19
Items / Re: Item: Egg your victims avatar
« on: October 22, 2006, 11:45:31 pm »
it worked on my avatar which was a .gif

20
Items / Re: Item: Egg your victims avatar
« on: October 22, 2006, 11:43:08 pm »
her avatar is just gone now..

22
Items / Re: Item: Egg your victims avatar
« on: October 22, 2006, 11:38:33 pm »
hmmm well it worked for a .png avatar but it erased someone elses. I didn't check to see what type it was before I tested it.. asking her now.

The image doesn't break on the preview, it just never shows the preview of the paint or the kiss. 
I don't use the taunt feature because I make my users buy the Custom Title if they want to do that... ;)

23
Items / Re: Item: Egg your victims avatar
« on: October 22, 2006, 11:28:10 pm »
Yes, that one worked Feeble, but when you're using the item and you change from Egg to Paint or something, it doesn't update the Egg preview image.

24
Items / New Item: Buy Membergroup
« on: October 22, 2006, 11:23:33 pm »
Save as Sources\shop\items\BuyMembergroup.php
Look for :
/////////////NOTICE  change the following ID or your item will fail.
$shophistoryID=98;//Set this to 0 if you don't have a shop history forum

and edit the 98 to your own shop history forum ID, if you don't use this feature, edit it to 0.
Enjoy.


Code: [Select]
<?php
/**********************************************\
| SMFSHOP (Shop MOD for Simple Machines Forum) |
|         (c) 2005 DanSoft Australia           |
|      http://www.dansoftaustralia.com/        |
\**********************************************/

//File: BuyMembergroup.php
//      Item

//VERSION: 1.0 (Build 1)
//DATE: Oct 22, 2006
//Author Chad

class item_BuyMembergroup extends itemTemplate {
    function 
getItemDetails() {
    
$this->authorName "Chad";

$this->authorWeb "http://www.aviary.info/";

$this->authorEmail "generalchad@gmail.com";

        
$this->name "Buy Membergroup";
        
$this->desc "Allows you to buy your way into a membergroup!";
        
$this->price 250;

        
$this->require_input false;
        
$this->can_use_item true;
    }
    
function 
getAddInput() {
global $db_prefix$item_info;

            
$result db_query("SELECT groupName 
                                FROM 
{$db_prefix}membergroups"__FILE____LINE__);
            
$row mysql_fetch_array($resultMYSQL_ASSOC);

while (
$row mysql_fetch_array($resultMYSQL_NUM)) {
   
$groups.=("<OPTION id='x{$i}' value='{$row[0]}'>{$row[0]}");
   
$i++; 
}
           
return "Which Membergroup ID do you want to grant users access to?: <SELECT name='info1'>{$groups}</SELECT>";

}


    function 
onUse() {
        global 
$db_prefix$ID_MEMBER$item_info$user$sourcedir;

/////////////NOTICE  change the following ID or your item will fail.
$shophistoryID=98;//Set this to 0 if you don't have a shop history forum

//Begin Shop history
if ($shophistoryID) {
require_once($sourcedir '/Subs-Post.php');
$topicOptions['board'] = $shophistoryID//SHOP history forum
$topicOptions['id']=0//NEW topic
$msgOptions['subject'] = "I just bought my way into the {$item_info[1]} membergroup!"//Subject
$msgOptions['body'] = "Yep!"
$posterOptions['id']=$ID_MEMBER//Current user's ID
createPost(&$msgOptions, &$topicOptions, &$posterOptions); //create the post using the SMF posting function
}
//End Shop history

$groupID=mysql_fetch_array(db_query("SELECT `ID_GROUP` FROM {$db_prefix}membergroups WHERE groupName = '{$item_info[1]}'"__FILE____LINE__),MYSQL_ASSOC);
$additionalGroups mysql_fetch_array(db_query("SELECT `additionalGroups` FROM {$db_prefix}members WHERE ID_MEMBER = {$ID_MEMBER}"__FILE____LINE__),MYSQL_ASSOC);

if(
$additionalGroups['additionalGroups']) {
$additionalGroups['additionalGroups'] = $additionalGroups['additionalGroups'].", ".$groupID['ID_GROUP'];
} else {
$additionalGroups['additionalGroups'] = $groupID['ID_GROUP'];
}

echo 
$groupID['ID_GROUP'].":";
echo 
$additionalGroups['additionalGroups'];          
        
$result db_query("UPDATE {$db_prefix}members SET additionalGroups = '{$additionalGroups['additionalGroups']}'
         WHERE ID_MEMBER=
{$ID_MEMBER}",__FILE____LINE__);

        return 
"You're in the new group, {$item_info[1]}!!";
    }
}
?>

25
Items / Re: Item: Egg your victims avatar
« on: October 22, 2006, 11:15:50 pm »
feeble: lol I just downloaded v2, let me get v3 and try it

26
Here you go, don't say we never did anything for you ;)
Save the file as "BuyMembergroup.php" in your Sources\shop\items directory.
Pay attention to the line: "$shophistoryID=98;//Set this to 0 if you don't have a shop history forum"  You need to mark this 98 as a 0 if you don't use the ShowHistory forum.. if you don't know what that is, make this a 0. ;)

http://www.daniel15.com/forum/index.php/topic,369.new.html

27
Items / Re: Item: Egg your victims avatar
« on: October 22, 2006, 10:50:41 pm »
Line 59 in version 2:
global $context, $scripturl, $settings, $txt, $de_prefix, $eggSelect, $item_info;
Shouldn't that be $db_prefix?  what's $de_prefix?
Though actually, you don't use any of those globals in that function so you only need:
global $item_info, $eggSelect;


29
You could easily write this.  Give me an hour and I'll be back with this item for you.


lol this took longer than I thought (editted 10 minutes to 1 hour).  Oh well, it was fun.

30
Items / Re: Item: Egg your victims avatar
« on: October 22, 2006, 08:26:46 am »
Still not working.  I have GD installed, I have the egged folder in the /avatars/ directory and it's 0777.  I receive no errors when installing the item or when using the item and it reports "Successfully egged <username whoever it was>".
But when I look at the user's profile, they no longer have an avatar and the EGGED directory is empty.

Pages: 1 [2] 3 4 5