The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Having problems with product file and ugprades...
Attached is a product file. It install fines, and works great... However, there is one section of the settings screen (rankingladder_awards), where each time I re-install the product, those settings are wiped out. Does anyone know how I fix this, so that the settings are maintained?
|
#2
|
||||
|
||||
There are two sections of codes for installing and uninstalling there, both are for version 1.0 - and I don't think that's really appropriate. I mean if they're the same version, shouldn't they be in the same section? But I don't think that's the problem. It probably doesn't matter.
I think this is your problem: Code:
$dbalter->fetch_table_info('usergroup'); $dbalter->add_field(array ( Unless you're talking about the static options... Code:
<options> <settinggroup name="rankingladder" displayorder="65538"> <setting varname="rankingladder_navbar" displayorder="1"> <datatype>number</datatype> <optioncode>radio:piped 0|Disable 1|Create Link on Navbar (Left) 2|Create Link in Quick Links 3|Create Link in Community Links</optioncode> <defaultvalue>1</defaultvalue> </setting> <setting varname="rankingladder_filename" displayorder="5"> <datatype>free</datatype> <defaultvalue>ranking.php</defaultvalue> </setting> <setting varname="rankingladder_thumbdir" displayorder="6"> <datatype>free</datatype> <defaultvalue>ranking</defaultvalue> </setting> <setting varname="rankingladder_bestcount" displayorder="10"> <datatype>posint</datatype> <defaultvalue>20</defaultvalue> </setting> <setting varname="rankingladder_topcount" displayorder="20"> <datatype>posint</datatype> <defaultvalue>10</defaultvalue> </setting> <setting varname="rankingladder_timecount" displayorder="30"> <datatype>posint</datatype> <defaultvalue>12</defaultvalue> </setting> <setting varname="rankingladder_awards" displayorder="40"> <datatype>free</datatype> <optioncode><![CDATA["; $values = @unserialize($setting['value']); $values = @array_map('htmlspecialchars_uni', $values); $right .= " <fieldset class=\"fieldset\"> <legend>$settingphrase[setting_rankingladder_awards_title]</legend> <table border=\"0\" width=\"100%\" cellpadding=\"1\" cellspacing=\"1\"> <tr> <td>$vbphrase[setting_rankingladder_awards_first]</td> <td><input type=\"text\" name=\"setting[$setting[varname]][first]\" value=\"$values[first]\" class=\"bginput\" /></td> </tr> <tr> <td>$vbphrase[setting_rankingladder_awards_split]</td> <td><input type=\"text\" name=\"setting[$setting[varname]][split]\" value=\"$values[split]\" class=\"bginput\" /></td> </tr> <tr> <td>$vbphrase[setting_rankingladder_awards_second]</td> <td><input type=\"text\" name=\"setting[$setting[varname]][second]\" value=\"$values[second]\" class=\"bginput\" /></td> </tr> <tr> <td>$vbphrase[setting_rankingladder_awards_third]</td> <td><input type=\"text\" name=\"setting[$setting[varname]][third]\" value=\"$values[third]\" class=\"bginput\" /></td> </tr> <tr> <td>$vbphrase[setting_rankingladder_awards_fourth]</td> <td><input type=\"text\" name=\"setting[$setting[varname]][fourth]\" value=\"$values[fourth]\" class=\"bginput\" /></td> </tr> <tr> <td>$vbphrase[setting_rankingladder_awards_fifth]</td> <td><input type=\"text\" name=\"setting[$setting[varname]][fifth]\" value=\"$values[fifth]\" class=\"bginput\" /></td> </tr> <tr> <td>$vbphrase[setting_rankingladder_awards_sixten]</td> <td><input type=\"text\" name=\"setting[$setting[varname]][sixten]\" value=\"$values[sixten]\" class=\"bginput\" /></td> </tr> <tr> <td>$vbphrase[setting_rankingladder_awards_else]</td> <td><input type=\"text\" name=\"setting[$setting[varname]][else]\" value=\"$values[else]\" class=\"bginput\" /></td> </tr> </table> </fieldset>]]></optioncode> <defaultvalue><![CDATA[a:7:{s:5:"first";i:10;s:5:"split";i:9;s:6:"second";i:8;s:5:"third";i:6;s:6:"fourth";i:5;s:5:"fifth";i:3;s:6:"sixten";i:2;s:4:"else";i:1;}]]></defaultvalue> </setting> <setting varname="rankingladder_externalurl" displayorder="60"> <datatype>free</datatype> <defaultvalue>member.php?u=</defaultvalue> </setting> <setting varname="rankingladder_pagesplit" displayorder="70"> <datatype>posint</datatype> <defaultvalue>30</defaultvalue> </setting> <setting varname="rankingladder_rebuildcount" displayorder="80"> <datatype>posint</datatype> <defaultvalue>20</defaultvalue> </setting> </settinggroup> </options> |
#3
|
|||
|
|||
Naw Tiger, thats not the problem... The alter field is for usergroup permissions, I'm not having any problems with that...
The problem I am having is in the settings section. Code:
<plugin active="1" executionorder="5"> <title>Ranking Ladder Initialization</title> <hookname>init_startup</hookname> <phpcode><![CDATA[$vbulletin->options['rankingladder_awards'] = @unserialize($vbulletin->options['rankingladder_awards']);]]></phpcode> </plugin> <plugin active="1" executionorder="5"> <title>Ranking Ladder Save Options</title> <hookname>admin_options_processing</hookname> <phpcode><![CDATA[if ($oldsetting['varname'] == 'rankingladder_awards') { $settings['rankingladder_awards'] = @serialize(@array_map('intval', $settings['rankingladder_awards'])); }]]></phpcode> </plugin> Code:
<setting varname="rankingladder_awards" displayorder="40"> <datatype>free</datatype> <optioncode><![CDATA["; $values = @unserialize($setting['value']); $values = @array_map('htmlspecialchars_uni', $values); $right .= " <fieldset class=\"fieldset\"> <legend>$settingphrase[setting_rankingladder_awards_title]</legend> <table border=\"0\" width=\"100%\" cellpadding=\"1\" cellspacing=\"1\"> <tr> <td>$vbphrase[setting_rankingladder_awards_first]</td> <td><input type=\"text\" name=\"setting[$setting[varname]][first]\" value=\"$values[first]\" class=\"bginput\" /></td> </tr> <tr> <td>$vbphrase[setting_rankingladder_awards_split]</td> <td><input type=\"text\" name=\"setting[$setting[varname]][split]\" value=\"$values[split]\" class=\"bginput\" /></td> </tr> <tr> <td>$vbphrase[setting_rankingladder_awards_second]</td> <td><input type=\"text\" name=\"setting[$setting[varname]][second]\" value=\"$values[second]\" class=\"bginput\" /></td> </tr> <tr> <td>$vbphrase[setting_rankingladder_awards_third]</td> <td><input type=\"text\" name=\"setting[$setting[varname]][third]\" value=\"$values[third]\" class=\"bginput\" /></td> </tr> <tr> <td>$vbphrase[setting_rankingladder_awards_fourth]</td> <td><input type=\"text\" name=\"setting[$setting[varname]][fourth]\" value=\"$values[fourth]\" class=\"bginput\" /></td> </tr> <tr> <td>$vbphrase[setting_rankingladder_awards_fifth]</td> <td><input type=\"text\" name=\"setting[$setting[varname]][fifth]\" value=\"$values[fifth]\" class=\"bginput\" /></td> </tr> <tr> <td>$vbphrase[setting_rankingladder_awards_sixten]</td> <td><input type=\"text\" name=\"setting[$setting[varname]][sixten]\" value=\"$values[sixten]\" class=\"bginput\" /></td> </tr> <tr> <td>$vbphrase[setting_rankingladder_awards_else]</td> <td><input type=\"text\" name=\"setting[$setting[varname]][else]\" value=\"$values[else]\" class=\"bginput\" /></td> </tr> </table> </fieldset>]]></optioncode> <defaultvalue><![CDATA[a:7:{s:5:"first";i:10;s:5:"split";i:9;s:6:"second";i:8;s:5:"third";i:6;s:6:"fourth";i:5;s:5:"fifth";i:3;s:6:"sixten";i:2;s:4:"else";i:1;}]]></defaultvalue> </setting> |
#4
|
|||
|
|||
I have not yet been able to fix this problem.
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|