Bravo List

Bravo List (http://www.bvlist.com/index.php)
-   Template Shares (http://www.bvlist.com/forumdisplay.php?f=26)
-   -   Read Rules before ... (http://www.bvlist.com/showthread.php?t=9356)

Marco 30th July 2013 12:03

Read Rules before ...
 
Hello i am interested a script to read (rules, pm's) before any action (ex. download or shout)

Thanks.

On tbdev exists something like " vote on poll before shut"

firefly007 31st July 2013 22:04

I'm not using TSSE but this should work in TSSE 5.6


1) Run this sql

PHP Code:

ALTER TABLE `usersADD `read_rulesenum('yes','no'COLLATE utf8_unicode_ci NOT NULL DEFAULT 'no'
ALTER TABLE `usersADD `read_faqenum('yes','no'COLLATE utf8_unicode_ci NOT NULL DEFAULT 'no'
ALTER TABLE `usersADD `read_agreeenum('yes','no'COLLATE utf8_unicode_ci NOT NULL DEFAULT 'no' 

2 Add this to the pages you want to force to read first

PHP Code:

$resread mysql_query("SELECT read_rules, read_faq, read_agree  FROM users WHERE id = '" $CURUSER["id"] . "'" ) or sqlerr();
    
$rowread mysql_fetch_array($resread);
    if (
$rowread['read_rules'] != 'yes' || $rowread['read_faq'] != 'yes' || $rowread['read_agree'] != 'yes' ){
    exit(
'You need to read rules, FAQ and Agreement');


3 Add this to rules
PHP Code:

mysql_query("UPDATE users SET read_rules = 'yes' WHERE id= '"$CURUSER["id"] . "'") or sqlerr(); 

Add this to faq
PHP Code:

mysql_query("UPDATE users SET read_faq = 'yes' WHERE id= '"$CURUSER["id"] . "'") or sqlerr(); 

5 Add this to agreement
PHP Code:

mysql_query("UPDATE read_agree SET read_agree = 'yes' WHERE id= '"$CURUSER["id"] . "'") or sqlerr(); 


eckeO5 27th August 2013 18:54

1 Attachment(s)
thx firefly mf ))

i have taken that to set up for a little message box in shoutbox
to all users that havenīt yet reported their up- and download speed
in profiles.

all know tracker teams fell very nerved after a while when users donīt enroll dsl speed.

an here it goes:

in outputinfo.php search:
PHP Code:

$extralink '&popupshoutbox=yes';

  } 

after that fill in:
PHP Code:

$resspeed mysql_query("SELECT speed FROM users WHERE id = '" $CURUSER["id"] . "'") or sqlerr();
$rowread mysql_fetch_array($resspeed);
if (
$rowread['speed'] == '0~0') {
print(
"<center><div id='newmes' style='position: absolute;z-index:1;filter:alpha(opacity=80);-moz-opacity: 0.80;opacity: 0.80;left:35%;width: 700px;'><table class=\"tableinborder\"  width=\"91%\" cellpadding\"=1\" cellspacing=\"1\" ><tr><td class=tablecat><div style='float: left;' ><b>ACHTUNG: Bitte an die Regeln halten $unread</b></div><div style='float: right;'><a href=\"javascript:closenmw('newmes');\" style='cursor:hand;' title='Fenster Schliessen'>X</a></div></td></tr><tr><td bgcolor=green >Du hast Deinen Up- & Download Speed bisher nicht eingetragen, klicke <a href='usercp.php?act=edit_details'>HIER</a> um erforderliche Daten einzutragen</td></tr><tr><td class='tableb'><center><a href=\"javascript:nmwcookie('newmes','newmes',5);closenmw('newmes');\" title=''></a>&nbsp;&nbsp;<a href=\"javascript:nmwcookie('newmes','newmes',10);closenmw('newmes');\" title=''></a></center></td></tr></table></div></center>");


at the end of the php find:
PHP Code:

?> 

after that fill in:
PHP Code:

<script language='javascript'>
function 
closenmw(div){
  if(
document.getElementById(div).style.display 'block')
    
document.getElementById(div).style.display 'none';
}
function 
nmwcookie(Bezeichner,Wert,Dauer)
   {
      
jetzt=new Date();
      
Auszeit=new Date(jetzt.getTime()+Dauer*6000);
      
document.cookie=Bezeichner+"="+Wert+";expires="+Auszeit.toGMTString()+";";
   }
</script> 

not all done completly, but its a beginning...

actual it is looking like this:


may be some1 has an idea how to show the "hint" as an overlay f.e.


All times are GMT +2. The time now is 23:48.

Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.