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.


Topics - Daniel15

Pages: 1 2 3 [4] 5
46
General SMFShop Discussion / Status of SMFShop development...
« on: June 26, 2006, 12:38:54 pm »
Well, I thought I should make a post about how the development of SMFShop is going...

What's done so far:
  • Bank: Minimum deposit required
  • Fix the 'Who's Online' list so it says that people are in the shop (instead of 'Unknown Action') [as per http://www.daniel15.com/forum/index.php?topic=149 ]
  • 'Send Money' link next to people's posts (underneath the 'View Inventory' link)
  • PM Instead of email when Sending money, and in trade centre

There's still a lot I want to do, though. I'm registering the SMFShop project at SourceForge, so I'll eventually have SVN access where you can download the very latest (testing) code :)

47
This is a shop button for the classic YaBB SE theme (which some people still use :))

The file for the button is attached to this post. Please save this to Themes/classic/images/english/shop.gif

Code modifications:
Open Themes/classic/Index.template.php
Find:

	
// The [calendar]!
	
if (
$context['allow_calendar'])
	
	
echo 
'
	
	
	
	
<a href="'
$scripturl'?action=calendar">', ($settings['use_image_buttons'] ? '<img src="' $settings['images_url'] . '/' $context['user']['language'] . '/calendar.gif" alt="' $txt['calendar24'] . '" border="0" />' $txt['calendar24']), '</a>'$context['menu_separator'];


Add after:

	
// The shop
	
	
echo 
'
	
	
	
	
<a href="'
$scripturl'?action=shop">', ($settings['use_image_buttons'] ? '<img src="' $settings['images_url'] . '/' $context['user']['language'] . '/shop.gif" alt="Shop" border="0" />' "Shop"), '</a>'$context['menu_separator'];


Then, your shop button should be working :D

48
Items / 'Profile Image' item
« on: April 23, 2006, 11:45:57 am »
The 'Profile Image' item is an item for SMFShop that allows your members to show an image next to their posts. This item is a standard SMF package, so please install it using the package manager.

This item comes with a set of flag images, although you can delete the original images and use whatever image you'd like.

You may downlaod the item via the 'SMFShop Items' downloads section of the DanSoft Australia site. Have fun!

EDIT: If you'd like to get this working in other themes, here's how:
Open Themes/[themename]/Display.template.php
Find:

	
	
	
if (!empty(
$settings['show_gender']) && $message['member']['gender']['image'] != '')
	
	
	
	
echo 
'
	
	
	
	
	
	
	
	
'
$txt[231], ': '$message['member']['gender']['image'], '<br />';

Add after:

            
//BEGIN SMFShop Profile Images Item 0.1 Beta
            
global $db_prefix$boardurl;
            
$result_flag db_query("SELECT shop_Flag
                                     FROM 
{$db_prefix}members
                                     WHERE ID_MEMBER = 
{$message['member']['id']}
                                     LIMIT 1"
__FILE____LINE__);
            
$row_flag mysql_fetch_array($result_flagMYSQL_ASSOC);
            
            if(
$row_flag['shop_Flag'] !== "") {
                echo 
"Flag: <img src='{$boardurl}/Sources/shop/flag_images/{$row_flag['shop_Flag']}'><br>";
            }
            
//END SMFShop Flag Item

49
Completed Shop Buttons / Button for 'Themis' theme
« on: April 01, 2006, 03:13:58 pm »
This is the shop button code for the 'Themis' theme. I wasn't sure what image to use for the shop, so I just used the 'Home' image.

Code modifications:
Open Themes/themis/Index.template.php
Find:

        // The [calendar]!
        if ($context['allow_calendar']){
                $menu1 .= '
                                <a href="'
$scripturl'?action=calendar"><img src="' $settings['images_url'] . '/gnome/calendar.gif" alt="' $txt['calendar24'] . '" style="margin: 2px 0;" border="0" /></a>';
                $menu2 .= '  |
                                <a href="'
$scripturl'?action=calendar">'.$txt['calendar24'].'</a>';
        }



Add after:

                $menu1 .= '
                                <a href="'
$scripturl'?action=shop"><img src="' $settings['images_url'] . '/gnome/home.gif" alt="Shop" style="margin: 2px 0;" border="0" /></a>';
                $menu2 .= '  |
                                <a href="'
