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
16
Completed Shop Buttons / BlueLine theme
« on: February 10, 2007, 01:34:32 pm »
This is a shop button for the BlueLine theme.

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

  // The [calendar]!
	
if (
$context['allow_calendar'])
	
	
echo 
'
<a href="'
$scripturl'?action=calendar">' $txt['calendar24'] . '</a>'$context['menu_separator'];


Add after:

	
// The shop
	
echo 
'
<a href="'
$scripturl'?action=shop">Shop</a>'$context['menu_separator'];


Then, your shop button should be working :D

17
Completed Shop Buttons / MNS Style
« on: February 10, 2007, 01:27:50 pm »
This is a shop button for the MNS Style theme.

Code modifications:
Open Themes/mns_style/index.template.php
Find:

	
if (
$context['current_action'] == 'theme')
	
	
$current_action = isset($_REQUEST['sa']) && $_REQUEST['sa'] == 'pick' 'profile' 'admin';


Add after:

	
if (
$context['current_action'] == 'shop')
	
	
$current_action 'shop';



Also, find:

	
// The [calendar]!
	
if (
$context['allow_calendar'])
	
	
	
	

	
echo
'
	
	
	
	
<td align="center" class="menubg' 
$current_action == 'calendar' '2' '' '">
	
	
	
	
	
<a href="'
$scripturl'?action=calendar">' $txt['calendar24'] , '</a>
	
	
	
	
	

	
	
	
	
</td>'
;
	


Add after:

	
// The shop
	
echo
'
	
	
	
	
<td align="center" class="menubg' 
$current_action == 'shop' '2' '' '">
	
	
	
	
	
<a href="'
$scripturl'?action=shop">Shop</a>
	
	
	
	
	

	
	
	
	
</td>'
;
	


Then, your shop button should be working :D

18
It was brought to my attention that the SMFShop 'Buy Stuff' page does not display properly in FireFox (the page is moved to the right. The same page displays fine in Opera and Internet Explorer. For anyone encountering this problem, could you please try this fix:

In Themes/default/Shop.template.php, find:
Code: [Select]
<br style="clear: all" />

Replace with:
Code: [Select]
<br clear="all" />

This should fix the display issue :)

19
SMFShop Announcements / Known bugs in SMFShop 3.0
« on: January 19, 2007, 07:00:53 pm »
This page has been moved to the Wiki - http://www.daniel15.com/smfshop_wiki/Bugs

20
SMFShop Announcements / SMFShop 3.0 now out!
« on: January 18, 2007, 06:58:06 pm »
I'm proud to annouce that SMFShop 3.0 is now out! The code has been cleaned up a lot, and it also has a few more features. All the features I listed in the Feature highlights in new version of SMFShop topic are present, along with a few more.

Changes in this release
Major:
 - Lots of code cleanup
 - Category support: You can now categorise your items
 - Permissions: You can disable access to the shop for certain membergroups
 - Bonuses per character and word: Give bonuses to a user depending on the number of characters or words in their post
 - Bank deposit/withdrawl fees
 - Option to not delete item after use: Great for items you'd like members to keep
 - When editing an item, you can now edit the item_info (custom info entered when adding the item)
 
Minor
 - Several minor formatting changes
 - Fixed problem with SMF 1.1's "Find Members" popup
 - Bold the current section on the left menu
 - In "10 Richest Members" list, have links to their profiles
 - When sending an item to someone, show an error if they don't exist
 - Allow floating point values for interest
 - And several other (minor things)... See the full changelog at http://server.daniel15.com/cgi-bin/viewvc.cgi/smfshop/trunk/svn_changelog.txt?revision=78

Download it from the DanSoft Australia site, as usual :).

Note that I didn't have much time to look for bugs. All the large bugs have been fixed, but there may be some smaller bugs (especially with the upgrade package). Please tell me if you encounter any problems ;)

I hope you enjoy this release, I spent ages on it :)
EDIT: Here's a nice Lines of Code graph (yes, I know release-2.3 is at the wrong date, that's my fault :P):

:D

21
General SMFShop Discussion / Feature highlights in new version of SMFShop
« on: January 13, 2007, 07:59:14 pm »
I'm very happy to announce that a new version of SMFShop will be coming out soon. This version has a significant number of changes in it, and the majority of these changes are already live on this site (and available in the development version). Here's the highlights:
  • Code cleanup
    This was the main aim of the new release. A lot of the code in SMFShop 2.3 was very messy, whereas the code in the new version will be very clean (conforming to the SMF Modification Guidelines)

  • Bonuses
    This is a new feature in the new version of SMFShop, and is already live on this site. Basically, you can set up SMFShop so it gives members a bonus number of credits, depending on how many words or characters are in their post (with an upper limit, of course)

  • Categories
    The new version of SMFShop will allow you to seperate your shop into multiple categories (this feature isn't live here yet). This was one of the most commonly requested features :)

  • Don't remove item from inventory after use
    A lot of people requested this, and it has finally been implemented. For every item in the shop, you can choose whether it will be removed from a user's inventory on use or not. This is great if you sell items that you'd like your members to use, but also keep.

  • Formatting changes
    Some of the SMFShop pages weren't formatted that well, with very ugly looking headers. I've changed all the headings so they use either the catbg or titlebg from your SMF theme.

  • Edit item info
    The current version of SMFShop allows you to input item-specific information when adding the item (eg. the number of posts added by the "Add xxx to postcount" item),  but doesn't allow you to edit it. The new version of SMFShop allows the values to be edited (custom items will need to be updated, though)

  • Show user's credits on their profile
    This was requested a lot, and will finally be implemented. Basically, when you view a user's profile, you'll be able to see how many credits they have.

  • Language file recoded
    The language file has been completely recoded. The confusing "string concatenated onto another string" format has been removed.

  • A few bug fixes as well ;)

