51
xgarb
Re: Hiding blocks for one usergroup
  • 2008/4/18 18:35

  • xgarb

  • Not too shy to talk

  • Posts: 154

  • Since: 2003/3/30


I've pretty much achieved what I wanted. Possibly not the prettiest way to do this but here's what I did..

I created a new user group and gave it view permission for all the advert blocks. I then removed view permission for those blocks from the registered users group.

Now I need to copy all registered users into the new group so they continue to see ads.

---------

The following SQL

SELECT uid FROM your_db_prefix_groups_users_link WHERE groupid = 2

gives you a table of all registered users

exporting to SQL gives rows like this..

INSERT INTO `your_db_prefix_groups_users_link` VALUES(1);
INSERT INTO `your_db_prefix_groups_users_link` VALUES(5);
INSERT INTO `your_db_prefix_groups_users_link` VALUES(8);
etc.

I copied this into Dreamweaver and did the following find and replace...

find VALUES( replace with (groupid,uid) VALUES (4,

to give

INSERT INTO `your_db_prefix_groups_users_link` (groupid,uid) VALUES (4,1);
INSERT INTO `your_db_prefix_groups_users_link` (groupid,uid) VALUES (4,5);
INSERT INTO `your_db_prefix_groups_users_link` (groupid,uid) VALUES (4,8);
etc.

Importing this to my database adds all registered users to the usergroup id 4 (the basic usergroup that sees ads)

so now all those members are seeing ads again.

-----

Now I need to get all new signups to see the ads as well so in modules/smartprofile/register.php I added the following line..

return _PROFILE_MA_REGISTERNG;
}
 
//line below is my hack to add new user to basic member group
$member_handler->addUserToGroup(4$newid);
if (
$xoopsModuleConfig['activation_type'] == 1) {


around line 188

---------

to remove subscribers from group id 4 (so they don't see adverts) I added the following line to the end of the addUserSubscription in include/functions in the subscription module from Third Eye.

$deletesql "DELETE FROM " XOOPS_DB_PREFIX "_groups_users_link WHERE groupid = 4 AND uid = $uid"// my hack to remove subscriber from basic member group


I've not tested the last part but the rest seems to work ok.



52
xgarb
Hiding blocks for one usergroup
  • 2008/4/15 12:12

  • xgarb

  • Not too shy to talk

  • Posts: 154

  • Since: 2003/3/30


On my site I have

1) Blocks containing adverts that the anon and registered users have view permissions for.
2) A new group for paid subscribers who should not see adverts.

I know normally you move people into a group with view permissions for blocks that they should see. However in this case moving paid subscibers out of the registered users group causes lots of problems with modules and would be a headache to go through all of them giving access permissions fot the paid subscribers group.

So ideally I would like to keep paid subscribers as part of the registered users group.

Anyone have a clever solution?

I'm thinking of creating a new group maybe called Basic Member and giving view pemission for the ad blocks to that and then adding all registered users to that on signing up but removing them when they buy a subscription.

Or maybe a hack in the theme that skips that numbered block for subscribers.

Could do with a negative block assigning system. So a block can be hidden for a certain user group. Not easy to implement I imagine.



53
xgarb
Re: Show us the $$$....!
  • 2008/4/11 9:26

  • xgarb

  • Not too shy to talk

  • Posts: 154

  • Since: 2003/3/30


somebody think of the children users!

I bet you find at the bottom of this a few idiots that are sitting back and trying to have fun at the expensive of most of the other members of this and the other CMS. I bet if you spoke to 99% of the people on here and there they would be happy for open collaboration between the two projects.

It doesn't matter if someone chooses their product over zoops. It's not a commercial enterprise, it's open source. It's done for the fun!

Would a poster get flamed for suggesting a different linux distro on the ubuntu forums?

That's the great thing about open source.. if someone does something better then you can use that code and make your package better.



54
xgarb
Re: Private Message System V2 Wishlist
  • 2008/4/11 8:50

  • xgarb

  • Not too shy to talk

  • Posts: 154

  • Since: 2003/3/30


Core Module? Shipped with the core, developed with the core but installed as a module.

Then if someone wants to use an alternative or hack it they won't be affected when a new core comes out.

So when you download XOOPS you get the core + the core modules.



55
xgarb
Re: Private Message System V2 Wishlist
  • 2008/4/9 15:04

  • xgarb

  • Not too shy to talk

  • Posts: 154

  • Since: 2003/3/30


agree with irmtfan.. should be a module if possible. Not all sites will want it. Some sites might choose to use one PM module where another type might fit other sites better.

Group level permissions.. ie Group A can store x, ie Group B can store y would be cool.

Would good be if a user could search their own messages.


Personally I would avoid any Hotmail style AJAX.. yeauch!



56
xgarb
Re: REALLY REALLY NEED HELP !!!
  • 2008/3/26 19:23

  • xgarb

  • Not too shy to talk

  • Posts: 154

  • Since: 2003/3/30


Warning: XoopsModule::include_once(/modules/freegames/language/english/modinfo.php) [function.XoopsModule-include-once]: failed to open stream: No such file or directory in file /kernel/module.php line 193

maybe some modules not where they should be? Trying making them inactive.



57
xgarb
Re: REALLY REALLY NEED HELP !!!
  • 2008/3/26 15:42

  • xgarb

  • Not too shy to talk

  • Posts: 154

  • Since: 2003/3/30


You're using an alpha version of xoops. It's just for testing an evaluation not production sites.

You should use 2.0.18.1 for public sites.



58
xgarb
Re: Xoops Comment system Improvement
  • 2008/3/24 11:32

  • xgarb

  • Not too shy to talk

  • Posts: 154

  • Since: 2003/3/30


a note of caution:

Fancy AJAX features may prevent google from being able to read and therefore index the content of your page.

If traditionally on your site you have a lot of keyword rich comments you may want these readable to google.



59
xgarb
Re: Multiple SQL injection exploit in xtorrent module
  • 2008/3/15 14:55

  • xgarb

  • Not too shy to talk

  • Posts: 154

  • Since: 2003/3/30


Thanks Vaughan for sticking with that explanation to the end.

Wishcraft - Thanks for the work you're doing for XOOPS but you really need to keep an open mind when it comes to web server security and potential problems - exploits are rarely obvious these days.

I'm working my way through this book at the moment.. it's well reviewed...http://www.oreilly.com/catalog/phpsec/



60
xgarb
Re: Unable to install weblog....
  • 2008/3/6 17:55

  • xgarb

  • Not too shy to talk

  • Posts: 154

  • Since: 2003/3/30


shouldn't the if statment be..

if (strtolower(get_class($entry)) != 'weblogentry')

? extra bracket after $entry)




TopTop
« 1 ... 3 4 5 (6) 7 8 9 ... 14 »



Login

Who's Online

155 user(s) are online (107 user(s) are browsing Support Forums)


Members: 0


Guests: 155


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