$scripturl'?action=shop">Shop</a>';



Make sure that you add the text AFTER the } in the calendar section.

Then, your shop button should be working :D

50
I've just been informed of a problem when trying to add items to the shop, and Joomla/Mambo is installed. The error looks something like this:
Quote
Fatal error: Cannot instantiate non-existent class: item_addtopostcount in /.................../Sources/shop/ShopAdmin.php(169) : eval()'d code on line 1

If you are getting this error, please replace your ShopAdmin.php file with the one available at http://users.tpg.com.au/dan15/smfmods/ShopAdmin.php . The SMFShop packages have been fixed, but if you downloaded SMFShop before today, you may have the ShopAdmin.php file with the error in it.

Thanks for understanding,
 --daniel15

51
Shop Button Requests / List of completed shop buttons
« on: March 17, 2006, 04:49:55 pm »
Note: This list is only kept here for historical purposes. All new buttons are now listed in the Wiki, at http://www.dansoftaustralia.net/smfshop_wiki/Themes


Here's a list of all the themes which have a shop button available for them. Please check this list before requesting a button.

A
Aa New Damage (m3talc0re)
Aero79 (Bloc)
Amber (Bloc)
Apollo (Bloc)

B
BlackTed
Blue Sapphire theme
BlueLine

C
Ceberus (Bloc)
Classic YaBB SE Theme

D
Darkness
Default Modern (m3talc0re)
Dilber Multicolour (HarzeM)

E
Epsilon (Bloc)
Enterprise (Bloc)

H
Helios Multi (Bloc)

I
Igoh RC2 (koni) - Thanks to SKETCHi

M
Mini-Black Button Set by Andrea Hubacher - Thanks to TheGamer
MNS Style

O
Oxygen (Bloc)

P
Pn-pn

S
SAF Multicolour
Silver_Shine v2 (m3talc0re)
SlickPro Graphite (m3talc0re)
SMFOne
Spikey

T
Themis

W
WoW-DK

Z
Zone99

If your theme isn't listed here, please make a request and your button will be posted here.

52
Completed Shop Buttons / Button for Blue Sapphire theme
« on: March 17, 2006, 04:40:08 pm »
This is a shop button for the 'Blue Sapphire' theme. The button is courtesy of Revolink24  :)

The file for the button is attached to this post. Please save this to Themes/[themename]/images/english/shop.gif

Code modifications:
Open Themes/[themename]/Index.template.php
Find:

// The [calendar]!
if ($context['allow_calendar'])
echo 
'
<a href="'
$scripturl'?action=calendar">', ($settings['use_image_buttons'] ? '<img src="' $settings['images_url'] . '/' $context['user']['language'] . '/calendar.gif" alt="' $txt['calendar24'] . '" style="margin: 2px 0;" border="0" />' $txt['calendar24']), '</a>'$context['menu_separator'];


Add after:

echo '
<a href="'
$scripturl'?action=shop">', ($settings['use_image_buttons'] ? '<img src="' $settings['images_url'] . '/' $context['user']['language'] . '/shop.gif" alt="Shop" style="margin: 2px 0;" border="0" />' 'Shop'), '</a>'$context['menu_separator'];


Then, your shop button should be working :D

EDIT: Fixed code

53
General SMFShop Discussion / SMFShop 2.1 now out!
« on: March 14, 2006, 11:45:41 am »
SMFShop 2.1 is now out! This release actually came out a few days ago, but this announcement was delayed due to server downtime. You can download this new version from the DanSoft Australia website at http://www.dansoftaustralia.net/

The new release fixes a few bugs, and adds a few new features, including seperating the items listing onto multiple pages. A full changelog can be found here.

54
Completed Shop Buttons / Button for ' Epsilon' (by Bloc)
« on: March 10, 2006, 06:22:47 pm »
This is a shop button for the 'Epsilon' theme by Bloc. This theme uses a text-based menu, so we don't need a shop button image  :)

Code modifications:
Open Themes/epsilon1.1rc2/index.template.php
Find:
Code: [Select]
echo '<li><a href="', $scripturl, '?action=calendar">', $txt['calendar24'], '</a></li>';
Add After:
Code: [Select]
echo '<li><a href="', $scripturl, '?action=shop">Shop</a></li>';
Your shop button should now be working!

