vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Miscellaneous Hacks - VSa - Advanced Forum Rules (https://vborg.vbsupport.ru/showthread.php?t=236069)

MarkFL 07-18-2016 05:26 AM

Regarding your question about displaying the rules in the user-selected language, what I think I would do is use HTML in the defined rules, where each set of rules in the different languages is wrapped in a div element having a classname that is the language. For example:

HTML Code:

<div class="english">
        English rules here...
</div>

<div class="german">
        German rules here...
</div>

Then create a plugin hooked at "parse_templates" as follows:

PHP Code:

if (THIS_SCRIPT === 'misc')
{
    if (
$vbulletin->userinfo['languageid'] == '0')
    {
        
$css '.english {display: block;}.german {display: none;}';
    }
    else
    {
        
$css '.english {display: none;}.german {display: block;}';
    }

    
$template_hook['headinclude_css'] .= '<style>' $css '</style>';


Now, as to why you aren't able to edit your rules, I don't know. I am able to edit them on my dev and production sites. If you want, create a temporary admin account for me, and PM the login credentials to me, and I will be glad to come to your site and see if I can get both issues resolved. :)

dariyos 07-18-2016 06:32 AM

thanks a lot!

it works fine,
language ID = 4 is my english language..

Code:

if (THIS_SCRIPT === 'misc')
{
    if ($vbulletin->userinfo['languageid'] == '4')
    {
        $css = '.german {display: block;}.german {display: none;}';
    }
    else
    {
        $css = '.english {display: none;}.english {display: none;}';
    }

    $template_hook['headinclude_css'] .= '<style>' . $css . '</style>';


And the empty field is only because I putted html code to format the text..

my text shows like this:

Code:

<br>
<font size="3"><b>1. Verhalten im Forum:</b></font><br>
<br>
<b>?1 Seid freundlich und hilfsbereit zueinander</b><br>
Wenn du nichts Positives schreiben kannst, dann schreibe lieber nichts.<br>

When I edit this, it shows nothing.

when I put a text without html code, the text will be displayed, but without formatting.

MarkFL 07-18-2016 06:41 AM

If the languageid is 4 for English, then you want:

PHP Code:

if (THIS_SCRIPT === 'misc')
{
    if (
$vbulletin->userinfo['languageid'] == '4')
    {
        
$css '.english {display: block;}.german {display: none;}';
    }
    else
    {
        
$css '.english {display: none;}.german {display: block;}';
    }

    
$template_hook['headinclude_css'] .= '<style>' $css '</style>';


Can you post a screenshot of your product settings?

dariyos 07-18-2016 07:28 AM

thanks, it works.

These are my settings:

https://vborg.vbsupport.ru/external/2016/07/11.png

MarkFL 07-18-2016 08:11 AM

Okay, try disabling BB Codes in rules (that's the way I have mine set)...see if that allows you to edit. :)

Manipulation 04-17-2017 06:29 PM

Is it possible to have this added on to the top bar above the navbar?

FrankP 05-21-2018 06:51 AM

Quote:

Originally Posted by AusPhotography (Post 2498875)
Works fine for us on vB4.2.2.

You can generate you own reports via a database query, there are extra fields on the user table.


Soory, but may I ask how this query may look like? I can't get it when scanning the columns of the user table. I saw some "ALTER TABLE" in the products xml, but I cannot find the columns in the database (4.2.2-5). But the add on seems to work, at least it's shown only once, and this is all I need. But it would be helpful to have a chance to check if/when a specific user accepted the rules.

Many thanks in advance!

Abominus 05-23-2018 08:45 PM

Could this be used for the "General Data Protection Regulation - GDPR"?

djbaxter 05-23-2018 11:18 PM

Quote:

Originally Posted by Abominus (Post 2594881)
Could this be used for the "General Data Protection Regulation - GDPR"?

Yes but it's easier just to edit the FAQ and put a link in the footer or header.

z3r0 05-26-2018 08:59 AM

Quote:

Originally Posted by Abominus (Post 2594881)
Could this be used for the "General Data Protection Regulation - GDPR"?

Yep with some changes to the phrases it works quite well for GDPR policy consent, it's not perfect, but it's the best option atm without having something custom coded.


All times are GMT. The time now is 02:10 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.01837 seconds
  • Memory Usage 1,751KB
  • 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
  • (2)bbcode_code_printable
  • (1)bbcode_html_printable
  • (2)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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