411
Mazarin
Re: Use xoEmail plugin
  • 2009/1/25 13:08

  • Mazarin

  • Just can't stay away

  • Posts: 533

  • Since: 2008/12/10


Just changed the permissions of the specific files related to xoEmail and that did it.



412
Mazarin
Re: Use xoEmail plugin
  • 2009/1/21 20:28

  • Mazarin

  • Just can't stay away

  • Posts: 533

  • Since: 2008/12/10


Thanks for taking your time (special nod to you trabis).

Sorry for not being clear enough, but I know I have to change the templates to actually use it. The problem is that when I do that (i.e. try to use it by adding |xoEmail) I get the error message which I described in the first post.

So, it seems to me that when I try to call the xoEmail function, it fails to load it and I can't figure out why.

Edit: OK, I found the reason. When I unpacked the files, the permission was automatically set to Read for all users. I manually changed the permission to read&writ and that did it. Anyone care to give a brief explanation as to why it's necessary to also have write acess (these files are not modified by the system, are they?)?

Anyway, thank you Ghia and trabis for your efforts.



413
Mazarin
Re: Use xoEmail plugin
  • 2009/1/21 6:51

  • Mazarin

  • Just can't stay away

  • Posts: 533

  • Since: 2008/12/10


Yes, that is exactly what it says on his site, but nowhere does it tell me what I have to do to get it working. It just states how you can use it and how you can configure it, but I can't even get it running.



414
Mazarin
Use xoEmail plugin
  • 2009/1/20 18:55

  • Mazarin

  • Just can't stay away

  • Posts: 533

  • Since: 2008/12/10


I'm using a theme (blue day dynamique) that assumes I have the xoEmail plugin and from what I gather it makes sense to have it. However, it seems I can't get the plugin to install and load correctly, as I keep getting an error

Error: Smarty error: [in db:system_userinfo.html line 63]: [plugin] modifier 'XoEmail' is not implemented (core.load_plugins.php, line 118)

Do I need to do something else than unzip the files of the XOOPS installation to install the plugin? I've looked at the site of the plugin and I've searched this site, but nowhere can I found how to go about this.



415
Mazarin
Re: Problem displaying special characters (åäö) from custom database
  • 2009/1/20 12:29

  • Mazarin

  • Just can't stay away

  • Posts: 533

  • Since: 2008/12/10


Yes, I have the database connection set to UTF-8. The characters in the database looks exactly like they should do, but when displayed on the web page, they look like I haven't encoded the page in UTF-8.

Regardless, I'm currently using the htmlentities function in my code to correct it, so at least I have a way around it, but perhaps it could be suggested to look into this problem for the future.



416
Mazarin
Re: Paid access to some parts of the website
  • 2009/1/19 16:57

  • Mazarin

  • Just can't stay away

  • Posts: 533

  • Since: 2008/12/10


globla $xoopsUser; did the trick! It works perfectly. Thanks you sooooooo much for your help trabis. Had I known you when I was in Portugal last September, I would have bought you a beer (or ten).

Once again, thank you!



417
Mazarin
Re: Paid access to some parts of the website
  • 2009/1/18 21:39

  • Mazarin

  • Just can't stay away

  • Posts: 533

  • Since: 2008/12/10


Sorry, messed up in the code. What I do have is in fact:
$uid is_object($xoopsUser) ? $xoopsUser->getVar('uid') : 0
echo 
"uid: $uid";


OK, so I excluded the mainfile and the header, but the result remains the same. When I print out the uid I only get a 0, as the is_object($xoopsUser) function returns a false (verified this and it always returns false). I'm probably doing something really simple and stupid wrong here, but I can't figure out what.



418
Mazarin
Re: Paid access to some parts of the website
  • 2009/1/18 20:45

  • Mazarin

  • Just can't stay away

  • Posts: 533

  • Since: 2008/12/10


require(XOOPS_ROOT_PATH.'/mainfile.php');
require(
XOOPS_ROOT_PATH.'/header.php');
$member_handler =& xoops_gethandler('member'); 
$uid is_object($xoopsUser) ? 
echo 
$uid;
$xoopsUser->getVar('uid') : 0
$groups =& $member_handler->getGroupsByUser($uidtrue); 
$usergroups = array(); 
$groups =& $member_handler->getGroupsByUser($uidtrue); 
foreach (
$groups as $group) { 
    
$usergroups[] = $group->getVar('name'); 


if (
in_array('mygroup'$usergroups)) { 
    
//$xoopsTpl->assign('hasPrivileges', true);
echo "Access"
} else {
echo 
"No access";
}



Actually, I haven't made any changes to your code, except adding a couple of lines printing the uid and verifying which clause of the if I'm in. In the theme, the only modification I've made to globalnav.html is an include statement to include the php file where I've written the code.
<{include_php file="$xoops_rootpath/themes/blueday_dynamique/xotpl/checkusergroup.php" }>


No other changes to the theme whatsoever.

Now, when I print out the uid, I only get 0, and of course I only get the No Access text from the false if clause. If I use the same code on a "separate" php page in a module, the code works perfectly. It's just when trying to use it with the theme navigation bar that it doesn't work and I would really like to know why.



419
Mazarin
Re: Paid access to some parts of the website
  • 2009/1/18 15:48

  • Mazarin

  • Just can't stay away

  • Posts: 533

  • Since: 2008/12/10


Yeah, that's the neat way of doing it. It's just a matter of negating the statement.

Anyway, trabis, do you have any idea what's causing my problems with the "navigation version" of this? Can I provide some other information that will aid in solving this?



420
Mazarin
Re: Paid access to some parts of the website
  • 2009/1/18 13:12

  • Mazarin

  • Just can't stay away

  • Posts: 533

  • Since: 2008/12/10


if (in_array('mygroup'$usergroups)) {

} else {
   echo 
"text not for 'mygroup' users";
}


But maybe that's not what you were after?




TopTop
« 1 ... 39 40 41 (42) 43 44 »



Login

Who's Online

65 user(s) are online (42 user(s) are browsing Support Forums)


Members: 0


Guests: 65


more...

Donat-O-Meter

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

Latest GitHub Commits