55
General SMFShop Discussion / New SMFShop item! (Change User CSS)
« on: March 04, 2006, 03:38:56 pm »
Hi,
 I've just released a new item for SMFShop. This item is called 'Change User CSS'. Basically, this allows you to add items into your shop which allow the user's Display Name to be shown differently. For example, you can make the display name show up in a different colour, or italic, or whatever you want!

You need some basic CSS knowledge to use this item. A good site to learn basic CSS is at www.w3schools.com/css/css_examples.asp .

I hope you enjoy this new item!

--daniel15

56
Completed Shop Buttons / Button for SMFone theme
« on: March 03, 2006, 06:20:36 pm »
This is a shop button for the 'SMFone' theme by A.M.A (one of Simple Machine's Lead Graphic Designers). This theme is like the SMF 1.1RC2 default theme, in the fact that it uses text buttons. However, these buttons have small images next to them. Since I don't know what image to use, I'm just using the 'Home' button image.

Code modifications:
Open Themes/amber/index.template.php
Find:
Code: [Select]
// The [calendar]!
if ($context['allow_calendar'])
echo '
<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/calendar.gif" alt="' . $txt['calendar24'] . '" /><a class="menub" href="', $scripturl, '?action=calendar">' , $txt['calendar24'], '</a>', $context['menu_separator'];

Add After:
Code: [Select]
echo '
<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/home.gif" alt="Shop" /><a class="menub" href="', $scripturl, '?action=shop">Shop</a>', $context['menu_separator'];

Your shop button should now be working! To show the amount of credits a user has next to their posts, please see the How to get shop working in other themes topic.

57
SMFShop Announcements / How to get shop working in other themes
« on: February 17, 2006, 03:59:26 pm »
Well, if you use a theme other than the default, you'll be upset to find out that SMFShop doesn't put a shop button in that theme. Also, it doesn't display the amount of credits a user has next to posts that they make. But, don't worry! We can fix that!

The first thing to do is request a shop button. Please read the topic entitled 'How to request a Shop button for your theme', and once you have done that, make a new post in the 'Shop Button Requests' subforum. Please, read the How-to topic first!

Next, we need to edit the theme to put the amount of credits next to every post a user makes. To do so, just follow these steps:
Open /themes/[themename]/Display.template.php
Find:
Code: (php) [Select]
                        // Show how many posts they have made.
                        echo '
                                                                ', $txt[26], ': ', $message['member']['posts'], '<br />
                                                                <br />';

SMFShop 3.0 or higher, or development version (revision 37 or higher), replace with:
Code: (php) [Select]
            // BEGIN SMFShop MOD New Version Code
// Removed one <br /> from end of post count line.
echo '
', $txt[26], ': ', $message['member']['posts'], '<br />
';

echo '
', $modSettings['shopCurrencyPrefix'], $message['member']['money'], $modSettings['shopCurrencySuffix'], '<br /><br />
<a href="', $scripturl, '?action=shop;do=invother2;member=', $message['member']['username'], '">View Inventory</a><br />
<a href="', $scripturl, '?action=shop;do=sendmoney;member=', $message['member']['username'], '">Send Money to ', $message['member']['name'], '</a><br />';
//END SMFShop code

SMFShop 2.3 or lower, replace with:
Code: (php) [Select]
// Show how many posts they have made.
// echo '
// ', $txt[26], ': ', $message['member']['posts'], '<br />
// <br />';

            //BEGIN Shop MOD 0.2 Code
echo '
', $txt[26], ': ', $message['member']['posts'], '<br />
';

            //I couldn't find where all these $message['member'][whatever] variables
            //are set, so I just send an extra database query to get the member's
            //money. Can someone tell me where (file and line) the $message variables
            //are set?
            global $ID_MEMBER, $db_prefix;

            $result_money = db_query("SELECT money
                                      FROM {$db_prefix}members
                                      WHERE ID_MEMBER = {$message['member']['id']}
                                      LIMIT 1", __FILE__, __LINE__);
            $row_money = mysql_fetch_array($result_money, MYSQL_ASSOC);

            echo $modSettings['shopCurrencyPrefix'].$row_money['money'].$modSettings['shopCurrencySuffix']."<br><br>";
            //END SHOP MOD
           

//BEGIN SMFShop MOD 1.31 (Build 7) CODE
echo "<a href='$scripturl?action=shop;do=invother2;member={$message['member']['username']}'>View Inventory</a><br>";
//END SMFShop MOD 1.31 code

//BEGIN SMFShop MOD 2.2 (Build 10) code
echo "<a href='$scripturl?action=shop;do=sendmoney;member={$message['member']['username']}'>Send Money to {$message['member']['name']}</a><br />";
//END SMFShop code

Then, the amount of credits a user has, as well as a link to their inventory, will be seen next to every post they make.

If you can't find this segment of code, please make a new post here, stating the name of your theme, and a link to your forum
Thanks for reading! :D
 --daniel15

58
Completed Shop Buttons / Button for 'Helios Multi' theme (Bloc)
« on: February 17, 2006, 03:46:03 pm »
This is a shop button for the 'Helios Multi' theme by Bloc. It was made using the Bloc Zone Button Generator.

The file for the button is attached to this post. Please save this to Themes/Helios_Multi/images/shop.gif

Theme Modifications
Now, we need to add the button to the theme. First, go into your SMF Administration Panel. Click on 'Theme and Layout Settings' and then click on 'Helios Multi'.  There should be a section for additional buttons, as shown below:

The information for the button is:
Use button 1: Ticked
Path: shop.gif
Link: index.php?action=shop
Show for members only? Ticked

Then, your shop button should be working :D

59
SMFShop Announcements / Bank interest without cron job? Read this!
« on: February 10, 2006, 08:43:23 pm »
Hi,
 Unfortunately, some people don't have access to cron jobs, and therefore ask me if there's a way to add the interest without using cron jobs.

First, create a file somewhere on your website. Give it a random name, maybe something like dointerest2342351.php. This is so members of your site don't know the name of the file, and therefore can't add the interest themselves. Put the following text in the file:
Code: (php) [Select]
<?php
/**********************************************\
| SMFSHOP (Shop MOD for Simple Machines Forum) |
|         (c) 2005 DanSoft Australia           |
|      http://www.dansoftaustralia.net/        |
\**********************************************/

//File: dointerest.php
//      The file to add interest to member's bank

//VERSION: 1.31 (Build 7)
//DATE: 10th December 2005

include("/home/[username]/public_html/forum/SSI.php");

$interest_rate $modSettings['shopInterest'] / 100;
db_query("UPDATE {$db_prefix}members
SET moneyBank = moneyBank + (moneyBank*
{$interest_rate})"__FILE____LINE__);

echo 
"Interest added at ".date("d/m/Y h:i:s A");
?>


Replace '/home/[username]/public_html/forum/' with the absolute URL of the forum. This can be found by going to SMF Admin Panel --> Edit Server Settings --> SMF Directory. It will look something like '/home/username/public_html/forum'.

Next, we use a utility that calls this script every day. There are several web-based cron tools, but most are in other languages. You can get a Windows program that will call the script every day, or, if you want to, you could just run the script yourself :)

Once you've set that up, your interest should now be working!

UPDATE: You may try to call the script via the Windows Task Scheduler. Please see this post for more details

60
SMFShop Announcements / How to change money upper limit (9,999,999)
« on: February 05, 2006, 08:48:37 am »
Well, some people have noticed an upper limit of 9,999,999 for the money in pocket/bank. Some people were wondering how to make the limit greater. Well, you need to have access to cPanel/DirectAdmin or something else with phpMyAdmin access...

Just follow these steps:
1) Log in to your cPanel
2) Click on MySQL Databases and then 'phpMyAdmin'
3) On the left hand side, click on your forum's database (in the dropdown box)
4) Underneath the drop down box, there should be a list of all the tables. Click on 'smf_members'
5) Tick the box next to 'money' and 'moneyBank', and then click the edit button under 'With selected'(it looks like a pencil)
6) Where it says '9,2', change that to whatever you want. The '9' is how many numbers in total, and the '2' is how many numbers after the decimal point. You might want to type '15,2' or something.

Fixed :D

Pages: 1 2 3 [4] 5