Log in

View Full Version : hackers - will this code work...


SpreadingLight
02-18-2008, 10:21 PM
Would this type of code work with 3.6.8.pl2?






With this hack you can specify which usergroups can access to each paid subscription. If you don?t specify at least one usergroup the subscription will not be avalaible. Remember to edit your previous subscriptions or they will be unavailable.


1 query to run
1 phrase to add
2 files to edit

-------- PHRASE-----------

In Subscription Tools add a new phrase:
---------------------------------------------------------------
Varname: forusergroups
Text: Avalaible for usergroups. Example: 2,5,6,7
---------------------------------------------------------------

-------- QUERY -----------

Run this query to add a new definition (forusergroups) in table subscription:
---------------------------------------------------------------
ALTER TABLE subscription ADD forusergroups MEDIUMTEXT NOT NULL AFTER description;
---------------------------------------------------------------

-------- EDITIONS ----------

In Admincp/subscriptions.php
AFTER:
---------------------------------------------------------------
print_textarea_row($vbphrase['description'], 'sub[description]', $sub['description']);
---------------------------------------------------------------

ADD this to can input value of "forusergroups" in "Subscription Manager" of Admin CP:
---------------------------------------------------------------
print_input_row($vbphrase['forusergroups'], 'sub[forusergroups]', $sub['forusergroups']);
---------------------------------------------------------------


In forum/subscriptions.php
AFTER:
----------------------------------------------------------------
foreach ($subscriptioncache AS $subscription)
{
$show['will_extend'] = false;
----------------------------------------------------------------

ADD:
----------------------------------------------------------------
$forusergroups = $subscription['forusergroups'];
$forusergroupsarray = explode(",", $forusergroups);
----------------------------------------------------------------

FIND:
----------------------------------------------------------------
if ($subscription['active']
----------------------------------------------------------------
and REPLACE with:
----------------------------------------------------------------
if ($subscription['active'] AND in_array($bbuserinfo['usergroupid'], $forusergroupsarray))
----------------------------------------------------------------

#####################################

Remember to edit the previous subscription or they will not be available.


coded by
https://vborg.vbsupport.ru/showthread.php?t=81854

punchbowl
02-18-2008, 10:24 PM
give me your admin u/p and I'll check

Lynne
02-18-2008, 10:25 PM
I am pretty sure you are not suppose to be pasting the contents of a hack out here. If you are wondering if a hack will work for a certain version, you should post in the hack thread and ask.

SpreadingLight
02-19-2008, 04:42 AM
I am pretty sure you are not suppose to be pasting the contents of a hack out here. If you are wondering if a hack will work for a certain version, you should post in the hack thread and ask.

Oh okay (new to code etiquette).
I posted it here because that thread appears to be retired.

--------------- Added 1203403445 at 1203403445 ---------------

give me your admin u/p and I'll check

Thank you for the offer punchbowl. I'm unsure of security issues with sharing my details, but I appreciate your offer.

Marco van Herwaarden
02-19-2008, 07:52 AM
give me your admin u/p and I'll check
Why do you need access to say if a certain modification will work on a certain vB version?

* Marco van Herwaarden scratches head

@SpreadingLight
As a board admin you are responsible for the security of your board. Keeping login details known to only those who really need it is one of the first steps to take. Most problems can be solved on the forums without any need to have access to the members board.

Please only give out such access if it is really needed and only to trusted people.

punchbowl
02-19-2008, 08:27 AM
Why do you need access to say if a certain modification will work on a certain vB version?

* Marco van Herwaarden scratches head

I wasn't being serious sorry:o