vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   Miscellaneous Hacks - Rules and User Agreement Hack (https://vborg.vbsupport.ru/showthread.php?t=97699)

dxguru 02-13-2006 11:09 AM

What would be good is this ...

Instead of having to set up a 2nd page to use for the MEMBERINFO link, why not have that link go to a templated page that shows the text you have entered in the rule?

TeaTree 02-14-2006 08:16 AM

Installed really easliy and works brilliantly-Thanks!

blackpudding 02-16-2006 10:47 PM

i'm having problems with this on our board. the problem seems to happen after midnight. the agreement keeps coming up, and often after you tick it the next page says that the post was too short and the text box comes back blank, which wipes your message out!

i've just reset it manually and it seems ok again.

any ideas? thanks

designBox 02-18-2006 09:27 AM

This is exactly what i was looking for.
Thank you very much for this usefull (and needed) contribution.

INSTALL clicked. :)

dxguru 02-21-2006 07:03 AM

I tried copying the "Agreed Rules" from the MEMBERINFO template to the USERCP template but nothing shows up.

Has anybody been able to do this successfully?

dxguru 02-23-2006 03:23 AM

Have also found a possible bug ... rules are working fine except they appear when a member first views the forum even though I dont have that option selected (I do have all the others ticked)

dxguru 02-23-2006 03:33 AM

Another issue ...

I have a rule that covers 'all' forums (using the hack provided earlier) and an additional rule for a specific forum.

If I go to the specific forum I will get the Site Rule and then access to the forum. What happened to the forum specific rule?

ryansmith 03-01-2006 03:54 AM

I have an issue too.

I have been using this for quite a while, and I love it. However, tonight I logged out of my forum and viewed it as a Guest. While in Guest mode, if I clicked on a forum, it brought me to the Rules I have set for that forum. I checked "I agree" and tried to proceed, but then it tells me I'm not logged in/must be a member.

I checked in the AdminCP under the "Edit Rule" option and the only usergroups selected are the registered members and my moderators... there's no checkbox next to Unregistered/Not logged in, COPPA, or Users Awaiting Email Confirmation.

Any idea how to work around this? I'd like guests to be able to see our forums still. I only need them to agree to the rules if they are joining and posting.

Ryan

Smiry Kin's 03-06-2006 06:04 AM

does this work with 3.5.4 ? i really need something like this? :S

Smiry Kin's 03-06-2006 06:38 AM

hmm seems to work in 3.5.4 no problem yet..

anyone have a rough spam template? if you get what i mean??. .lol

King Internet 03-11-2006 05:09 PM

i'll probably modify this like hell but thanks ;) saves me from writing my own for sure

one thing i'd like to see maybe in the base version is a javascript timer to wait at least like 20 seconds before they can click the agree button, most people might just breeze through it like the rules at registration.

Quarterbore 03-16-2006 09:03 PM

I got it installed and I am posting here so it is easier for me to find this later... I really needed this one lately!

bada_bing 03-16-2006 10:13 PM

Sounds like a great hack I will keep this in mind

jadkar 03-17-2006 03:09 AM

Did anyone ever figure out or fix why this hack will not work with MySQLi :(

I have this running in DEV with great results but it's not loading in my production environment because I use MySQLi there.

Conversely, does anyone know if I can disable MySQLi while my forum is up and running? Or can this only be enabled/disabled during the install??

If someone can answer my question it would be greatly appreciated :)

Thanks

IrPr 03-19-2006 01:20 AM

SQL ERROR !
when opening http://forum.domain.com/index.php?\
i got this error
caused by \ near quotation mark --> \'
Quote:

Database error in vBulletin 3.5.4:

Invalid SQL:
SELECT * FROM ruleshack
WHERE (fileurl LIKE 'http://forum.domain.com/index.php?\' AND exactmatch = 1 )
OR (fileurl LIKE 'http://forum.domain.com/index.php%' AND exactmatch = 0 ) AND active = 1 ORDER BY ruleid;

MySQL Error : 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 'http://forum.domain.com/index.php%' AND exactmatch = 0 ) AND active = 1 ORDER' at line 2
Error Number : 1064
Date : Saturday, March 18th 2006 @ 10:19:28 PM
Script : http://forum.domain.com/index.php?\
Referrer :
IP Address : PRIVATE;)
Username : ME!
Classname : vb_database
HOW TO FIX?

rmwebs 03-21-2006 09:06 PM

Does this alow google and other crawlers to be able to see the threads? Otherwise half your content wont get indexed...

kurtbarker 04-09-2006 03:20 PM

easy way to check this is *provided you have it installed* sign out of your forum, go directly to the thread link, and see if you get the rules page, or the content

TheHeartSmasher 04-17-2006 02:45 AM

Code:

Database error in vBulletin 3.5.4:

Invalid SQL:
SELECT * FROM vbruleshack
                        WHERE (fileurl LIKE 'http://www.teamcronus.net/forums/private.php' AND exactmatch = 1 )
                        OR (fileurl LIKE 'http://www.teamcronus.net/forums/private.php%' AND exactmatch = 0 ) AND active = 1 ORDER BY ruleid;

MySQL Error  : Table 'forumsvb.vbruleshack' doesn't exist
Error Number : 1146
Date        : Sunday, April 16th 2006 @ 08:43:45 PM
Script      : http://www.teamcronus.net/forums/private.php
Referrer    : http://www.teamcronus.net/forums/pri...=newpm&pmid=18
IP Address  : 000.000.000.000
Username    : TheHeartSmasher
Classname    : vb_database

I get that error when I installed the product

Rude Awakening 04-22-2006 04:38 PM

Excellent hack. Works perfect for what Im working on. You have no idea how much in need I was for something like this :)

Props!

antialiasis 04-22-2006 11:21 PM

When I try to import it, I get "Importing Product - Please Wait..." and it never seems to finish being imported.

JD210 04-24-2006 03:52 PM

Quote:

Originally Posted by vibe
When I click on agree and submit, browser takes me to this URL

Code:

http://www.agalico.com/php/php.exe?f=65...

Security Alert! The PHP CGI cannot be accessed directly.

This PHP CGI binary was compiled with force-cgi-redirect enabled. This means that a page will only be served up if the REDIRECT_STATUS CGI variable is set, e.g. via an Apache Action directive.


I ran into the exact same problem. Any idea why and what is causing it?

bashy 04-26-2006 04:58 PM

Hi peeps

I appear to have an uncached template for "forumrules"
The only thing that i can think of thats caused this would be this hack perhaps?

Can anyone advise please?

Rude Awakening 04-28-2006 02:08 PM

UAE if you ever manage to see this I've got a slight problem. I've noticed that some of the other guys have this issue too.

I wanted the Rules hack to only work for the Registered Users and not Guests. I wanted the Guests to freely surf the forums, but once registered, required to accept the Rules.

Right now even a guest is required to accept the hack which is pretty bad for Crawlers and Bots. I might be missing something but until then I'll have to uninstall.

Thanks.

Update:

Although I didnt find a way to solve the problem above, I did find a way around it. Instead of having it show up when "viewing" a thread I switched it to "new thread" and "new reply". Guests cant post replies or new threads on my forums anyways. :)

Sometimes you just gotta beat the system ;)

Bubble #5 05-04-2006 01:08 AM

How should we fix this?

Instead of becoming part of the Forums and Moderators section, it started its own Forum and Moderators section so now we have two of them showing :(

How/where do we rename it?

Bubble #5 05-04-2006 01:20 AM

What are the two new templates called, and where (what section) can we find them?

SimCityForum 05-04-2006 11:35 PM

I've discovered one can force a SQL error by adding a single quote to an URL for a registration confirmation (e.g. http://gfxcontests.com/register.html?a=act&u=312&i=19120597'). Apparently there isn't an error checking to clean URLs of stray single quotes before passing them into the SQL string to look for rules that belong to said URL.

A full version of the error result is:
Code:

Database error in vBulletin 3.5.3:

Invalid SQL:
SELECT * FROM tblruleshack
                        WHERE (fileurl LIKE 'http://gfxcontests.com/register.html?a=act&u=312&i=19120597'' AND exactmatch = 1 )
                        OR (fileurl LIKE 'http://gfxcontests.com/register.html%' AND exactmatch = 0 ) AND active = 1 ORDER BY ruleid;

MySQL Error  : 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 'http://gfxcontests.com/register.html%' AND exactmatch = 0 ) AND
Error Number : 1064
Date        : Thursday, May 4th 2006 @ 08:30:57 PM
Script      : http://gfxcontests.com/register.html?a=act&u=312&i=19120597'

Notice how feeding the extra single quote into the URL passes straight into the SQL statement. I could see someone exploiting this to force a SQL injection.

The solution to this error is to find the following statements in the product-rulesagreement.xml file;
Code:

                  $ruleneed = $vbulletin->db->query_first("SELECT * FROM " . TABLE_PREFIX . "ruleshack
                        WHERE (fileurl LIKE '" . $urluri . "' AND exactmatch = 1 )
                        OR (fileurl LIKE '" . $scripturl1 . "%' AND exactmatch = 0 ) AND active = 1 ORDER BY ruleid");

AND

Code:

                $sql = "SELECT * from " . TABLE_PREFIX . "ruleshack
                        WHERE
                        (
                        (forumid = $fid)
                        OR
                        (fileurl LIKE '" . $urluri . "' AND exactmatch = 1 )
                        OR
                        (fileurl LIKE '" . $scripturl1 . "%' AND exactmatch = 0 )
                        OR
                        (forumid IN ($parents))
                        )
                        AND
                        (ruleid not in (" . $vbulletin->userinfo['agreedrule'] . "))
                        AND
                        active = 1
                        ORDER BY ruleid";

and add the following code above the two statements above:
Code:

                  $urluri = addslashes($urluri);
                  $scripturl1 = addslashes($scripturl1);

If you have already installed this mod, then use the plugin manager to find "Hook Location : parse_templates" and edit "Rules And User Agreement" to add in the code above.

bashy 05-05-2006 07:04 AM

Hi

Whoopsy, wrong hack :o

arossphoto 05-13-2006 05:45 PM

Is there any way to use this with paid subscriptions, so the user has to agree to my rules regarding cancellations, refunds, etc?

Thanks,

Andrew

Bubble #5 05-13-2006 06:02 PM

Quote:

Originally Posted by arossphoto
Is there any way to use this with paid subscriptions, so the user has to agree to my rules regarding cancellations, refunds, etc?

Ummm... shouldn't that be handled before the initial payment is made? ;)

arossphoto 05-13-2006 06:25 PM

Quote:

Originally Posted by Bubble #5
Ummm... shouldn't that be handled before the initial payment is made? ;)

Yes, of course. That's what I'm talking about.

Bubble #5 05-13-2006 06:33 PM

Quote:

Originally Posted by arossphoto
Yes, of course. That's what I'm talking about.

Oh OK, 'cuss it sounded like you were trying to handle this at the time of the refund ;) You might want to have a look at Bills Easy PayPal hack. You could easily customize it for what you have in mind :)

arossphoto 05-13-2006 07:26 PM

Quote:

Originally Posted by Bubble #5
You might want to have a look at Bills Easy PayPal hack. You could easily customize it for what you have in mind :)

Really? Maybe I'll ask over there, but I had a look at it and I don't see any mention of rules or T&C prior to purchase.

JohnBee 05-17-2006 12:08 PM

Very strange..
I installed the hack and although everything slipped in without a hitch there is no rule or agreement popup when I enter the assigned forum.

I ran this before on an earlier forum, worked fine. But this time its as though its not even installed (front end wise) everything is there as far as the CP is concerned.

Any ideas?

JohnBee 05-17-2006 12:34 PM

Okay I found it!

This MOD "vbPluginOrder 1.0" does not seem to allow the agreement page to come up, I will look into it with the author.

thx

JohnBee 05-18-2006 03:46 PM

I have one small question, is it possible to adjust the size of the user agreement form? I find it a little short for my needs.

Robbed 05-19-2006 08:47 PM

Quote:

Originally Posted by JohnBee
I have one small question, is it possible to adjust the size of the user agreement form? I find it a little short for my needs.

I went to this template ruleshack_rulesbit

Found this line

<div class="page" style="border:thin inset; padding:$stylevar[cellpadding]px;<if condition="!is_browser('konqueror')"> height:750px; overflow:auto</if>">

Change the bolded number to suit your needs.

Robbed 05-19-2006 08:53 PM

When I use a forum link OR

from File URL e.g: http://www.DOAIMN.com/FORUM/file.php

Why does it apply to everyone?

JohnBee 05-19-2006 11:52 PM

Quote:

Originally Posted by Robbed
I went to this template ruleshack_rulesbit

Found this line

<div class="page" style="border:thin inset; padding:$stylevar[cellpadding]px;<if condition="!is_browser('konqueror')"> height:750px; overflow:auto</if>">

Change the bolded number to suit your needs.

I'm afraid that does not work :(
I think that is a conditional for overflow in alternate browsers or something not sure, whatever it is it does not change the height of the R&A form.

ang2el 05-20-2006 12:10 PM

it looks cool, I will install it

angB 05-29-2006 08:52 PM

I am getting this error each time I try and upload--> XML Error: not well-formed (invalid token) at Line 1 or XML Error: unknown at Line 0. What could be the challenge? Thanks!


All times are GMT. The time now is 08:54 PM.

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.02526 seconds
  • Memory Usage 1,835KB
  • 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
  • (6)bbcode_code_printable
  • (8)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete