The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Custom Cursor on / off
Hi !!
Is there a way to set a (or more) custom-cursor(s) in my forums and my members can switch the cursor(s) on or off in there options?? Currently i using in headinclude something like: CURSOR: url('cursor.cur'); Can anyone help? |
#2
|
||||
|
||||
In my opinon. That would bulk up the forums.. But that is not what you think maybe.
|
#3
|
||||
|
||||
I can't do this myself but I know that it will be quite hard to set up. At least I think... You'll need to use Javascript... *Shudders*
|
#4
|
||||
|
||||
Why would it be hard?
Im sure you could just add a field to the user table, something like: [sql]ALTER TABLE user ADD customcursor smallint(6) DEFAULT '0' NOT NULL[/sql] Then just edit member.php and set the queries to update the user etc, then edit the modifyoptions template, and add a radio button section with "Use custom cursor?", and then "yes" and "no" options... Then just edit global.php, and do a check on the user to see if they use the custom cursor, something like: Code:
if ($bbuserinfo[customcursor]==1) { $cursorcode = "the cursor code"; }else{ $cursorcode = ""; } Im sure it can be done that way Satan |
#5
|
||||
|
||||
Cool thank you Chris!!
Can you code something for me/us? Would be very cool!! |
#6
|
||||
|
||||
I could try
Satan |
#7
|
||||
|
||||
Cool!! Thanks chris!!
|
#8
|
||||
|
||||
Heh...I had coded it earlier, but our stupid internet cutoff:bored:
Here you go! Run this sql query: [sql]ALTER TABLE user ADD customcursor smallint(6) DEFAULT '0' NOT NULL[/sql] Open forum/member.php Find: Code:
if ($bbuserinfo[emailnotification]) { $emailnotificationchecked="checked"; $emailnotificationnotchecked=""; } else { $emailnotificationchecked=""; $emailnotificationnotchecked="checked"; } Code:
if ($bbuserinfo[customcursor]) { $customcursorchecked="checked"; $customcursornotchecked=""; } else { $customcursorchecked=""; $customcursornotchecked="checked"; } Code:
$emailnotification=iif($emailnotification=="yes",1,0); Code:
$customcursor=iif($customcursor=="yes",1,0); Code:
$DB_site->query("UPDATE user SET ".$updatestyles."adminemail='$adminemail', showemail='$showemail',invisible='$invisible',cookieuser='$cookieuser', maxposts='".addslashes($umaxposts)."',daysprune='".addslashes($prunedays)."', timezoneoffset='".addslashes($timezoneoffset)."',emailnotification='$emailnotification', startofweek='".addslashes($startofweek)."',options='$options',receivepm='$receivepm', emailonpm='$emailonpm',pmpopup='$pmpopup',usergroupid='$bbuserinfo[usergroupid]', nosessionhash='$nosessionhash' WHERE userid='$bbuserinfo[userid]'"); Code:
$DB_site->query("UPDATE user SET ".$updatestyles."adminemail='$adminemail', showemail='$showemail',invisible='$invisible',cookieuser='$cookieuser', maxposts='".addslashes($umaxposts)."',daysprune='".addslashes($prunedays)."', timezoneoffset='".addslashes($timezoneoffset)."',emailnotification='$emailnotification',customcursor='$customcursor', startofweek='".addslashes($startofweek)."',options='$options',receivepm='$receivepm', emailonpm='$emailonpm',pmpopup='$pmpopup',usergroupid='$bbuserinfo[usergroupid]', nosessionhash='$nosessionhash' WHERE userid='$bbuserinfo[userid]'"); Find: Code:
<tr> <td bgcolor="{secondaltcolor}"><normalfont><b>Use 'Email Notification' by default?</b></normalfont><br> <smallfont>Using this option emails you whenever someone replies to a thread that you have participated in.</smallfont></td> <td bgcolor="{secondaltcolor}"><normalfont> <input type="radio" name="emailnotification" value="yes" $emailnotificationchecked> yes <input type="radio" name="emailnotification" value="no" $emailnotificationnotchecked> no </normalfont></td> </tr> Code:
<tr> <td bgcolor="{secondaltcolor}"><normalfont><b>Use Custom Cursor?</b></normalfont><br> <smallfont>Using this option sets your Cursor to the Custom Cursor set by the Administrator.</smallfont></td> <td bgcolor="{secondaltcolor}"><normalfont> <input type="radio" name="customcursor" value="yes" $customcursorchecked> yes <input type="radio" name="customcursor" value="no" $customcursornotchecked> no </normalfont></td> </tr> Find: Code:
// ###################### Referrer Stuff ######################### // Referer stuff if ($bbuserinfo['userid']==0 and $usereferrer and !$bbreferrerid and $referrerid) { if ($r_id = $DB_site->query_first("SELECT userid FROM user WHERE userid = '".addslashes($referrerid)."'")) { vbsetcookie("bbreferrerid",$r_id[userid]); } } Code:
if ($bbuserinfo[customcursor]==1) { $cursorcode = "the cursor code"; }else{ $cursorcode = ""; } Satan |
#9
|
||||
|
||||
This saves my life!!!
Thank you so much Chris!!! Btw: ...this could be ready to put in Full Releases! |
#10
|
||||
|
||||
Here, i put it in a Txt-File...
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|