vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   hackers - will this code work... (https://vborg.vbsupport.ru/showthread.php?t=170883)

SpreadingLight 02-18-2008 10:21 PM

hackers - will this code work...
 
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

Quote:

Originally Posted by Lynne (Post 1446266)
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 [DATE]1203403445[/DATE] at [TIME]1203403445[/TIME] ---------------

Quote:

Originally Posted by punchbowl (Post 1446264)
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

Quote:

Originally Posted by punchbowl (Post 1446264)
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?

[high]* Marco van Herwaarden scratches head[/high]

@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

Quote:

Originally Posted by Marco van Herwaarden (Post 1446446)
Why do you need access to say if a certain modification will work on a certain vB version?

[high]* Marco van Herwaarden scratches head[/high]

I wasn't being serious sorry:o


All times are GMT. The time now is 07:33 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01079 seconds
  • Memory Usage 1,729KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete