1
succhi
Re: Could not register new user.
  • 2005/9/20 8:28

  • succhi

  • Just popping in

  • Posts: 20

  • Since: 2004/3/20


I have found a fix to the problem of not having the user_profile deleted when trying to delete a user. The problem is that the profile found in the User object doesn't have the key set so it can't delete itself using it's own key. In Kernel/User.php assignVars($vars) is used to fill either the User object's vars or the Profile vars however the "profileid" doesn't get set. I have edited the following code so that it gets set. I don't know if this introduces any other problems but I don't think so as there is no var "profileid" initiated as part of the creation of XoopsUser so AFAIK a value can't be assigned to it anyway.

function assignVars($vars) {
$uservars = array_keys($this->getVars());
foreach ($vars as $key => $value) {
/* edit the following line to remove || $key == "profileid" */
// if (in_array($key, $uservars) || $key == "profileid") {
if (in_array($key, $uservars)) {
$this->assignVar($key, $value);
}
/*
* Dynamic user profiles - Mith
*/
else {
$this->_profile->assignVar($key, $value);
}
/*
* Dynamic user profiles end
*/
}
}

I hope that makes sense.



2
succhi
Re: What do you think about new login in Xoops 2.2
  • 2005/9/5 14:49

  • succhi

  • Just popping in

  • Posts: 20

  • Since: 2004/3/20


I personally would like to see the Display Name become optional. I am attempting to build my second significant XOOPS site but will never have the need to use the Display Name or Avatars etc.

I am not implementing forums or the usual news type modules. I am just using XOOPS as a framework for logging in, XOOPS's API etc. Plus I am familiar with Module dev now.

So for me I would like to just see the real basics in the profile and extraneous information moved to extended profiles. Make Avatar usage optional etc.

Most people use XOOPS as a portal and so the current changes are understandable but I think it removes some flexibility and restricts the kinds of sites XOOPS could be used for.



3
succhi
Bug in profile/admin/user
  • 2005/8/28 14:41

  • succhi

  • Just popping in

  • Posts: 20

  • Since: 2004/3/20


I was trying to work out why I could not modify the settings for a user's groups or even my own. I found the following two lines and the one I needed to 'comment out'/remove in /modules/profile/admin/user.php.

149: $new_groups = isset($_POST['groups']) ? $_POST['groups'] : array();
150: //$user->setGroups($new_groups);

The reason it needs commenting out is because below that is a section that checks the difference between the current array of groups and the new set

156: $cur_groups = $user->getGroups();

158: $added_groups = array_diff($new_groups, $cur_groups);
159: $removed_groups = array_diff($cur_groups, $new_groups);

So if line 150 has set the groups already when we call $user->getGroups(); on line 156 $cur_groups will already be the same as $new_groups and because there is now no difference the groups will not be inserted/removed

I am too buggered finding that to track down the sql issue found when triggering a save op in the same page (saving settings for instance) The error is as follows

SELECT COUNT(*) FROM fcn_group_permission WHERE (gperm_modid = '1' AND gperm_name = 'module_admin' AND gperm_groupid IN () AND gperm_itemid = '2')
Error number: 1064
Error message: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') AND gperm_itemid = '2')' at line 1
( 0.000362)

Stuart.



4
succhi
mailing html emails
  • 2005/6/5 16:33

  • succhi

  • Just popping in

  • Posts: 20

  • Since: 2004/3/20


In a nutshell. I need to email all users an html newsletter so that it is rendered as html in their email client. What I have found from using the admin 'mail users' is that if html code is added to this and emailed I only end up with html code but but not rendered.

I have just spent a whole day coding up something to generate an html page that I could copy and paste into the mail users admin area only to find this problem. I figure it is a header issue but I am not sure where to begin looking for a fix.

Stuart.



5
succhi
Re: XOBJ_DTYPE_ARRAY issues
  • 2005/2/18 2:30

  • succhi

  • Just popping in

  • Posts: 20

  • Since: 2004/3/20


Yes I have to serialize my array manually. This should be transparent. The unserializing happens transparently which would normally indicate that serializing of arrays should do so too.

Stuart.



6
succhi
XOBJ_DTYPE_ARRAY issues
  • 2005/2/18 2:18

  • succhi

  • Just popping in

  • Posts: 20

  • Since: 2004/3/20


Hi I have written a XoopsObject called kbActivity. One of my variables is initialised as type XOBJ_DTYPE_ARRAY. I have a problem retrieving it after assigning. I get the error:

Notice [PHP]: unserialize(): Argument is not a string in file e:\apache\htdocs\getupandgo\kernel\object.php line 343

Here is the portion in the handler where "activities" (my array) is assigned.

<pre>
function &get($id) {
if (intval($id) > 0) {
$sql = "SELECT * FROM " . $this->db->prefix('kb_locations') . " WHERE lid = " . $id;
if (!$result = $this->db->query($sql)) {
return false;
}
$numrows = $this->db->getRowsNum($result);
if ($numrows == 1) {
$location = new kbLocation();
$location->assignVars($this->db->fetchArray($result));
$sql = "SELECT aid FROM " . $this->db->prefix('kb_activities') . " WHERE lid = " . $id;
if ($result = $this->db->query($sql)) {
$acts = array();
while($row = $this->db->fetchArray($result)){
$activity = serialize(new kbActivity($row['aid']));
$acts[] = $activity;
}
$location->assignVar("activities", $acts);
}
return $location;
}
}
return false;
}
</pre>

My first problem is that when I call back 'activities' from my object with $this->getVar("activities") I get the error listed above. Do I need to serialize the whole array first manually?

Secondly when I work this problem out do I need to serialize my objects to store them in my array? I'd probably work this one out if I was able to retrieve my inital array first.

Ta,
Stu



7
succhi
Re: Theme pulling data from default: it shouldn't
  • 2005/1/17 13:03

  • succhi

  • Just popping in

  • Posts: 20

  • Since: 2004/3/20


Thankyou.

That fixed it.

S.



8
succhi
Theme pulling data from default: it shouldn't
  • 2005/1/17 12:15

  • succhi

  • Just popping in

  • Posts: 20

  • Since: 2004/3/20


I have been trying to create a new theme for myself. I duplicated the 'default' theme folder and named it 'cloud'.

In the preferences pane in admin I set both the default theme and user default theme to 'cloud'. I also said yes to updating from template dirs.

My site picks up theme.html and style.css fine from my 'cloud' folder but theme_blockright.html keeps getting pulled across from the 'default' theme folder. I know this because when I edit that theme_blockright.html in the default folder I get the changes I want.

Is this normal behaviour for XOOPS 2.0.9.2? Is there a trick I am missing?

I just want a self contained theme instead of hacking the default theme folder to pieces like I did for my last site.

TIA

Stu.



9
succhi
Re: Notification not appearing as pm
  • 2004/5/23 5:40

  • succhi

  • Just popping in

  • Posts: 20

  • Since: 2004/3/20


Now that didn't occur to me. Thank you. I haven't tried that yet didn't even think about it because I was simply thinking about the event. So the system doesn't send me a notificatioin if I add the item, that is smart and what you'd want I guess

I will test that, but it does seem that's what it would be.
Thanks.



10
succhi
Re: Notification not appearing as pm
  • 2004/5/22 6:59

  • succhi

  • Just popping in

  • Posts: 20

  • Since: 2004/3/20


It doesn't matter where or how I subscribe to notifications on my site I get no response when a reply or new post or what ever happens. But I know that 'pm' works I just don't get notification events being delivered via 'pm'.

This site works fine.




TopTop
(1) 2 »



Login

Who's Online

147 user(s) are online (95 user(s) are browsing Support Forums)


Members: 0


Guests: 147


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits