Bravo List
Register
Go Back   > Bravo List > Source Code > Archived Trackers > Template Shares
Reply
Thread Tools
  #1  
Old 30th July 2013, 12:03
Marco Marco is offline
Senior Member
 
Join Date: Jun 2009
Seychelles
Posts: 327
Default 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"
Reply With Quote
  #2  
Old 31st July 2013, 22:04
firefly007's Avatar
firefly007 firefly007 is offline
SUPPORT GURU
 
Join Date: Jun 2010
P2P
Posts: 721
Default
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(); 
__________________




Please Support Majority Report


You can contact me on Skype live:phesadent.elect but please let me know first.


If you are ever need me desperately then please email me at dan.oak44@gmail.com and I will contact u within a week.


Due to free time I'm able to help interested member's with their tracker.

Please Note!
Depending on your requests I will charge you for my assistance for Tracker installs and mods.
All my mods are custom and prices will very depending on the request.
I'm able to install any tracker and mods including themes.

Please PM me


Last edited by firefly007; 27th August 2013 at 20:02.
Reply With Quote
The Following 2 Users Say Thank You to firefly007 For This Useful Post:
FENIX (29th August 2013), Marco (1st August 2013)
  #3  
Old 27th August 2013, 18:54
eckeO5 eckeO5 is offline
Senior Member
 
Join Date: Jan 2011
P2P
Posts: 117
Talking
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><br></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.
Attached Thumbnails
speedhinweis.png  

Last edited by eckeO5; 28th August 2013 at 17:14.
Reply With Quote
The Following 2 Users Say Thank You to eckeO5 For This Useful Post:
FENIX (29th August 2013), Marco (29th August 2013)
Reply

Tags
read , rules


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT +2. The time now is 12:27. vBulletin skin by ForumMonkeys. Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.