A full changelog is available at http://server.daniel15.com/cgi-bin/viewvc.cgi/smfshop/trunk/svn_changelog.txt.
I have no release timeframe as yet, although it should be within a few days. I hope that you enjoy this release, I've put heaps of effort into it :D If you'd like to test out this version of SMFShop, please see the Beta testers for SMFShop wanted topic (there's packages available)

--Daniel15

22
General SMFShop Discussion / MOVED: Item: Egg your victims avatar
« on: January 02, 2007, 08:08:17 pm »

23
Completed Shop Buttons / Pn-pn theme
« on: December 27, 2006, 01:41:54 pm »
This is a shop button for the Pn-pn theme (I must say, it's an awesome theme :))

Code modifications:
Open Themes/pnpn11/index.template.php
Find:

	
if (
$context['current_action'] == 'theme')
	
	
$current_action = isset($_REQUEST['sa']) && $_REQUEST['sa'] == 'pick' 'profile' 'admin';


Add after:

	
if (
$context['current_action'] == 'shop')
	
	
$current_action 'shop';


Also, find:

	
// The [calendar]!
	
if (
$context['allow_calendar'])
	
	
echo (
$current_action == 'calendar' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '<td class="maintab_off_' $first '">&nbsp;</td>' '
	
	
	
	
<td valign="top" class="maintab_' 
$current_action == 'calendar' 'active_back' 'off_back' '">
	
	
	
	
	
<a href="'
$scripturl'?action=calendar">' $txt['calendar24'] , '</a>
	
	
	
	
</td>' 
$current_action == 'calendar' '<td class="maintab_active_' $last '">&nbsp;</td>' '<td class="maintab_off_' $last '">&nbsp;</td>';


Add after:

	
// SMFShop
	
echo (
$current_action == 'shop' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '<td class="maintab_off_' $first '">&nbsp;</td>' '
	
	
	
	
<td valign="top" class="maintab_' 
$current_action == 'shop' 'active_back' 'off_back' '">
	
	
	
	
	
<a href="'
$scripturl'?action=shop">Shop</a>
	
	
	
	
</td>' 
$current_action == 'shop' '<td class="maintab_active_' $last '">&nbsp;</td>' '<td class="maintab_off_' $last '">&nbsp;</td>';


Then, your shop button should be working :D

24
SMFShop Announcements / Beta testers for SMFShop wanted
« on: December 20, 2006, 06:22:09 pm »
Hi everyone,
 I'm currently looking for some people who are able to beta test SMFShop for me, as this would save a lot of development time (I currently have multiple installs of SMF that I test it on, and bugs still pop up). Basically, all this involves is downloading the latest development version of SMFShop, looking through the changelog to see what changes have been done, and testing that all the changes are working correctly.

What is needed/wanted (although anyone can beta test if they like):
  • Some knowledge of how code in SMF works (doesn't need to be in-depth)
  • Basic knowledge of SVN (checking out repositories using TortoiseSVN) -- Not needed if using the automatically generated packages
  • Some free time

I don't have any official SMFShop development page as of yet, but there's instructions for how to download the development version from the SVN repository at http://www.daniel15.com/forum/index.php/topic,198.0.html (alternatively, see below for automatically generated packages)

Changelog: http://server.daniel15.com/cgi-bin/viewvc.cgi/smfshop/trunk/svn_changelog.txt
SVN repository: http://server.daniel15.com/svn/smfshop/trunk/
SVN Interface (ViewVC): http://server.daniel15.com/cgi-bin/viewvc.cgi/smfshop/trunk/
SVN Snapshots (packages that can be installed via the Package Manager): http://server.daniel15.com/smfshop-devel/
Note: Please do NOT try to upgrade a SMFShop 2.3 installation to the development version, unless you do it manually... It's best to install the development version on a clean SMF board. To upgrade from one development version to another, you'll need to uninstall the old one and install the new one (if using the snapshots), or upgrade it manually (if you're manually installing)

If anyone is interested, please reply here :)

Thanks in advance,
 Daniel15

25
General SMFShop Discussion / Status of SMFShop development
« on: December 20, 2006, 05:53:42 pm »
Well, I thought I should make a post about the status of SMFShop development. At the moment, development is coming along well. I'd like to emphasise the fact that I'm working on cleaning up the code at the moment, and will implement new features, etc. later. I'm making snapshots of the development version at http://server.daniel15.com/smfshop-devel/, if you'd like to try it out (a changelog is available at http://server.daniel15.com/cgi-bin/viewvc.cgi/smfshop/trunk/svn_changelog.txt)

I'm currently in the process of looking for beta testers. Please take a look at http://www.daniel15.com/forum/index.php/topic,475.html for information on that.

26
Since SMF 1.1 came out, the behavior of the 'Find Members' popup has changed. Basically, it puts quotation marks around the username, whereas SMF 1.0 didn't. Thus, on the Send Money to someone and Send item to someone pages, you may get errors like this:

ERROR: The member you typed ('\"Daniel15\"') doesn't exist

Here's the fix for SMFShop 2.3, so it works properly again. The development version will be fixed soon.
In Sources/shop/Shop-Send.php, find:
Code: [Select]
// Get the id and name of member to send to
$result = db_query("SELECT ID_MEMBER, memberName
FROM {$db_prefix}members
WHERE memberName = '{$_POST['membername']}'
LIMIT 1", __FILE__, __LINE__);
$row = mysql_fetch_array($result, MYSQL_ASSOC);

// If the member's name is not what the user posted... They don't exist!
if ($row['memberName'] !== $_POST['membername']) {
$context['shop_buy_message'] = sprintf($txt['shop_member_no_exist'], $_POST['membername']);

Replace with:
Code: [Select]
// This code from PersonalMessage.php, lines 1531-1535. It trims the " characters off the membername posted,
// and then puts all names into an array
$_POST['membername'] = strtr($_POST['membername'], array('\\"' => '"'));
preg_match_all('~"([^"]+)"~', $_POST['membername'], $matches);
$moneyArrayTo = array_unique(array_merge($matches[1], explode(',', preg_replace('~"([^"]+)"~', '', $_POST['membername']))));

// We only want the first memberName found
$moneyTo = $moneyArrayTo[0];

// Get the id and name of member to send to
$result = db_query("SELECT ID_MEMBER, memberName
FROM {$db_prefix}members
WHERE memberName = '{$moneyTo}'
LIMIT 1", __FILE__, __LINE__);
$row = mysql_fetch_array($result, MYSQL_ASSOC);

// No results? They don't exist!
if (mysql_num_rows($result) == 0) {
$context['shop_buy_message'] = sprintf($txt['shop_member_no_exist'], htmlentities($moneyTo));


Find:
Code: [Select]
// Get new owner's information
$result = db_query("SELECT ID_MEMBER
FROM {$db_prefix}members
WHERE memberName = '{$_POST['membername']}'", __FILE__, __LINE__);
$rowNewOwner = mysql_fetch_array($result, MYSQL_ASSOC);

Replace with:
Code: [Select]
// This code from PersonalMessage.php, lines 1531-1535. It trims the " characters off the membername posted,
// and then puts all names into an array
$_POST['membername'] = strtr($_POST['membername'], array('\\"' => '"'));
preg_match_all('~"([^"]+)"~', $_POST['membername'], $matches);
$itemArrayTo = array_unique(array_merge($matches[1], explode(',', preg_replace('~"([^"]+)"~', '', $_POST['membername']))));

// We only want the first memberName found
$itemTo = $itemArrayTo[0];

// Get new owner's information
$result = db_query("SELECT ID_MEMBER
FROM {$db_prefix}members
WHERE memberName = '{$itemTo}'", __FILE__, __LINE__);
$rowNewOwner = mysql_fetch_array($result, MYSQL_ASSOC);

// No results? They don't exist!
if (mysql_num_rows($result) == 0) {
printf($txt['shop_member_no_exist'], htmlentities($_POST['membername']));
die();
}


27
Completed Shop Buttons / Alienation (Bloc)
« on: December 08, 2006, 06:04:37 pm »
Shop button for the Alienation theme

Code modifications:
Open Themes/alienation1.1RC3/Index.template.php
Find:

	
if (
$context['current_action'] == 'theme')
	
	
$current_action = isset($_REQUEST['sa']) && $_REQUEST['sa'] == 'pick' 'profile' 'admin';


Add after:

	
if (
$context['current_action'] == 'shop')
	
	
$current_action 'shop';


Also, find:

	
// The [calendar]!
	
if (
$context['allow_calendar'])
	
	
echo  
'
	
	
	
	
<td class="amaintab_' 
$current_action == 'calendar' 'active_back' 'back' '">
	
	
	
	
	
<a href="'
$scripturl'?action=calendar">' $txt['calendar24'] , '</a>
	
	
	
	
</td>'
;


Add after:

	
// SMFShop
	
echo  
'
	
	
	
	
<td class="amaintab_' 
$current_action == 'shop' 'active_back' 'back' '">
	
	
	
	
	
<a href="'
$scripturl'?action=shop">Shop</a>
	
	
	
	
</td>'
;


Then, your shop button should be working :D

28
Completed Shop Buttons / Salava (Gaia)
« on: December 08, 2006, 05:52:00 pm »
Adding a shop button to the 'Salava' theme is quite easy:

Code modifications:
Open Themes/salava/Index.template.php (file path may differ)
Find:

	
// The [calendar]!
	
if (
$context['allow_calendar'])
	
	
echo 
'<a href="'$scripturl'?action=calendar">Calendar</a>';


Add after:

	
echo 
'<a href="'$scripturl'?action=shop">Shop</a>';


Then, your shop button should be working :D

29
SMFShop Announcements / Information on upgrading to SMF 1.1 Final
« on: December 08, 2006, 01:12:55 pm »
Note: These instructions are old. Please see the Using SMFShop 2.3 on SMF 1.0? Here's how to upgrade to SMFShop 3.0 on SMF 1.1 topic!

If you're upgrading to SMF 1.1 Final, please note that it uninstalls all currently-installed MODs. To reinstall SMFShop once the upgrade is completed, follow these steps:
1) Delete your current SMFShop 2.3 installation package from the Package Manager
2) Download the SMF 1.1-compatible package from http://www.dansoftaustralia.net/
3) Upload the newly-downloaded package, and install it. It should install fine, and once it's done, your shop should be working again (and people should still have the same amount of credits as they did before the upgrade)

Please reply here if you have any problems regarding the upgrade.

30
General SMFShop Discussion / SMFShop 2.3 now out!
« on: October 21, 2006, 02:30:13 pm »
I'm proud to announce that a new release of SMFShop (SMFShop 2.3) is now available! This version has a few new features, and fixes some of the bugs present in SMFShop 2.2. Additionally, I'm currently working on documentation for SMFShop, and it should be ready soon...

Changes:
- Admins can now give credits depending on which membergroup users are in (membergroup functions)
- Minor changes to installer (finally fixed "Incorrect table name ''" error!)
- Money can now be automatically given to people at registration
- General code cleanup
- Heaps more comments in the code (it's a lot easier to understand)
- Item files now have author name, email and website fields
- item_engine.php now has heaps and heaps of comments
- The 'Add Item' page has merged into the 'Edit Items' page
- Delete Items now uses checkboxes for deleting more than 1 item at a time
- When an item is deleted, it is now properly deleted from everyone's inventory
- Changed formatting of template files (they're now a lot easier to understand)
- Every shop page now has a custom title (previously, every page said 'Shop' on it)
- Moved stuff which shouldn't have been in ShopAdmin.template.php into ShopAdmin.php
- Money is now properly treated as float values, rather than int values
- Various updates for XHTML compliance
- Relpaced all 4-space code indentation with tabs instead
- Minor updates to a few items


Problems fixed in this release:
 - The installer now no longer shows Incorrect table name '' errors
- Linktree on 'Send Items' page fixed (it said 'Send Money')
- Slight problem with item images fixed
- Fixed InstantMessage.english.php errors

Download it from the DanSoft Australia website.

Pages: 1 [2] 3 4 5