Author Topic: How to fix problem with board config and SMFShop  (Read 8279 times)

Offline jacortina

How to fix problem with board config and SMFShop
« on: April 26, 2006, 02:45:30 am »
Digging through things after experiencing Shop checkbox misbehaviour in Manage Boards,
I discovered something which doesn't look quite right in the install_SMF1-1RC2.xml
(and reflected in mods to the Sub-Boards.php):

Code: [Select]
<file name="$sourcedir/Subs-Boards.php">
<operation>
<search position="before"><![CDATA[
// Should the board theme override the user preferred theme?
if (isset($boardOptions['override_theme']))
$boardUpdates[] = 'override_theme = ' . ($boardOptions['override_theme'] ? '1' : '0');

]]></search>
<add><![CDATA[
                //BEGIN SMFShop Shop MOD 1.3 (Build 6) code
// Should posts in this board give credits?
                if (isset($boardOptions['countMoney']))
                    $boardUpdates[] = 'countMoney = ' . ($boardOptions['override_theme'] ? '1' : '0');
                //End Shop MOD
]]></add>

This 'seems'  to be hooking the value of the countMoney flag to the value of the override_theme flag.
« Last Edit: April 29, 2006, 12:03:26 pm by daniel15 »

Offline Daniel15

Re: Is This Right?
« Reply #1 on: April 26, 2006, 07:43:40 pm »
Oh my god!! Thanks for saying that! That must be the problem!

The truth is, I didn't make the SMFShop installation package for SMF 1.1. Someone made it for me, and I merged that with the main SMFSHop package. I guess that's why some people were having that problem

Thank you so much! I'll fix this soon!

Offline TechnoDragon

Re: Is This Right?
« Reply #2 on: April 28, 2006, 11:38:55 pm »
Not that i am trying to be pushy...but has this been addressed yet?  Now instead of boards not unchecking...they won't stay checked...it is starting to get very annoying as one of the boards on my site that is the most popular isn't counting shop points!
Don't tell me to get into shape...I have a shape...It is round!


Offline Daniel15

Re: Is This Right?
« Reply #3 on: April 29, 2006, 12:02:43 pm »
Ok, well I'm too busy to make a release at the moment, although here's how you fix it:
Find in Sources/Subs-Boards.php:
Code: [Select]
                    $boardUpdates[] = 'countMoney = ' . ($boardOptions['override_theme'] ? '1' : '0');
Replace with:
Code: [Select]
                    $boardUpdates[] = 'countMoney = ' . ($boardOptions['countMoney'] ? '1' : '0');
That should work. Please tell me if it fixes it for you.

Offline TechnoDragon

Re: How to fix problem with board config and SMFShop
« Reply #4 on: April 29, 2006, 01:25:09 pm »
no, it still won't stay checked
Don't tell me to get into shape...I have a shape...It is round!


Offline TechnoDragon

Re: How to fix problem with board config and SMFShop
« Reply #5 on: April 29, 2006, 01:31:27 pm »
Fixed it for ya....

Find this in Sources/ManageBoards.php:
Code: [Select]
$boardOptions['override_theme'] = isset($_POST['override_theme']);
and add this after:
Code: [Select]
$boardOptions['countMoney'] = isset($_POST['countMoney']);
Don't tell me to get into shape...I have a shape...It is round!


Offline Daniel15

Re: How to fix problem with board config and SMFShop
« Reply #6 on: April 30, 2006, 01:06:20 pm »
Hey, thanks :)
I'll be sure to put that in the next update

Offline TechnoDragon

Re: How to fix problem with board config and SMFShop
« Reply #7 on: April 30, 2006, 01:13:04 pm »
you still need the other code you posted as well.
Don't tell me to get into shape...I have a shape...It is round!


Offline pheadrus

Re: How to fix problem with board config and SMFShop
« Reply #8 on: May 07, 2006, 03:43:58 am »
I have done both modifications that is written in this post, but nothing changed  :(
(ticket ID=57) Pls help as soon as possible or my members will make me real mad  :uglystupid2:
 O0
Thanks for everything

Offline seo

Re: How to fix problem with board config and SMFShop
« Reply #9 on: June 14, 2006, 06:44:56 pm »
I have done both modifications that is written in this post, but nothing changed  :(
(ticket ID=57) Pls help as soon as possible or my members will make me real mad  :uglystupid2:
 O0
Thanks for everything

Read this topic : http://www.daniel15.com/forum/index.php?topic=159.0 i have a perfectly fine running shop mod, its not only that settings error that is pointed there are few other minor fixes. It even includes the fix mentioned in this thread.

Offline geezmo

Re: How to fix problem with board config and SMFShop
« Reply #10 on: July 03, 2006, 03:04:19 am »
Fixed it for ya....

Find this in Sources/ManageBoards.php:
Code: [Select]
$boardOptions['override_theme'] = isset($_POST['override_theme']);
and add this after:
Code: [Select]
$boardOptions['countMoney'] = isset($_POST['countMoney']);

This didn't work and the other file didn't work either .. :(

Offline TechnoDragon

Re: How to fix problem with board config and SMFShop
« Reply #11 on: July 03, 2006, 06:10:53 am »
you may have to completely remove the shop mod (verify after the uninstall is done) and reinstall it...all the fixes here have my shop running at 100% error free. including check boxes.
Don't tell me to get into shape...I have a shape...It is round!


Offline geezmo

Re: How to fix problem with board config and SMFShop
« Reply #12 on: July 03, 2006, 05:25:29 pm »
If I uninstall the Shop mod, does it also remove the database entries? Which means if I reinstall the Shop mod it won't recognize the existing credits that the members have already earned? I can't afford to restart the Shop Mod, I just restarted the credits system two weeks ago... :(

Offline Daniel15

Re: How to fix problem with board config and SMFShop
« Reply #13 on: July 08, 2006, 03:09:47 pm »
Quote
If I uninstall the Shop mod, does it also remove the database entries? Which means if I reinstall the Shop mod it won't recognize the existing credits that the members have already earned?
Yeah, it removes the database entries :(. What you could do is make a database backup before uninstalling it. Then, uninstall it, and straight after this, restore the backup. Then, when you install SMFShop, it will detect that the database is already configured, and won't do anything.

NOTE: I would suggest that if you do this, put your forum into Maintenance Mode so you don't lose any posts.