incidentally, the extension doesn't work on my local vanilla either, but it's not the same problem it won't install itself and gives no errors. i'm trying to figure out why. (php 5.1.1/ mysql 5.0.18)
Thanks to ithcy for taking the time to try an installation. Did you call "settings.php?PostBackAction=InstallPredefinedAttributes" after enabling the extension in the extension manager page? You need to do so, so the "PredefinedAttributes" column will be created in the Users table.
hutstein, right: the filename has to be default.php.
Parse error: parse error, expecting `')'' in /home/webtree/htdocs/vanilla/extensions/PredefinedAttributes_v0.3.1/default.php on line 102
is a typo error I don't have in the file.
@michaelontheroof: yes, i did that before, but it still didn't install. but i changed line 102 to &$User=false and did it again, and it works! thanks for the tips
I installed this extension but no matter what I did it did not work at all. I need to remove all changes it made on other files because my forum does not work now, but what files were effected? Does anyone have an idea?
When I try to install the extension as described after activating it, I get this error msg:
Warning: Missing argument 2 for predefinedattributes() in /srv/vefir/personal/levy/weareone/forum/extensions/PredefinedAttributes/default.php
on line 102
PredefinedAttributes.Install();
The error occurred on or near: You have an error in your SQL syntax near 'COMMENT 'Created by Predefined Attributes Extension
' AFTER Attributes' at line 3
I checked the DB and the column has not been inserted to the USER table. Any ideas on how to get this installed?
Levy, i uploaded a new version of the extension:
function PredefinedAttributes(&$Context, $User = false) {
should be the best solution for the constructor. The 2nd argument has to be optional.
The database errors results from the "Missing argument 2" error you got first. Without this error the SQL Query will work.
but what files were effected? No other files are changed by the extension.
@michael: thx for the extension! I have a problem, however. After activating the extension I get this error:
Parse error: syntax error, unexpected '=', expecting ')' in /hsphere/local/home/tools/tools.web.surftown.se/storaa/forum/extensions/PredefinedAttributes/default.php on line 102
It shows on every vanilla page - I needed to remove the extension manually in my extensions.php file to bring the forum alive again. Any ideas?
Comments
I didn't thought that far..
it won't install itself and gives no errors. i'm trying to figure out why. (php 5.1.1/ mysql 5.0.18)
Sorry I don't know how to post code formatted... now i know it
var $Attributes = array( array( "Label" => "Phone-Nr.", "Required" => true, "Value" => "", "Hidden" => true, "Description" => "A short description will be displayed on the personal Information page only." ), array( "Label" => "T-Shirt-Size", "Required" => false, "Value" => "M", "Hidden" => false, "Type" => "Select", "Data" => array("XS", "S", "M", "X", "XL") ), array( "Label" => "City", "Required" => false, "Value" => "m", "Hidden" => false, "Type" => "Select", "Data" => array("Tokio", "Mexico", "New York", "Mumbai", "Sao Paulo", "Delhi") ) );
that's funny.. have you changed anything else ?
function PredefinedAttributes(&$Context, &$User) {
is the default value false or null important?
hutstein, right: the filename has to be default.php.
Parse error: parse error, expecting `')'' in /home/webtree/htdocs/vanilla/extensions/PredefinedAttributes_v0.3.1/default.php on line 102
is a typo error I don't have in the file.
but i changed line 102 to &$User=false and did it again, and it works!
thanks for the tips
thanks again.
I've tried this:
function PredefinedAttributes($Context, $User = false) { $this->Context = $Context; $this->User = $User; $this->Context->DatabaseColumns['User'][$this->ColumnName] = $this->ColumnName; }
Anyway, it doesn't work.
Still waiting for new version...
---
PS
Ooops. Working!
I installed this extension but no matter what I did it did not work at all. I need to remove all changes it made on other files because my forum does not work now, but what files were effected? Does anyone have an idea?
Levy
I missed an essential post from hutstein
function PredefinedAttributes(&$Context, &$User) {
My forum works atleast
Thank you and keep up the good work guys.... I' m loving this.
When I try to install the extension as described after activating it, I get this error msg:
Warning: Missing argument 2 for predefinedattributes() in /srv/vefir/personal/levy/weareone/forum/extensions/PredefinedAttributes/default.php on line 102 PredefinedAttributes.Install(); The error occurred on or near: You have an error in your SQL syntax near 'COMMENT 'Created by Predefined Attributes Extension ' AFTER Attributes' at line 3
I checked the DB and the column has not been inserted to the USER table. Any ideas on how to get this installed?
Levy
i uploaded a new version of the extension:
function PredefinedAttributes(&$Context, $User = false) {
should be the best solution for the constructor. The 2nd argument has to be optional.
The database errors results from the "Missing argument 2" error you got first. Without this error the SQL Query will work.
but what files were effected?
No other files are changed by the extension.
Hope it'll finally work for you.
maybe you have an error in the var $Attributes array on line 53.
Did you changed the Attributes definition in the Array.
Is the error still there on a 'clean' installation (without changes) of the extension?
Michael